mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-08-29 01:11:30 +02:00
refactor
This commit is contained in:
@@ -28,28 +28,15 @@ module polyline3d(points, diameter, startingStyle = "CAP_CIRCLE", endingStyle =
|
|||||||
p2Style = styles[1];
|
p2Style = styles[1];
|
||||||
|
|
||||||
line3d(p1, p2, diameter,
|
line3d(p1, p2, diameter,
|
||||||
p1Style = p1Style, p2Style = p2Style);
|
p1Style = p1Style, p2Style = p2Style);
|
||||||
|
|
||||||
// hook for testing
|
|
||||||
test_polyline3d_line3d_segment(index, p1, p2, diameter, p1Style, p2Style);
|
|
||||||
}
|
|
||||||
|
|
||||||
module polyline3d_inner(index) {
|
|
||||||
if(index < leng_pts) {
|
|
||||||
line_segment(index);
|
|
||||||
polyline3d_inner(index + 1);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if(leng_pts == 2) {
|
if(leng_pts == 2) {
|
||||||
line3d(points[0], points[1], diameter, startingStyle, endingStyle);
|
line3d(points[0], points[1], diameter, startingStyle, endingStyle);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
polyline3d_inner(1);
|
for(i = [1:leng_pts - 1]) {
|
||||||
|
line_segment(i);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// override it to test
|
|
||||||
module test_polyline3d_line3d_segment(index, point1, point2, diameter, p1Style, p2Style) {
|
|
||||||
|
|
||||||
}
|
}
|
Reference in New Issue
Block a user