mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-31 18:22:08 +02:00
accept 3D point
This commit is contained in:
@@ -10,13 +10,14 @@ function tf_sphere(size, point, radius, angle = [180, 360]) =
|
||||
let(
|
||||
x = point[0],
|
||||
y = point[1],
|
||||
z = is_undef(point[2]) ? 0 : point[2],
|
||||
za = angle[0],
|
||||
xa = angle[1],
|
||||
xlen = size[0],
|
||||
ylen = size[1],
|
||||
za_step = za / ylen,
|
||||
rza = za_step * y,
|
||||
rzpt = [radius * cos(rza), radius * sin(rza), 0],
|
||||
rzpt = [(radius + z) * cos(rza), (radius + z) * sin(rza), 0],
|
||||
rxpt = rotate_p(rzpt, [xa / xlen * x, 0, 0])
|
||||
)
|
||||
rxpt;
|
Reference in New Issue
Block a user