From 9171a48b1bdce1abc840a5b7ddb33be614748e20 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 26 Nov 2011 18:58:53 +0100 Subject: Reorganized a bit, added support for test configurations diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 6de3d93..0465d2c 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -349,16 +349,97 @@ set_target_properties(throwntogethertest PROPERTIES COMPILE_FLAGS "-DENABLE_OPEN target_link_libraries(throwntogethertest tests-offscreen tests-cgal ${CGAL_LIBRARY} ${CGAL_3RD_PARTY_LIBRARIES} ${QT_LIBRARIES} ${OPENCSG_LIBRARY} ${GLEW_LIBRARY} ${COCOA_LIBRARY} ${OPENGL_LIBRARY} ${Boost_LIBRARIES}) # +# Tags tests as disabled. This is more convenient than removing them manually +# from the lists of filenames +# +macro(disable_tests) + foreach (TESTNAME ${ARGN}) +# message("Disabling ${TESTNAME}") + list(APPEND DISABLED_TESTS ${TESTNAME}) + endforeach() +endmacro() + +# +# Tags the given tests as belonging to the given CONFIG, i.e. will +# only be executed when run using ctest -C +# +# Usage example: set_test_config(Heavy dumptest_testname opencsgtest_testname2) +# +function(set_test_config CONFIG) + list(APPEND ${CONFIG}_TEST_CONFIG ${ARGN}) + list(FIND TEST_CONFIGS ${CONFIG} FOUND) + if (FOUND EQUAL -1) + list(APPEND TEST_CONFIGS ${CONFIG}) + # Export to parent scope + set(TEST_CONFIGS ${TEST_CONFIGS} PARENT_SCOPE) + endif() + # Export to parent scope + set(${CONFIG}_TEST_CONFIG ${${CONFIG}_TEST_CONFIG} PARENT_SCOPE) +endfunction() + +# +# Returns a list of test configs +# +function(get_test_config TESTNAME CONFIGS) + foreach(CONFIG ${TEST_CONFIGS}) + list(FIND ${CONFIG}_TEST_CONFIG ${TESTNAME} IDX) + if (${IDX} GREATER -1) + list(APPEND ${CONFIGS} ${CONFIG}) + endif() + endforeach() + if (${CONFIGS}) + # Convert to a format understood by add_test() + string(REPLACE ";" "|" ${${CONFIGS}} ${CONFIGS}) + # Export to parent scope + set(${CONFIGS} ${${CONFIGS}} PARENT_SCOPE) + endif() +endfunction() + +# +# Returns into the FULLNAME variable the global full test name (identifier) +# given a test command and source filename +# +function(get_test_fullname TESTCMD FILENAME FULLNAME) + get_filename_component(TESTCMD_NAME ${TESTCMD} NAME_WE) + get_filename_component(TESTNAME ${FILENAME} NAME_WE) + string(REPLACE " " "_" TESTNAME ${TESTNAME}) # Test names cannot include spaces + set(${FULLNAME} ${TESTCMD_NAME}_${TESTNAME}) + # Export to parent scope + set(${FULLNAME} ${${FULLNAME}} PARENT_SCOPE) +endfunction() + +# # This functions adds cmd-line tests given files. # Files are sent as the parameters following TESTSUFFIX # +# Usage add_cmdline_test(TESTCMD TESTSUFFIX ) +# find_package(PythonInterp) function(add_cmdline_test TESTCMD TESTSUFFIX) get_filename_component(TESTCMD_NAME ${TESTCMD} NAME_WE) + + # Add tests from args foreach (SCADFILE ${ARGN}) get_filename_component(TESTNAME ${SCADFILE} NAME_WE) string(REPLACE " " "_" TESTNAME ${TESTNAME}) # Test names cannot include spaces - add_test("${TESTCMD_NAME}_${TESTNAME}" ${PYTHON_EXECUTABLE} ${tests_SOURCE_DIR}/test_cmdline_tool.py -s ${TESTSUFFIX} ${CMAKE_BINARY_DIR}/${TESTCMD} "${SCADFILE}") + set(TEST_FULLNAME "${TESTCMD_NAME}_${TESTNAME}") + + list(FIND DISABLED_TESTS ${TEST_FULLNAME} DISABLED) + if (${DISABLED} EQUAL -1) + # Handle configurations + unset(FOUNDCONFIGS) + get_test_config(${TEST_FULLNAME} FOUNDCONFIGS) + if (FOUNDCONFIGS) + #message("config ${TEST_FULLNAME}: ${FOUNDCONFIGS}") + set(CONFARG CONFIGURATIONS) + set(CONFVAL ${FOUNDCONFIGS}) + else() + unset(CONFARG) + unset(CONFVAL) + endif() + + add_test(NAME ${TEST_FULLNAME} ${CONFARG} ${CONFVAL} COMMAND ${PYTHON_EXECUTABLE} ${tests_SOURCE_DIR}/test_cmdline_tool.py -s ${TESTSUFFIX} ${CMAKE_BINARY_DIR}/${TESTCMD} "${SCADFILE}") + endif() endforeach() endfunction() @@ -367,6 +448,7 @@ enable_testing() # Find all scad files file(GLOB MINIMAL_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/minimal/*.scad) file(GLOB FEATURES_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/features/*.scad) +# Remove included files not to be used as tests list(REMOVE_ITEM FEATURES_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/features/include\ test6.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/features/include-test5.scad) @@ -375,22 +457,6 @@ file(GLOB SCAD_DXF_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/dxf/*.scad) file(GLOB FUNCTION_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/functions/*.scad) file(GLOB EXAMPLE_FILES ${CMAKE_SOURCE_DIR}/../examples/*.scad) -list(APPEND DUMPTEST_FILES ${MINIMAL_FILES} ${FEATURES_FILES} ${EXAMPLE_FILES}) -list(APPEND DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test.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 -list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/features/transform-tests.scad) -list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/features/render-tests.scad) -list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) -list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example005.scad) -list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example006.scad) -list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example007.scad) -list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example008.scad) -list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example012.scad) -list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example016.scad) -list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example020.scad) -list(REMOVE_ITEM DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example021.scad) - list(APPEND ECHO_FILES ${FUNCTION_FILES} ${CMAKE_SOURCE_DIR}/../testdata/scad/minimal/echo.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/echo-tests.scad @@ -401,42 +467,75 @@ list(APPEND ECHO_FILES ${FUNCTION_FILES} ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/string-test.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/string-indexing.scad) -# Add echotest tests to CTest -add_cmdline_test(echotest txt ${ECHO_FILES}) -# Add dumptest tests to CTest -add_cmdline_test(dumptest txt ${DUMPTEST_FILES}) -# Add csgtexttest tests to CTest -add_cmdline_test(csgtexttest txt ${MINIMAL_FILES}) -# Add csgtermtest tests to CTest -add_cmdline_test(csgtermtest txt ${MINIMAL_FILES}) - -# Add cgaltest tests to CTest -add_cmdline_test(cgaltest stl ${CGALTEST_FILES}) +list(APPEND DUMPTEST_FILES ${MINIMAL_FILES} ${FEATURES_FILES} ${EXAMPLE_FILES}) +list(APPEND DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test.scad) -# Add cgalpngtest tests to CTest -list(APPEND CGALPNGTEST_FILES ${FEATURES_FILES}) -list(APPEND CGALPNGTEST_FILES ${SCAD_DXF_FILES}) +list(APPEND CGALPNGTEST_FILES ${FEATURES_FILES} ${SCAD_DXF_FILES} ${EXAMPLE_FILES}) list(APPEND OPENCSGTEST_FILES ${CGALPNGTEST_FILES}) +list(APPEND THROWNTOGETHERTEST_FILES ${CGALPNGTEST_FILES}) -list(REMOVE_ITEM CGALPNGTEST_FILES - ${CMAKE_SOURCE_DIR}/../testdata/scad/features/child-background.scad - ${CMAKE_SOURCE_DIR}/../testdata/scad/features/highlight-and-background-modifier.scad - ${CMAKE_SOURCE_DIR}/../testdata/scad/features/testcolornames.scad) - -add_cmdline_test(cgalpngtest png ${CGALPNGTEST_FILES}) - -# Add opencsg tests to CTest +# 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 + dumptest_render-tests + dumptest_example001 + dumptest_example005 + dumptest_example006 + dumptest_example007 + dumptest_example008 + dumptest_example012 + dumptest_example016 + dumptest_example020 + dumptest_example021) # FIXME: This test illustrates a weakness in child() combined with modifiers. # Reenable it when this is improved -list(REMOVE_ITEM OPENCSGTEST_FILES - ${CMAKE_SOURCE_DIR}/../testdata/scad/features/child-background.scad) +disable_tests(opencsgtest_child-background) + +# These tests only makes sense in OpenCSG mode +disable_tests(cgalpngtest_child-background + cgalpngtest_highlight-and-background-modifier + cgalpngtest_testcolornames + throwntogethertest_child-background + throwntogethertest_highlight-and-background-modifier + throwntogethertest_testcolornames) + +# Test config handling + +set_test_config(Heavy opencsgtest_minkowski3-tests + opencsgtest_projection-tests + throwntogethertest_minkowski3-tests + throwntogethertest_projection-tests + cgalpngtest_projection-tests + cgalpngtest_rotate_extrude-tests + cgalpngtest_surface-tests + cgalpngtest_sphere-tests + cgalpngtest_minkowski3-tests + cgalpngtest_for-tests + cgalpngtest_for-nested-tests + cgalpngtest_difference-tests + cgalpngtest_intersection-tests) + +foreach(FILE ${EXAMPLE_FILES}) + get_test_fullname(cgalpngtest ${FILE} TEST_FULLNAME) + set_test_config(Examples ${TEST_FULLNAME}) + get_test_fullname(opencsgtest ${FILE} TEST_FULLNAME) + set_test_config(Examples ${TEST_FULLNAME}) + get_test_fullname(throwntogethertest ${FILE} TEST_FULLNAME) + set_test_config(Examples ${TEST_FULLNAME}) +endforeach() + +# Add tests +add_cmdline_test(echotest txt ${ECHO_FILES}) +add_cmdline_test(dumptest txt ${DUMPTEST_FILES}) +add_cmdline_test(csgtexttest txt ${MINIMAL_FILES}) +add_cmdline_test(csgtermtest txt ${MINIMAL_FILES}) +add_cmdline_test(cgalpngtest png ${CGALPNGTEST_FILES}) add_cmdline_test(opencsgtest png ${OPENCSGTEST_FILES}) - -# Add throwntogether tests to CTest -list(APPEND THROWNTOGETHERTEST_FILES ${CGALPNGTEST_FILES}) add_cmdline_test(throwntogethertest png ${THROWNTOGETHERTEST_FILES}) -# Add dxfexport tests to CTest -add_cmdline_test(${CMAKE_SOURCE_DIR}/../test-code/exportdxf dxf ${SCAD_FILES}) +message("Available test configurations: ${TEST_CONFIGS}") +#foreach(CONF ${TEST_CONFIGS}) +# message("${CONF}: ${${CONF}_TEST_CONFIG}") +#endforeach() -- cgit v0.10.1 From 07800da50835e63e9d554fab948ff27da9846a36 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 26 Nov 2011 19:25:16 +0100 Subject: Better config handling diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 0465d2c..68e6730 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -423,20 +423,20 @@ function(add_cmdline_test TESTCMD TESTSUFFIX) get_filename_component(TESTNAME ${SCADFILE} NAME_WE) string(REPLACE " " "_" TESTNAME ${TESTNAME}) # Test names cannot include spaces set(TEST_FULLNAME "${TESTCMD_NAME}_${TESTNAME}") - list(FIND DISABLED_TESTS ${TEST_FULLNAME} DISABLED) if (${DISABLED} EQUAL -1) + # Handle configurations unset(FOUNDCONFIGS) get_test_config(${TEST_FULLNAME} FOUNDCONFIGS) - if (FOUNDCONFIGS) - #message("config ${TEST_FULLNAME}: ${FOUNDCONFIGS}") - set(CONFARG CONFIGURATIONS) - set(CONFVAL ${FOUNDCONFIGS}) - else() - unset(CONFARG) - unset(CONFVAL) + if (NOT FOUNDCONFIGS) + set_test_config(Default ${TEST_FULLNAME}) endif() + set_test_config(All ${TEST_FULLNAME}) + unset(FOUNDCONFIGS) + get_test_config(${TEST_FULLNAME} FOUNDCONFIGS) + set(CONFARG CONFIGURATIONS) + set(CONFVAL ${FOUNDCONFIGS}) add_test(NAME ${TEST_FULLNAME} ${CONFARG} ${CONFVAL} COMMAND ${PYTHON_EXECUTABLE} ${tests_SOURCE_DIR}/test_cmdline_tool.py -s ${TESTSUFFIX} ${CMAKE_BINARY_DIR}/${TESTCMD} "${SCADFILE}") endif() @@ -445,6 +445,8 @@ endfunction() enable_testing() +set_directory_properties(PROPERTIES TEST_INCLUDE_FILE "${CMAKE_SOURCE_DIR}/EnforceConfig.cmake") + # Find all scad files file(GLOB MINIMAL_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/minimal/*.scad) file(GLOB FEATURES_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/features/*.scad) diff --git a/tests/EnforceConfig.cmake b/tests/EnforceConfig.cmake new file mode 100644 index 0000000..8e2ebf7 --- /dev/null +++ b/tests/EnforceConfig.cmake @@ -0,0 +1,4 @@ +message("Enforcing config") +if(NOT CTEST_CONFIGURATION_TYPE) + set(CTEST_CONFIGURATION_TYPE Default) +endif() -- cgit v0.10.1 From 6e030b571639be3336a5b34bd2404a7dea54aebd Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 26 Nov 2011 19:25:31 +0100 Subject: Updated testing docs diff --git a/doc/testing.txt b/doc/testing.txt index b2974fc..66ceac2 100644 --- a/doc/testing.txt +++ b/doc/testing.txt @@ -3,32 +3,46 @@ Running regression tests: Prerequisites: cmake, python -cd tests -mkdir build -cd build -cmake .. -make -make test +A) Building test environment -Running on Windows: +Linux, Mac: +$ cd tests +$ cmake . +$ make + +Windows: First, get a normal build working by following instructions at http://en.wikibooks.org/wiki/OpenSCAD_User_Manual/Building_on_Windows Then, from the QT command prompt: -cd tests -mkdir build -cd build -cmake .. -DCMAKE_BUILD_TYPE=Release -sed -i s/\/MD/\/MT/ CMakeCache.txt -cmake .. -nmake -f Makefile -nmake -f Makefile test +$ cd tests +$ cmake . -DCMAKE_BUILD_TYPE=Release +$ sed -i s/\/MD/\/MT/ CMakeCache.txt +$ cmake . +$ nmake -f Makefile + +B) Running tests + +Easy version: +$ make test + +Windows: +$ nmake -f Makefile test -Running on headless (no X) servers: +Headless servers (no X11): +$ Xvnc :5 -screen 0 800x600x24 & +$ DISPLAY=:5 make test -Xvnc :5 -screen 0 800x600x24 & -DISPLAY=:5 make test +Partial or extended test runs: +$ ctest Runs tests enabled by default +$ ctest -R Runs only matching tests, e.g. ctest -R dxf +$ ctest -C Adds extended tests belonging to configs. + Valid configs: + Default - Run default tests + Heavy - Run more time consuming tests (> ~10 seconds) + Examples - test all examples + All - test everything Adding a new regression test: -- cgit v0.10.1 From e158384eb838dc8339743c3c327e1b210cb0968d Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 30 Oct 2011 14:00:21 +0100 Subject: Rewrite deprecated code in examples, discovered bugs in open polyline handling diff --git a/examples/example007.scad b/examples/example007.scad index fe69f84..c1787f6 100644 --- a/examples/example007.scad +++ b/examples/example007.scad @@ -5,30 +5,22 @@ module cutout() { rotate(90, [1, 0, 0]) translate([0, 0, -50]) - dxf_linear_extrude( - file = "example007.dxf", - layer = "cutout1", - height = 100, - convexity = 1); + linear_extrude(height = 100, convexity = 1) + import(file = "example007.dxf", layer = "cutout1"); rotate(90, [0, 0, 1]) rotate(90, [1, 0, 0]) translate([0, 0, -50]) - dxf_linear_extrude( - file = "example007.dxf", - layer = "cutout2", - height = 100, - convexity = 2); + linear_extrude(height = 100, convexity = 2) + import(file = "example007.dxf", layer = "cutout2"); } } module clip() { difference() { - dxf_rotate_extrude( - file = "example007.dxf", - layer="dorn", - convexity = 3); + rotate_extrude(convexity = 3) + import(file = "example007.dxf", layer="dorn"); for (r = [0, 90]) rotate(r, [0, 0, 1]) cutout(); diff --git a/examples/example008.scad b/examples/example008.scad index e1b0ac4..7c45d7b 100644 --- a/examples/example008.scad +++ b/examples/example008.scad @@ -4,29 +4,29 @@ difference() intersection() { translate([ -25, -25, -25]) - dxf_linear_extrude(file = "example008.dxf", + linear_extrude(file = "example008.dxf", layer = "G", height = 50, convexity = 3); rotate(90, [1, 0, 0]) translate([ -25, -125, -25]) - dxf_linear_extrude(file = "example008.dxf", + linear_extrude(file = "example008.dxf", layer = "E", height = 50, convexity = 3); rotate(90, [0, 1, 0]) translate([ -125, -125, -25]) - dxf_linear_extrude(file = "example008.dxf", + linear_extrude(file = "example008.dxf", layer = "B", height = 50, convexity = 3); } intersection() { translate([ -125, -25, -25]) - dxf_linear_extrude(file = "example008.dxf", + linear_extrude(file = "example008.dxf", layer = "X", height = 50, convexity = 1); rotate(90, [0, 1, 0]) translate([ -125, -25, -25]) - dxf_linear_extrude(file = "example008.dxf", + linear_extrude(file = "example008.dxf", layer = "X", height = 50, convexity = 1); } } \ No newline at end of file diff --git a/examples/example009.scad b/examples/example009.scad index 5f39f00..5146720 100644 --- a/examples/example009.scad +++ b/examples/example009.scad @@ -6,23 +6,23 @@ fan_side_center = dxf_cross(file = "example009.dxf", layer = "fan_side_center"); fanrot = dxf_dim(file = "example009.dxf", name = "fanrot"); -% dxf_linear_extrude(file = "example009.dxf", layer = "body", +% linear_extrude(file = "example009.dxf", layer = "body", height = bodywidth, center = true, convexity = 10); % for (z = [+(bodywidth/2 + platewidth/2), -(bodywidth/2 + platewidth/2)]) { translate([0, 0, z]) - dxf_linear_extrude(file = "example009.dxf", layer = "plate", + linear_extrude(file = "example009.dxf", layer = "plate", height = platewidth, center = true, convexity = 10); } intersection() { - dxf_linear_extrude(file = "example009.dxf", layer = "fan_top", + linear_extrude(file = "example009.dxf", layer = "fan_top", height = fanwidth, center = true, convexity = 10, twist = -fanrot); - dxf_rotate_extrude(file = "example009.dxf", layer = "fan_side", + rotate_extrude(file = "example009.dxf", layer = "fan_side", origin = fan_side_center, convexity = 10); } diff --git a/examples/example013.scad b/examples/example013.scad index 18f1f04..7132b02 100644 --- a/examples/example013.scad +++ b/examples/example013.scad @@ -1,12 +1,12 @@ intersection() { - dxf_linear_extrude(file = "example013.dxf", + linear_extrude(file = "example013.dxf", height = 100, center = true, convexity= 3); rotate([0, 90, 0]) - dxf_linear_extrude(file = "example013.dxf", + linear_extrude(file = "example013.dxf", height = 100, center = true, convexity= 3); rotate([90, 0, 0]) - dxf_linear_extrude(file = "example013.dxf", + linear_extrude(file = "example013.dxf", height = 100, center = true, convexity= 3); } \ No newline at end of file -- cgit v0.10.1 From 8d97fb3939cae92105f4d83e67cb2030a4256ec2 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 26 Nov 2011 18:57:26 +0100 Subject: Temporarily fall back to deprecated module diff --git a/examples/example007.scad b/examples/example007.scad index c1787f6..12d2dc2 100644 --- a/examples/example007.scad +++ b/examples/example007.scad @@ -19,8 +19,13 @@ module cutout() module clip() { difference() { - rotate_extrude(convexity = 3) - import(file = "example007.dxf", layer="dorn"); + // NB! We have to use the deprecated module here since the "dorn" + // layer contains an open polyline, which is not yet supported + // by the import() module. + dxf_rotate_extrude( + file = "example007.dxf", + layer="dorn", + convexity = 3); for (r = [0, 90]) rotate(r, [0, 0, 1]) cutout(); -- cgit v0.10.1 From c6a6ad46da7cb349422eefbec6bf37a55e9f8cc5 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 26 Nov 2011 19:41:48 +0100 Subject: Removed use of deprecated functionality from examples, with a few temporary exceptions diff --git a/examples/example007.scad b/examples/example007.scad index 12d2dc2..6a57a3b 100644 --- a/examples/example007.scad +++ b/examples/example007.scad @@ -22,7 +22,7 @@ module clip() // NB! We have to use the deprecated module here since the "dorn" // layer contains an open polyline, which is not yet supported // by the import() module. - dxf_rotate_extrude( + rotate_extrude( file = "example007.dxf", layer="dorn", convexity = 3); diff --git a/examples/example008.scad b/examples/example008.scad index 7c45d7b..a12ef96 100644 --- a/examples/example008.scad +++ b/examples/example008.scad @@ -4,29 +4,29 @@ difference() intersection() { translate([ -25, -25, -25]) - linear_extrude(file = "example008.dxf", - layer = "G", height = 50, convexity = 3); + linear_extrude(height = 50, convexity = 3) + import(file = "example008.dxf", layer = "G"); rotate(90, [1, 0, 0]) translate([ -25, -125, -25]) - linear_extrude(file = "example008.dxf", - layer = "E", height = 50, convexity = 3); + linear_extrude(height = 50, convexity = 3) + import(file = "example008.dxf", layer = "E"); rotate(90, [0, 1, 0]) translate([ -125, -125, -25]) - linear_extrude(file = "example008.dxf", - layer = "B", height = 50, convexity = 3); + linear_extrude(height = 50, convexity = 3) + import(file = "example008.dxf", layer = "B"); } intersection() { translate([ -125, -25, -25]) - linear_extrude(file = "example008.dxf", - layer = "X", height = 50, convexity = 1); + linear_extrude(height = 50, convexity = 1) + import(file = "example008.dxf", layer = "X"); rotate(90, [0, 1, 0]) translate([ -125, -25, -25]) - linear_extrude(file = "example008.dxf", - layer = "X", height = 50, convexity = 1); + linear_extrude(height = 50, convexity = 1) + import(file = "example008.dxf", layer = "X"); } } \ No newline at end of file diff --git a/examples/example009.scad b/examples/example009.scad index 5146720..017ecc3 100644 --- a/examples/example009.scad +++ b/examples/example009.scad @@ -2,26 +2,28 @@ bodywidth = dxf_dim(file = "example009.dxf", name = "bodywidth"); fanwidth = dxf_dim(file = "example009.dxf", name = "fanwidth"); platewidth = dxf_dim(file = "example009.dxf", name = "platewidth"); -fan_side_center = dxf_cross(file = "example009.dxf", - layer = "fan_side_center"); +fan_side_center = dxf_cross(file = "example009.dxf", layer = "fan_side_center"); fanrot = dxf_dim(file = "example009.dxf", name = "fanrot"); -% linear_extrude(file = "example009.dxf", layer = "body", - height = bodywidth, center = true, convexity = 10); +% linear_extrude(height = bodywidth, center = true, convexity = 10) + import(file = "example009.dxf", layer = "body"); % for (z = [+(bodywidth/2 + platewidth/2), -(bodywidth/2 + platewidth/2)]) { translate([0, 0, z]) - linear_extrude(file = "example009.dxf", layer = "plate", - height = platewidth, center = true, convexity = 10); + linear_extrude(height = platewidth, center = true, convexity = 10) + import(file = "example009.dxf", layer = "plate"); } intersection() { - linear_extrude(file = "example009.dxf", layer = "fan_top", - height = fanwidth, center = true, convexity = 10, - twist = -fanrot); + linear_extrude(height = fanwidth, center = true, convexity = 10, twist = -fanrot) + import(file = "example009.dxf", layer = "fan_top"); + + // NB! We have to use the deprecated module here since the "fan_side" + // layer contains an open polyline, which is not yet supported + // by the import() module. rotate_extrude(file = "example009.dxf", layer = "fan_side", origin = fan_side_center, convexity = 10); } diff --git a/examples/example013.scad b/examples/example013.scad index 7132b02..c17422f 100644 --- a/examples/example013.scad +++ b/examples/example013.scad @@ -1,12 +1,12 @@ intersection() { - linear_extrude(file = "example013.dxf", - height = 100, center = true, convexity= 3); + linear_extrude(height = 100, center = true, convexity= 3) + import(file = "example013.dxf"); rotate([0, 90, 0]) - linear_extrude(file = "example013.dxf", - height = 100, center = true, convexity= 3); + linear_extrude(height = 100, center = true, convexity= 3) + import(file = "example013.dxf"); rotate([90, 0, 0]) - linear_extrude(file = "example013.dxf", - height = 100, center = true, convexity= 3); + linear_extrude(height = 100, center = true, convexity= 3) + import(file = "example013.dxf"); } \ No newline at end of file -- cgit v0.10.1 From 47bd0b639b4adf4a20f901bd93ac235e77bd2df4 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 26 Nov 2011 23:31:11 +0100 Subject: bugfix: We didn't correctly set back CGAL error behaviour after changing it diff --git a/src/CGALEvaluator.cc b/src/CGALEvaluator.cc index 7921b85..78b9c78 100644 --- a/src/CGALEvaluator.cc +++ b/src/CGALEvaluator.cc @@ -598,19 +598,20 @@ CGAL_Nef_polyhedron CGALEvaluator::evaluateCGALMesh(const PolySet &ps) } else // not (this->is2d) { + CGAL_Nef_polyhedron3 *N = NULL; CGAL::Failure_behaviour old_behaviour = CGAL::set_error_behaviour(CGAL::THROW_EXCEPTION); try { + // FIXME: Are we leaking memory for the CGAL_Polyhedron object? CGAL_Polyhedron *P = createPolyhedronFromPolySet(ps); if (P) { - CGAL_Nef_polyhedron3 *N = new CGAL_Nef_polyhedron3(*P); - return CGAL_Nef_polyhedron(N); + N = new CGAL_Nef_polyhedron3(*P); } } catch (CGAL::Assertion_exception e) { - PRINTF("CGAL error in CGA_Nef_polyhedron3(): %s", e.what()); - CGAL::set_error_behaviour(old_behaviour); - return CGAL_Nef_polyhedron(); + PRINTF("CGAL error in CGAL_Nef_polyhedron3(): %s", e.what()); } + CGAL::set_error_behaviour(old_behaviour); + return CGAL_Nef_polyhedron(N); } return CGAL_Nef_polyhedron(); } diff --git a/src/CGAL_Nef_polyhedron.cc b/src/CGAL_Nef_polyhedron.cc index 2538b64..61ca2f8 100644 --- a/src/CGAL_Nef_polyhedron.cc +++ b/src/CGAL_Nef_polyhedron.cc @@ -7,6 +7,29 @@ #include "dxftess.h" #include +CGAL_Nef_polyhedron::CGAL_Nef_polyhedron(CGAL_Nef_polyhedron2 *p) +{ + if (p) { + dim = 2; + p2.reset(p); + } + else { + dim = 0; + } +} + +CGAL_Nef_polyhedron::CGAL_Nef_polyhedron(CGAL_Nef_polyhedron3 *p) +{ + if (p) { + dim = 3; + p3.reset(p); + } + else { + dim = 0; + } +} + + CGAL_Nef_polyhedron& CGAL_Nef_polyhedron::operator+=(const CGAL_Nef_polyhedron &other) { if (this->dim == 2) (*this->p2) += (*other.p2); diff --git a/src/CGAL_Nef_polyhedron.h b/src/CGAL_Nef_polyhedron.h index fda4bc5..f93905f 100644 --- a/src/CGAL_Nef_polyhedron.h +++ b/src/CGAL_Nef_polyhedron.h @@ -8,8 +8,8 @@ class CGAL_Nef_polyhedron { public: CGAL_Nef_polyhedron() : dim(0) {} - CGAL_Nef_polyhedron(CGAL_Nef_polyhedron2 *p) : dim(2), p2(p) {} - CGAL_Nef_polyhedron(CGAL_Nef_polyhedron3 *p) : dim(3), p3(p) {} + CGAL_Nef_polyhedron(CGAL_Nef_polyhedron2 *p); + CGAL_Nef_polyhedron(CGAL_Nef_polyhedron3 *p); ~CGAL_Nef_polyhedron() {} bool empty() const { return (dim == 0 || (!p2 && !p3)); } diff --git a/src/cgalutils.cc b/src/cgalutils.cc index e77f5dd..1de7ab4 100644 --- a/src/cgalutils.cc +++ b/src/cgalutils.cc @@ -140,8 +140,10 @@ CGAL_Polyhedron *createPolyhedronFromPolySet(const PolySet &ps) } catch (CGAL::Assertion_exception e) { PRINTF("CGAL error in CGAL_Build_PolySet: %s", e.what()); - CGAL::set_error_behaviour(old_behaviour); + delete P; + P = NULL; } + CGAL::set_error_behaviour(old_behaviour); return P; } -- cgit v0.10.1 From 1c1098f8b48e448a767ceedebfa61200151adaec Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 26 Nov 2011 23:32:50 +0100 Subject: Minor debug output fixes diff --git a/tests/OffscreenContext.mm b/tests/OffscreenContext.mm index 140516f..0c44d7d 100644 --- a/tests/OffscreenContext.mm +++ b/tests/OffscreenContext.mm @@ -1,6 +1,7 @@ #include "OffscreenContext.h" #include "imageutils.h" #include "fbo.h" +#include #import // for NSOpenGL... @@ -47,24 +48,13 @@ OffscreenContext *create_offscreen_context(int w, int h) [ctx->openGLContext makeCurrentContext]; - glewInit(); -#ifdef DEBUG - std::cout << "GLEW version " << glewGetString(GLEW_VERSION) << "\n"; - std::cout << (const char *)glGetString(GL_RENDERER) << "(" << (const char *)glGetString(GL_VENDOR) << ")\n" - << "OpenGL version " << (const char *)glGetString(GL_VERSION) << "\n"; - std::cout << "Extensions: " << (const char *)glGetString(GL_EXTENSIONS) << "\n"; - - - if (GLEW_ARB_framebuffer_object) { - std::cout << "ARB_FBO supported\n"; - } - if (GLEW_EXT_framebuffer_object) { - std::cout << "EXT_FBO supported\n"; - } - if (GLEW_EXT_packed_depth_stencil) { - std::cout << "EXT_packed_depth_stencil\n"; + // glewInit must come after Context creation and before FBO calls. + GLenum err = glewInit(); + if (GLEW_OK != err) { + std::cerr << "Unable to init GLEW: " << glewGetErrorString(err) << std::endl; + return NULL; } -#endif + glew_dump(); ctx->fbo = fbo_new(); if (!fbo_init(ctx->fbo, w, h)) { diff --git a/tests/system-gl.cc b/tests/system-gl.cc index f95a5ca..bdf3bf9 100644 --- a/tests/system-gl.cc +++ b/tests/system-gl.cc @@ -8,13 +8,13 @@ using namespace std; using namespace boost; -void glew_dump() { +void glew_dump(bool dumpall) { +#ifdef DEBUG cerr << "GLEW version: " << glewGetString(GLEW_VERSION) << endl << "Renderer: " << (const char *)glGetString(GL_RENDERER) << endl << "Vendor: " << (const char *)glGetString(GL_VENDOR) << endl << "OpenGL version: " << (const char *)glGetString(GL_VERSION) << endl; - bool dumpall = false; if (dumpall) { string extensions((const char *)glGetString(GL_EXTENSIONS)); replace_all( extensions, " ", "\n " ); @@ -30,6 +30,7 @@ void glew_dump() { << " GL_EXT_packed_depth_stencil: " << (glewIsSupported("GL_EXT_packed_depth_stencil") ? "yes" : "no") << endl; +#endif }; bool report_glerror(const char * function) diff --git a/tests/system-gl.h b/tests/system-gl.h index bb41be5..b41e32c 100644 --- a/tests/system-gl.h +++ b/tests/system-gl.h @@ -3,7 +3,7 @@ #include -void glew_dump(); +void glew_dump(bool dumpall = false); bool report_glerror(const char *task); #endif -- cgit v0.10.1 From 5b4632b0402b6021d49ae980b30cec1698722440 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 26 Nov 2011 23:33:19 +0100 Subject: Initialize CGAL error behaviour, remove duplicate debug output diff --git a/tests/cgalpngtest.cc b/tests/cgalpngtest.cc index bfa92da..60e630c 100644 --- a/tests/cgalpngtest.cc +++ b/tests/cgalpngtest.cc @@ -54,6 +54,10 @@ #include #include +#ifdef ENABLE_CGAL +#include +#endif + std::string commandline_commands; QString currentdir; QString examplesdir; @@ -99,6 +103,11 @@ int main(int argc, char **argv) const char *filename = argv[1]; const char *outfile = argv[2]; +#ifdef ENABLE_CGAL + // Causes CGAL errors to abort directly instead of throwing exceptions + // (which we don't catch). This gives us stack traces without rerunning in gdb. + CGAL::set_error_behaviour(CGAL::ABORT); +#endif Builtins::instance()->initialize(); QApplication app(argc, argv, false); @@ -163,29 +172,6 @@ int main(int argc, char **argv) exit(1); } - GLenum err = glewInit(); - if (GLEW_OK != err) { - fprintf(stderr, "Unable to init GLEW: %s\n", glewGetErrorString(err)); - exit(1); - } -#ifdef DEBUG - std::cout << "GLEW version " << glewGetString(GLEW_VERSION) << "\n"; - std::cout << (const char *)glGetString(GL_RENDERER) << "(" << (const char *)glGetString(GL_VENDOR) << ")\n" - << "OpenGL version " << (const char *)glGetString(GL_VERSION) << "\n"; - std::cout << "Extensions: " << (const char *)glGetString(GL_EXTENSIONS) << "\n"; - - - if (GLEW_ARB_framebuffer_object) { - std::cout << "ARB_FBO supported\n"; - } - if (GLEW_EXT_framebuffer_object) { - std::cout << "EXT_FBO supported\n"; - } - if (GLEW_EXT_packed_depth_stencil) { - std::cout << "EXT_packed_depth_stencil\n"; - } -#endif - CGALRenderer cgalRenderer(N); BoundingBox bbox; -- cgit v0.10.1 From 9038f6b85792c0349f3afd3cfcd40e9ca0aa4ab8 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 26 Nov 2011 23:33:53 +0100 Subject: Use macro instead of functions since we may change global variables diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 68e6730..624346b 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -415,7 +415,7 @@ endfunction() # Usage add_cmdline_test(TESTCMD TESTSUFFIX ) # find_package(PythonInterp) -function(add_cmdline_test TESTCMD TESTSUFFIX) +macro(add_cmdline_test TESTCMD TESTSUFFIX) get_filename_component(TESTCMD_NAME ${TESTCMD} NAME_WE) # Add tests from args @@ -441,7 +441,7 @@ function(add_cmdline_test TESTCMD TESTSUFFIX) add_test(NAME ${TEST_FULLNAME} ${CONFARG} ${CONFVAL} COMMAND ${PYTHON_EXECUTABLE} ${tests_SOURCE_DIR}/test_cmdline_tool.py -s ${TESTSUFFIX} ${CMAKE_BINARY_DIR}/${TESTCMD} "${SCADFILE}") endif() endforeach() -endfunction() +endmacro() enable_testing() -- cgit v0.10.1 From 46ce786edc05106b36df483e9ccb564afca4b09b Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sat, 26 Nov 2011 23:39:49 +0100 Subject: Updated tests after recent deprecation fixes of examples diff --git a/tests/regression/dumptest/example009-expected.txt b/tests/regression/dumptest/example009-expected.txt index 30c8bc3..df05fe2 100644 --- a/tests/regression/dumptest/example009-expected.txt +++ b/tests/regression/dumptest/example009-expected.txt @@ -1,14 +1,22 @@ - linear_extrude(file = "example009.dxf", layer = "body", origin = [0, 0], scale = 1, height = 22, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 22, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1) { + import(file = "example009.dxf", layer = "body", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + } group() { multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 12], [0, 0, 0, 1]]) { - linear_extrude(file = "example009.dxf", layer = "plate", origin = [0, 0], scale = 1, height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1) { + import(file = "example009.dxf", layer = "plate", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, -12], [0, 0, 0, 1]]) { - linear_extrude(file = "example009.dxf", layer = "plate", origin = [0, 0], scale = 1, height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 2, center = true, convexity = 10, $fn = 0, $fa = 12, $fs = 1) { + import(file = "example009.dxf", layer = "plate", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + } } } intersection() { - linear_extrude(file = "example009.dxf", layer = "fan_top", origin = [0, 0], scale = 1, height = 20, center = true, convexity = 10, twist = -57.5288, slices = 4, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 20, center = true, convexity = 10, twist = -57.5288, slices = 4, $fn = 0, $fa = 12, $fs = 1) { + import(file = "example009.dxf", layer = "fan_top", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + } rotate_extrude(file = "example009.dxf", layer = "fan_side", origin = [0, -40], scale = 1, convexity = 10, $fn = 0, $fa = 12, $fs = 1); } diff --git a/tests/regression/dumptest/example013-expected.txt b/tests/regression/dumptest/example013-expected.txt index b1dcccb..f4d0aec 100644 --- a/tests/regression/dumptest/example013-expected.txt +++ b/tests/regression/dumptest/example013-expected.txt @@ -1,10 +1,16 @@ intersection() { - linear_extrude(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1) { + import(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + } multmatrix([[2.22045e-16, 0, 1, 0], [0, 1, 0, 0], [-1, 0, 2.22045e-16, 0], [0, 0, 0, 1]]) { - linear_extrude(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1) { + import(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + } } multmatrix([[1, 0, 0, 0], [0, 2.22045e-16, -1, 0], [0, 1, 2.22045e-16, 0], [0, 0, 0, 1]]) { - linear_extrude(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1); + linear_extrude(height = 100, center = true, convexity = 3, $fn = 0, $fa = 12, $fs = 1) { + import(file = "example013.dxf", layer = "", origin = [0, 0], scale = 1, convexity = 1, $fn = 0, $fa = 12, $fs = 1); + } } } -- cgit v0.10.1 From a159135e978bc6d4a7f56af712df72cce7a1819f Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 27 Nov 2011 02:40:49 +0100 Subject: Modified test to not cause z buffer fighting diff --git a/tests/regression/dumptest/difference-tests-expected.txt b/tests/regression/dumptest/difference-tests-expected.txt index bbdf3ea..eee4616 100644 --- a/tests/regression/dumptest/difference-tests-expected.txt +++ b/tests/regression/dumptest/difference-tests-expected.txt @@ -7,7 +7,7 @@ multmatrix([[1, 0, 0, 12], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) { difference() { cube(size = [10, 10, 10], center = true); - cylinder($fn = 0, $fa = 12, $fs = 1, h = 10, r1 = 4, r2 = 4, center = true); + cylinder($fn = 0, $fa = 12, $fs = 1, h = 10.5, r1 = 4, r2 = 4, center = true); } } multmatrix([[1, 0, 0, 0], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { @@ -22,7 +22,7 @@ multmatrix([[1, 0, 0, 12], [0, 1, 0, 12], [0, 0, 1, 0], [0, 0, 0, 1]]) { difference() { cube(size = [10, 10, 10], center = true); - multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 7], [0, 0, 0, 1]]) { + multmatrix([[1, 0, 0, 0], [0, 1, 0, 0], [0, 0, 1, 7.01], [0, 0, 0, 1]]) { cylinder($fn = 0, $fa = 12, $fs = 1, h = 4, r1 = 4, r2 = 4, center = true); } } diff --git a/tests/regression/opencsgtest/difference-tests-expected.png b/tests/regression/opencsgtest/difference-tests-expected.png index d88d98b..794104a 100644 Binary files a/tests/regression/opencsgtest/difference-tests-expected.png and b/tests/regression/opencsgtest/difference-tests-expected.png differ diff --git a/tests/regression/throwntogethertest/difference-tests-expected.png b/tests/regression/throwntogethertest/difference-tests-expected.png index 0b8070f..ee75bad 100644 Binary files a/tests/regression/throwntogethertest/difference-tests-expected.png and b/tests/regression/throwntogethertest/difference-tests-expected.png differ -- cgit v0.10.1 From c2f29733b53c21f75a925ebd15a5e5cd646e8a79 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 27 Nov 2011 02:47:15 +0100 Subject: Modified test to not cause z buffer fighting diff --git a/testdata/scad/features/difference-tests.scad b/testdata/scad/features/difference-tests.scad index 4d82676..3bcd9e5 100644 --- a/testdata/scad/features/difference-tests.scad +++ b/testdata/scad/features/difference-tests.scad @@ -10,7 +10,7 @@ difference() { translate([12,0,0]) difference() { cube([10,10,10], center=true); - cylinder(r=4, h=10, center=true); + cylinder(r=4, h=10.5, center=true); } translate([0,12,0]) difference() { @@ -21,7 +21,7 @@ translate([0,12,0]) difference() { translate([12,12,0]) difference() { cube([10,10,10], center=true); - translate([0,0,7]) cylinder(r=4, h=4, center=true); + translate([0,0,7.01]) cylinder(r=4, h=4, center=true); } translate([24,0,0]) difference() { -- cgit v0.10.1 From 04c340b35d8809b595ebb3ce53b7a00313d00a9b Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Sun, 27 Nov 2011 02:47:58 +0100 Subject: expected files for example tests diff --git a/tests/regression/cgalpngtest/example001-expected.png b/tests/regression/cgalpngtest/example001-expected.png new file mode 100644 index 0000000..12b3dea Binary files /dev/null and b/tests/regression/cgalpngtest/example001-expected.png differ diff --git a/tests/regression/cgalpngtest/example002-expected.png b/tests/regression/cgalpngtest/example002-expected.png new file mode 100644 index 0000000..491477d Binary files /dev/null and b/tests/regression/cgalpngtest/example002-expected.png differ diff --git a/tests/regression/cgalpngtest/example003-expected.png b/tests/regression/cgalpngtest/example003-expected.png new file mode 100644 index 0000000..429b64b Binary files /dev/null and b/tests/regression/cgalpngtest/example003-expected.png differ diff --git a/tests/regression/cgalpngtest/example004-expected.png b/tests/regression/cgalpngtest/example004-expected.png new file mode 100644 index 0000000..b0a91fd Binary files /dev/null and b/tests/regression/cgalpngtest/example004-expected.png differ diff --git a/tests/regression/cgalpngtest/example005-expected.png b/tests/regression/cgalpngtest/example005-expected.png new file mode 100644 index 0000000..8727800 Binary files /dev/null and b/tests/regression/cgalpngtest/example005-expected.png differ diff --git a/tests/regression/cgalpngtest/example006-expected.png b/tests/regression/cgalpngtest/example006-expected.png new file mode 100644 index 0000000..c2fd5c1 Binary files /dev/null and b/tests/regression/cgalpngtest/example006-expected.png differ diff --git a/tests/regression/cgalpngtest/example007-expected.png b/tests/regression/cgalpngtest/example007-expected.png new file mode 100644 index 0000000..0ec829f Binary files /dev/null and b/tests/regression/cgalpngtest/example007-expected.png differ diff --git a/tests/regression/cgalpngtest/example008-expected.png b/tests/regression/cgalpngtest/example008-expected.png new file mode 100644 index 0000000..54cd35d Binary files /dev/null and b/tests/regression/cgalpngtest/example008-expected.png differ diff --git a/tests/regression/cgalpngtest/example009-expected.png b/tests/regression/cgalpngtest/example009-expected.png new file mode 100644 index 0000000..bbdc192 Binary files /dev/null and b/tests/regression/cgalpngtest/example009-expected.png differ diff --git a/tests/regression/cgalpngtest/example010-expected.png b/tests/regression/cgalpngtest/example010-expected.png new file mode 100644 index 0000000..f611b12 Binary files /dev/null and b/tests/regression/cgalpngtest/example010-expected.png differ diff --git a/tests/regression/cgalpngtest/example011-expected.png b/tests/regression/cgalpngtest/example011-expected.png new file mode 100644 index 0000000..88c8299 Binary files /dev/null and b/tests/regression/cgalpngtest/example011-expected.png differ diff --git a/tests/regression/cgalpngtest/example012-expected.png b/tests/regression/cgalpngtest/example012-expected.png new file mode 100644 index 0000000..8065e9c Binary files /dev/null and b/tests/regression/cgalpngtest/example012-expected.png differ diff --git a/tests/regression/cgalpngtest/example013-expected.png b/tests/regression/cgalpngtest/example013-expected.png new file mode 100644 index 0000000..331fa17 Binary files /dev/null and b/tests/regression/cgalpngtest/example013-expected.png differ diff --git a/tests/regression/cgalpngtest/example014-expected.png b/tests/regression/cgalpngtest/example014-expected.png new file mode 100644 index 0000000..73453a2 Binary files /dev/null and b/tests/regression/cgalpngtest/example014-expected.png differ diff --git a/tests/regression/cgalpngtest/example015-expected.png b/tests/regression/cgalpngtest/example015-expected.png new file mode 100644 index 0000000..98d0e78 Binary files /dev/null and b/tests/regression/cgalpngtest/example015-expected.png differ diff --git a/tests/regression/cgalpngtest/example016-expected.png b/tests/regression/cgalpngtest/example016-expected.png new file mode 100644 index 0000000..70bd10d Binary files /dev/null and b/tests/regression/cgalpngtest/example016-expected.png differ diff --git a/tests/regression/cgalpngtest/example017-expected.png b/tests/regression/cgalpngtest/example017-expected.png new file mode 100644 index 0000000..05f429b Binary files /dev/null and b/tests/regression/cgalpngtest/example017-expected.png differ diff --git a/tests/regression/cgalpngtest/example018-expected.png b/tests/regression/cgalpngtest/example018-expected.png new file mode 100644 index 0000000..5ea05af Binary files /dev/null and b/tests/regression/cgalpngtest/example018-expected.png differ diff --git a/tests/regression/cgalpngtest/example019-expected.png b/tests/regression/cgalpngtest/example019-expected.png new file mode 100644 index 0000000..42a356a Binary files /dev/null and b/tests/regression/cgalpngtest/example019-expected.png differ diff --git a/tests/regression/cgalpngtest/example020-expected.png b/tests/regression/cgalpngtest/example020-expected.png new file mode 100644 index 0000000..e6afb94 Binary files /dev/null and b/tests/regression/cgalpngtest/example020-expected.png differ diff --git a/tests/regression/cgalpngtest/example021-expected.png b/tests/regression/cgalpngtest/example021-expected.png new file mode 100644 index 0000000..d657b0d Binary files /dev/null and b/tests/regression/cgalpngtest/example021-expected.png differ diff --git a/tests/regression/cgalpngtest/example022-expected.png b/tests/regression/cgalpngtest/example022-expected.png new file mode 100644 index 0000000..b8b8fbd Binary files /dev/null and b/tests/regression/cgalpngtest/example022-expected.png differ diff --git a/tests/regression/opencsgtest/example001-expected.png b/tests/regression/opencsgtest/example001-expected.png new file mode 100644 index 0000000..ff2da6b Binary files /dev/null and b/tests/regression/opencsgtest/example001-expected.png differ diff --git a/tests/regression/opencsgtest/example002-expected.png b/tests/regression/opencsgtest/example002-expected.png new file mode 100644 index 0000000..554dc13 Binary files /dev/null and b/tests/regression/opencsgtest/example002-expected.png differ diff --git a/tests/regression/opencsgtest/example003-expected.png b/tests/regression/opencsgtest/example003-expected.png new file mode 100644 index 0000000..1faa4a6 Binary files /dev/null and b/tests/regression/opencsgtest/example003-expected.png differ diff --git a/tests/regression/opencsgtest/example004-expected.png b/tests/regression/opencsgtest/example004-expected.png new file mode 100644 index 0000000..beb549c Binary files /dev/null and b/tests/regression/opencsgtest/example004-expected.png differ diff --git a/tests/regression/opencsgtest/example005-expected.png b/tests/regression/opencsgtest/example005-expected.png new file mode 100644 index 0000000..0bb2fef Binary files /dev/null and b/tests/regression/opencsgtest/example005-expected.png differ diff --git a/tests/regression/opencsgtest/example006-expected.png b/tests/regression/opencsgtest/example006-expected.png new file mode 100644 index 0000000..ff0fe35 Binary files /dev/null and b/tests/regression/opencsgtest/example006-expected.png differ diff --git a/tests/regression/opencsgtest/example007-expected.png b/tests/regression/opencsgtest/example007-expected.png new file mode 100644 index 0000000..b212b12 Binary files /dev/null and b/tests/regression/opencsgtest/example007-expected.png differ diff --git a/tests/regression/opencsgtest/example008-expected.png b/tests/regression/opencsgtest/example008-expected.png new file mode 100644 index 0000000..0e4241f Binary files /dev/null and b/tests/regression/opencsgtest/example008-expected.png differ diff --git a/tests/regression/opencsgtest/example009-expected.png b/tests/regression/opencsgtest/example009-expected.png new file mode 100644 index 0000000..541410d Binary files /dev/null and b/tests/regression/opencsgtest/example009-expected.png differ diff --git a/tests/regression/opencsgtest/example010-expected.png b/tests/regression/opencsgtest/example010-expected.png new file mode 100644 index 0000000..3a4ba27 Binary files /dev/null and b/tests/regression/opencsgtest/example010-expected.png differ diff --git a/tests/regression/opencsgtest/example011-expected.png b/tests/regression/opencsgtest/example011-expected.png new file mode 100644 index 0000000..13164c3 Binary files /dev/null and b/tests/regression/opencsgtest/example011-expected.png differ diff --git a/tests/regression/opencsgtest/example012-expected.png b/tests/regression/opencsgtest/example012-expected.png new file mode 100644 index 0000000..c705bc7 Binary files /dev/null and b/tests/regression/opencsgtest/example012-expected.png differ diff --git a/tests/regression/opencsgtest/example013-expected.png b/tests/regression/opencsgtest/example013-expected.png new file mode 100644 index 0000000..5917382 Binary files /dev/null and b/tests/regression/opencsgtest/example013-expected.png differ diff --git a/tests/regression/opencsgtest/example014-expected.png b/tests/regression/opencsgtest/example014-expected.png new file mode 100644 index 0000000..7f39f61 Binary files /dev/null and b/tests/regression/opencsgtest/example014-expected.png differ diff --git a/tests/regression/opencsgtest/example015-expected.png b/tests/regression/opencsgtest/example015-expected.png new file mode 100644 index 0000000..1a1c869 Binary files /dev/null and b/tests/regression/opencsgtest/example015-expected.png differ diff --git a/tests/regression/opencsgtest/example016-expected.png b/tests/regression/opencsgtest/example016-expected.png new file mode 100644 index 0000000..1288ff6 Binary files /dev/null and b/tests/regression/opencsgtest/example016-expected.png differ diff --git a/tests/regression/opencsgtest/example017-expected.png b/tests/regression/opencsgtest/example017-expected.png new file mode 100644 index 0000000..b0b2f8a Binary files /dev/null and b/tests/regression/opencsgtest/example017-expected.png differ diff --git a/tests/regression/opencsgtest/example018-expected.png b/tests/regression/opencsgtest/example018-expected.png new file mode 100644 index 0000000..033a136 Binary files /dev/null and b/tests/regression/opencsgtest/example018-expected.png differ diff --git a/tests/regression/opencsgtest/example019-expected.png b/tests/regression/opencsgtest/example019-expected.png new file mode 100644 index 0000000..306c0fb Binary files /dev/null and b/tests/regression/opencsgtest/example019-expected.png differ diff --git a/tests/regression/opencsgtest/example020-expected.png b/tests/regression/opencsgtest/example020-expected.png new file mode 100644 index 0000000..4e8c3c4 Binary files /dev/null and b/tests/regression/opencsgtest/example020-expected.png differ diff --git a/tests/regression/opencsgtest/example021-expected.png b/tests/regression/opencsgtest/example021-expected.png new file mode 100644 index 0000000..675e57b Binary files /dev/null and b/tests/regression/opencsgtest/example021-expected.png differ diff --git a/tests/regression/opencsgtest/example022-expected.png b/tests/regression/opencsgtest/example022-expected.png new file mode 100644 index 0000000..66738e0 Binary files /dev/null and b/tests/regression/opencsgtest/example022-expected.png differ diff --git a/tests/regression/throwntogethertest/example001-expected.png b/tests/regression/throwntogethertest/example001-expected.png new file mode 100644 index 0000000..a0ea588 Binary files /dev/null and b/tests/regression/throwntogethertest/example001-expected.png differ diff --git a/tests/regression/throwntogethertest/example002-expected.png b/tests/regression/throwntogethertest/example002-expected.png new file mode 100644 index 0000000..27e3c4e Binary files /dev/null and b/tests/regression/throwntogethertest/example002-expected.png differ diff --git a/tests/regression/throwntogethertest/example003-expected.png b/tests/regression/throwntogethertest/example003-expected.png new file mode 100644 index 0000000..f27d17c Binary files /dev/null and b/tests/regression/throwntogethertest/example003-expected.png differ diff --git a/tests/regression/throwntogethertest/example004-expected.png b/tests/regression/throwntogethertest/example004-expected.png new file mode 100644 index 0000000..0d2f1ba Binary files /dev/null and b/tests/regression/throwntogethertest/example004-expected.png differ diff --git a/tests/regression/throwntogethertest/example005-expected.png b/tests/regression/throwntogethertest/example005-expected.png new file mode 100644 index 0000000..4c401da Binary files /dev/null and b/tests/regression/throwntogethertest/example005-expected.png differ diff --git a/tests/regression/throwntogethertest/example006-expected.png b/tests/regression/throwntogethertest/example006-expected.png new file mode 100644 index 0000000..66441bf Binary files /dev/null and b/tests/regression/throwntogethertest/example006-expected.png differ diff --git a/tests/regression/throwntogethertest/example007-expected.png b/tests/regression/throwntogethertest/example007-expected.png new file mode 100644 index 0000000..ea17570 Binary files /dev/null and b/tests/regression/throwntogethertest/example007-expected.png differ diff --git a/tests/regression/throwntogethertest/example008-expected.png b/tests/regression/throwntogethertest/example008-expected.png new file mode 100644 index 0000000..880844b Binary files /dev/null and b/tests/regression/throwntogethertest/example008-expected.png differ diff --git a/tests/regression/throwntogethertest/example009-expected.png b/tests/regression/throwntogethertest/example009-expected.png new file mode 100644 index 0000000..de8868a Binary files /dev/null and b/tests/regression/throwntogethertest/example009-expected.png differ diff --git a/tests/regression/throwntogethertest/example010-expected.png b/tests/regression/throwntogethertest/example010-expected.png new file mode 100644 index 0000000..37e6545 Binary files /dev/null and b/tests/regression/throwntogethertest/example010-expected.png differ diff --git a/tests/regression/throwntogethertest/example011-expected.png b/tests/regression/throwntogethertest/example011-expected.png new file mode 100644 index 0000000..13164c3 Binary files /dev/null and b/tests/regression/throwntogethertest/example011-expected.png differ diff --git a/tests/regression/throwntogethertest/example012-expected.png b/tests/regression/throwntogethertest/example012-expected.png new file mode 100644 index 0000000..360d6eb Binary files /dev/null and b/tests/regression/throwntogethertest/example012-expected.png differ diff --git a/tests/regression/throwntogethertest/example013-expected.png b/tests/regression/throwntogethertest/example013-expected.png new file mode 100644 index 0000000..d22b68f Binary files /dev/null and b/tests/regression/throwntogethertest/example013-expected.png differ diff --git a/tests/regression/throwntogethertest/example014-expected.png b/tests/regression/throwntogethertest/example014-expected.png new file mode 100644 index 0000000..562ce74 Binary files /dev/null and b/tests/regression/throwntogethertest/example014-expected.png differ diff --git a/tests/regression/throwntogethertest/example015-expected.png b/tests/regression/throwntogethertest/example015-expected.png new file mode 100644 index 0000000..6e16e33 Binary files /dev/null and b/tests/regression/throwntogethertest/example015-expected.png differ diff --git a/tests/regression/throwntogethertest/example016-expected.png b/tests/regression/throwntogethertest/example016-expected.png new file mode 100644 index 0000000..9bc4306 Binary files /dev/null and b/tests/regression/throwntogethertest/example016-expected.png differ diff --git a/tests/regression/throwntogethertest/example017-expected.png b/tests/regression/throwntogethertest/example017-expected.png new file mode 100644 index 0000000..b0b2f8a Binary files /dev/null and b/tests/regression/throwntogethertest/example017-expected.png differ diff --git a/tests/regression/throwntogethertest/example018-expected.png b/tests/regression/throwntogethertest/example018-expected.png new file mode 100644 index 0000000..033a136 Binary files /dev/null and b/tests/regression/throwntogethertest/example018-expected.png differ diff --git a/tests/regression/throwntogethertest/example019-expected.png b/tests/regression/throwntogethertest/example019-expected.png new file mode 100644 index 0000000..306c0fb Binary files /dev/null and b/tests/regression/throwntogethertest/example019-expected.png differ diff --git a/tests/regression/throwntogethertest/example020-expected.png b/tests/regression/throwntogethertest/example020-expected.png new file mode 100644 index 0000000..fa41d2f Binary files /dev/null and b/tests/regression/throwntogethertest/example020-expected.png differ diff --git a/tests/regression/throwntogethertest/example021-expected.png b/tests/regression/throwntogethertest/example021-expected.png new file mode 100644 index 0000000..1e1576c Binary files /dev/null and b/tests/regression/throwntogethertest/example021-expected.png differ diff --git a/tests/regression/throwntogethertest/example022-expected.png b/tests/regression/throwntogethertest/example022-expected.png new file mode 100644 index 0000000..66738e0 Binary files /dev/null and b/tests/regression/throwntogethertest/example022-expected.png differ -- cgit v0.10.1