From e5850f871dff761fe2ec23f71975e75207491971 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Thu, 13 Jun 2019 20:35:55 +0800 Subject: [PATCH] c-style for loop --- src/path_scaling_sections.scad | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/path_scaling_sections.scad b/src/path_scaling_sections.scad index 7a903367..f0d4e468 100644 --- a/src/path_scaling_sections.scad +++ b/src/path_scaling_sections.scad @@ -18,10 +18,11 @@ function path_scaling_sections(shape_pts, edge_path) = for(p = edge_path) let(s = norm([p[0], p[1], 0]) / base_leng) m_scaling([s, s, 1]) - ] + ], + leng_edge_path = len(edge_path) ) __reverse([ - for(i = [0:len(edge_path) - 1]) + for(i = 0; i < leng_edge_path; i = i + 1) [ for(p = shape_pts) let(scaled_p = scaling_matrice[i] * [p[0], p[1], edge_path[i][2], 1])