diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2f8f4d42f7..bac6612df2 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -1046,6 +1046,52 @@ add_cmdline_test(offcgalpngtest SCRIPT ${EX_IM_PNGTEST_PY} ARGS ${OPENSCA add_cmdline_test(dxfpngtest SCRIPT ${EX_IM_PNGTEST_PY} ARGS ${OPENSCAD_ARG} --format=DXF --render=force EXPECTEDDIR cgalpngtest SUFFIX png FILES ${FILES_2D} ${SCAD_DXF_FILES}) add_cmdline_test(svgpngtest SCRIPT ${EX_IM_PNGTEST_PY} ARGS ${OPENSCAD_ARG} --format=SVG --render=force EXPECTEDDIR cgalpngtest SUFFIX png FILES ${FILES_2D} ${SCAD_SVG_FILES}) +# Manifold corner cases +set(FILES_MANIFOLD_CORNER_CASES + ${TEST_SCAD_DIR}/3D/misc/tetracyl-slim.scad + ${TEST_SCAD_DIR}/3D/misc/tetracyl-touch-edge.scad + ${TEST_SCAD_DIR}/3D/misc/tetracyl-touch-edge-nonmanifold.scad + ${TEST_SCAD_DIR}/3D/misc/tetracyl-touch-vertex.scad + ${TEST_SCAD_DIR}/3D/misc/tetracyl-touch-vertex-nonmanifold.scad + ${TEST_SCAD_DIR}/3D/misc/polyhedrons-touch-edge-nonmanifold.scad + ${TEST_SCAD_DIR}/3D/misc/polyhedrons-touch-edge.scad + ${TEST_SCAD_DIR}/3D/misc/polyhedrons-touch-vertex-nonmanifold.scad + ${TEST_SCAD_DIR}/3D/misc/polyhedrons-touch-vertex.scad + ${TEST_SCAD_DIR}/3D/misc/polyhedrons-touch-face-nonmanifold.scad + ${TEST_SCAD_DIR}/3D/misc/polyhedrons-touch-face.scad + ${TEST_SCAD_DIR}/3D/misc/polyhedron-self-touch-edge-nonmanifold.scad + ${TEST_SCAD_DIR}/3D/misc/polyhedron-self-touch-edge.scad + ${TEST_SCAD_DIR}/3D/misc/polyhedron-self-touch-face-nonmanifold.scad + ${TEST_SCAD_DIR}/3D/misc/polyhedron-self-touch-face.scad + ${TEST_SCAD_DIR}/3D/misc/polyhedron-self-touch-vertex-nonmanifold.scad + ${TEST_SCAD_DIR}/3D/misc/polyhedron-self-touch-vertex.scad +) +add_cmdline_test(3mfpngtest SCRIPT ${EX_IM_PNGTEST_PY} ARGS ${OPENSCAD_ARG} --format=3MF --render=force EXPECTEDDIR 3mfpngtest SUFFIX png FILES ${FILES_MANIFOLD_CORNER_CASES}) +add_cmdline_test(objpngtest SCRIPT ${EX_IM_PNGTEST_PY} ARGS ${OPENSCAD_ARG} --format=OBJ --render=force EXPECTEDDIR 3mfpngtest SUFFIX png FILES ${FILES_MANIFOLD_CORNER_CASES}) +add_cmdline_test(offpngtest SCRIPT ${EX_IM_PNGTEST_PY} ARGS ${OPENSCAD_ARG} --format=OFF --render=force EXPECTEDDIR 3mfpngtest SUFFIX png FILES ${FILES_MANIFOLD_CORNER_CASES}) +add_cmdline_test(stlpngtest SCRIPT ${EX_IM_PNGTEST_PY} ARGS ${OPENSCAD_ARG} --format=STL --render=force EXPECTEDDIR 3mfpngtest SUFFIX png FILES ${FILES_MANIFOLD_CORNER_CASES}) + +set_tests_properties( + # Manifold construction error. Probably due to polygon soup strategy + 3mfpngtest_polyhedron-self-touch-face-nonmanifold + 3mfpngtest_polyhedron-self-touch-face + objpngtest_polyhedron-self-touch-face-nonmanifold + objpngtest_polyhedron-self-touch-face + offpngtest_polyhedron-self-touch-face-nonmanifold + offpngtest_polyhedron-self-touch-face + stlpngtest_polyhedron-self-touch-face-nonmanifold + stlpngtest_polyhedron-self-touch-face + 3mfpngtest_polyhedrons-touch-face-nonmanifold + 3mfpngtest_polyhedrons-touch-face + objpngtest_polyhedrons-touch-face-nonmanifold + objpngtest_polyhedrons-touch-face + offpngtest_polyhedrons-touch-face-nonmanifold + offpngtest_polyhedrons-touch-face + stlpngtest_polyhedrons-touch-face-nonmanifold + stlpngtest_polyhedrons-touch-face + PROPERTIES DISABLED TRUE +) + # Failing tests add_failing_test(stlfailedtest SUFFIX stl FILES ${TEST_SCAD_DIR}/misc/empty-union.scad ARGS --retval=1) add_failing_test(offfailedtest SUFFIX off FILES ${TEST_SCAD_DIR}/misc/empty-union.scad ARGS --retval=1) diff --git a/tests/data/scad/3D/misc/polyhedron-self-touch-edge-nonmanifold.scad b/tests/data/scad/3D/misc/polyhedron-self-touch-edge-nonmanifold.scad new file mode 100644 index 0000000000..0777536bd6 --- /dev/null +++ b/tests/data/scad/3D/misc/polyhedron-self-touch-edge-nonmanifold.scad @@ -0,0 +1,33 @@ +// A single volume touching itself (two pairs of coincident vertices forming an edge). +// This is a non-manifold object since the collapsed vertices are not distinct. +polyhedron( + points=[ + [0, 0, 0], + [1, 0, 0], + [0, 1, 0], + [1, 1, 0], + + [0, 0, 1], + [1, 0, 1], + [0, 1, 1], + [1, 1, 1], + + [0.4, 0.5, 0.5], + [0.6, 0.5, 0.5], + ], + faces=[ + [5,4,8],[5,8,9], + [4,6,8], + [6,7,9],[6,9,8], + [7,5,9], + + [0,1,9],[0,9,8], + [1,3,9], + [3,2,8],[3,8,9], + [2,0,8], + + [4,5,1],[4,1,0], + [5,7,3],[5,3,1], + [7,6,2],[7,2,3], + [6,4,0],[6,0,2], + ]); diff --git a/tests/data/scad/3D/misc/polyhedron-self-touch-edge.scad b/tests/data/scad/3D/misc/polyhedron-self-touch-edge.scad new file mode 100644 index 0000000000..e5c4ac2c31 --- /dev/null +++ b/tests/data/scad/3D/misc/polyhedron-self-touch-edge.scad @@ -0,0 +1,36 @@ +// A single volume touching itself (two pairs of coincident vertices forming an edge), +// but with a manifold topology (the coincident vertices are distinct). +polyhedron( + points=[ + [0, 0, 0], + [1, 0, 0], + [0, 1, 0], + [1, 1, 0], + + [0, 0, 1], + [1, 0, 1], + [0, 1, 1], + [1, 1, 1], + + [0.4, 0.5, 0.5], + [0.6, 0.5, 0.5], + + [0.4, 0.5, 0.5], + [0.6, 0.5, 0.5], + ], + faces=[ + [5,4,10],[5,10,11], + [4,6,10], + [6,7,11],[6,11,10], + [7,5,11], + + [0,1,9],[0,9,8], + [1,3,9], + [3,2,8],[3,8,9], + [2,0,8], + + [4,5,1],[4,1,0], + [5,7,3],[5,3,1], + [7,6,2],[7,2,3], + [6,4,0],[6,0,2], + ]); diff --git a/tests/data/scad/3D/misc/polyhedron-self-touch-face-nonmanifold.scad b/tests/data/scad/3D/misc/polyhedron-self-touch-face-nonmanifold.scad new file mode 100644 index 0000000000..3dd3c67062 --- /dev/null +++ b/tests/data/scad/3D/misc/polyhedron-self-touch-face-nonmanifold.scad @@ -0,0 +1,38 @@ +polyhedron( + points=[ + [0, 0, 0], + [1, 0, 0], + [0, 1, 0], + [1, 1, 0], + + [0, 0, 1], + [1, 0, 1], + [0, 1, 1], + [1, 1, 1], + + [0.4, 0.4, 0.5], + [0.6, 0.4, 0.5], + [0.5, 0.6, 0.5], + ], + faces=[ + [5,4,8],[5,8,9], + [4,6,8], + [6,10,8], + [6,7,10], + [7,9,10], + [7,5,9], + [10,9,8], + + [0,1,9],[0,9,8], + [1,3,9], + [3,10,9], + [3,2,10], + [2,8,10], + [2,0,8], + [8,9,10], + + [4,5,1],[4,1,0], + [5,7,3],[5,3,1], + [7,6,2],[7,2,3], + [6,4,0],[6,0,2], + ]); diff --git a/tests/data/scad/3D/misc/polyhedron-self-touch-face.scad b/tests/data/scad/3D/misc/polyhedron-self-touch-face.scad new file mode 100644 index 0000000000..064880ba29 --- /dev/null +++ b/tests/data/scad/3D/misc/polyhedron-self-touch-face.scad @@ -0,0 +1,43 @@ +// A single volume touching itself (three pairs of coincident vertices forming a triangle). +polyhedron( + points=[ + [0, 0, 0], + [1, 0, 0], + [0, 1, 0], + [1, 1, 0], + + [0, 0, 1], + [1, 0, 1], + [0, 1, 1], + [1, 1, 1], + + [0.4, 0.4, 0.5], + [0.6, 0.4, 0.5], + [0.5, 0.6, 0.5], + + [0.4, 0.4, 0.5], + [0.6, 0.4, 0.5], + [0.5, 0.6, 0.5], + ], + faces=[ + [5,4,11],[5,11,12] + [4,6,11], + [6,13,11], + [6,7,13], + [7,12,13], + [7,5,12], + [13,12,11], + + [0,1,9],[0,9,8], + [1,3,9], + [3,10,9], + [3,2,10], + [2,8,10], + [2,0,8], + [8,9,10], + + [4,5,1],[4,1,0], + [5,7,3],[5,3,1], + [7,6,2],[7,2,3], + [6,4,0,2],[6,0,2], + ]); diff --git a/tests/data/scad/3D/misc/polyhedron-self-touch-vertex-nonmanifold.scad b/tests/data/scad/3D/misc/polyhedron-self-touch-vertex-nonmanifold.scad new file mode 100644 index 0000000000..ea1e9ce9f1 --- /dev/null +++ b/tests/data/scad/3D/misc/polyhedron-self-touch-vertex-nonmanifold.scad @@ -0,0 +1,30 @@ +polyhedron( + points=[ + [0, 0, 0], + [1, 0, 0], + [0, 1, 0], + [1, 1, 0], + + [0, 0, 1], + [1, 0, 1], + [0, 1, 1], + [1, 1, 1], + + [0.5, 0.5, 0.5], + ], + faces=[ + [5,4,8], + [4,6,8], + [6,7,8], + [7,5,8], + + [0,1,8], + [1,3,8], + [3,2,8], + [2,0,8], + + [4,5,1],[4,1,0], + [5,7,3],[5,3,1], + [7,6,2],[7,2,3], + [6,4,0],[6,0,2], + ]); diff --git a/tests/data/scad/3D/misc/polyhedron-self-touch-vertex.scad b/tests/data/scad/3D/misc/polyhedron-self-touch-vertex.scad new file mode 100644 index 0000000000..f8e0dc9175 --- /dev/null +++ b/tests/data/scad/3D/misc/polyhedron-self-touch-vertex.scad @@ -0,0 +1,31 @@ +polyhedron( + points=[ + [0, 0, 0], + [1, 0, 0], + [0, 1, 0], + [1, 1, 0], + + [0, 0, 1], + [1, 0, 1], + [0, 1, 1], + [1, 1, 1], + + [0.5, 0.5, 0.5], + [0.5, 0.5, 0.5], + ], + faces=[ + [5,4,9], + [4,6,9], + [6,7,9], + [7,5,9], + + [0,1,8], + [1,3,8], + [3,2,8], + [2,0,8], + + [4,5,1],[4,1,0], + [5,7,3],[5,3,1], + [7,6,2],[7,2,3], + [6,4,0],[6,0,2], + ]); diff --git a/tests/data/scad/3D/misc/polyhedrons-touch-edge-nonmanifold.scad b/tests/data/scad/3D/misc/polyhedrons-touch-edge-nonmanifold.scad new file mode 100644 index 0000000000..783840e4a4 --- /dev/null +++ b/tests/data/scad/3D/misc/polyhedrons-touch-edge-nonmanifold.scad @@ -0,0 +1,34 @@ +// Two cubes sharing an edge. +// This is a non-manifold object since the collapsed vertices are not distinct. +polyhedron( + points=[ + [0, 0, 0], + [1, 0, 0], + [0, 1, 0], + [1, 1, 0], + [0, 0, 1], + [1, 0, 1], + [0, 1, 1], + [1, 1, 1], + + [2, 1, 0], + [1, 2, 0], + [2, 2, 0], + [2, 1, 1], + [1, 2, 1], + [2, 2, 1], + ], + faces=[ + [6,7,5,4], + [0,1,3,2], + [4,5,1,0], + [5,7,3,1], + [7,6,2,3], + [6,4,0,2], + [12,13,11,7], + [3,8,10,9], + [7,11,8,3], + [11,13,10,8], + [13,12,9,10], + [12,7,3,9], + ]); diff --git a/tests/data/scad/3D/misc/polyhedrons-touch-edge.scad b/tests/data/scad/3D/misc/polyhedrons-touch-edge.scad new file mode 100644 index 0000000000..f40f314301 --- /dev/null +++ b/tests/data/scad/3D/misc/polyhedrons-touch-edge.scad @@ -0,0 +1,34 @@ +polyhedron( + points=[ + [0, 0, 0], + [1, 0, 0], + [0, 1, 0], + [1, 1, 0], + [0, 0, 1], + [1, 0, 1], + [0, 1, 1], + [1, 1, 1], + + [1, 1, 0], + [2, 1, 0], + [1, 2, 0], + [2, 2, 0], + [1, 1, 1], + [2, 1, 1], + [1, 2, 1], + [2, 2, 1], + ], + faces=[ + [6,7,5],[6,5,4], + [0,1,3],[0,3,2], + [4,5,1],[4,1,0], + [5,7,3],[5,3,1], + [7,6,2],[7,2,3], + [6,4,0],[6,0,2], + [14,15,13],[14,13,7], + [3,9,11],[3,11,10], + [7,13,9],[7,9,3], + [13,15,11],[13,11,9], + [15,14,10],[15,10,11], + [14,7,3],[14,3,10], + ]); diff --git a/tests/data/scad/3D/misc/polyhedrons-touch-face-nonmanifold.scad b/tests/data/scad/3D/misc/polyhedrons-touch-face-nonmanifold.scad new file mode 100644 index 0000000000..4cdb11848e --- /dev/null +++ b/tests/data/scad/3D/misc/polyhedrons-touch-face-nonmanifold.scad @@ -0,0 +1,30 @@ +polyhedron( + points=[ + [0, 0, 0], + [1, 0, 0], + [0, 1, 0], + [1, 1, 0], + [0, 0, 1], + [1, 0, 1], + [0, 1, 1], + [1, 1, 1], + + [2, 0, 0], + [2, 1, 0], + [2, 0, 1], + [2, 1, 1], + ], + faces=[ + [6,7,5],[6,5,4], + [0,1,3],[0,3,2], + [4,5,1],[4,1,0], + [5,7,3],[5,3,1], + [7,6,2],[7,2,3], + [4,0,2],[4,2,6], + [7,11,10],[7,10,5], + [1,8,9],[1,9,3], + [5,10,8],[5,8,1], + [10,11,9],[10,9,8], + [11,7,3],[11,3,9], + [5,1,3],[5,3,7], + ]); diff --git a/tests/data/scad/3D/misc/polyhedrons-touch-face.scad b/tests/data/scad/3D/misc/polyhedrons-touch-face.scad new file mode 100644 index 0000000000..7adc331a83 --- /dev/null +++ b/tests/data/scad/3D/misc/polyhedrons-touch-face.scad @@ -0,0 +1,36 @@ +// Two cubes sharing a face, +// but with a manifold topology (the coincident vertices are distinct). +polyhedron( + points=[ + [0, 0, 0], + [1, 0, 0], + [0, 1, 0], + [1, 1, 0], + [0, 0, 1], + [1, 0, 1], + [0, 1, 1], + [1, 1, 1], + + [1, 0, 0], + [2, 0, 0], + [1, 1, 0], + [2, 1, 0], + [1, 0, 1], + [2, 0, 1], + [1, 1, 1], + [2, 1, 1], + ], + faces=[ + [6,7,5],[6,5,4], + [0,1,3],[0,3,2], + [4,5,1],[4,1,0], + [5,7,3],[5,3,1], + [7,6,2],[7,2,3], + [4,0,2],[4,2,6], + [14,15,13],[14,13,12], + [8,9,11],[8,11,10], + [12,13,9],[12,9,8], + [13,15,11],[13,11,9], + [15,14,10],[15,10,11], + [12,8,10],[12,10,14], + ]); diff --git a/tests/data/scad/3D/misc/polyhedrons-touch-vertex-nonmanifold.scad b/tests/data/scad/3D/misc/polyhedrons-touch-vertex-nonmanifold.scad new file mode 100644 index 0000000000..d477b3e7f8 --- /dev/null +++ b/tests/data/scad/3D/misc/polyhedrons-touch-vertex-nonmanifold.scad @@ -0,0 +1,36 @@ +// Two cubes sharing a vertex. +// This is a non-manifold object since the collapsed vertices are not distinct. +polyhedron( + points=[ + [0, 0, 0], + [1, 0, 0], + [0, 1, 0], + [1, 1, 0], + [0, 0, 1], + [1, 0, 1], + [0, 1, 1], + [1, 1, 1], + + [2, 1, 1], + [1, 2, 1], + [2, 2, 1], + [1, 1, 2], + [2, 1, 2], + [1, 2, 2], + [2, 2, 2], + ], + faces=[ + [6,7,5],[6,5,4], + [0,1,3],[0,3,2], + [4,5,1],[4,1,0], + [5,7,3],[5,3,1], + [7,6,2],[7,2,3], + [6,4,0],[6,0,2], + + [13,14,12],[13,12,11], + [7,8,10],[7,10,9], + [11,12,8],[11,8,7], + [12,14,10],[12,10,8], + [14,13,9],[14,9,10], + [13,11,7],[13,7,9], + ]); diff --git a/tests/data/scad/3D/misc/polyhedrons-touch-vertex.scad b/tests/data/scad/3D/misc/polyhedrons-touch-vertex.scad new file mode 100644 index 0000000000..d90d8f9bb4 --- /dev/null +++ b/tests/data/scad/3D/misc/polyhedrons-touch-vertex.scad @@ -0,0 +1,35 @@ +// Two cubes sharing a vertex, +// but with a manifold topology (the coincident vertices are distinct). +polyhedron( + points=[ + [0, 0, 0], + [1, 0, 0], + [0, 1, 0], + [1, 1, 0], + [0, 0, 1], + [1, 0, 1], + [0, 1, 1], + [1, 1, 1], + [1, 1, 1], + [2, 1, 1], + [1, 2, 1], + [2, 2, 1], + [1, 1, 2], + [2, 1, 2], + [1, 2, 2], + [2, 2, 2], + ], + faces=[ + [6,7,5],[6,5,4], + [0,1,3],[0,3,2], + [4,5,1],[4,1,0], + [5,7,3],[5,3,1], + [7,6,2],[7,2,3], + [6,4,0],[6,0,2], + [14,15,13],[14,13,12], + [8,9,11],[8,11,10], + [12,13,9],[12,9,8], + [13,15,11],[13,11,9], + [15,14,10],[15,10,11], + [14,12,8],[14,8,10], + ]); diff --git a/tests/data/scad/3D/misc/tetracyl-slim.scad b/tests/data/scad/3D/misc/tetracyl-slim.scad new file mode 100644 index 0000000000..8082e4adf2 --- /dev/null +++ b/tests/data/scad/3D/misc/tetracyl-slim.scad @@ -0,0 +1,28 @@ +h = 1; + +// A cylinder with a triangular base and a slim waist +polyhedron( + points=[ + [0,1,0], + [cos(210), sin(210),0], + [cos(330), sin(330),0], + + [0,0.1,h], + [0.1*cos(210), 0.1*sin(210),h], + [0.1*cos(330), 0.1*sin(330),h], + + [0,1,2*h], + [cos(210), sin(210),2*h], + [cos(330), sin(330),2*h], + ], + faces=[ + [0,1,2], + [1,0,3],[1,3,4], + [0,2,5],[0,5,3], + [2,1,4],[2,4,5], + + [4,3,6],[4,6,7], + [5,4,7],[5,7,8], + [3,5,8],[3,8,6], + [8,7,6], + ]); diff --git a/tests/data/scad/3D/misc/tetracyl-touch-edge-nonmanifold.scad b/tests/data/scad/3D/misc/tetracyl-touch-edge-nonmanifold.scad new file mode 100644 index 0000000000..0154d21222 --- /dev/null +++ b/tests/data/scad/3D/misc/tetracyl-touch-edge-nonmanifold.scad @@ -0,0 +1,28 @@ +h = 1; + +// A cylinder with a triangular base and a slim waist which is collapsed into a single edge. +// This is a non-manifold object since the collapsed vertices are not distinct. +polyhedron( + points=[ + [0,1,0], + [cos(210), sin(210),0], + [cos(330), sin(330),0], + + [0,0.1,h], + [0.1*cos(270), 0.1*sin(270),h], + + [0,1,2*h], + [cos(210), sin(210),2*h], + [cos(330), sin(330),2*h], + ], + faces=[ + [0,1,2], + [1,0,3],[1,3,4], + [0,2,4],[0,4,3], + [2,1,4], + + [4,3,5],[4,5,6], + [4,6,7], + [3,4,7],[3,7,5], + [7,6,5], + ]); diff --git a/tests/data/scad/3D/misc/tetracyl-touch-edge.scad b/tests/data/scad/3D/misc/tetracyl-touch-edge.scad new file mode 100644 index 0000000000..5bd4426602 --- /dev/null +++ b/tests/data/scad/3D/misc/tetracyl-touch-edge.scad @@ -0,0 +1,29 @@ +h = 1; + +// A cylinder with a triangular base and a slim waist which is collapsed into a single edge, +// but with a manifold topology (the collapsed vertices are still distinct). +polyhedron( + points=[ + [0,1,0], + [cos(210), sin(210),0], + [cos(330), sin(330),0], + + [0,0.1,h], + [0.1*cos(270), 0.1*sin(270),h], + [0.1*cos(270), 0.1*sin(270),h], + + [0,1,2*h], + [cos(210), sin(210),2*h], + [cos(330), sin(330),2*h], + ], + faces=[ + [0,1,2], + [1,0,3],[1,3,4], + [0,2,5],[0,5,3], + [2,1,4],[2,4,5], + + [4,3,6],[4,6,7], + [5,4,7],[5,7,8], + [3,5,8],[3,8,6], + [8,7,6], + ]); diff --git a/tests/data/scad/3D/misc/tetracyl-touch-vertex-nonmanifold.scad b/tests/data/scad/3D/misc/tetracyl-touch-vertex-nonmanifold.scad new file mode 100644 index 0000000000..90920963e3 --- /dev/null +++ b/tests/data/scad/3D/misc/tetracyl-touch-vertex-nonmanifold.scad @@ -0,0 +1,27 @@ +h = 1; + +// A cylinder with a triangular base and a slim waist which is collapsed into a single vertex. +// This is a non-manifold object since the collapsed vertices are not distinct. +polyhedron( + points=[ + [0,1,0], + [cos(210), sin(210),0], + [cos(330), sin(330),0], + + [0,0,h], + + [0,1,2*h], + [cos(210), sin(210),2*h], + [cos(330), sin(330),2*h], + ], + faces=[ + [0,1,2], + [1,0,3], + [0,2,3], + [2,1,3], + + [3,4,5], + [3,5,6], + [3,6,4], + [6,5,4], + ]); diff --git a/tests/data/scad/3D/misc/tetracyl-touch-vertex.scad b/tests/data/scad/3D/misc/tetracyl-touch-vertex.scad new file mode 100644 index 0000000000..d900b3777c --- /dev/null +++ b/tests/data/scad/3D/misc/tetracyl-touch-vertex.scad @@ -0,0 +1,29 @@ +h = 1; + +// A cylinder with a triangular base and a slim waist which is collapsed into a single vertex, +// but with a manifold topology (the collapsed vertices are still distinct). +polyhedron( + points=[ + [0,1,0], + [cos(210), sin(210),0], + [cos(330), sin(330),0], + + [0,0,h], + [0,0,h], + [0,0,h], + + [0,1,2*h], + [cos(210), sin(210),2*h], + [cos(330), sin(330),2*h], + ], + faces=[ + [0,1,2], + [1,0,3],[1,3,4], + [0,2,5],[0,5,3], + [2,1,4],[2,4,5], + + [4,3,6],[4,6,7], + [5,4,7],[5,7,8], + [3,5,8],[3,8,6], + [8,7,6], + ]); diff --git a/tests/regression/3mfpngtest/polyhedron-self-touch-edge-expected.png b/tests/regression/3mfpngtest/polyhedron-self-touch-edge-expected.png new file mode 100644 index 0000000000..8795f6580c Binary files /dev/null and b/tests/regression/3mfpngtest/polyhedron-self-touch-edge-expected.png differ diff --git a/tests/regression/3mfpngtest/polyhedron-self-touch-edge-nonmanifold-expected.png b/tests/regression/3mfpngtest/polyhedron-self-touch-edge-nonmanifold-expected.png new file mode 100644 index 0000000000..8795f6580c Binary files /dev/null and b/tests/regression/3mfpngtest/polyhedron-self-touch-edge-nonmanifold-expected.png differ diff --git a/tests/regression/3mfpngtest/polyhedron-self-touch-face-expected.png b/tests/regression/3mfpngtest/polyhedron-self-touch-face-expected.png new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/regression/3mfpngtest/polyhedron-self-touch-face-nonmanifold-expected.png b/tests/regression/3mfpngtest/polyhedron-self-touch-face-nonmanifold-expected.png new file mode 100644 index 0000000000..e69de29bb2 diff --git a/tests/regression/3mfpngtest/polyhedron-self-touch-vertex-expected.png b/tests/regression/3mfpngtest/polyhedron-self-touch-vertex-expected.png new file mode 100644 index 0000000000..1f0572671a Binary files /dev/null and b/tests/regression/3mfpngtest/polyhedron-self-touch-vertex-expected.png differ diff --git a/tests/regression/3mfpngtest/polyhedron-self-touch-vertex-nonmanifold-expected.png b/tests/regression/3mfpngtest/polyhedron-self-touch-vertex-nonmanifold-expected.png new file mode 100644 index 0000000000..1f0572671a Binary files /dev/null and b/tests/regression/3mfpngtest/polyhedron-self-touch-vertex-nonmanifold-expected.png differ diff --git a/tests/regression/3mfpngtest/polyhedrons-touch-edge-expected.png b/tests/regression/3mfpngtest/polyhedrons-touch-edge-expected.png new file mode 100644 index 0000000000..e98969b744 Binary files /dev/null and b/tests/regression/3mfpngtest/polyhedrons-touch-edge-expected.png differ diff --git a/tests/regression/3mfpngtest/polyhedrons-touch-edge-nonmanifold-expected.png b/tests/regression/3mfpngtest/polyhedrons-touch-edge-nonmanifold-expected.png new file mode 100644 index 0000000000..e98969b744 Binary files /dev/null and b/tests/regression/3mfpngtest/polyhedrons-touch-edge-nonmanifold-expected.png differ diff --git a/tests/regression/3mfpngtest/polyhedrons-touch-face-expected.png b/tests/regression/3mfpngtest/polyhedrons-touch-face-expected.png new file mode 100644 index 0000000000..f1c7975030 Binary files /dev/null and b/tests/regression/3mfpngtest/polyhedrons-touch-face-expected.png differ diff --git a/tests/regression/3mfpngtest/polyhedrons-touch-face-nonmanifold-expected.png b/tests/regression/3mfpngtest/polyhedrons-touch-face-nonmanifold-expected.png new file mode 100644 index 0000000000..8c4ac38779 Binary files /dev/null and b/tests/regression/3mfpngtest/polyhedrons-touch-face-nonmanifold-expected.png differ diff --git a/tests/regression/3mfpngtest/polyhedrons-touch-vertex-expected.png b/tests/regression/3mfpngtest/polyhedrons-touch-vertex-expected.png new file mode 100644 index 0000000000..3fad684c1a Binary files /dev/null and b/tests/regression/3mfpngtest/polyhedrons-touch-vertex-expected.png differ diff --git a/tests/regression/3mfpngtest/polyhedrons-touch-vertex-nonmanifold-expected.png b/tests/regression/3mfpngtest/polyhedrons-touch-vertex-nonmanifold-expected.png new file mode 100644 index 0000000000..3fad684c1a Binary files /dev/null and b/tests/regression/3mfpngtest/polyhedrons-touch-vertex-nonmanifold-expected.png differ diff --git a/tests/regression/3mfpngtest/tetracyl-slim-expected.png b/tests/regression/3mfpngtest/tetracyl-slim-expected.png new file mode 100644 index 0000000000..264842eb71 Binary files /dev/null and b/tests/regression/3mfpngtest/tetracyl-slim-expected.png differ diff --git a/tests/regression/3mfpngtest/tetracyl-touch-edge-expected.png b/tests/regression/3mfpngtest/tetracyl-touch-edge-expected.png new file mode 100644 index 0000000000..c17b96f0a0 Binary files /dev/null and b/tests/regression/3mfpngtest/tetracyl-touch-edge-expected.png differ diff --git a/tests/regression/3mfpngtest/tetracyl-touch-edge-nonmanifold-expected.png b/tests/regression/3mfpngtest/tetracyl-touch-edge-nonmanifold-expected.png new file mode 100644 index 0000000000..c17b96f0a0 Binary files /dev/null and b/tests/regression/3mfpngtest/tetracyl-touch-edge-nonmanifold-expected.png differ diff --git a/tests/regression/3mfpngtest/tetracyl-touch-vertex-expected.png b/tests/regression/3mfpngtest/tetracyl-touch-vertex-expected.png new file mode 100644 index 0000000000..7afa3837e5 Binary files /dev/null and b/tests/regression/3mfpngtest/tetracyl-touch-vertex-expected.png differ diff --git a/tests/regression/3mfpngtest/tetracyl-touch-vertex-nonmanifold-expected.png b/tests/regression/3mfpngtest/tetracyl-touch-vertex-nonmanifold-expected.png new file mode 100644 index 0000000000..7afa3837e5 Binary files /dev/null and b/tests/regression/3mfpngtest/tetracyl-touch-vertex-nonmanifold-expected.png differ