summaryrefslogtreecommitdiff
path: root/testdata/scad
diff options
context:
space:
mode:
Diffstat (limited to 'testdata/scad')
-rw-r--r--testdata/scad/bugs/minkowski-crash.scad26
-rw-r--r--testdata/scad/features/import_stl-tests.scad2
-rw-r--r--testdata/scad/functions/inf-tests.scad23
3 files changed, 51 insertions, 0 deletions
diff --git a/testdata/scad/bugs/minkowski-crash.scad b/testdata/scad/bugs/minkowski-crash.scad
new file mode 100644
index 0000000..46419ba
--- /dev/null
+++ b/testdata/scad/bugs/minkowski-crash.scad
@@ -0,0 +1,26 @@
+/*
+ Originally reported by nop head 20120107:
+ This causes a CGAL assertion in minkowski on some platforms and CGAL versions:
+ o CGAL-3.6, 3.8 Linux
+ o Windows (OpenSCAD-2011.12 binaries)
+
+ The problem is that minkowski leaves the target polyhedron in a corrupt state
+ causing a crash. This is worked around in CGALEvaluator::process().
+
+ CGAL-3.9 appears to just process forever.
+*/
+$fn = 30;
+minkowski() {
+ union() {
+ cube([10, 10, 10], center=true);
+
+ cylinder(r=2, h=15, center=true);
+
+ rotate([90, 0, 0])
+ cylinder(r=2, h=15, center=true);
+
+ rotate([0, 90, 0])
+ cylinder(r=2, h=15, center=true);
+ }
+ sphere(3);
+}
diff --git a/testdata/scad/features/import_stl-tests.scad b/testdata/scad/features/import_stl-tests.scad
index b634d12..7104078 100644
--- a/testdata/scad/features/import_stl-tests.scad
+++ b/testdata/scad/features/import_stl-tests.scad
@@ -1 +1,3 @@
import_stl("import.stl");
+translate([2,0,0]) import("import.stl");
+translate([4,0,0]) import("import_bin.stl");
diff --git a/testdata/scad/functions/inf-tests.scad b/testdata/scad/functions/inf-tests.scad
new file mode 100644
index 0000000..87b6823
--- /dev/null
+++ b/testdata/scad/functions/inf-tests.scad
@@ -0,0 +1,23 @@
+echo(1/0);
+echo(-1/0);
+echo(sin(1/0));
+echo(cos(1/0));
+echo(tan(1/0));
+echo(asin(1/0));
+echo(acos(1/0));
+echo(atan(1/0));
+echo(atan(-1/0));
+echo(atan2(1/0, -1/0));
+echo(ceil(1/0));
+echo(floor(1/0));
+echo(exp(2, 1/0));
+echo(ln(1/0));
+echo(log(1/0));
+echo(max(-1/0, 1/0));
+echo(min(-1/0, 1/0));
+echo(pow(2, 1/0));
+echo(round(1/0));
+echo(sign(1/0));
+echo(sign(-1/0));
+echo(sqrt(1/0));
+echo(sqrt(-1/0)); \ No newline at end of file
contact: Jan Huwald // Impressum