Previous: ``` startProfileAt([x, y], %) startProfileAt([x, y], sketch001) ``` New: ``` startProfile(%, at = [x, y]) startProfile(sketch001, at = [x, y]) ```
20 lines
394 B
Plaintext
20 lines
394 B
Plaintext
const width = 5
|
|
const height = 10
|
|
const length = 12
|
|
|
|
fn box = (sk1, sk2, scale) => {
|
|
const boxSketch = startSketchOn(XY)
|
|
|> startProfile(at = [sk1, sk2])
|
|
|> line(end = [0, scale])
|
|
|> line(end = [scale, 0])
|
|
|> line(end = [0, -scale])
|
|
|> close()
|
|
|> extrude(length = scale)
|
|
return boxSketch
|
|
}
|
|
|
|
box(0, 0, 5)
|
|
box(10, 23, 8)
|
|
let thing = box(-12, -15, 10)
|
|
box(-20, -5, 10)
|