mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-05 14:27:45 +02:00
add thickness
This commit is contained in:
@@ -10,14 +10,24 @@
|
|||||||
|
|
||||||
include <__comm__/__nearest_multiple_of_4.scad>;
|
include <__comm__/__nearest_multiple_of_4.scad>;
|
||||||
|
|
||||||
module crystal_ball(radius, theta = 360, phi = 180) {
|
module crystal_ball(radius, theta = 360, phi = 180, thickness) {
|
||||||
phis = is_num(phi) ? [0, phi] : phi;
|
phis = is_num(phi) ? [0, phi] : phi;
|
||||||
|
|
||||||
frags = __frags(radius);
|
frags = __frags(radius);
|
||||||
|
|
||||||
shape_pts = shape_pie(
|
angle = [90 - phis[1], 90 - phis[0]];
|
||||||
|
|
||||||
|
shape_pts = is_undef(thickness) ?
|
||||||
|
shape_pie(
|
||||||
radius,
|
radius,
|
||||||
[90 - phis[1], 90 - phis[0]],
|
angle ,
|
||||||
|
$fn = __nearest_multiple_of_4(frags)
|
||||||
|
) :
|
||||||
|
shape_arc(
|
||||||
|
radius,
|
||||||
|
angle,
|
||||||
|
width = thickness,
|
||||||
|
width_mode = "LINE_INWARD",
|
||||||
$fn = __nearest_multiple_of_4(frags)
|
$fn = __nearest_multiple_of_4(frags)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user