diff options
author | Marius Kintel <marius@kintel.net> | 2013-11-25 05:27:15 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2013-11-25 05:27:15 (GMT) |
commit | de2db22b5f82855b9cf42829c4dde3b4bd231273 (patch) | |
tree | 555ed5e8885a41e253e9c6687e7c76b3ecce7cea /testdata | |
parent | 8496e5d7cc273680b61313b98a327dd9b355e28f (diff) |
Split projection tests into cut vs. project
Diffstat (limited to 'testdata')
-rw-r--r-- | testdata/scad/features/projection-cut-tests.scad | 15 | ||||
-rw-r--r-- | testdata/scad/features/projection-tests.scad | 28 |
2 files changed, 33 insertions, 10 deletions
diff --git a/testdata/scad/features/projection-cut-tests.scad b/testdata/scad/features/projection-cut-tests.scad new file mode 100644 index 0000000..0409a3e --- /dev/null +++ b/testdata/scad/features/projection-cut-tests.scad @@ -0,0 +1,15 @@ +// 2D child +projection(cut=true) { square(); } + +projection(cut=true) translate([20,0,0]) cube(10, center=true); + +// Boundary case: clipping the top of a cube +translate([0,20,0]) projection(cut=true) translate([0,0,-4.999999]) cube(10, center=true); + +// holes +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/testdata/scad/features/projection-tests.scad b/testdata/scad/features/projection-tests.scad index bc2111c..27d03fe 100644 --- a/testdata/scad/features/projection-tests.scad +++ b/testdata/scad/features/projection-tests.scad @@ -3,17 +3,25 @@ projection(); // No children projection() { } // 2D child -projection(cut=true) { square(); } +projection() { square(); } +// Simple 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,20,0]) projection(cut=true) translate([0,0,-4.999999]) cube(10, center=true); -// holes -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); } - } +// Two children +translate([-12,0]) projection(cut=false) { + cube(10); + difference() { + sphere(10); + cylinder(h=30, r=5, center=true); + } +} + +// Holes +translate([6,-12]) projection(cut=false) { + cube(10); + difference() { + sphere(10); + cylinder(h=30, r=5, center=true); + } } |