summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDon Bright <hugh.m.bright@gmail.com>2013-12-15 03:58:22 (GMT)
committerDon Bright <hugh.m.bright@gmail.com>2013-12-15 03:58:22 (GMT)
commitf12237a9c4b39349da673456e7e309562ed0f75a (patch)
tree79a248808a882562a0eaf722aec3dd57efc9207f
parent36db9de870262110ea74ffa136b92f49e1dd650d (diff)
add tests for non-planar bug. add docs to .cc code
-rw-r--r--src/dxftess-cgal.cc49
-rw-r--r--testdata/scad/bugs/nonplanar_polyhedron.scad131
-rw-r--r--tests/CMakeLists.txt4
-rw-r--r--tests/regression/cgalpngtest/nonplanar_polyhedron-expected.pngbin0 -> 6465 bytes
-rw-r--r--tests/regression/dumptest/nonplanar_polyhedron-expected.csg3
-rw-r--r--tests/regression/opencsgtest/nonplanar_polyhedron-expected.pngbin0 -> 6740 bytes
-rw-r--r--tests/regression/throwntogethertest/nonplanar_polyhedron-expected.pngbin0 -> 6740 bytes
7 files changed, 178 insertions, 9 deletions
diff --git a/src/dxftess-cgal.cc b/src/dxftess-cgal.cc
index 6899598..ebdcf58 100644
--- a/src/dxftess-cgal.cc
+++ b/src/dxftess-cgal.cc
@@ -336,8 +336,28 @@ void dxf_tesselate(PolySet *ps, DxfData &dxf, double rot, Vector2d scale, bool u
}
}
+
+/* Tessellation of 3d PolySet with near-planar polygons.
+
+We do this by projecting each polygon of the Polyset onto a 2-d plane,
+then running a tessellation algorithm on the projected polygon. Then we
+project the generated 2d triangles back up into 3d space.
+
+(in reality as of writing, we dont need to do a back-projection from 2d->3d
+because the algorithm we are using doesn't create any new points, and we can
+just use a 'map' to associate 3d points to 2d points).
+
+The code assumes the input polygons are simple, non-intersecting, without
+holes, and without duplicate input points.
+
+For more info, please see github #issue349. This code enables
+polyhedron() to use near-planar polygons rather than perfectly planar
+polygons. */
+
typedef enum { XYPLANE, YZPLANE, XZPLANE, NONE } projection_t;
+// this is how we make 3d points appear as though they were 2d points to
+//the tessellation algorithm.
Vector2d get_projected_point( Vector3d v, projection_t projection ) {
Vector2d v2(0,0);
if (projection==XYPLANE) { v2.x() = v.x(); v2.y() = v.y(); }
@@ -347,9 +367,13 @@ Vector2d get_projected_point( Vector3d v, projection_t projection ) {
}
CGAL_Point_3 cgp( Vector3d v ) { return CGAL_Point_3( v.x(), v.y(), v.z() ); }
-/* near-planar polygons in 3d can be projected into 2d, but you have to
-be careful. if you project, say, 0,0,0 0,1,0 0,1,1 0,0,1 onto the XY plane
-you will not get a polygon, you will get a skinny line thing. */
+
+/* Find a 'good' 2d projection for a given 3d polygon. the XY, YZ, or XZ
+plane. This is needed because near-planar polygons in 3d can have 'bad'
+projections into 2d. For example if the square 0,0,0 0,1,0 0,1,1 0,0,1
+is projected onto the XY plane you will not get a polygon, you wil get
+a skinny line thing. It's better to project that square onto the yz
+plane.*/
projection_t find_good_projection( PolySet::Polygon pgon ) {
// step 1 - find 3 non-collinear points in the input
if (pgon.size()<3) return NONE;
@@ -368,8 +392,8 @@ projection_t find_good_projection( PolySet::Polygon pgon ) {
// step 2 - find which direction is best for projection. planes use
// the equation ax+by+cz+d = 0. a,b, and c determine the direction the
// plane is in. we want to find which projection of the 'normal vector'
- // would make the smallest shadow if projected onto the given plane.
- // 'quadrance' (distance squared) can tell this w/o using sqrt.
+ // would make the smallest shadow if projected onto the XY, YZ, or XZ
+ // plane. 'quadrance' (distance squared) can tell this w/o using sqrt.
CGAL::Plane_3<CGAL_Kernel3> pl( cgp(v1), cgp(v2), cgp(v3) );
NT3 qxy = pl.a()*pl.a()+pl.b()*pl.b();
NT3 qyz = pl.b()*pl.b()+pl.c()*pl.c();
@@ -380,6 +404,11 @@ projection_t find_good_projection( PolySet::Polygon pgon ) {
return XZPLANE;
}
+/* triangulate the given polygon using CGAL's Constrained Delaunay
+algorithm. project the polygon's points using the given projection
+before performing the triangulation. this code assumes input polygon is
+simple, no holes, no self-intersections, no duplicate points, and
+properly oriented. */
void triangulate_polygon( const PolySet::Polygon &pgon, std::vector<PolySet::Polygon> &triangles, projection_t projection )
{
CDT cdt;
@@ -431,9 +460,11 @@ void triangulate_polygon( const PolySet::Polygon &pgon, std::vector<PolySet::Pol
}
}
-/* given a 3d PolySet with 'near planar' faces, triangulate the faces.
-See Issue 340... this is so CGAL Nef Polyhedron will accept them.
-This code assumes the input polyset has simple polygon faces with no holes. */
+/* Given a 3d PolySet with 'near planar' polygonal faces, Tessellate the
+faces. As of writing, our only tessellation method is Triangulation
+using CGAL's Constrained Delaunay algorithm. This code assumes the input
+polyset has simple polygon faces with no holes, no self intersections, and no
+duplicate points. */
void tessellate_3d_faces( const PolySet &inps, PolySet &outps ) {
PRINTB("tess 3d %i",inps.polygons.size());
PRINTB("%s < input ps",inps.dump());
@@ -455,3 +486,5 @@ void tessellate_3d_faces( const PolySet &inps, PolySet &outps ) {
PRINTB("%s < output ps",outps.dump());
}
+// End of the Tessellation of PolySet polygons
+
diff --git a/testdata/scad/bugs/nonplanar_polyhedron.scad b/testdata/scad/bugs/nonplanar_polyhedron.scad
new file mode 100644
index 0000000..b92d57e
--- /dev/null
+++ b/testdata/scad/bugs/nonplanar_polyhedron.scad
@@ -0,0 +1,131 @@
+// test polyhedrons where the facets are not, stritcly speaking, planar,
+// but instead "near planar". see issue #349 in github.
+polyhedron(points = [[-10., -13.090169943749475, -34.270509831248425],
+[-10., -13.090169943749475, 34.270509831248425],
+[-10., 13.090169943749475, -34.270509831248425],
+[-10., 13.090169943749475, 34.270509831248425],
+[-5., -5., -37.3606797749979], [-5., -5., 37.3606797749979],
+[-5., 5., -37.3606797749979], [-5., 5., 37.3606797749979],
+[-5., -37.3606797749979, -5.], [-5., -37.3606797749979, 5.],
+[-5., -21.18033988749895, -31.18033988749895],
+[-5., -21.18033988749895, 31.18033988749895], [-5., 37.3606797749979, -5.],
+[-5., 37.3606797749979, 5.], [-5., 21.18033988749895, -31.18033988749895],
+[-5., 21.18033988749895, 31.18033988749895], [5., -5., -37.3606797749979],
+[5., -5., 37.3606797749979], [5., 5., -37.3606797749979],
+[5., 5., 37.3606797749979], [5., -37.3606797749979, -5.],
+[5., -37.3606797749979, 5.], [5., -21.18033988749895, -31.18033988749895],
+[5., -21.18033988749895, 31.18033988749895], [5., 37.3606797749979, -5.],
+[5., 37.3606797749979, 5.], [5., 21.18033988749895, -31.18033988749895],
+[5., 21.18033988749895, 31.18033988749895], [10., -13.090169943749475,
+ -34.270509831248425], [10., -13.090169943749475, 34.270509831248425],
+[10., 13.090169943749475, -34.270509831248425],
+[10., 13.090169943749475, 34.270509831248425],
+[-34.270509831248425, -10., -13.090169943749475],
+[-34.270509831248425, -10., 13.090169943749475],
+[-34.270509831248425, 10., -13.090169943749475],
+[-34.270509831248425, 10., 13.090169943749475],
+[-29.270509831248425, -18.090169943749473, -16.18033988749895],
+[-29.270509831248425, -18.090169943749473, 16.18033988749895],
+[-29.270509831248425, 18.090169943749473, -16.18033988749895],
+[-29.270509831248425, 18.090169943749473, 16.18033988749895],
+[-18.090169943749473, -16.18033988749895, -29.270509831248425],
+[-18.090169943749473, -16.18033988749895, 29.270509831248425],
+[-18.090169943749473, 16.18033988749895, -29.270509831248425],
+[-18.090169943749473, 16.18033988749895, 29.270509831248425],
+[-13.090169943749475, -34.270509831248425, -10.],
+[-13.090169943749475, -34.270509831248425, 10.],
+[-13.090169943749475, -24.270509831248425, -26.18033988749895],
+[-13.090169943749475, -24.270509831248425, 26.18033988749895],
+[-13.090169943749475, 24.270509831248425, -26.18033988749895],
+[-13.090169943749475, 24.270509831248425, 26.18033988749895],
+[-13.090169943749475, 34.270509831248425, -10.],
+[-13.090169943749475, 34.270509831248425, 10.],
+[-26.18033988749895, -13.090169943749475, -24.270509831248425],
+[-26.18033988749895, -13.090169943749475, 24.270509831248425],
+[-26.18033988749895, 13.090169943749475, -24.270509831248425],
+[-26.18033988749895, 13.090169943749475, 24.270509831248425],
+[-37.3606797749979, -5., -5.], [-37.3606797749979, -5., 5.],
+[-37.3606797749979, 5., -5.], [-37.3606797749979, 5., 5.],
+[-16.18033988749895, -29.270509831248425, -18.090169943749473],
+[-16.18033988749895, -29.270509831248425, 18.090169943749473],
+[-16.18033988749895, 29.270509831248425, -18.090169943749473],
+[-16.18033988749895, 29.270509831248425, 18.090169943749473],
+[-31.18033988749895, -5., -21.18033988749895],
+[-31.18033988749895, -5., 21.18033988749895],
+[-31.18033988749895, 5., -21.18033988749895],
+[-31.18033988749895, 5., 21.18033988749895],
+[-21.18033988749895, -31.18033988749895, -5.],
+[-21.18033988749895, -31.18033988749895, 5.],
+[-21.18033988749895, 31.18033988749895, -5.],
+[-21.18033988749895, 31.18033988749895, 5.],
+[-24.270509831248425, -26.18033988749895, -13.090169943749475],
+[-24.270509831248425, -26.18033988749895, 13.090169943749475],
+[-24.270509831248425, 26.18033988749895, -13.090169943749475],
+[-24.270509831248425, 26.18033988749895, 13.090169943749475],
+[16.18033988749895, -29.270509831248425, -18.090169943749473],
+[16.18033988749895, -29.270509831248425, 18.090169943749473],
+[16.18033988749895, 29.270509831248425, -18.090169943749473],
+[16.18033988749895, 29.270509831248425, 18.090169943749473],
+[24.270509831248425, -26.18033988749895, -13.090169943749475],
+[24.270509831248425, -26.18033988749895, 13.090169943749475],
+[24.270509831248425, 26.18033988749895, -13.090169943749475],
+[24.270509831248425, 26.18033988749895, 13.090169943749475],
+[37.3606797749979, -5., -5.], [37.3606797749979, -5., 5.],
+[37.3606797749979, 5., -5.], [37.3606797749979, 5., 5.],
+[21.18033988749895, -31.18033988749895, -5.],
+[21.18033988749895, -31.18033988749895, 5.],
+[21.18033988749895, 31.18033988749895, -5.],
+[21.18033988749895, 31.18033988749895, 5.],
+[13.090169943749475, -34.270509831248425, -10.],
+[13.090169943749475, -34.270509831248425, 10.],
+[13.090169943749475, -24.270509831248425, -26.18033988749895],
+[13.090169943749475, -24.270509831248425, 26.18033988749895],
+[13.090169943749475, 24.270509831248425, -26.18033988749895],
+[13.090169943749475, 24.270509831248425, 26.18033988749895],
+[13.090169943749475, 34.270509831248425, -10.],
+[13.090169943749475, 34.270509831248425, 10.],
+[26.18033988749895, -13.090169943749475, -24.270509831248425],
+[26.18033988749895, -13.090169943749475, 24.270509831248425],
+[26.18033988749895, 13.090169943749475, -24.270509831248425],
+[26.18033988749895, 13.090169943749475, 24.270509831248425],
+[31.18033988749895, -5., -21.18033988749895],
+[31.18033988749895, -5., 21.18033988749895],
+[31.18033988749895, 5., -21.18033988749895],
+[31.18033988749895, 5., 21.18033988749895],
+[18.090169943749473, -16.18033988749895, -29.270509831248425],
+[18.090169943749473, -16.18033988749895, 29.270509831248425],
+[18.090169943749473, 16.18033988749895, -29.270509831248425],
+[18.090169943749473, 16.18033988749895, 29.270509831248425],
+[29.270509831248425, -18.090169943749473, -16.18033988749895],
+[29.270509831248425, -18.090169943749473, 16.18033988749895],
+[29.270509831248425, 18.090169943749473, -16.18033988749895],
+[29.270509831248425, 18.090169943749473, 16.18033988749895],
+[34.270509831248425, -10., -13.090169943749475],
+[34.270509831248425, -10., 13.090169943749475],
+[34.270509831248425, 10., -13.090169943749475],
+[34.270509831248425, 10., 13.090169943749475]],faces =
+[[41, 53, 65, 67, 55, 43, 3, 7, 5, 1], [100, 104, 106, 102, 110, 30, 18, 16,
+ 28, 108], [11, 1, 5, 17, 29, 23], [18, 30, 26, 14, 2, 6],
+[33, 37, 73, 69, 68, 72, 36, 32, 56, 57], [91, 90, 82, 114, 118, 86, 87,
+ 119, 115, 83], [81, 113, 117, 85, 84, 116, 112, 80, 88, 89],
+[59, 58, 34, 38, 74, 70, 71, 75, 39, 35], [0, 10, 22, 28, 16, 4],
+[15, 27, 31, 19, 7, 3], [64, 52, 40, 0, 4, 6, 2, 42, 54, 66],
+[19, 31, 111, 103, 107, 105, 101, 109, 29, 17], [96, 110, 102, 114, 82, 78],
+[53, 41, 47, 61, 73, 37], [43, 49, 15, 3], [94, 108, 28, 22],
+[23, 29, 109, 95], [2, 14, 48, 42], [36, 72, 60, 46, 40, 52],
+[79, 83, 115, 103, 111, 97], [69, 45, 9, 8, 44, 68],
+[24, 98, 90, 91, 99, 25], [77, 95, 109, 101, 113, 81],
+[42, 48, 62, 74, 38, 54], [40, 46, 10, 0], [97, 111, 31, 27],
+[44, 8, 20, 92, 76, 94, 22, 10, 46, 60], [63, 51, 13, 25, 99, 79, 97, 27,
+ 15, 49], [26, 30, 110, 96], [1, 11, 47, 41], [55, 39, 75, 63, 49, 43],
+[80, 112, 100, 108, 94, 76], [48, 14, 26, 96, 78, 98, 24, 12, 50, 62],
+[61, 47, 11, 23, 95, 77, 93, 21, 9, 45], [71, 70, 50, 12, 13, 51],
+[93, 89, 88, 92, 20, 21], [102, 106, 118, 114], [65, 53, 37, 33],
+[74, 62, 50, 70], [77, 81, 89, 93], [101, 105, 117, 113], [66, 54, 38, 34],
+[73, 61, 45, 69], [78, 82, 90, 98], [32, 36, 52, 64], [115, 119, 107, 103],
+[92, 88, 80, 76], [71, 51, 63, 75], [56, 32, 64, 66, 34, 58],
+[107, 119, 87, 85, 117, 105], [35, 39, 55, 67], [112, 116, 104, 100],
+[99, 91, 83, 79], [68, 44, 60, 72], [57, 59, 35, 67, 65, 33],
+[116, 84, 86, 118, 106, 104], [4, 16, 18, 6], [7, 19, 17, 5],
+[12, 24, 25, 13], [9, 21, 20, 8], [56, 58, 59, 57], [85, 87, 86, 84]]
+);
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 3d3aad1..7db0874 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -794,12 +794,14 @@ list(APPEND DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/localfiles_dir/localfiles-compatibility-test.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allexpressions.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allfunctions.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allmodules.scad)
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allmodules.scad
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/nonplanar_polyhedron.scad)
list(APPEND CGALPNGTEST_FILES ${FEATURES_FILES} ${SCAD_DXF_FILES} ${EXAMPLE_FILES})
list(APPEND CGALPNGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/include-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/use-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/transform-nan-inf-tests.scad
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/nonplanar_polyhedron.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/localfiles-test.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/localfiles_dir/localfiles-compatibility-test.scad)
diff --git a/tests/regression/cgalpngtest/nonplanar_polyhedron-expected.png b/tests/regression/cgalpngtest/nonplanar_polyhedron-expected.png
new file mode 100644
index 0000000..3c69083
--- /dev/null
+++ b/tests/regression/cgalpngtest/nonplanar_polyhedron-expected.png
Binary files differ
diff --git a/tests/regression/dumptest/nonplanar_polyhedron-expected.csg b/tests/regression/dumptest/nonplanar_polyhedron-expected.csg
new file mode 100644
index 0000000..a3c1b81
--- /dev/null
+++ b/tests/regression/dumptest/nonplanar_polyhedron-expected.csg
@@ -0,0 +1,3 @@
+group() {
+ polyhedron(points = [[-10, -13.09016994374, -34.27050983124], [-10, -13.09016994374, 34.27050983124], [-10, 13.09016994374, -34.27050983124], [-10, 13.09016994374, 34.27050983124], [-5, -5, -37.36067977499], [-5, -5, 37.36067977499], [-5, 5, -37.36067977499], [-5, 5, 37.36067977499], [-5, -37.36067977499, -5], [-5, -37.36067977499, 5], [-5, -21.18033988749, -31.18033988749], [-5, -21.18033988749, 31.18033988749], [-5, 37.36067977499, -5], [-5, 37.36067977499, 5], [-5, 21.18033988749, -31.18033988749], [-5, 21.18033988749, 31.18033988749], [5, -5, -37.36067977499], [5, -5, 37.36067977499], [5, 5, -37.36067977499], [5, 5, 37.36067977499], [5, -37.36067977499, -5], [5, -37.36067977499, 5], [5, -21.18033988749, -31.18033988749], [5, -21.18033988749, 31.18033988749], [5, 37.36067977499, -5], [5, 37.36067977499, 5], [5, 21.18033988749, -31.18033988749], [5, 21.18033988749, 31.18033988749], [10, -13.09016994374, -34.27050983124], [10, -13.09016994374, 34.27050983124], [10, 13.09016994374, -34.27050983124], [10, 13.09016994374, 34.27050983124], [-34.27050983124, -10, -13.09016994374], [-34.27050983124, -10, 13.09016994374], [-34.27050983124, 10, -13.09016994374], [-34.27050983124, 10, 13.09016994374], [-29.27050983124, -18.09016994374, -16.18033988749], [-29.27050983124, -18.09016994374, 16.18033988749], [-29.27050983124, 18.09016994374, -16.18033988749], [-29.27050983124, 18.09016994374, 16.18033988749], [-18.09016994374, -16.18033988749, -29.27050983124], [-18.09016994374, -16.18033988749, 29.27050983124], [-18.09016994374, 16.18033988749, -29.27050983124], [-18.09016994374, 16.18033988749, 29.27050983124], [-13.09016994374, -34.27050983124, -10], [-13.09016994374, -34.27050983124, 10], [-13.09016994374, -24.27050983124, -26.18033988749], [-13.09016994374, -24.27050983124, 26.18033988749], [-13.09016994374, 24.27050983124, -26.18033988749], [-13.09016994374, 24.27050983124, 26.18033988749], [-13.09016994374, 34.27050983124, -10], [-13.09016994374, 34.27050983124, 10], [-26.18033988749, -13.09016994374, -24.27050983124], [-26.18033988749, -13.09016994374, 24.27050983124], [-26.18033988749, 13.09016994374, -24.27050983124], [-26.18033988749, 13.09016994374, 24.27050983124], [-37.36067977499, -5, -5], [-37.36067977499, -5, 5], [-37.36067977499, 5, -5], [-37.36067977499, 5, 5], [-16.18033988749, -29.27050983124, -18.09016994374], [-16.18033988749, -29.27050983124, 18.09016994374], [-16.18033988749, 29.27050983124, -18.09016994374], [-16.18033988749, 29.27050983124, 18.09016994374], [-31.18033988749, -5, -21.18033988749], [-31.18033988749, -5, 21.18033988749], [-31.18033988749, 5, -21.18033988749], [-31.18033988749, 5, 21.18033988749], [-21.18033988749, -31.18033988749, -5], [-21.18033988749, -31.18033988749, 5], [-21.18033988749, 31.18033988749, -5], [-21.18033988749, 31.18033988749, 5], [-24.27050983124, -26.18033988749, -13.09016994374], [-24.27050983124, -26.18033988749, 13.09016994374], [-24.27050983124, 26.18033988749, -13.09016994374], [-24.27050983124, 26.18033988749, 13.09016994374], [16.18033988749, -29.27050983124, -18.09016994374], [16.18033988749, -29.27050983124, 18.09016994374], [16.18033988749, 29.27050983124, -18.09016994374], [16.18033988749, 29.27050983124, 18.09016994374], [24.27050983124, -26.18033988749, -13.09016994374], [24.27050983124, -26.18033988749, 13.09016994374], [24.27050983124, 26.18033988749, -13.09016994374], [24.27050983124, 26.18033988749, 13.09016994374], [37.36067977499, -5, -5], [37.36067977499, -5, 5], [37.36067977499, 5, -5], [37.36067977499, 5, 5], [21.18033988749, -31.18033988749, -5], [21.18033988749, -31.18033988749, 5], [21.18033988749, 31.18033988749, -5], [21.18033988749, 31.18033988749, 5], [13.09016994374, -34.27050983124, -10], [13.09016994374, -34.27050983124, 10], [13.09016994374, -24.27050983124, -26.18033988749], [13.09016994374, -24.27050983124, 26.18033988749], [13.09016994374, 24.27050983124, -26.18033988749], [13.09016994374, 24.27050983124, 26.18033988749], [13.09016994374, 34.27050983124, -10], [13.09016994374, 34.27050983124, 10], [26.18033988749, -13.09016994374, -24.27050983124], [26.18033988749, -13.09016994374, 24.27050983124], [26.18033988749, 13.09016994374, -24.27050983124], [26.18033988749, 13.09016994374, 24.27050983124], [31.18033988749, -5, -21.18033988749], [31.18033988749, -5, 21.18033988749], [31.18033988749, 5, -21.18033988749], [31.18033988749, 5, 21.18033988749], [18.09016994374, -16.18033988749, -29.27050983124], [18.09016994374, -16.18033988749, 29.27050983124], [18.09016994374, 16.18033988749, -29.27050983124], [18.09016994374, 16.18033988749, 29.27050983124], [29.27050983124, -18.09016994374, -16.18033988749], [29.27050983124, -18.09016994374, 16.18033988749], [29.27050983124, 18.09016994374, -16.18033988749], [29.27050983124, 18.09016994374, 16.18033988749], [34.27050983124, -10, -13.09016994374], [34.27050983124, -10, 13.09016994374], [34.27050983124, 10, -13.09016994374], [34.27050983124, 10, 13.09016994374]], faces = [[41, 53, 65, 67, 55, 43, 3, 7, 5, 1], [100, 104, 106, 102, 110, 30, 18, 16, 28, 108], [11, 1, 5, 17, 29, 23], [18, 30, 26, 14, 2, 6], [33, 37, 73, 69, 68, 72, 36, 32, 56, 57], [91, 90, 82, 114, 118, 86, 87, 119, 115, 83], [81, 113, 117, 85, 84, 116, 112, 80, 88, 89], [59, 58, 34, 38, 74, 70, 71, 75, 39, 35], [0, 10, 22, 28, 16, 4], [15, 27, 31, 19, 7, 3], [64, 52, 40, 0, 4, 6, 2, 42, 54, 66], [19, 31, 111, 103, 107, 105, 101, 109, 29, 17], [96, 110, 102, 114, 82, 78], [53, 41, 47, 61, 73, 37], [43, 49, 15, 3], [94, 108, 28, 22], [23, 29, 109, 95], [2, 14, 48, 42], [36, 72, 60, 46, 40, 52], [79, 83, 115, 103, 111, 97], [69, 45, 9, 8, 44, 68], [24, 98, 90, 91, 99, 25], [77, 95, 109, 101, 113, 81], [42, 48, 62, 74, 38, 54], [40, 46, 10, 0], [97, 111, 31, 27], [44, 8, 20, 92, 76, 94, 22, 10, 46, 60], [63, 51, 13, 25, 99, 79, 97, 27, 15, 49], [26, 30, 110, 96], [1, 11, 47, 41], [55, 39, 75, 63, 49, 43], [80, 112, 100, 108, 94, 76], [48, 14, 26, 96, 78, 98, 24, 12, 50, 62], [61, 47, 11, 23, 95, 77, 93, 21, 9, 45], [71, 70, 50, 12, 13, 51], [93, 89, 88, 92, 20, 21], [102, 106, 118, 114], [65, 53, 37, 33], [74, 62, 50, 70], [77, 81, 89, 93], [101, 105, 117, 113], [66, 54, 38, 34], [73, 61, 45, 69], [78, 82, 90, 98], [32, 36, 52, 64], [115, 119, 107, 103], [92, 88, 80, 76], [71, 51, 63, 75], [56, 32, 64, 66, 34, 58], [107, 119, 87, 85, 117, 105], [35, 39, 55, 67], [112, 116, 104, 100], [99, 91, 83, 79], [68, 44, 60, 72], [57, 59, 35, 67, 65, 33], [116, 84, 86, 118, 106, 104], [4, 16, 18, 6], [7, 19, 17, 5], [12, 24, 25, 13], [9, 21, 20, 8], [56, 58, 59, 57], [85, 87, 86, 84]], convexity = 1);
+}
diff --git a/tests/regression/opencsgtest/nonplanar_polyhedron-expected.png b/tests/regression/opencsgtest/nonplanar_polyhedron-expected.png
new file mode 100644
index 0000000..c81f20a
--- /dev/null
+++ b/tests/regression/opencsgtest/nonplanar_polyhedron-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/nonplanar_polyhedron-expected.png b/tests/regression/throwntogethertest/nonplanar_polyhedron-expected.png
new file mode 100644
index 0000000..c81f20a
--- /dev/null
+++ b/tests/regression/throwntogethertest/nonplanar_polyhedron-expected.png
Binary files differ
contact: Jan Huwald // Impressum