diff options
author | don bright <hugh.m.bright@gmail.com> | 2013-01-28 02:42:20 (GMT) |
---|---|---|
committer | don bright <hugh.m.bright@gmail.com> | 2013-01-28 02:42:20 (GMT) |
commit | 1e64dddf1ea30282c89de7f35854a68614234652 (patch) | |
tree | 165d37c1c66f6ff79d48c74794238b3f0bed09da /testdata/scad | |
parent | 5c779159c208ca3d88c88479ab29f9cd66574859 (diff) | |
parent | d0856efe6da545693f9c50a8a2514a9f999ab5ef (diff) |
Merge branch 'master' of github.com:openscad/openscad into issue159
Diffstat (limited to 'testdata/scad')
-rw-r--r-- | testdata/scad/bugs/issue204.scad | 5 | ||||
-rw-r--r-- | testdata/scad/bugs/transform-nan-inf-tests.scad | 12 | ||||
-rw-r--r-- | testdata/scad/features/background-modifier.scad | 1 | ||||
-rw-r--r-- | testdata/scad/features/control-hull-dimension.scad | 4 | ||||
-rw-r--r-- | testdata/scad/features/difference-tests.scad | 6 | ||||
-rw-r--r-- | testdata/scad/features/disable-modifier.scad | 1 | ||||
-rw-r--r-- | testdata/scad/features/highlight-and-background-modifier.scad | 2 | ||||
-rw-r--r-- | testdata/scad/features/highlight-modifier.scad | 1 | ||||
-rw-r--r-- | testdata/scad/features/hull3-tests.scad | 11 | ||||
-rw-r--r-- | testdata/scad/misc/recursion-tests.scad | 2 |
10 files changed, 45 insertions, 0 deletions
diff --git a/testdata/scad/bugs/issue204.scad b/testdata/scad/bugs/issue204.scad new file mode 100644 index 0000000..f2e8152 --- /dev/null +++ b/testdata/scad/bugs/issue204.scad @@ -0,0 +1,5 @@ +// Causes a CGAL assertion in CGALEvaluator::process() +e=0.000; +for (m = [ [ [ 0, 1, 0], [ 0, 0, 1], [ 1, 0, 0] ], + [ [-1, 0, e], [ 0,-1, 0], [ 0, 0,-1] ] ] ) + multmatrix (m) cube([1,5,1], center=true); diff --git a/testdata/scad/bugs/transform-nan-inf-tests.scad b/testdata/scad/bugs/transform-nan-inf-tests.scad new file mode 100644 index 0000000..cb8a667 --- /dev/null +++ b/testdata/scad/bugs/transform-nan-inf-tests.scad @@ -0,0 +1,12 @@ +// Test translation by NaN and Infinity +// cube()s should not be rendered + +// NaN +sphere(); +rotate([0, 0, asin(1.1) ]) cube(); + +// Infinity (as of 2012-08 this is detected as NaN) +translate([4,0,0]) { + sphere(); + rotate([0, 0, 1/0]) cube(); +} diff --git a/testdata/scad/features/background-modifier.scad b/testdata/scad/features/background-modifier.scad index ec7b28d..5430472 100644 --- a/testdata/scad/features/background-modifier.scad +++ b/testdata/scad/features/background-modifier.scad @@ -2,3 +2,4 @@ difference() { sphere(r=10); %cylinder(h=30, r=6, center=true); } +%if (true) cube([25,6,3], center=true); diff --git a/testdata/scad/features/control-hull-dimension.scad b/testdata/scad/features/control-hull-dimension.scad new file mode 100644 index 0000000..c8736db --- /dev/null +++ b/testdata/scad/features/control-hull-dimension.scad @@ -0,0 +1,4 @@ +hull() { + circle(1); + echo(1); +} diff --git a/testdata/scad/features/difference-tests.scad b/testdata/scad/features/difference-tests.scad index 3bcd9e5..b770764 100644 --- a/testdata/scad/features/difference-tests.scad +++ b/testdata/scad/features/difference-tests.scad @@ -28,3 +28,9 @@ translate([24,0,0]) difference() { cube([10,10,10], center=true); translate([0,0,6.99]) cylinder(r=4, h=4, center=true); } + +// Subtracting something from nothing +translate([24,12,0]) difference() { + cube([0,10,10], center=true); + # cylinder(r=4, h=20, center=true); +} diff --git a/testdata/scad/features/disable-modifier.scad b/testdata/scad/features/disable-modifier.scad index b47e074..2b75339 100644 --- a/testdata/scad/features/disable-modifier.scad +++ b/testdata/scad/features/disable-modifier.scad @@ -2,3 +2,4 @@ difference() { *sphere(r=10); cylinder(h=30, r=6, center=true); } +*if (true) cube([25,6,3], center=true); diff --git a/testdata/scad/features/highlight-and-background-modifier.scad b/testdata/scad/features/highlight-and-background-modifier.scad index 945d6b4..5dca703 100644 --- a/testdata/scad/features/highlight-and-background-modifier.scad +++ b/testdata/scad/features/highlight-and-background-modifier.scad @@ -1,8 +1,10 @@ difference() { sphere(r=10); %#cylinder(h=30, r=6, center=true); + %#if (true) cube([6,25,3], center=true); } translate([13,0,0]) difference() { sphere(r=10); #%cylinder(h=30, r=6, center=true); + #%if (true) cube([6,25,3], center=true); } diff --git a/testdata/scad/features/highlight-modifier.scad b/testdata/scad/features/highlight-modifier.scad index 1156a88..f228d08 100644 --- a/testdata/scad/features/highlight-modifier.scad +++ b/testdata/scad/features/highlight-modifier.scad @@ -2,3 +2,4 @@ difference() { sphere(r=10); #cylinder(h=30, r=6, center=true); } +#if (true) cube([25,6,3], center=true); diff --git a/testdata/scad/features/hull3-tests.scad b/testdata/scad/features/hull3-tests.scad index 12c8a11..e3fc8e7 100644 --- a/testdata/scad/features/hull3-tests.scad +++ b/testdata/scad/features/hull3-tests.scad @@ -15,3 +15,14 @@ translate([25,0,0]) hull() { cylinder(r=5, h=5, center=true); } } + +// Don't Crash (issue 188) + +translate([-5,-5,-5]) { + hull() { + intersection() { + cube([1,1,1]); + translate([-1,-1,-1]) cube([1,1,1]); + } + } +} diff --git a/testdata/scad/misc/recursion-tests.scad b/testdata/scad/misc/recursion-tests.scad new file mode 100644 index 0000000..2a07b91 --- /dev/null +++ b/testdata/scad/misc/recursion-tests.scad @@ -0,0 +1,2 @@ +function crash() = crash(); +echo(crash()); |