diff options
author | Marius Kintel <marius@kintel.net> | 2014-01-05 17:44:53 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2014-01-05 17:44:53 (GMT) |
commit | 0899abeb90f72817bfe2e8ce28d280d3b27d6efc (patch) | |
tree | 0fb07aee68bd2109a72da02e4250bde008bfaf1f | |
parent | 5ef8d9b8a1591e2f290e0f2acd57c05cb195c5f4 (diff) |
Added testcase for #591
-rw-r--r-- | testdata/scad/bugs/issue591.scad | 25 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 1 | ||||
-rw-r--r-- | tests/regression/cgalpngtest/issue591-expected.png | bin | 0 -> 8778 bytes | |||
-rw-r--r-- | tests/regression/opencsgtest/issue591-expected.png | bin | 0 -> 8778 bytes |
4 files changed, 26 insertions, 0 deletions
diff --git a/testdata/scad/bugs/issue591.scad b/testdata/scad/bugs/issue591.scad new file mode 100644 index 0000000..f30142f --- /dev/null +++ b/testdata/scad/bugs/issue591.scad @@ -0,0 +1,25 @@ +// Creates the same "non-manifold" object (sharing one edge) using two techniques: +// o linear_extrude of two 2D objects +// o union of two linear_extrudes +// +// Subsequently cuts away the non-manifold part: +// -> the first technique fails, the second one succeeds +// +module cutoff() { + difference() { + children(); + translate([0,0,2.5]) cube(2, center=true); + } +} + +cutoff() { + linear_extrude(height=3, scale=[0,1], convexity=2) { + translate([1,0,0]) square(1,true); + translate([-1,0,0]) square(1,true); + } +} + +translate([0,2,0]) cutoff() { + linear_extrude(height=3, scale=[0,1]) translate([1,0,0]) square(1,true); + linear_extrude(height=3, scale=[0,1]) translate([-1,0,0]) square(1,true); +} diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index ed5bdc3..a1c5cc6 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -891,6 +891,7 @@ list(APPEND BUGS_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue495.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue578b.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue582.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue584.scad + ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue591.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/issue585.scad) list(APPEND OPENCSGTEST_FILES ${BUGS_FILES}) diff --git a/tests/regression/cgalpngtest/issue591-expected.png b/tests/regression/cgalpngtest/issue591-expected.png Binary files differnew file mode 100644 index 0000000..07e1559 --- /dev/null +++ b/tests/regression/cgalpngtest/issue591-expected.png diff --git a/tests/regression/opencsgtest/issue591-expected.png b/tests/regression/opencsgtest/issue591-expected.png Binary files differnew file mode 100644 index 0000000..07e1559 --- /dev/null +++ b/tests/regression/opencsgtest/issue591-expected.png |