1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 22:28:16 +01:00

depends on $children

This commit is contained in:
Justin Lin 2021-10-01 09:15:06 +08:00
parent 6e38061655
commit fa0e77ebaf

View File

@ -3,21 +3,21 @@ module polyline_hull(points) {
module hull_line(index) {
hull() {
translate(points[index - 1])
children();
translate(points[index])
children();
translate(points[index + 1])
children();
}
}
if($children == 1) {
for(i = [1:leng - 1]) {
for(i = [0:leng - 2]) {
hull_line(i)
children();
}
}
else {
for(i = [1:leng - 1]) {
for(i = [0:min(leng, $children) - 2]) {
hull_line(i)
children(i);
}