mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-20 05:21:38 +02:00
refactor
This commit is contained in:
@@ -27,9 +27,23 @@ module hull_polyline2d(points, width = 1) {
|
|||||||
test_hull_polyline2d_line_segment(index, point1, point2, half_width);
|
test_hull_polyline2d_line_segment(index, point1, point2, half_width);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = [1:leng - 1]) {
|
if($children == 0) {
|
||||||
hull_line2d(i)
|
for(i = [1:leng - 1]) {
|
||||||
circle(half_width);
|
hull_line2d(i)
|
||||||
|
circle(half_width);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if($children == 1) {
|
||||||
|
for(i = [1:leng - 1]) {
|
||||||
|
hull_line2d(i)
|
||||||
|
children();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for(i = [1:leng - 1]) {
|
||||||
|
hull_line2d(i)
|
||||||
|
children(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -27,9 +27,23 @@ module hull_polyline3d(points, diameter = 1) {
|
|||||||
test_hull_polyline3d_line_segment(index, point1, point2, radius);
|
test_hull_polyline3d_line_segment(index, point1, point2, radius);
|
||||||
}
|
}
|
||||||
|
|
||||||
for(i = [1:leng - 1]) {
|
if($children == 0) {
|
||||||
hull_line3d(i)
|
for(i = [1:leng - 1]) {
|
||||||
sphere(radius);
|
hull_line3d(i)
|
||||||
|
sphere(radius);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if($children == 1) {
|
||||||
|
for(i = [1:leng - 1]) {
|
||||||
|
hull_line3d(i)
|
||||||
|
children();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
for(i = [1:leng - 1]) {
|
||||||
|
hull_line3d(i)
|
||||||
|
children(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user