2025-05-01 11:36:51 -05:00
|
|
|
fn cube(pos, scale) {
|
2025-04-11 19:06:12 -07:00
|
|
|
return startSketchOn(XY)
|
2025-05-01 11:36:51 -05:00
|
|
|
|> startProfile(at = [pos[0] - scale, pos[1] - scale])
|
|
|
|
|> line(endAbsolute = [pos[0] + scale, pos[1] - scale])
|
|
|
|
|> line(endAbsolute = [pos[0] + scale, pos[1] + scale])
|
|
|
|
|> line(endAbsolute = [pos[0] - scale, pos[1] + scale])
|
2025-04-11 19:06:12 -07:00
|
|
|
|> close()
|
|
|
|
|> extrude(length = 10)
|
|
|
|
}
|
|
|
|
|
2025-05-01 11:36:51 -05:00
|
|
|
part001 = cube(pos = [0, 0], scale = 10)
|
|
|
|
part002 = cube(pos = [7, 3], scale = 5)
|
2025-04-11 19:06:12 -07:00
|
|
|
|> translate(z = 1)
|
|
|
|
|
|
|
|
subtractedPart = subtract(part001, tools = part002)
|