From e68a70a21d695c9587891e5b8f280a3680235448 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Wed, 3 May 2017 08:43:49 +0800 Subject: [PATCH] supported round_robin --- src/path_extrude.scad | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/path_extrude.scad b/src/path_extrude.scad index 846b1f6f..57c4a610 100644 --- a/src/path_extrude.scad +++ b/src/path_extrude.scad @@ -13,8 +13,8 @@ * **/ -module path_extrude(shape_pts, path_pts, triangles = "RADIAL", twist = 0, scale = 1.0) { - +module path_extrude(shape_pts, path_pts, triangles = "RADIAL", twist = 0, scale = 1.0, round_robin = false) { + s_pts = to3d(shape_pts); pth_pts = to3d(path_pts); @@ -72,8 +72,13 @@ module path_extrude(shape_pts, path_pts, triangles = "RADIAL", twist = 0, scale path_extrude_inner(index + 1) ); - if(pth_pts[0] == pth_pts[len_path_pts_minus_one]) { - + if(round_robin && pth_pts[0] == pth_pts[len_path_pts_minus_one]) { + // round-robin + sections = path_extrude_inner(1); + polysections( + concat(sections, [sections[0]]), + triangles = triangles + ); } else { polysections( concat([first_section()], path_extrude_inner(1)),