Added crash testcase for crash reported by Dan Zuras

git-svn-id: http://svn.clifford.at/openscad/trunk@559 b57f626f-c46c-0410-a088-ec61d464b74c
stl_dim
kintel 2010-06-15 22:46:12 +00:00
parent 04b5f3b96b
commit 0aee909469
2 changed files with 42 additions and 0 deletions

38
testdata/scad/polyset-reduce-crash.scad vendored Normal file
View File

@ -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);
}
}

View File

@ -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.