diff options
-rw-r--r-- | testdata/scad/bugs/bbox-transform-bug.scad | 9 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 3 | ||||
-rw-r--r-- | tests/regression/opencsgtest/bbox-transform-bug-expected.png | bin | 0 -> 5808 bytes | |||
-rw-r--r-- | tests/regression/throwntogethertest/bbox-transform-bug-expected.png | bin | 0 -> 6400 bytes |
4 files changed, 11 insertions, 1 deletions
diff --git a/testdata/scad/bugs/bbox-transform-bug.scad b/testdata/scad/bugs/bbox-transform-bug.scad new file mode 100644 index 0000000..ccd2eab --- /dev/null +++ b/testdata/scad/bugs/bbox-transform-bug.scad @@ -0,0 +1,9 @@ +// +// Bug description: The intersection results in an empty object. +// Cause: The rotated bounding box is wrongly calculated, yielding a +// box which don't overlap with the bounding box of the second object. +// +intersection() { + rotate(45) cube(10); + translate([3,2,0]) cube(10); +} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e98dd8e..20a9ede 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -531,7 +531,8 @@ list(APPEND DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test list(APPEND CGALPNGTEST_FILES ${FEATURES_FILES} ${SCAD_DXF_FILES} ${EXAMPLE_FILES}) list(APPEND OPENCSGTEST_FILES ${CGALPNGTEST_FILES}) -list(APPEND THROWNTOGETHERTEST_FILES ${CGALPNGTEST_FILES}) +list(APPEND OPENCSGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/bbox-transform-bug.scad) +list(APPEND THROWNTOGETHERTEST_FILES ${OPENCSGTEST_FILES}) # 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 diff --git a/tests/regression/opencsgtest/bbox-transform-bug-expected.png b/tests/regression/opencsgtest/bbox-transform-bug-expected.png Binary files differnew file mode 100644 index 0000000..060b921 --- /dev/null +++ b/tests/regression/opencsgtest/bbox-transform-bug-expected.png diff --git a/tests/regression/throwntogethertest/bbox-transform-bug-expected.png b/tests/regression/throwntogethertest/bbox-transform-bug-expected.png Binary files differnew file mode 100644 index 0000000..f65e09c --- /dev/null +++ b/tests/regression/throwntogethertest/bbox-transform-bug-expected.png |