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

c-style for loop

This commit is contained in:
Justin Lin
2019-06-12 20:29:51 +08:00
parent f433a79c31
commit 7c59a3e11b

View File

@@ -24,7 +24,7 @@ function cross_sections(shape_pts, path_pts, angles, twist = 0, scale = 1.0) =
twist_step = twist / len_path_pts_minus_one
)
[
for(i = [0:len_path_pts_minus_one])
for(i = 0; i <= len_path_pts_minus_one; i = i + 1)
[
for(p = sh_pts)
let(scaled_p = [p[0] * (1 + scale_step_x * i), p[1] * (1 + scale_step_y * i), p[2]])