1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-29 17:30:11 +02:00

add convexity

This commit is contained in:
Justin Lin
2022-03-30 09:36:02 +08:00
parent 96c9cfc0c4
commit 3e1044787f
2 changed files with 3 additions and 3 deletions

View File

@@ -1,6 +1,6 @@
to_do: to_do:
- doc: sf add convexity - doc: sf, stereographic_extrude add convexity
new: new:

View File

@@ -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();
} }