1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-11 17:24:20 +02:00

refactor: merge for

This commit is contained in:
Justin Lin
2022-03-30 21:44:14 +08:00
parent 280332fb8f
commit da03b782ed

View File

@@ -39,8 +39,7 @@ module hexagons(radius, spacing, levels) {
offset_xs = [for(i = 0; i < n; i = i + 1) i * offset_step + center_offset]; offset_xs = [for(i = 0; i < n; i = i + 1) i * offset_step + center_offset];
for(x = offset_xs) { for(x = offset_xs) {
p = [x + tx, ty, 0]; translate([x + tx, ty, 0])
translate(p)
hexagon(); hexagon();
} }
} }
@@ -66,12 +65,10 @@ module hexagons(radius, spacing, levels) {
hexagons_pts(hex_datum) hexagons_pts(hex_datum)
]; ];
for(pts_one_line = pts_all_lines) { for(pts_one_line = pts_all_lines, pt = pts_one_line) {
for(pt = pts_one_line) {
translate(pt) translate(pt)
hexagon(); hexagon();
} }
}
test_each_hexagon(r_hexagon, pts_all_lines); test_each_hexagon(r_hexagon, pts_all_lines);
} }