diff options
Diffstat (limited to 'testdata/scad/features/projection-tests.scad')
-rw-r--r-- | testdata/scad/features/projection-tests.scad | 31 |
1 files changed, 19 insertions, 12 deletions
diff --git a/testdata/scad/features/projection-tests.scad b/testdata/scad/features/projection-tests.scad index e6c52ea..27d03fe 100644 --- a/testdata/scad/features/projection-tests.scad +++ b/testdata/scad/features/projection-tests.scad @@ -3,18 +3,25 @@ projection(); // No children projection() { } // 2D child -projection(cut=true) { square(); } +projection() { 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); +// Simple +projection(cut=false) cube(10); -// 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); +// Two children +translate([-12,0]) projection(cut=false) { + cube(10); + difference() { + sphere(10); + cylinder(h=30, r=5, 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); } - } +// Holes +translate([6,-12]) projection(cut=false) { + cube(10); + difference() { + sphere(10); + cylinder(h=30, r=5, center=true); + } +} |