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:
parent
d701b537f0
commit
bc17a2df19
25
src/polyline_hull.scad
Normal file
25
src/polyline_hull.scad
Normal 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);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user