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