doc: Add more docs and links for KCL import (#4488)
* Add links in docs to KCL module documentation * Add import statement test in import() stdlib doc comments * Update doc test outputs * Update doc outputs
This commit is contained in:
20
src/wasm-lib/kcl/common.kcl
Normal file
20
src/wasm-lib/kcl/common.kcl
Normal file
@ -0,0 +1,20 @@
|
||||
// This file is used by the import docs.
|
||||
|
||||
export fn width = () => {
|
||||
return 10
|
||||
}
|
||||
|
||||
export fn height = () => {
|
||||
return 10
|
||||
}
|
||||
|
||||
export fn buildSketch = (plane, offset) => {
|
||||
w = width()
|
||||
h = height()
|
||||
return startSketchOn(plane)
|
||||
|> startProfileAt(offset, %)
|
||||
|> line([w, 0], %)
|
||||
|> line([0, h], %)
|
||||
|> line([-w, 0], %)
|
||||
|> close(%)
|
||||
}
|
Reference in New Issue
Block a user