From 46777fa403e0835a0482e5637517658d1baea058 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Fri, 3 May 2019 20:07:38 +0800 Subject: [PATCH] refactor --- src/path_extrude.scad | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/path_extrude.scad b/src/path_extrude.scad index bf260d2d..f8761202 100644 --- a/src/path_extrude.scad +++ b/src/path_extrude.scad @@ -61,14 +61,15 @@ module path_extrude(shape_pts, path_pts, triangles = "SOLID", twist = 0, scale = let( vt0 = pth_pts[j] - pth_pts[j - 1], vt1 = pth_pts[j + 1] - pth_pts[j], - a = acos((vt0 * vt1) / (norm(vt0) * norm(vt1))) + a = acos((vt0 * vt1) / (norm(vt0) * norm(vt1))), + v = cross(vt0, vt1) ) rotate_pts( - local_rotate_section(j - 1, init_a, init_s), - a, - cross(vt0, vt1) + local_rotate_section(j - 1, init_a, init_s), + a, + v ); - + function sections() = let( fst_section =