mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-29 17:30:11 +02:00
add convexity
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
to_do:
|
to_do:
|
||||||
|
|
||||||
- doc: sf add convexity
|
- doc: sf, stereographic_extrude add convexity
|
||||||
|
|
||||||
new:
|
new:
|
||||||
|
|
||||||
|
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
**/
|
**/
|
||||||
|
|
||||||
module stereographic_extrude(shadow_side_leng) {
|
module stereographic_extrude(shadow_side_leng, convexity = 1) {
|
||||||
half_side_length = shadow_side_leng / 2;
|
half_side_length = shadow_side_leng / 2;
|
||||||
outer_sphere_r = half_side_length / 3;
|
outer_sphere_r = half_side_length / 3;
|
||||||
a = atan(sqrt(2) * half_side_length / (2 * outer_sphere_r));
|
a = atan(sqrt(2) * half_side_length / (2 * outer_sphere_r));
|
||||||
@@ -25,7 +25,7 @@ module stereographic_extrude(shadow_side_leng) {
|
|||||||
circle(inner_sphere_r * cos(a));
|
circle(inner_sphere_r * cos(a));
|
||||||
}
|
}
|
||||||
|
|
||||||
linear_extrude(outer_sphere_r * 2, scale = 0.01)
|
linear_extrude(outer_sphere_r * 2, scale = 0.01, convexity = convexity)
|
||||||
children();
|
children();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user