1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-09-03 03:33:08 +02:00

use polyline_join

This commit is contained in:
Justin Lin
2021-10-08 09:36:01 +08:00
parent e9440e55d6
commit a14c5676d4
36 changed files with 158 additions and 136 deletions

View File

@@ -1,4 +1,4 @@
use <hull_polyline3d.scad>;
use <polyline_join.scad>;
length = 100;
diff_scale = 0.125;
@@ -22,7 +22,8 @@ module square_pursuit_3d(length, diff_scale, diameter, n) {
npts = [for(i = [0:3]) inter_p(pts[i], pts[(i + 1) % 4], leng, d)];
hull_polyline3d(concat(npts, [npts[3], npts[0]]), diameter);
polyline_join(concat(npts, [npts[3], npts[0]]))
sphere(d = diameter);
_square_pursuit_3d(npts, diff_scale, diameter, n - 1);
}
@@ -36,7 +37,8 @@ module square_pursuit_3d(length, diff_scale, diameter, n) {
[0, length, 0]
];
hull_polyline3d(concat(pts, [pts[3], pts[0]]), diameter);
polyline_join(concat(pts, [pts[3], pts[0]]))
sphere(d = diameter);
_square_pursuit_3d(pts, diff_scale, diameter, n - 1);
}