1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-21 14:04:53 +02:00

to the length of children

This commit is contained in:
Justin Lin
2017-06-17 18:08:06 +08:00
parent 56facf9e1c
commit 2681fbce0b

View File

@@ -31,8 +31,10 @@ module along_with(points, angles, twist = 0, scale = 1.0) {
scale[2] == undef ? 0 : (scale[2] - 1) / leng_points_minus_one scale[2] == undef ? 0 : (scale[2] - 1) / leng_points_minus_one
] : scale_step(); ] : scale_step();
end_i = $children == 1 ? leng_points_minus_one : $children - 1;
function _path_angles(pts, i = 0) = function _path_angles(pts, i = 0) =
i == leng_points_minus_one ? i == end_i ?
[] : [] :
concat( concat(
[__angy_angz(pts[i], pts[i + 1])], [__angy_angz(pts[i], pts[i + 1])],