2025-03-20 11:06:27 +13:00
|
|
|
---
|
|
|
|
source: kcl-lib/src/simulation_tests.rs
|
|
|
|
description: Result of unparsing sketch_on_face_end.kcl
|
|
|
|
---
|
|
|
|
fn cube(pos, scale) {
|
2025-03-21 22:39:12 +13:00
|
|
|
sg = startSketchOn(XY)
|
2025-03-20 11:06:27 +13:00
|
|
|
|> startProfileAt(pos, %)
|
|
|
|
|> line(end = [0, scale])
|
|
|
|
|> line(end = [scale, 0])
|
|
|
|
|> line(end = [0, -scale])
|
|
|
|
|
|
|
|
return sg
|
|
|
|
}
|
|
|
|
part001 = cube([0, 0], 20)
|
|
|
|
|> close(%)
|
|
|
|
|> extrude(length = 20)
|
|
|
|
|
2025-04-14 20:37:45 +12:00
|
|
|
part002 = startSketchOn(part001, END)
|
2025-03-20 11:06:27 +13:00
|
|
|
|> startProfileAt([0, 0], %)
|
|
|
|
|> line(end = [0, 10])
|
|
|
|
|> line(end = [10, 0])
|
|
|
|
|> line(end = [0, -10])
|
|
|
|
|> close(%)
|
|
|
|
|> extrude(length = 5)
|