1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-01 20:40:28 +02: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) { module hull_line(index) {
hull() { hull() {
translate(points[index - 1])
children();
translate(points[index]) translate(points[index])
children(); children();
translate(points[index + 1])
children();
} }
} }
if($children == 1) { if($children == 1) {
for(i = [1:leng - 1]) { for(i = [0:leng - 2]) {
hull_line(i) hull_line(i)
children(); children();
} }
} }
else { else {
for(i = [1:leng - 1]) { for(i = [0:min(leng, $children) - 2]) {
hull_line(i) hull_line(i)
children(i); children(i);
} }