From 88b0868358f8563d836f61b997b923bb912bb42b Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Wed, 12 Jun 2019 08:39:54 +0800 Subject: [PATCH] c-style for loop --- src/__private__/__shape_arc.scad | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/__private__/__shape_arc.scad b/src/__private__/__shape_arc.scad index c0d782cb..0eb84476 100644 --- a/src/__private__/__shape_arc.scad +++ b/src/__private__/__shape_arc.scad @@ -15,14 +15,13 @@ function __shape_arc(radius, angle, width, width_mode = "LINE_CROSS") = // outer arc path [__ra_to_xy(__edge_r_begin(r_outer, angles[0], a_step, m), angles[0])], m > n ? [] : [ - for(i = [m:n]) - __ra_to_xy(r_outer, a_step * i) + for(i = m; i <= n; i = i + 1) __ra_to_xy(r_outer, a_step * i) ], angles[1] == a_step * n ? [] : [__ra_to_xy(__edge_r_end(r_outer, angles[1], a_step, n), angles[1])], // inner arc path angles[1] == a_step * n ? [] : [__ra_to_xy(__edge_r_end(r_inner, angles[1], a_step, n), angles[1])], m > n ? [] : [ - for(i = [m:n]) + for(i = m; i <= n; i = i + 1) let(idx = (n + (m - i))) __ra_to_xy(r_inner, a_step * idx)