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:
@@ -21,12 +21,11 @@ function h_lines_in_square(width) =
|
|||||||
function hollow_out_square(size, width) =
|
function hollow_out_square(size, width) =
|
||||||
let(
|
let(
|
||||||
columns = size[0],
|
columns = size[0],
|
||||||
rows = size[1]
|
rows = size[1],
|
||||||
|
lines = h_lines_in_square(width)
|
||||||
)
|
)
|
||||||
[
|
[
|
||||||
for(y = [0:width:width * rows - width],
|
for(y = [0:width:width * rows - width], x = [0:width:width * columns - width])
|
||||||
x = [0:width:width * columns - width],
|
let(coord = [x, y])
|
||||||
line = h_lines_in_square(width)
|
for(line = lines) [for(p = line) p + coord]
|
||||||
)
|
|
||||||
[for(p = line) p + [x, y]]
|
|
||||||
];
|
];
|
Reference in New Issue
Block a user