summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorDon Bright <hugh.m.bright@gmail.com>2013-12-15 03:58:22 (GMT)
committerDon Bright <hugh.m.bright@gmail.com>2013-12-15 03:58:22 (GMT)
commitf12237a9c4b39349da673456e7e309562ed0f75a (patch)
tree79a248808a882562a0eaf722aec3dd57efc9207f /tests
parent36db9de870262110ea74ffa136b92f49e1dd650d (diff)
add tests for non-planar bug. add docs to .cc code
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt4
-rw-r--r--tests/regression/cgalpngtest/nonplanar_polyhedron-expected.pngbin0 -> 6465 bytes
-rw-r--r--tests/regression/dumptest/nonplanar_polyhedron-expected.csg3
-rw-r--r--tests/regression/opencsgtest/nonplanar_polyhedron-expected.pngbin0 -> 6740 bytes
-rw-r--r--tests/regression/throwntogethertest/nonplanar_polyhedron-expected.pngbin0 -> 6740 bytes
5 files changed, 6 insertions, 1 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index 3d3aad1..7db0874 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -794,12 +794,14 @@ list(APPEND DUMPTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/escape-test
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/localfiles_dir/localfiles-compatibility-test.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allexpressions.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allfunctions.scad
- ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allmodules.scad)
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/allmodules.scad
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/nonplanar_polyhedron.scad)
list(APPEND CGALPNGTEST_FILES ${FEATURES_FILES} ${SCAD_DXF_FILES} ${EXAMPLE_FILES})
list(APPEND CGALPNGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/misc/include-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/use-tests.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/transform-nan-inf-tests.scad
+ ${CMAKE_SOURCE_DIR}/../testdata/scad/bugs/nonplanar_polyhedron.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/localfiles-test.scad
${CMAKE_SOURCE_DIR}/../testdata/scad/misc/localfiles_dir/localfiles-compatibility-test.scad)
diff --git a/tests/regression/cgalpngtest/nonplanar_polyhedron-expected.png b/tests/regression/cgalpngtest/nonplanar_polyhedron-expected.png
new file mode 100644
index 0000000..3c69083
--- /dev/null
+++ b/tests/regression/cgalpngtest/nonplanar_polyhedron-expected.png
Binary files differ
diff --git a/tests/regression/dumptest/nonplanar_polyhedron-expected.csg b/tests/regression/dumptest/nonplanar_polyhedron-expected.csg
new file mode 100644
index 0000000..a3c1b81
--- /dev/null
+++ b/tests/regression/dumptest/nonplanar_polyhedron-expected.csg
@@ -0,0 +1,3 @@
+group() {
+ polyhedron(points = [[-10, -13.09016994374, -34.27050983124], [-10, -13.09016994374, 34.27050983124], [-10, 13.09016994374, -34.27050983124], [-10, 13.09016994374, 34.27050983124], [-5, -5, -37.36067977499], [-5, -5, 37.36067977499], [-5, 5, -37.36067977499], [-5, 5, 37.36067977499], [-5, -37.36067977499, -5], [-5, -37.36067977499, 5], [-5, -21.18033988749, -31.18033988749], [-5, -21.18033988749, 31.18033988749], [-5, 37.36067977499, -5], [-5, 37.36067977499, 5], [-5, 21.18033988749, -31.18033988749], [-5, 21.18033988749, 31.18033988749], [5, -5, -37.36067977499], [5, -5, 37.36067977499], [5, 5, -37.36067977499], [5, 5, 37.36067977499], [5, -37.36067977499, -5], [5, -37.36067977499, 5], [5, -21.18033988749, -31.18033988749], [5, -21.18033988749, 31.18033988749], [5, 37.36067977499, -5], [5, 37.36067977499, 5], [5, 21.18033988749, -31.18033988749], [5, 21.18033988749, 31.18033988749], [10, -13.09016994374, -34.27050983124], [10, -13.09016994374, 34.27050983124], [10, 13.09016994374, -34.27050983124], [10, 13.09016994374, 34.27050983124], [-34.27050983124, -10, -13.09016994374], [-34.27050983124, -10, 13.09016994374], [-34.27050983124, 10, -13.09016994374], [-34.27050983124, 10, 13.09016994374], [-29.27050983124, -18.09016994374, -16.18033988749], [-29.27050983124, -18.09016994374, 16.18033988749], [-29.27050983124, 18.09016994374, -16.18033988749], [-29.27050983124, 18.09016994374, 16.18033988749], [-18.09016994374, -16.18033988749, -29.27050983124], [-18.09016994374, -16.18033988749, 29.27050983124], [-18.09016994374, 16.18033988749, -29.27050983124], [-18.09016994374, 16.18033988749, 29.27050983124], [-13.09016994374, -34.27050983124, -10], [-13.09016994374, -34.27050983124, 10], [-13.09016994374, -24.27050983124, -26.18033988749], [-13.09016994374, -24.27050983124, 26.18033988749], [-13.09016994374, 24.27050983124, -26.18033988749], [-13.09016994374, 24.27050983124, 26.18033988749], [-13.09016994374, 34.27050983124, -10], [-13.09016994374, 34.27050983124, 10], [-26.18033988749, -13.09016994374, -24.27050983124], [-26.18033988749, -13.09016994374, 24.27050983124], [-26.18033988749, 13.09016994374, -24.27050983124], [-26.18033988749, 13.09016994374, 24.27050983124], [-37.36067977499, -5, -5], [-37.36067977499, -5, 5], [-37.36067977499, 5, -5], [-37.36067977499, 5, 5], [-16.18033988749, -29.27050983124, -18.09016994374], [-16.18033988749, -29.27050983124, 18.09016994374], [-16.18033988749, 29.27050983124, -18.09016994374], [-16.18033988749, 29.27050983124, 18.09016994374], [-31.18033988749, -5, -21.18033988749], [-31.18033988749, -5, 21.18033988749], [-31.18033988749, 5, -21.18033988749], [-31.18033988749, 5, 21.18033988749], [-21.18033988749, -31.18033988749, -5], [-21.18033988749, -31.18033988749, 5], [-21.18033988749, 31.18033988749, -5], [-21.18033988749, 31.18033988749, 5], [-24.27050983124, -26.18033988749, -13.09016994374], [-24.27050983124, -26.18033988749, 13.09016994374], [-24.27050983124, 26.18033988749, -13.09016994374], [-24.27050983124, 26.18033988749, 13.09016994374], [16.18033988749, -29.27050983124, -18.09016994374], [16.18033988749, -29.27050983124, 18.09016994374], [16.18033988749, 29.27050983124, -18.09016994374], [16.18033988749, 29.27050983124, 18.09016994374], [24.27050983124, -26.18033988749, -13.09016994374], [24.27050983124, -26.18033988749, 13.09016994374], [24.27050983124, 26.18033988749, -13.09016994374], [24.27050983124, 26.18033988749, 13.09016994374], [37.36067977499, -5, -5], [37.36067977499, -5, 5], [37.36067977499, 5, -5], [37.36067977499, 5, 5], [21.18033988749, -31.18033988749, -5], [21.18033988749, -31.18033988749, 5], [21.18033988749, 31.18033988749, -5], [21.18033988749, 31.18033988749, 5], [13.09016994374, -34.27050983124, -10], [13.09016994374, -34.27050983124, 10], [13.09016994374, -24.27050983124, -26.18033988749], [13.09016994374, -24.27050983124, 26.18033988749], [13.09016994374, 24.27050983124, -26.18033988749], [13.09016994374, 24.27050983124, 26.18033988749], [13.09016994374, 34.27050983124, -10], [13.09016994374, 34.27050983124, 10], [26.18033988749, -13.09016994374, -24.27050983124], [26.18033988749, -13.09016994374, 24.27050983124], [26.18033988749, 13.09016994374, -24.27050983124], [26.18033988749, 13.09016994374, 24.27050983124], [31.18033988749, -5, -21.18033988749], [31.18033988749, -5, 21.18033988749], [31.18033988749, 5, -21.18033988749], [31.18033988749, 5, 21.18033988749], [18.09016994374, -16.18033988749, -29.27050983124], [18.09016994374, -16.18033988749, 29.27050983124], [18.09016994374, 16.18033988749, -29.27050983124], [18.09016994374, 16.18033988749, 29.27050983124], [29.27050983124, -18.09016994374, -16.18033988749], [29.27050983124, -18.09016994374, 16.18033988749], [29.27050983124, 18.09016994374, -16.18033988749], [29.27050983124, 18.09016994374, 16.18033988749], [34.27050983124, -10, -13.09016994374], [34.27050983124, -10, 13.09016994374], [34.27050983124, 10, -13.09016994374], [34.27050983124, 10, 13.09016994374]], faces = [[41, 53, 65, 67, 55, 43, 3, 7, 5, 1], [100, 104, 106, 102, 110, 30, 18, 16, 28, 108], [11, 1, 5, 17, 29, 23], [18, 30, 26, 14, 2, 6], [33, 37, 73, 69, 68, 72, 36, 32, 56, 57], [91, 90, 82, 114, 118, 86, 87, 119, 115, 83], [81, 113, 117, 85, 84, 116, 112, 80, 88, 89], [59, 58, 34, 38, 74, 70, 71, 75, 39, 35], [0, 10, 22, 28, 16, 4], [15, 27, 31, 19, 7, 3], [64, 52, 40, 0, 4, 6, 2, 42, 54, 66], [19, 31, 111, 103, 107, 105, 101, 109, 29, 17], [96, 110, 102, 114, 82, 78], [53, 41, 47, 61, 73, 37], [43, 49, 15, 3], [94, 108, 28, 22], [23, 29, 109, 95], [2, 14, 48, 42], [36, 72, 60, 46, 40, 52], [79, 83, 115, 103, 111, 97], [69, 45, 9, 8, 44, 68], [24, 98, 90, 91, 99, 25], [77, 95, 109, 101, 113, 81], [42, 48, 62, 74, 38, 54], [40, 46, 10, 0], [97, 111, 31, 27], [44, 8, 20, 92, 76, 94, 22, 10, 46, 60], [63, 51, 13, 25, 99, 79, 97, 27, 15, 49], [26, 30, 110, 96], [1, 11, 47, 41], [55, 39, 75, 63, 49, 43], [80, 112, 100, 108, 94, 76], [48, 14, 26, 96, 78, 98, 24, 12, 50, 62], [61, 47, 11, 23, 95, 77, 93, 21, 9, 45], [71, 70, 50, 12, 13, 51], [93, 89, 88, 92, 20, 21], [102, 106, 118, 114], [65, 53, 37, 33], [74, 62, 50, 70], [77, 81, 89, 93], [101, 105, 117, 113], [66, 54, 38, 34], [73, 61, 45, 69], [78, 82, 90, 98], [32, 36, 52, 64], [115, 119, 107, 103], [92, 88, 80, 76], [71, 51, 63, 75], [56, 32, 64, 66, 34, 58], [107, 119, 87, 85, 117, 105], [35, 39, 55, 67], [112, 116, 104, 100], [99, 91, 83, 79], [68, 44, 60, 72], [57, 59, 35, 67, 65, 33], [116, 84, 86, 118, 106, 104], [4, 16, 18, 6], [7, 19, 17, 5], [12, 24, 25, 13], [9, 21, 20, 8], [56, 58, 59, 57], [85, 87, 86, 84]], convexity = 1);
+}
diff --git a/tests/regression/opencsgtest/nonplanar_polyhedron-expected.png b/tests/regression/opencsgtest/nonplanar_polyhedron-expected.png
new file mode 100644
index 0000000..c81f20a
--- /dev/null
+++ b/tests/regression/opencsgtest/nonplanar_polyhedron-expected.png
Binary files differ
diff --git a/tests/regression/throwntogethertest/nonplanar_polyhedron-expected.png b/tests/regression/throwntogethertest/nonplanar_polyhedron-expected.png
new file mode 100644
index 0000000..c81f20a
--- /dev/null
+++ b/tests/regression/throwntogethertest/nonplanar_polyhedron-expected.png
Binary files differ
contact: Jan Huwald // Impressum