37 lines
No EOL
676 B
OpenSCAD
37 lines
No EOL
676 B
OpenSCAD
use <../dsl/component.scad>;
|
|
use <../dsl/modify.scad>;
|
|
use <../subdivision.scad>;
|
|
use <../scad-common.scad>;
|
|
view=0; // [0:all,1:side,2:top,3:front]
|
|
|
|
$sc_view=[undef,"side","top","front"][view];
|
|
|
|
module test_components() {
|
|
c("square") square(10);
|
|
c("eq") add() circle(10);
|
|
c("eq") remove() construct() {
|
|
add() square(10);
|
|
remove() circle(5);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
module def() {
|
|
mc(["def"]) mv("side","front") add() square([10,20]);
|
|
c("def") {
|
|
v("top") add() circle(10);
|
|
v("side") remove() circle(5);
|
|
}
|
|
}
|
|
|
|
|
|
|
|
_c("def") c_construct() {
|
|
v("3d") {
|
|
add() sphere(5);
|
|
remove() move(z=20) sphere(7);
|
|
}
|
|
def();
|
|
} |