1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-26 16:04:46 +02:00

support 3D point

This commit is contained in:
Justin Lin
2020-02-19 12:19:31 +08:00
parent df1bad4887
commit 3cd0d138af

View File

@@ -12,7 +12,9 @@ function tf_bend(size, point, radius, angle) =
// ylen = size[1], // ylen = size[1],
y = point[0], y = point[0],
z = point[1], z = point[1],
x = is_undef(point[2]) ? 0 : point[2],
a_step = angle / xlen, a_step = angle / xlen,
a = a_step * y a = a_step * y,
r = radius + x
) )
[radius * cos(a), radius * sin(a), z]; [r * cos(a), r * sin(a), z];