diff options
author | Marius Kintel <marius@kintel.net> | 2011-09-02 12:46:45 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2011-09-02 12:46:45 (GMT) |
commit | a1e452472a8cc71c8a8337ed1a8f54e517b48a04 (patch) | |
tree | a2c57ae509ba83d1fae85526c12c17f8bd16261e | |
parent | a20c08b8cea3832a8c99eeecc8d3f66cdbb6c85d (diff) |
Added intersection-tests
-rw-r--r-- | testdata/scad/features/intersection-tests.scad | 35 | ||||
-rw-r--r-- | tests/CMakeLists.txt | 3 | ||||
-rw-r--r-- | tests/regression/cgalpngtest/intersection-tests-expected.png | bin | 0 -> 8295 bytes |
3 files changed, 35 insertions, 3 deletions
diff --git a/testdata/scad/features/intersection-tests.scad b/testdata/scad/features/intersection-tests.scad index 4101b03..f673b35 100644 --- a/testdata/scad/features/intersection-tests.scad +++ b/testdata/scad/features/intersection-tests.scad @@ -1,4 +1,35 @@ intersection() { - sphere(3); - cube([3,3,8], center=true); + sphere(r=5); + translate([0,0,3]) cube([4,4,6], center=true); +} + +translate([0,12,0]) intersection() { + cube([10,10,10], center=true); + cylinder(r=4, h=12, center=true); +} + +translate([12,0,0]) intersection() { + cube([10,10,10], center=true); + cylinder(r=4, h=12, center=true); + rotate([0,90,0]) cylinder(r=4, h=12, center=true); +} + +translate([12,12,0]) intersection() { + cube([10,10,10], center=true); + translate([0,0,7]) cylinder(r=4, h=4, center=true); +} + +translate([24,0,0]) intersection() { + cube([10,10,10], center=true); + translate([0,0,6.99]) cylinder(r=4, h=4, center=true); +} + +translate([-12,0,0]) intersection() { + cube([10,10,10], center=true); + translate([0,-10,-10]) cube([10,10,10], center=true); +} + +translate([-12,12,0]) intersection() { + cube([10,10,10], center=true); + translate([0,-9.99,-9.99]) cube([10,10,10], center=true); } diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 26533af..161eade 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -208,7 +208,8 @@ LIST(APPEND CGALPNGTEST_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/features/sphere-tests.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/features/cylinder-tests.scad ${CMAKE_SOURCE_DIR}/../testdata/scad/features/union-tests.scad - ${CMAKE_SOURCE_DIR}/../testdata/scad/features/difference-tests.scad) + ${CMAKE_SOURCE_DIR}/../testdata/scad/features/difference-tests.scad + ${CMAKE_SOURCE_DIR}/../testdata/scad/features/intersection-tests.scad) #LIST(APPEND CGALPNGTEST_FILES ${CMAKE_SOURCE_DIR}/../examples/example001.scad) add_cmdline_test(cgalpngtest png ${CGALPNGTEST_FILES}) diff --git a/tests/regression/cgalpngtest/intersection-tests-expected.png b/tests/regression/cgalpngtest/intersection-tests-expected.png Binary files differnew file mode 100644 index 0000000..6d004b0 --- /dev/null +++ b/tests/regression/cgalpngtest/intersection-tests-expected.png |