mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-15 11:14:17 +02:00
add engraved param
This commit is contained in:
@@ -12,6 +12,8 @@ spacing = 3;
|
|||||||
drill_angle = 38;
|
drill_angle = 38;
|
||||||
support_thickness = 1;
|
support_thickness = 1;
|
||||||
|
|
||||||
|
engraved = false; // [true, false], warning: previewing is very slow when it's true.
|
||||||
|
|
||||||
ivory_ball_fern_leaf(radius, thickness, spacing, drill_angle, support_thickness);
|
ivory_ball_fern_leaf(radius, thickness, spacing, drill_angle, support_thickness);
|
||||||
|
|
||||||
module ivory_ball_fern_leaf(radius, thickness, spacing, drill_angle, support_thickness) {
|
module ivory_ball_fern_leaf(radius, thickness, spacing, drill_angle, support_thickness) {
|
||||||
@@ -50,13 +52,7 @@ module ivory_ball_fern_leaf(radius, thickness, spacing, drill_angle, support_thi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
color("black")
|
module fern_ball() {
|
||||||
difference() {
|
|
||||||
sphere(radius);
|
|
||||||
sphere(radius - thickness);
|
|
||||||
}
|
|
||||||
|
|
||||||
union() {
|
|
||||||
ferns(4);
|
ferns(4);
|
||||||
|
|
||||||
mirror([1, 0, 0])
|
mirror([1, 0, 0])
|
||||||
@@ -70,6 +66,27 @@ module ivory_ball_fern_leaf(radius, thickness, spacing, drill_angle, support_thi
|
|||||||
mirror([0, 1, 1])
|
mirror([0, 1, 1])
|
||||||
ferns(2);
|
ferns(2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(engraved) {
|
||||||
|
difference() {
|
||||||
|
render()
|
||||||
|
difference() {
|
||||||
|
sphere(radius);
|
||||||
|
sphere(radius - thickness);
|
||||||
|
}
|
||||||
|
|
||||||
|
fern_ball();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
color("black")
|
||||||
|
difference() {
|
||||||
|
sphere(radius);
|
||||||
|
sphere(radius - thickness);
|
||||||
|
}
|
||||||
|
|
||||||
|
fern_ball();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
r_step = thickness + spacing;
|
r_step = thickness + spacing;
|
||||||
|
Reference in New Issue
Block a user