summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-06-15 22:46:12 (GMT)
committerkintel <kintel@b57f626f-c46c-0410-a088-ec61d464b74c>2010-06-15 22:46:12 (GMT)
commit0aee90946946191cf3a8d476f4c7c3dd7bd6265e (patch)
treecf80c54700382c6985eff16bd8709cf8eb7f4e08
parent04b5f3b96bb9715bce05201c8f295149cc72f2f6 (diff)
Added crash testcase for crash reported by Dan Zuras
git-svn-id: http://svn.clifford.at/openscad/trunk@559 b57f626f-c46c-0410-a088-ec61d464b74c
-rw-r--r--testdata/scad/polyset-reduce-crash.scad38
-rw-r--r--testdata/scad/polyset-reduce-crash.txt4
2 files changed, 42 insertions, 0 deletions
diff --git a/testdata/scad/polyset-reduce-crash.scad b/testdata/scad/polyset-reduce-crash.scad
new file mode 100644
index 0000000..ce9fae7
--- /dev/null
+++ b/testdata/scad/polyset-reduce-crash.scad
@@ -0,0 +1,38 @@
+N=20;
+
+rotate (a = [0, 0, 36]) {
+ union() {
+ translate ([1, 0]) {
+ polygon (points = [[(N - 1)*cos(180/N), -(N - 1)*sin(180/N)],
+ [(N - 3)*cos(270/N), -(N - 3)*sin(270/N)],
+ [(N - 1)*cos(270/N), -(N - 1)*sin(270/N)]]);
+
+ polygon (points = [[(N - 1)*cos(180/N), -(N - 1)*sin(180/N)],
+ [(N - 3)*cos(180/N), -(N - 3)*sin(180/N)],
+ [(N - 3)*cos(270/N), -(N - 3)*sin(270/N)]]);
+
+ polygon (points = [[N - 1, 0], [N - 3, 0],
+ [(N - 3)*cos(180/N), -(N - 3)*sin(180/N)]]);
+
+ polygon (points = [[N - 1, 0],
+ [(N - 3)*cos(180/N), -(N - 3)*sin(180/N)],
+ [(N - 1)*cos(180/N), -(N - 1)*sin(180/N)]]);
+
+ polygon (points = [[N - 1, 0], [N - 3, 0],
+ [(N - 3)*cos(180/N), (N - 3)*sin(180/N)]]);
+
+ polygon (points = [[N - 1, 0],
+ [(N - 3)*cos(180/N), (N - 3)*sin(180/N)],
+ [(N - 1)*cos(180/N), (N - 1)*sin(180/N)]]);
+
+ polygon (points = [[(N - 1)*cos(180/N), (N - 1)*sin(180/N)],
+ [(N - 3)*cos(180/N), (N - 3)*sin(180/N)],
+ [(N - 3)*cos(270/N), (N - 3)*sin(270/N)]]);
+
+ polygon (points = [[(N - 1)*cos(180/N), (N - 1)*sin(180/N)],
+ [(N - 3)*cos(270/N), (N - 3)*sin(270/N)],
+ [(N - 1)*cos(270/N), (N - 1)*sin(270/N)]]);
+ }
+ circle (r = 20);
+ }
+}
diff --git a/testdata/scad/polyset-reduce-crash.txt b/testdata/scad/polyset-reduce-crash.txt
new file mode 100644
index 0000000..bc9e8d5
--- /dev/null
+++ b/testdata/scad/polyset-reduce-crash.txt
@@ -0,0 +1,4 @@
+This testcase causes a crash in PolySet::PolyReducer::add_edges().
+It appears to be because we collapse two close vertices into the same
+vertex. This is handled by just abort()'ing.
+
contact: Jan Huwald // Impressum