#964 Added test for checking correct export of nonmanifold objects

master
Marius Kintel 2014-12-11 17:24:35 -05:00
parent 9fe80a3a66
commit 1bbbfad575
3 changed files with 21 additions and 0 deletions

View File

@ -0,0 +1,16 @@
polyhedron(points=[
[0,0,0],
[10,0,0],
[10,10,0],
[0,10,0],
[0,-20,20],
[10,-20,20],
[10,-20,30],
[0,-20,30]
],
faces = [[0,1,2,3],[4,5,6,7],
[1,2,5,4],
[2,3,6,5],
[3,0,6,5],
[0,1,4,7]
]);

View File

@ -1116,6 +1116,9 @@ list(APPEND EXPORT3D_TEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/3D/features
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/bad-stl-wing.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/rotate_extrude-hole.scad)
list(APPEND EXPORTCSG_TEST_FILES
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/nonmanifold-polyhedron.scad)
disable_tests(
# These don't output anything
dxfpngtest_text-empty-tests
@ -1313,6 +1316,7 @@ file(WRITE ${CMAKE_CURRENT_BINARY_DIR}/CTestCustom.cmake ${TMP})
# o stlpngtest: Export to STL, Re-import and render to PNG (--render=cgal)
# o offpngtest: Export to OFF, Re-import and render to PNG (--render=cgal)
# o dxfpngtest: Export to DXF, Re-import and render to PNG (--render=cgal)
# o stlcsgpngtest: Export to STL, Re-import and render to PNG (--preview)
#
add_cmdline_test(moduledumptest EXE ${OPENSCAD_BINPATH} ARGS -o SUFFIX ast FILES
@ -1356,6 +1360,7 @@ add_cmdline_test(monotonepngtest EXE ${OPENSCAD_BINPATH} ARGS --colorscheme=Mono
add_cmdline_test(stlpngtest EXE ${PYTHON_EXECUTABLE} SCRIPT ${CMAKE_SOURCE_DIR}/export_import_pngtest.py ARGS --openscad=${OPENSCAD_BINPATH} --format=STL --render=cgal EXPECTEDDIR monotonepngtest SUFFIX png FILES ${EXPORT3D_TEST_FILES})
add_cmdline_test(offpngtest EXE ${PYTHON_EXECUTABLE} SCRIPT ${CMAKE_SOURCE_DIR}/export_import_pngtest.py ARGS --openscad=${OPENSCAD_BINPATH} --format=OFF --render=cgal EXPECTEDDIR monotonepngtest SUFFIX png FILES ${EXPORT3D_TEST_FILES})
add_cmdline_test(dxfpngtest EXE ${PYTHON_EXECUTABLE} SCRIPT ${CMAKE_SOURCE_DIR}/export_import_pngtest.py ARGS --openscad=${OPENSCAD_BINPATH} --format=DXF --render=cgal EXPECTEDDIR cgalpngtest SUFFIX png FILES ${FILES_2D})
add_cmdline_test(stlcsgpngtest EXE ${PYTHON_EXECUTABLE} SCRIPT ${CMAKE_SOURCE_DIR}/export_import_pngtest.py ARGS --openscad=${OPENSCAD_BINPATH} --format=STL EXPECTEDDIR monotonepngtest SUFFIX png FILES ${EXPORTCSG_TEST_FILES})
#

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.8 KiB