From 8bc6a0b4c94e548b357afe8456becee1b17de222 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sat, 15 Jun 2019 11:04:16 +0800 Subject: [PATCH] refactor --- src/along_with.scad | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/along_with.scad b/src/along_with.scad index 268c20a8..fc2e7125 100644 --- a/src/along_with.scad +++ b/src/along_with.scad @@ -120,13 +120,8 @@ module along_with(points, angles, twist = 0, scale = 1.0, method = "AXIS_ANGLE") // >>> begin: modules and functions for "EULER-ANGLE" - function _euler_angle_path_angles(pts, end_i, i = 0) = - i == end_i ? - [] : - concat( - [__angy_angz(pts[i], pts[i + 1])], - _euler_angle_path_angles(pts, end_i, i + 1) - ); + function _euler_angle_path_angles(pts, end_i) = + [for(i = 0; i < end_i; i = i + 1) [__angy_angz(pts[i], pts[i + 1])]]; function euler_angle_path_angles(children) = let(