1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-30 01:40:02 +02:00

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

This commit is contained in:
Justin Lin
2022-02-28 11:05:50 +08:00
parent c9370160a7
commit 8f76446bd8
9 changed files with 58 additions and 51 deletions

View File

@@ -34,11 +34,7 @@ module hilbert_dragon() {
scale_tilt_a = -3;
lines = hilbert_curve();
hilbert_path = dedup(
concat(
[for(line = lines) line[0]],
[lines[len(lines) - 1][1]])
);
hilbert_path = dedup([each [for(line = lines) line[0]], lines[len(lines) - 1][1]]);
smoothed_hilbert_path = bezier_smooth(hilbert_path, 0.45, t_step = 0.15);
dragon_body_path = reverse([for(i = [1:len(smoothed_hilbert_path) - 2]) smoothed_hilbert_path[i]]);