Added intersection-tests

stl_dim
Marius Kintel 2011-09-02 14:46:45 +02:00
parent a20c08b8ce
commit a1e452472a
3 changed files with 35 additions and 3 deletions

View File

@ -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);
}

View File

@ -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})

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB