1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-03-14 02:59:42 +01:00

refactored

This commit is contained in:
Justin Lin 2017-05-29 17:18:42 +08:00
parent 60d56cf188
commit 3b91745976

View File

@ -16,6 +16,7 @@ module hexagons(radius, spacing, levels) {
offset_x = radius * cos(30);
offset_y = radius + radius * sin(30);
r_hexagon = radius - spacing / 2;
offset_step = 2 * offset_x;
module hexagon() {
rotate(30)
@ -23,9 +24,8 @@ module hexagons(radius, spacing, levels) {
}
module line_hexagons(n) {
offset = 2 * offset_x;
for(i = [0:n - 1]) {
offset_p = [i * offset, 0, 0];
offset_p = [i * offset_step, 0, 0];
translate(offset_p)
hexagon();
}