Added intersection() for() test
|
|
@ -3,7 +3,7 @@ module LazyChildrenTest() {
|
|||
}
|
||||
|
||||
LazyChildrenTest() {
|
||||
cube();
|
||||
sphere();
|
||||
cylinder();
|
||||
cube(10, center=true);
|
||||
translate([11,0,0]) sphere(5);
|
||||
translate([22,0,0]) cylinder(r=5, h=10, center=true);
|
||||
}
|
||||
|
|
|
|||
5
testdata/scad/experimental/lazyunion-intersection-for.scad
vendored
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
intersection() for(i = [[0, 0, 0],
|
||||
[10, 20, 300],
|
||||
[200, 40, 57],
|
||||
[20, 88, 57]])
|
||||
rotate(i) cube([100, 20, 20], center = true);
|
||||
|
|
@ -1,3 +1,3 @@
|
|||
cube();
|
||||
sphere();
|
||||
cylinder();
|
||||
cube(10, center=true);
|
||||
translate([11,0,0]) sphere(5);
|
||||
translate([22,0,0]) cylinder(r=5, h=10, center=true);
|
||||
|
|
|
|||
|
|
@ -1034,12 +1034,18 @@ add_cmdline_test(cgalstlsanitytest EXE ${CMAKE_SOURCE_DIR}/cgalstlsanitytest SUF
|
|||
add_cmdline_test(echotest EXE ${OPENSCAD_BINPATH} ARGS --enable=concat -o SUFFIX echo FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/concat-tests.scad)
|
||||
|
||||
# lazy-union
|
||||
list(APPEND LAZYUNION_DUMP_FILES ${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/lazyunion-toplevel-objects.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/lazyunion-toplevel-for.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/lazyunion-nested-for.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/lazyunion-children.scad)
|
||||
list(APPEND LAZYUNION_DUMP_FILES
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/lazyunion-toplevel-objects.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/lazyunion-toplevel-for.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/lazyunion-nested-for.scad
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/lazyunion-children.scad)
|
||||
|
||||
list(APPEND LAZYUNION_FILES ${LAZYUNION_DUMP_FILES}
|
||||
${CMAKE_SOURCE_DIR}/../testdata/scad/experimental/lazyunion-intersection-for.scad)
|
||||
|
||||
add_cmdline_test(lazyunion-dump EXE ${OPENSCAD_BINPATH} ARGS --enable=lazy-union -o SUFFIX csg FILES ${LAZYUNION_DUMP_FILES})
|
||||
add_cmdline_test(lazyunion-opencsg EXE ${OPENSCAD_BINPATH} ARGS --enable=lazy-union -o SUFFIX png FILES ${LAZYUNION_FILES})
|
||||
add_cmdline_test(lazyunion-cgalpng EXE ${OPENSCAD_BINPATH} ARGS --enable=lazy-union --render -o SUFFIX png FILES ${LAZYUNION_FILES})
|
||||
|
||||
# Tests using the actual OpenSCAD binary
|
||||
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 8.8 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 9 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 8.8 KiB |
|
|
@ -1,7 +1,11 @@
|
|||
group() {
|
||||
color([1, 0, 0, 1]) {
|
||||
cube(size = [1, 1, 1], center = false);
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 1);
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = false);
|
||||
cube(size = [10, 10, 10], center = true);
|
||||
multmatrix([[1, 0, 0, 11], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 5);
|
||||
}
|
||||
multmatrix([[1, 0, 0, 22], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 10, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
cube(size = [1, 1, 1], center = false);
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 1);
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 1, r1 = 1, r2 = 1, center = false);
|
||||
cube(size = [10, 10, 10], center = true);
|
||||
multmatrix([[1, 0, 0, 11], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
sphere($fn = 0, $fa = 12, $fs = 2, r = 5);
|
||||
}
|
||||
multmatrix([[1, 0, 0, 22], [0, 1, 0, 0], [0, 0, 1, 0], [0, 0, 0, 1]]) {
|
||||
cylinder($fn = 0, $fa = 12, $fs = 2, h = 10, r1 = 5, r2 = 5, center = true);
|
||||
}
|
||||
|
|
|
|||
|
After Width: | Height: | Size: 8.9 KiB |
|
After Width: | Height: | Size: 5.7 KiB |
|
After Width: | Height: | Size: 9.6 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 9.3 KiB |