1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-01-17 22:28:16 +01:00

refactored

This commit is contained in:
Justin Lin 2017-05-29 17:26:11 +08:00
parent 3b91745976
commit b03c8b4a5d

View File

@ -36,12 +36,15 @@ module hexagons(radius, spacing, levels) {
line_hexagons(beginning_n);
if(levels > 1) {
for(i = [1:beginning_n - (levels)]) {
translate([offset_x * i, offset_y * i, 0])
for(i = [1:beginning_n - levels]) {
x = offset_x * i;
y = offset_y * i;
translate([x, y, 0])
line_hexagons(beginning_n - i);
translate([x, -y, 0])
line_hexagons(beginning_n - i);
mirror([0, 1, 0])
translate([offset_x * i, offset_y * i, 0])
line_hexagons(beginning_n - i);
}
}
}