mirror of https://github.com/vitalif/openscad
Added test case for nan occuring in exported STL files
parent
0d72f5a2d5
commit
d91021746a
|
@ -0,0 +1,16 @@
|
|||
/*
|
||||
When exporting this to STL, null polygons appear, causing
|
||||
problems normalizing normal vectors (nan output in STL files)
|
||||
*/
|
||||
|
||||
$fs=0.2;
|
||||
|
||||
difference() {
|
||||
cube(8);
|
||||
|
||||
translate([0,20,4]) rotate([90,0,0]) union() {
|
||||
translate([0,-3,14.5]) cube([5.4,6,2.4],center=true);
|
||||
translate([0,0,13.3]) rotate([0,0,30]) cylinder(r=3.115,h=2.4,$fn=6);
|
||||
}
|
||||
}
|
||||
|
|
@ -360,6 +360,13 @@ add_executable(cgaltest cgaltest.cc)
|
|||
set_target_properties(cgaltest PROPERTIES COMPILE_FLAGS "-DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}")
|
||||
target_link_libraries(cgaltest tests-cgal ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES})
|
||||
|
||||
#
|
||||
# cgalstlsanitytest
|
||||
#
|
||||
add_executable(cgalstlsanitytest cgalstlsanitytest.cc)
|
||||
set_target_properties(cgalstlsanitytest PROPERTIES COMPILE_FLAGS "-DENABLE_CGAL ${CGAL_CXX_FLAGS_INIT}")
|
||||
target_link_libraries(cgalstlsanitytest tests-cgal ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES} ${OPENGL_LIBRARY} ${Boost_LIBRARIES})
|
||||
|
||||
#
|
||||
# cgalpngtest
|
||||
#
|
||||
|
@ -535,6 +542,8 @@ list(APPEND OPENCSGTEST_FILES ${CGALPNGTEST_FILES})
|
|||
list(APPEND OPENCSGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/bbox-transform-bug.scad)
|
||||
list(APPEND THROWNTOGETHERTEST_FILES ${OPENCSGTEST_FILES})
|
||||
|
||||
list(APPEND CGALSTLSANITYTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/normal-nan.scad)
|
||||
|
||||
# Disable tests which are known to cause floating point comparison issues
|
||||
# Once we're capable of comparing these across platforms, we can put these back in
|
||||
disable_tests(dumptest_transform-tests
|
||||
|
@ -598,6 +607,9 @@ add_cmdline_test(csgtermtest txt ${MINIMAL_FILES})
|
|||
add_cmdline_test(cgalpngtest png ${CGALPNGTEST_FILES})
|
||||
add_cmdline_test(opencsgtest png ${OPENCSGTEST_FILES})
|
||||
add_cmdline_test(throwntogethertest png ${THROWNTOGETHERTEST_FILES})
|
||||
# FIXME: We don't actually need to compare the output of cgalstlsanitytest
|
||||
# with anything. It's self-contained and returns != 0 on error
|
||||
add_cmdline_test(cgalstlsanitytest txt ${CGALSTLSANITYTEST_FILES})
|
||||
|
||||
message("Available test configurations: ${TEST_CONFIGS}")
|
||||
#foreach(CONF ${TEST_CONFIGS})
|
||||
|
|
Loading…
Reference in New Issue