From 41db14881576f894325589c2488adab1149ea2c8 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Fri, 14 Jun 2019 08:32:28 +0800 Subject: [PATCH] c-style for loop --- src/shape_ellipse.scad | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shape_ellipse.scad b/src/shape_ellipse.scad index e7ed4548..828fd456 100644 --- a/src/shape_ellipse.scad +++ b/src/shape_ellipse.scad @@ -14,8 +14,9 @@ function shape_ellipse(axes) = let( frags = __frags(axes[0]), step_a = 360 / frags, + a_end = 360 - step_a, shape_pts = [ - for(a = [0:step_a:360 - step_a]) + for(a = 0; a <= a_end; a = a + step_a) [axes[0] * cos(a), axes[1] * sin(a)] ] ) shape_pts; \ No newline at end of file