1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-12 09:44:16 +02:00

refactor: extract lines

This commit is contained in:
Justin Lin
2022-04-04 15:35:21 +08:00
parent f76fd33054
commit 438e9cfd93

View File

@@ -21,12 +21,11 @@ function h_lines_in_square(width) =
function hollow_out_square(size, width) =
let(
columns = size[0],
rows = size[1]
rows = size[1],
lines = h_lines_in_square(width)
)
[
for(y = [0:width:width * rows - width],
x = [0:width:width * columns - width],
line = h_lines_in_square(width)
)
[for(p = line) p + [x, y]]
for(y = [0:width:width * rows - width], x = [0:width:width * columns - width])
let(coord = [x, y])
for(line = lines) [for(p = line) p + coord]
];