From 5a44454547d487e80bd8ac6270ef846fb8ad7310 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Wed, 13 Oct 2021 16:06:22 +0800 Subject: [PATCH] fix join index --- src/polyline_join.scad | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/src/polyline_join.scad b/src/polyline_join.scad index 52de8108..8acf350c 100644 --- a/src/polyline_join.scad +++ b/src/polyline_join.scad @@ -10,6 +10,15 @@ module polyline_join(points) { } } + module hull_line2(index) { + hull() { + translate(points[index]) + children(0); + translate(points[index + 1]) + children(1); + } + } + if($children == 1) { for(i = [0:leng - 2]) { hull_line(i) @@ -18,8 +27,10 @@ module polyline_join(points) { } else { for(i = [0:min(leng, $children) - 2]) { - hull_line(i) + hull_line2(i) { children(i); + children(i + 1); + } } } } \ No newline at end of file