From 108e2cc0eaa87554df835dd0bff43574c6a57f08 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Thu, 5 May 2022 13:16:56 +0800 Subject: [PATCH] refactor --- src/shape_ellipse.scad | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/shape_ellipse.scad b/src/shape_ellipse.scad index 5a6c6271..3b66b646 100644 --- a/src/shape_ellipse.scad +++ b/src/shape_ellipse.scad @@ -12,11 +12,13 @@ use <__comm__/__frags.scad>; function shape_ellipse(axes) = let( - frags = __frags(axes[0]), + axes0 = axes[0], + axes1 = axes[1], + frags = __frags(axes0), step_a = 360 / frags ) [ for(i = [0:frags - 1]) let(a = i * step_a) - [axes[0] * cos(a), axes[1] * sin(a)] + [axes0 * cos(a), axes1 * sin(a)] ]; \ No newline at end of file