1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-04-13 18:51:53 +02:00

add polyline_hull

This commit is contained in:
Justin Lin 2021-10-01 08:27:07 +08:00
parent d701b537f0
commit bc17a2df19

25
src/polyline_hull.scad Normal file
View File

@ -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);
}
}
}