summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2013-11-20 06:27:46 (GMT)
committerMarius Kintel <marius@kintel.net>2013-11-20 06:27:46 (GMT)
commit2162aaed64d4c60c4821fbb89f7eae3e37130011 (patch)
treedc1a9efe2dd605a1fe4cf49089e0492a9898ce32
parent3e3caaa62500431b047072d3ecf1e5e3fdd7e502 (diff)
Split up projection tests to avoid long running times
-rw-r--r--testdata/scad/features/projection-extrude-tests.scad3
-rw-r--r--testdata/scad/features/projection-tests.scad19
-rw-r--r--tests/CMakeLists.txt4
-rw-r--r--tests/regression/cgalpngtest/projection-extrude-tests-expected.pngbin0 -> 8789 bytes
-rw-r--r--tests/regression/cgalpngtest/projection-tests-expected.pngbin5836 -> 7793 bytes
-rw-r--r--tests/regression/dumptest/projection-extrude-tests-expected.csg20
-rw-r--r--tests/regression/dumptest/projection-tests-expected.csg51
-rw-r--r--tests/regression/opencsgtest/projection-extrude-tests-expected.pngbin0 -> 9460 bytes
-rw-r--r--tests/regression/opencsgtest/projection-tests-expected.pngbin6531 -> 8176 bytes
-rw-r--r--tests/regression/throwntogethertest/projection-extrude-tests-expected.pngbin0 -> 9460 bytes
-rw-r--r--tests/regression/throwntogethertest/projection-tests-expected.pngbin5865 -> 8176 bytes
11 files changed, 48 insertions, 49 deletions
diff --git a/testdata/scad/features/projection-extrude-tests.scad b/testdata/scad/features/projection-extrude-tests.scad
new file mode 100644
index 0000000..d9c216c
--- /dev/null
+++ b/testdata/scad/features/projection-extrude-tests.scad
@@ -0,0 +1,3 @@
+// Linear extrude
+translate([22,0,0]) linear_extrude(height=20) projection(cut=true) translate([0,0,9]) sphere(r=10);
+translate([44,0,0]) linear_extrude(height=20) projection(cut=true) translate([0,0,7]) sphere(r=10);
diff --git a/testdata/scad/features/projection-tests.scad b/testdata/scad/features/projection-tests.scad
index e6c52ea..bc2111c 100644
--- a/testdata/scad/features/projection-tests.scad
+++ b/testdata/scad/features/projection-tests.scad
@@ -5,16 +5,15 @@ projection() { }
// 2D child
projection(cut=true) { square(); }
-linear_extrude(height=20) projection(cut=false) sphere(r=10);
-translate([22,0,0]) linear_extrude(height=20) projection(cut=true) translate([0,0,9]) sphere(r=10);
-translate([44,0,0]) linear_extrude(height=20) projection(cut=true) translate([0,0,7]) sphere(r=10);
-
+projection(cut=false) cube(10);
+projection(cut=true) translate([20,0,0]) cube(10, center=true);
// Boundary case: clipping the top of a cube
-translate([0,-22,0]) linear_extrude(height=5) projection(cut=true) translate([0,0,-4.999999]) cube(10, center=true);
+translate([0,20,0]) projection(cut=true) translate([0,0,-4.999999]) cube(10, center=true);
// holes
-translate([0,-44,0]) linear_extrude(height=5) projection(cut=true)
- union() {
- difference() { cube(5,center=true); cube(4,center=true); }
- translate([2.1,2.1]) difference() { cube(5,center=true); cube(4,center=true); }
- }
+translate([0,-10,0]) projection(cut=true) {
+ union() {
+ difference() { cube(5,center=true); cube(4,center=true); }
+ translate([2.1,2.1]) difference() { cube(5,center=true); cube(4,center=true); }
+ }
+}
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 4be8245..3d3aad1 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -834,12 +834,8 @@ disable_tests(cgalpngtest_child-background
# Test config handling
set_test_config(Heavy opencsgtest_minkowski3-tests
- opencsgtest_projection-tests
openscad-csgpng_minkowski3-tests
- openscad-csgpng_projection-tests
throwntogethertest_minkowski3-tests
- throwntogethertest_projection-tests
- cgalpngtest_projection-tests
cgalpngtest_rotate_extrude-tests
cgalpngtest_surface-tests
cgalpngtest_sphere-tests
diff --git a/tests/regression/cgalpngtest/projection-extrude-tests-expected.png b/tests/regression/cgalpngtest/projection-extrude-tests-expected.png
new file mode 100644
index 0000000..b5d7338
--- /dev/null
+++ b/tests/regression/cgalpngtest/projection-extrude-tests-expected.png
Binary files differ
diff --git a/tests/regression/cgalpngtest/projection-tests-expected.png b/tests/regression/cgalpngtest/projection-tests-expected.png
index 2610507..3be3654 100644
--- a/tests/regression/cgalpngtest/projection-tests-expected.png
+++ b/tests/regression/cgalpngtest/projection-tests-expected.png
Binary files differ
diff --git a/tests/regression/dumptest/projection-extrude-tests-expected.csg b/tests/regression/dumptest/projection-extrude-tests-expected.csg
new file mode 100644
index 0000000..0199ea0
--- /dev/null
+++ b/tests/regression/dumptest/projection-extrude-tests-expected.csg
@@ -0,0 +1,20 @@
+group() {
+ multmatrix([[1, 0, 0, 22], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
+ linear_extrude(height = 20, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
+ projection(cut = true, convexity = 0) {
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 9], [0, 0, 0, 1]]) {
+ sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
+ }
+ }
+ }
+ }
+ multmatrix([[1, 0, 0, 44], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
+ linear_extrude(height = 20, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
+ projection(cut = true, convexity = 0) {
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 7], [0, 0, 0, 1]]) {
+ sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
+ }
+ }
+ }
+ }
+}
diff --git a/tests/regression/dumptest/projection-tests-expected.csg b/tests/regression/dumptest/projection-tests-expected.csg
index 86423a1..da3e5ce 100644
--- a/tests/regression/dumptest/projection-tests-expected.csg
+++ b/tests/regression/dumptest/projection-tests-expected.csg
@@ -4,52 +4,33 @@ group() {
projection(cut = true, convexity = 0) {
square(size = [1, 1], center = false);
}
- linear_extrude(height = 20, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
- projection(cut = false, convexity = 0) {
- sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
- }
+ projection(cut = false, convexity = 0) {
+ cube(size = [10, 10, 10], center = false);
}
- multmatrix([[1, 0, 0, 22], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
- linear_extrude(height = 20, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
- projection(cut = true, convexity = 0) {
- multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 9], [0, 0, 0, 1]]) {
- sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
- }
- }
+ projection(cut = true, convexity = 0) {
+ multmatrix([[1, 0, 0, 20], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
+ cube(size = [10, 10, 10], center = true);
}
}
- multmatrix([[1, 0, 0, 44], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
- linear_extrude(height = 20, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
- projection(cut = true, convexity = 0) {
- multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 7], [0, 0, 0, 1]]) {
- sphere($fn = 0, $fa = 12, $fs = 2, r = 10);
- }
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 20], [0, 0, 1, 0], [0, 0, 0, 1]]) {
+ projection(cut = true, convexity = 0) {
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -4.999999], [0, 0, 0, 1]]) {
+ cube(size = [10, 10, 10], center = true);
}
}
}
- multmatrix([[1, 0, 0, 0], [0, 1, 0, -22], [0, 0, 1, 0], [0, 0, 0, 1]]) {
- linear_extrude(height = 5, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
- projection(cut = true, convexity = 0) {
- multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -4.999999], [0, 0, 0, 1]]) {
- cube(size = [10, 10, 10], center = true);
+ multmatrix([[1, 0, 0, 0], [0, 1, 0, -10], [0, 0, 1, 0], [0, 0, 0, 1]]) {
+ projection(cut = true, convexity = 0) {
+ union() {
+ difference() {
+ cube(size = [5, 5, 5], center = true);
+ cube(size = [4, 4, 4], center = true);
}
- }
- }
- }
- multmatrix([[1, 0, 0, 0], [0, 1, 0, -44], [0, 0, 1, 0], [0, 0, 0, 1]]) {
- linear_extrude(height = 5, center = false, convexity = 1, scale = [1, 1], $fn = 0, $fa = 12, $fs = 2) {
- projection(cut = true, convexity = 0) {
- union() {
+ multmatrix([[1, 0, 0, 2.1], [0, 1, 0, 2.1], [0, 0, 1, 0], [0, 0, 0, 1]]) {
difference() {
cube(size = [5, 5, 5], center = true);
cube(size = [4, 4, 4], center = true);
}
- multmatrix([[1, 0, 0, 2.1], [0, 1, 0, 2.1], [0, 0, 1, 0], [0, 0, 0, 1]]) {
- difference() {
- cube(size = [5, 5, 5], center = true);
- cube(size = [4, 4, 4], center = true);
- }
- }
}
}
}
diff --git a/tests/regression/opencsgtest/projection-extrude-tests-expected.png b/tests/regression/opencsgtest/projection-extrude-tests-expected.png
new file mode 100644
index 0000000..d68bd59
--- /dev/null
+++ b/tests/regression/opencsgtest/projection-extrude-tests-expected.png
Binary files differ
diff --git a/tests/regression/opencsgtest/projection-tests-expected.png b/tests/regression/opencsgtest/projection-tests-expected.png
index 9aabe36..b808ffe 100644
--- a/tests/regression/opencsgtest/projection-tests-expected.png
+++ b/tests/regression/opencsgtest/projection-tests-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/projection-extrude-tests-expected.png b/tests/regression/throwntogethertest/projection-extrude-tests-expected.png
new file mode 100644
index 0000000..d68bd59
--- /dev/null
+++ b/tests/regression/throwntogethertest/projection-extrude-tests-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/projection-tests-expected.png b/tests/regression/throwntogethertest/projection-tests-expected.png
index 3be3ae0..b808ffe 100644
--- a/tests/regression/throwntogethertest/projection-tests-expected.png
+++ b/tests/regression/throwntogethertest/projection-tests-expected.png
Binary files differ
contact: Jan Huwald // Impressum