Previous: ``` startProfileAt([x, y], %) startProfileAt([x, y], sketch001) ``` New: ``` startProfile(%, at = [x, y]) startProfile(sketch001, at = [x, y]) ```
25 lines
546 B
Plaintext
25 lines
546 B
Plaintext
---
|
|
source: kcl-lib/src/simulation_tests.rs
|
|
description: Result of unparsing sketch_on_face_end.kcl
|
|
---
|
|
fn cube(pos, scale) {
|
|
sg = startSketchOn(XY)
|
|
|> startProfile(at = pos)
|
|
|> line(end = [0, scale])
|
|
|> line(end = [scale, 0])
|
|
|> line(end = [0, -scale])
|
|
|
|
return sg
|
|
}
|
|
part001 = cube([0, 0], 20)
|
|
|> close(%)
|
|
|> extrude(length = 20)
|
|
|
|
part002 = startSketchOn(part001, face = END)
|
|
|> startProfile(at = [0, 0])
|
|
|> line(end = [0, 10])
|
|
|> line(end = [10, 0])
|
|
|> line(end = [0, -10])
|
|
|> close(%)
|
|
|> extrude(length = 5)
|