1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 01:04:07 +02:00

c-style for loop

This commit is contained in:
Justin Lin
2019-06-13 20:35:55 +08:00
parent 85c75018f1
commit e5850f871d

View File

@@ -18,10 +18,11 @@ function path_scaling_sections(shape_pts, edge_path) =
for(p = edge_path) for(p = edge_path)
let(s = norm([p[0], p[1], 0]) / base_leng) let(s = norm([p[0], p[1], 0]) / base_leng)
m_scaling([s, s, 1]) m_scaling([s, s, 1])
] ],
leng_edge_path = len(edge_path)
) )
__reverse([ __reverse([
for(i = [0:len(edge_path) - 1]) for(i = 0; i < leng_edge_path; i = i + 1)
[ [
for(p = shape_pts) for(p = shape_pts)
let(scaled_p = scaling_matrice[i] * [p[0], p[1], edge_path[i][2], 1]) let(scaled_p = scaling_matrice[i] * [p[0], p[1], edge_path[i][2], 1])