diff --git a/src/polyline_hull.scad b/src/polyline_hull.scad new file mode 100644 index 00000000..bb8feb64 --- /dev/null +++ b/src/polyline_hull.scad @@ -0,0 +1,25 @@ +module polyline_hull(points) { + leng = len(points); + + module hull_line(index) { + hull() { + translate(points[index - 1]) + children(); + translate(points[index]) + children(); + } + } + + if($children == 1) { + for(i = [1:leng - 1]) { + hull_line(i) + children(); + } + } + else { + for(i = [1:leng - 1]) { + hull_line(i) + children(i); + } + } +} \ No newline at end of file