1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-22 06:13:10 +02:00

use [each lt, v] to replace concat(lt, [v])

This commit is contained in:
Justin Lin
2022-02-28 11:22:58 +08:00
parent 9a143a9f72
commit e04381bdea
10 changed files with 36 additions and 40 deletions

View File

@@ -24,7 +24,7 @@ module spiral_polygons(beginning_radius, line_width, fn, n) {
module drawPolygon(r) {
pts = shape_circle(radius = r, $fn = fn);
polyline_join(concat(pts, [pts[0]]))
polyline_join([each pts, pts[0]])
circle(half_line_width, $fn = 12);
}

View File

@@ -22,7 +22,7 @@ module square_pursuit_3d(length, diff_scale, diameter, n) {
npts = [for(i = [0:3]) inter_p(pts[i], pts[(i + 1) % 4], leng, d)];
polyline_join(concat(npts, [npts[3], npts[0]]))
polyline_join([each npts, npts[3], npts[0]])
sphere(d = diameter);
_square_pursuit_3d(npts, diff_scale, diameter, n - 1);
@@ -37,7 +37,7 @@ module square_pursuit_3d(length, diff_scale, diameter, n) {
[0, length, 0]
];
polyline_join(concat(pts, [pts[3], pts[0]]))
polyline_join([each pts, pts[3], pts[0]])
sphere(d = diameter);
_square_pursuit_3d(pts, diff_scale, diameter, n - 1);