summaryrefslogtreecommitdiff
path: root/testdata
diff options
context:
space:
mode:
authorMarius Kintel <marius@kintel.net>2014-01-16 03:23:50 (GMT)
committerMarius Kintel <marius@kintel.net>2014-01-16 03:23:50 (GMT)
commitbf0d9edf38132049a2d8a8f5de4d6e70657a8870 (patch)
tree5559625acd9496f855fd7e377b75ce5318cf7d21 /testdata
parent1fc52f8cd47213131e0eb76ccf184b5c7388c6b9 (diff)
Change behavior of intersection: intersecting something with an empty object will be empty
Diffstat (limited to 'testdata')
-rw-r--r--testdata/scad/features/intersection-tests.scad19
1 files changed, 19 insertions, 0 deletions
diff --git a/testdata/scad/features/intersection-tests.scad b/testdata/scad/features/intersection-tests.scad
index 4a1d7e3..d4e32db 100644
--- a/testdata/scad/features/intersection-tests.scad
+++ b/testdata/scad/features/intersection-tests.scad
@@ -39,3 +39,22 @@ translate([-12,12,0]) intersection() {
cube([10,10,10], center=true);
translate([0,-9.99,-9.99]) cube([10,10,10], center=true);
}
+
+// Intersecting something with nothing
+translate([0,-12,0]) intersection() {
+ cylinder(r=4, h=5, center=true);
+ cube(0);
+}
+
+// Intersecting 2D with 3D
+translate([12,-12,0]) intersection() {
+ cube([5,5,5], center=true);
+ circle(r=2);
+}
+
+// Non-geometry (echo) statement as first child should be ignored
+translate([24,-12,0]) intersection() {
+ echo("difference-tests");
+ cube([5,5,5], center=true);
+ cylinder(r=2, h=20, center=true);
+}
contact: Jan Huwald // Impressum