scad-common/dsl/modify.test.scad
2019-02-23 20:33:01 +01:00

42 lines
No EOL
671 B
OpenSCAD
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

use <modify.scad>;
module offset_by(x=0,y=0,z=0) {
for(i=[0:1:$children-1]) {
translate(i*[x,y,z]) children(i);
}
}
module inner() {
remove() cube(5);
}
mirror([1,0,0])
offset_by(y=15) {
construct() {
remove() cube(10);
}
construct() {
cube(10);
}
construct() {
cube(10);
remove() cube(5);
}
construct() {
add() cube(10);
remove() cube(5);
}
construct() {
add() cube(10);
inner();
}
construct() {
add() cube(10);
remove() construct() {
add() sphere(7);
remove() cube(5);
}
}
}