diff --git a/docs/kcl/abs.md b/docs/kcl/abs.md index 28f79970e..e71ae96ec 100644 --- a/docs/kcl/abs.md +++ b/docs/kcl/abs.md @@ -8,13 +8,13 @@ Computes the absolute value of a number. -``` +```js abs(num: number) -> number ``` ### Examples -```kcl +```js const myVar = abs(-4) ``` diff --git a/docs/kcl/acos.md b/docs/kcl/acos.md index 5569c6cfd..bd3ff9afe 100644 --- a/docs/kcl/acos.md +++ b/docs/kcl/acos.md @@ -8,13 +8,13 @@ Computes the arccosine of a number (in radians). -``` +```js acos(num: number) -> number ``` ### Examples -```kcl +```js const myVar = acos(0.5) ``` diff --git a/docs/kcl/angleToMatchLengthX.md b/docs/kcl/angleToMatchLengthX.md index 00c0b45c1..1a2e62375 100644 --- a/docs/kcl/angleToMatchLengthX.md +++ b/docs/kcl/angleToMatchLengthX.md @@ -8,13 +8,13 @@ Returns the angle to match the given length for x. -``` +```js angleToMatchLengthX(segment_name: string, to: number, sketch_group: SketchGroup) -> number ``` ### Examples -```kcl +```js const part001 = startSketchOn('XY') |> startProfileAt([0, 0], %) |> line({ to: [1, 3.82], tag: 'seg01' }, %) @@ -30,7 +30,7 @@ const part001 = startSketchOn('XY') * `segment_name`: `string` (REQUIRED) * `to`: `number` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/angleToMatchLengthY.md b/docs/kcl/angleToMatchLengthY.md index 6f386832e..e58817b52 100644 --- a/docs/kcl/angleToMatchLengthY.md +++ b/docs/kcl/angleToMatchLengthY.md @@ -8,13 +8,13 @@ Returns the angle to match the given length for y. -``` +```js angleToMatchLengthY(segment_name: string, to: number, sketch_group: SketchGroup) -> number ``` ### Examples -```kcl +```js const part001 = startSketchOn('XY') |> startProfileAt([0, 0], %) |> line({ to: [1, 3.82], tag: 'seg01' }, %) @@ -30,7 +30,7 @@ const part001 = startSketchOn('XY') * `segment_name`: `string` (REQUIRED) * `to`: `number` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/angledLine.md b/docs/kcl/angledLine.md index a5987a9a1..b916615d1 100644 --- a/docs/kcl/angledLine.md +++ b/docs/kcl/angledLine.md @@ -8,13 +8,13 @@ Draw an angled line. -``` +```js angledLine(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('XY') |> startProfileAt([0, 0], %) |> angledLine({ angle: 45, length: 10, tag: "edge1" }, %) @@ -27,7 +27,7 @@ startSketchOn('XY') ### Arguments * `data`: `AngledLineData` - Data to draw an angled line. (REQUIRED) -``` +```js { // The angle of the line. angle: number, @@ -39,7 +39,7 @@ startSketchOn('XY') [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -206,7 +206,7 @@ startSketchOn('XY') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/angledLineOfXLength.md b/docs/kcl/angledLineOfXLength.md index f770e863f..23c65e384 100644 --- a/docs/kcl/angledLineOfXLength.md +++ b/docs/kcl/angledLineOfXLength.md @@ -8,13 +8,13 @@ Draw an angled line of a given x length. -``` +```js angledLineOfXLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('XZ') |> startProfileAt([0, 0], %) |> angledLineOfXLength({ angle: 45, length: 10, tag: "edge1" }, %) @@ -27,7 +27,7 @@ startSketchOn('XZ') ### Arguments * `data`: `AngledLineData` - Data to draw an angled line. (REQUIRED) -``` +```js { // The angle of the line. angle: number, @@ -39,7 +39,7 @@ startSketchOn('XZ') [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -206,7 +206,7 @@ startSketchOn('XZ') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/angledLineOfYLength.md b/docs/kcl/angledLineOfYLength.md index 9ce6e3091..1fafa778d 100644 --- a/docs/kcl/angledLineOfYLength.md +++ b/docs/kcl/angledLineOfYLength.md @@ -8,13 +8,13 @@ Draw an angled line of a given y length. -``` +```js angledLineOfYLength(data: AngledLineData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('YZ') |> startProfileAt([0, 0], %) |> angledLineOfYLength({ angle: 45, length: 10, tag: "edge1" }, %) @@ -28,7 +28,7 @@ startSketchOn('YZ') ### Arguments * `data`: `AngledLineData` - Data to draw an angled line. (REQUIRED) -``` +```js { // The angle of the line. angle: number, @@ -40,7 +40,7 @@ startSketchOn('YZ') [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -207,7 +207,7 @@ startSketchOn('YZ') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/angledLineThatIntersects.md b/docs/kcl/angledLineThatIntersects.md index 8bef3edc8..f57ccf0f4 100644 --- a/docs/kcl/angledLineThatIntersects.md +++ b/docs/kcl/angledLineThatIntersects.md @@ -8,13 +8,13 @@ Draw an angled line that intersects with a given line. -``` +```js angledLineThatIntersects(data: AngledLineThatIntersectsData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js const part001 = startSketchOn('XY') |> startProfileAt([0, 0], %) |> lineTo({ to: [2, 2], tag: "yo" }, %) @@ -33,7 +33,7 @@ const part001 = startSketchOn('XY') ### Arguments * `data`: `AngledLineThatIntersectsData` - Data for drawing an angled line that intersects with a given line. (REQUIRED) -``` +```js { // The angle of the line. angle: number, @@ -46,7 +46,7 @@ const part001 = startSketchOn('XY') } ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -213,7 +213,7 @@ const part001 = startSketchOn('XY') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/angledLineToX.md b/docs/kcl/angledLineToX.md index 427c7cd9e..0510e2d54 100644 --- a/docs/kcl/angledLineToX.md +++ b/docs/kcl/angledLineToX.md @@ -8,13 +8,13 @@ Draw an angled line to a given x coordinate. -``` +```js angledLineToX(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('XY') |> startProfileAt([0, 0], %) |> angledLineToX({ angle: 45, to: 10, tag: "edge1" }, %) @@ -28,7 +28,7 @@ startSketchOn('XY') ### Arguments * `data`: `AngledLineToData` - Data to draw an angled line to a point. (REQUIRED) -``` +```js { // The angle of the line. angle: number, @@ -40,7 +40,7 @@ startSketchOn('XY') [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -207,7 +207,7 @@ startSketchOn('XY') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/angledLineToY.md b/docs/kcl/angledLineToY.md index 00d6f1922..c6899d0fc 100644 --- a/docs/kcl/angledLineToY.md +++ b/docs/kcl/angledLineToY.md @@ -8,13 +8,13 @@ Draw an angled line to a given y coordinate. -``` +```js angledLineToY(data: AngledLineToData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('XY') |> startProfileAt([0, 0], %) |> angledLineToY({ angle: 45, to: 10, tag: "edge1" }, %) @@ -27,7 +27,7 @@ startSketchOn('XY') ### Arguments * `data`: `AngledLineToData` - Data to draw an angled line to a point. (REQUIRED) -``` +```js { // The angle of the line. angle: number, @@ -39,7 +39,7 @@ startSketchOn('XY') [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -206,7 +206,7 @@ startSketchOn('XY') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/arc.md b/docs/kcl/arc.md index 89746a80f..435855978 100644 --- a/docs/kcl/arc.md +++ b/docs/kcl/arc.md @@ -8,13 +8,13 @@ Draw an arc. -``` +```js arc(data: ArcData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('-YZ') |> startProfileAt([0, 0], %) |> arc({ @@ -29,7 +29,7 @@ startSketchOn('-YZ') ### Arguments * `data`: `ArcData` - Data to draw an arc. (REQUIRED) -``` +```js { // The end angle. angle_end: number, @@ -52,7 +52,7 @@ startSketchOn('-YZ') } ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -219,7 +219,7 @@ startSketchOn('-YZ') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/asin.md b/docs/kcl/asin.md index 96c2116f9..198a8501a 100644 --- a/docs/kcl/asin.md +++ b/docs/kcl/asin.md @@ -8,13 +8,13 @@ Computes the arcsine of a number (in radians). -``` +```js asin(num: number) -> number ``` ### Examples -```kcl +```js const myVar = asin(0.5) ``` diff --git a/docs/kcl/atan.md b/docs/kcl/atan.md index df0174faa..7bba6a7ac 100644 --- a/docs/kcl/atan.md +++ b/docs/kcl/atan.md @@ -8,13 +8,13 @@ Computes the arctangent of a number (in radians). -``` +```js atan(num: number) -> number ``` ### Examples -```kcl +```js const myVar = atan(1.0) ``` diff --git a/docs/kcl/bezierCurve.md b/docs/kcl/bezierCurve.md index 2631b207a..1e8a74e86 100644 --- a/docs/kcl/bezierCurve.md +++ b/docs/kcl/bezierCurve.md @@ -8,13 +8,13 @@ Draw a bezier curve. -``` +```js bezierCurve(data: BezierData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('XY') |> startProfileAt([0, 0], %) |> bezierCurve({ @@ -30,7 +30,7 @@ startSketchOn('XY') ### Arguments * `data`: `BezierData` - Data to draw a bezier curve. (REQUIRED) -``` +```js { // The first control point. control1: [number, number], @@ -43,7 +43,7 @@ startSketchOn('XY') } ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -210,7 +210,7 @@ startSketchOn('XY') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/ceil.md b/docs/kcl/ceil.md index 7d7132b45..775424e3a 100644 --- a/docs/kcl/ceil.md +++ b/docs/kcl/ceil.md @@ -8,13 +8,13 @@ Computes the smallest integer greater than or equal to a number. -``` +```js ceil(num: number) -> number ``` ### Examples -```kcl +```js const myVar = ceil(4.5) ``` diff --git a/docs/kcl/circle.md b/docs/kcl/circle.md index d170d9098..4537458c0 100644 --- a/docs/kcl/circle.md +++ b/docs/kcl/circle.md @@ -8,7 +8,7 @@ Sketch a circle on the given plane -``` +```js circle(center: [number, number], radius: number, surface: SketchSurface, tag?: String) -> SketchGroup ``` @@ -17,7 +17,7 @@ circle(center: [number, number], radius: number, surface: SketchSurface, tag?: S * `center`: `[number, number]` (REQUIRED) * `radius`: `number` (REQUIRED) * `surface`: `SketchSurface` - A sketch group type. (REQUIRED) -``` +```js { // The id of the plane. id: uuid, @@ -82,7 +82,7 @@ circle(center: [number, number], radius: number, surface: SketchSurface, tag?: S ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/close.md b/docs/kcl/close.md index b2d23afd6..596513613 100644 --- a/docs/kcl/close.md +++ b/docs/kcl/close.md @@ -8,13 +8,13 @@ Close the current sketch. -``` +```js close(sketch_group: SketchGroup, tag?: String) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('XZ') |> startProfileAt([0, 0], %) |> line([10, 10], %) @@ -22,7 +22,7 @@ startSketchOn('XZ') |> close(%) ``` -```kcl +```js startSketchOn('YZ') |> startProfileAt([0, 0], %) |> line([10, 10], %) @@ -33,7 +33,7 @@ startSketchOn('YZ') ### Arguments * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -201,7 +201,7 @@ startSketchOn('YZ') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/cos.md b/docs/kcl/cos.md index 1074f7e88..ad261a2c1 100644 --- a/docs/kcl/cos.md +++ b/docs/kcl/cos.md @@ -8,13 +8,13 @@ Computes the sine of a number (in radians). -``` +```js cos(num: number) -> number ``` ### Examples -```kcl +```js const anotherVar = cos(2 * pi()) ``` diff --git a/docs/kcl/e.md b/docs/kcl/e.md index b1869d724..4427d52c1 100644 --- a/docs/kcl/e.md +++ b/docs/kcl/e.md @@ -8,13 +8,13 @@ Return the value of Euler’s number `e`. -``` +```js e() -> number ``` ### Examples -```kcl +```js const myVar = e() ``` diff --git a/docs/kcl/extrude.md b/docs/kcl/extrude.md index ac94ad826..8e26f582f 100644 --- a/docs/kcl/extrude.md +++ b/docs/kcl/extrude.md @@ -8,13 +8,13 @@ Extrudes by a given amount. -``` +```js extrude(length: number, sketch_group: SketchGroup) -> ExtrudeGroup ``` ### Examples -```kcl +```js startSketchOn('XY') |> startProfileAt([0, 0], %) |> line([0, 10], %) @@ -28,7 +28,7 @@ startSketchOn('XY') * `length`: `number` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -195,7 +195,7 @@ startSketchOn('XY') ### Returns `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. -``` +```js { // The id of the extrusion end cap endCapId: uuid, diff --git a/docs/kcl/fillet.md b/docs/kcl/fillet.md index 5d6646e41..3b356f50b 100644 --- a/docs/kcl/fillet.md +++ b/docs/kcl/fillet.md @@ -8,13 +8,13 @@ Create fillets on tagged paths. -``` +```js fillet(data: FilletData, extrude_group: ExtrudeGroup) -> ExtrudeGroup ``` ### Examples -```kcl +```js const part001 = startSketchOn('XY') |> startProfileAt([0, 0], %) |> line({ to: [0, 10], tag: "thing" }, %) @@ -28,7 +28,7 @@ const part001 = startSketchOn('XY') ### Arguments * `data`: `FilletData` - Data for fillets. (REQUIRED) -``` +```js { // The radius of the fillet. radius: number, @@ -38,7 +38,7 @@ string], } ``` * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) -``` +```js { // The id of the extrusion end cap endCapId: uuid, @@ -172,7 +172,7 @@ string], ### Returns `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. -``` +```js { // The id of the extrusion end cap endCapId: uuid, diff --git a/docs/kcl/floor.md b/docs/kcl/floor.md index a61ebc6c2..60a3951d1 100644 --- a/docs/kcl/floor.md +++ b/docs/kcl/floor.md @@ -8,13 +8,13 @@ Computes the largest integer less than or equal to a number. -``` +```js floor(num: number) -> number ``` ### Examples -```kcl +```js const myVar = floor(4.5) ``` diff --git a/docs/kcl/getExtrudeWallTransform.md b/docs/kcl/getExtrudeWallTransform.md index 2934da025..8e544394d 100644 --- a/docs/kcl/getExtrudeWallTransform.md +++ b/docs/kcl/getExtrudeWallTransform.md @@ -8,13 +8,13 @@ Returns the extrude wall transform. -``` +```js getExtrudeWallTransform(surface_name: string, extrude_group: ExtrudeGroup) -> ExtrudeTransform ``` ### Examples -```kcl +```js const box = startSketchOn('XY') |> startProfileAt([0, 0], %) |> line([0, 10], %) @@ -30,7 +30,7 @@ const transform = getExtrudeWallTransform('surface', box) * `surface_name`: `string` (REQUIRED) * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) -``` +```js { // The id of the extrusion end cap endCapId: uuid, @@ -164,7 +164,7 @@ const transform = getExtrudeWallTransform('surface', box) ### Returns `ExtrudeTransform` -``` +```js { position: [number, number, number], rotation: [number, number, number, number], diff --git a/docs/kcl/getNextAdjacentEdge.md b/docs/kcl/getNextAdjacentEdge.md index 5fa837106..86baecbff 100644 --- a/docs/kcl/getNextAdjacentEdge.md +++ b/docs/kcl/getNextAdjacentEdge.md @@ -8,13 +8,13 @@ Get the next adjacent edge to the edge given. -``` +```js getNextAdjacentEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid ``` ### Examples -```kcl +```js const part001 = startSketchOn('XY') |> startProfileAt([0, 0], %) |> line({ to: [0, 10], tag: "thing" }, %) @@ -32,7 +32,7 @@ const part001 = startSketchOn('XY') * `tag`: `String` (REQUIRED) * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) -``` +```js { // The id of the extrusion end cap endCapId: uuid, diff --git a/docs/kcl/getOppositeEdge.md b/docs/kcl/getOppositeEdge.md index c82616cb9..be6af84d9 100644 --- a/docs/kcl/getOppositeEdge.md +++ b/docs/kcl/getOppositeEdge.md @@ -8,13 +8,13 @@ Get the opposite edge to the edge given. -``` +```js getOppositeEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid ``` ### Examples -```kcl +```js const part001 = startSketchOn('XY') |> startProfileAt([0, 0], %) |> line({ to: [0, 10], tag: "thing" }, %) @@ -32,7 +32,7 @@ const part001 = startSketchOn('XY') * `tag`: `String` (REQUIRED) * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) -``` +```js { // The id of the extrusion end cap endCapId: uuid, diff --git a/docs/kcl/getPreviousAdjacentEdge.md b/docs/kcl/getPreviousAdjacentEdge.md index 1ef244f04..ff63ca182 100644 --- a/docs/kcl/getPreviousAdjacentEdge.md +++ b/docs/kcl/getPreviousAdjacentEdge.md @@ -8,13 +8,13 @@ Get the previous adjacent edge to the edge given. -``` +```js getPreviousAdjacentEdge(tag: String, extrude_group: ExtrudeGroup) -> Uuid ``` ### Examples -```kcl +```js const part001 = startSketchOn('XY') |> startProfileAt([0, 0], %) |> line({ to: [0, 10], tag: "thing" }, %) @@ -32,7 +32,7 @@ const part001 = startSketchOn('XY') * `tag`: `String` (REQUIRED) * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) -``` +```js { // The id of the extrusion end cap endCapId: uuid, diff --git a/docs/kcl/hole.md b/docs/kcl/hole.md index 4d03f8588..96cca4bbb 100644 --- a/docs/kcl/hole.md +++ b/docs/kcl/hole.md @@ -8,13 +8,13 @@ Use a sketch to cut a hole in another sketch. -``` +```js hole(hole_sketch_group: SketchGroupSet, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js const square = startSketchOn('XY') |> startProfileAt([0, 0], %) |> line([0, 10], %) @@ -29,7 +29,7 @@ const square = startSketchOn('XY') ### Arguments * `hole_sketch_group`: `SketchGroupSet` - A sketch group or a group of sketch groups. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -197,7 +197,7 @@ const square = startSketchOn('XY') } ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -364,7 +364,7 @@ const square = startSketchOn('XY') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/import.md b/docs/kcl/import.md index bb3caac94..4b9e95306 100644 --- a/docs/kcl/import.md +++ b/docs/kcl/import.md @@ -9,29 +9,29 @@ Import a CAD file. For formats lacking unit data (STL, OBJ, PLY), the default import unit is millimeters. Otherwise you can specify the unit by passing in the options parameter. If you import a gltf file, we will try to find the bin file and import it as well. Import paths are relative to the current project directory. This only works in the desktop app not in browser. -``` +```js import(file_path: String, options?: ImportFormat) -> ImportedGeometry ``` ### Examples -```kcl +```js const model = import("thing.obj") ``` -```kcl +```js const model = import("cube.obj", { type: "obj", units: "m" }) ``` -```kcl +```js const model = import("my_model.gltf") ``` -```kcl +```js const model = import("my_model.sldprt") ``` -```kcl +```js const model = import("my_model.step") ``` @@ -39,7 +39,7 @@ const model = import("my_model.step") * `file_path`: `String` (REQUIRED) * `options`: `ImportFormat` - Import format specifier (OPTIONAL) -``` +```js { type: "fbx", } | @@ -123,7 +123,7 @@ const model = import("my_model.step") ### Returns `ImportedGeometry` - Data for an imported geometry. -``` +```js { // The ID of the imported geometry. id: uuid, diff --git a/docs/kcl/lastSegX.md b/docs/kcl/lastSegX.md index e41153ef5..2b2a77307 100644 --- a/docs/kcl/lastSegX.md +++ b/docs/kcl/lastSegX.md @@ -8,13 +8,13 @@ Returns the last segment of x. -``` +```js lastSegX(sketch_group: SketchGroup) -> number ``` ### Examples -```kcl +```js startSketchOn("YZ") |> startProfileAt([0, 0], %) |> line({ to: [5, 0], tag: "thing" }, %) @@ -27,7 +27,7 @@ startSketchOn("YZ") ### Arguments * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/lastSegY.md b/docs/kcl/lastSegY.md index c6bbe46bd..44f242377 100644 --- a/docs/kcl/lastSegY.md +++ b/docs/kcl/lastSegY.md @@ -8,13 +8,13 @@ Returns the last segment of y. -``` +```js lastSegY(sketch_group: SketchGroup) -> number ``` ### Examples -```kcl +```js startSketchOn("YZ") |> startProfileAt([0, 0], %) |> line({ to: [5, 0], tag: "thing" }, %) @@ -27,7 +27,7 @@ startSketchOn("YZ") ### Arguments * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/legAngX.md b/docs/kcl/legAngX.md index b8a9af05a..1def6269e 100644 --- a/docs/kcl/legAngX.md +++ b/docs/kcl/legAngX.md @@ -8,13 +8,13 @@ Returns the angle of the given leg for x. -``` +```js legAngX(hypotenuse: number, leg: number) -> number ``` ### Examples -```kcl +```js legAngX(5, 3) ``` diff --git a/docs/kcl/legAngY.md b/docs/kcl/legAngY.md index 34914e117..3c46c2b0f 100644 --- a/docs/kcl/legAngY.md +++ b/docs/kcl/legAngY.md @@ -8,13 +8,13 @@ Returns the angle of the given leg for y. -``` +```js legAngY(hypotenuse: number, leg: number) -> number ``` ### Examples -```kcl +```js legAngY(5, 3) ``` diff --git a/docs/kcl/legLen.md b/docs/kcl/legLen.md index 7c0564703..95ae6a924 100644 --- a/docs/kcl/legLen.md +++ b/docs/kcl/legLen.md @@ -8,13 +8,13 @@ Returns the length of the given leg. -``` +```js legLen(hypotenuse: number, leg: number) -> number ``` ### Examples -```kcl +```js legLen(5, 3) ``` diff --git a/docs/kcl/line.md b/docs/kcl/line.md index a8e59de43..c2e32e9fb 100644 --- a/docs/kcl/line.md +++ b/docs/kcl/line.md @@ -8,13 +8,13 @@ Draw a line. -``` +```js line(data: LineData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('-XY') |> startProfileAt([0, 0], %) |> line([10, 10], %) @@ -26,7 +26,7 @@ startSketchOn('-XY') ### Arguments * `data`: `LineData` - Data to draw a line. (REQUIRED) -``` +```js { // The tag. tag: string, @@ -36,7 +36,7 @@ startSketchOn('-XY') [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -203,7 +203,7 @@ startSketchOn('-XY') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/lineTo.md b/docs/kcl/lineTo.md index 3ff41a505..aefa8da62 100644 --- a/docs/kcl/lineTo.md +++ b/docs/kcl/lineTo.md @@ -8,13 +8,13 @@ Draw a line to a point. -``` +```js lineTo(data: LineToData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js fn rectShape = (pos, w, l) => { const rr = startSketchOn('YZ') |> startProfileAt([pos[0] - (w / 2), pos[1] - (l / 2)], %) @@ -41,7 +41,7 @@ const part = rectShape([0, 0], 20, 20) ### Arguments * `data`: `LineToData` - Data to draw a line to a point. (REQUIRED) -``` +```js { // The tag. tag: string, @@ -51,7 +51,7 @@ const part = rectShape([0, 0], 20, 20) [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -218,7 +218,7 @@ const part = rectShape([0, 0], 20, 20) ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/ln.md b/docs/kcl/ln.md index e6ae94f8b..79e7559b4 100644 --- a/docs/kcl/ln.md +++ b/docs/kcl/ln.md @@ -8,13 +8,13 @@ Computes the natural logarithm of the number. -``` +```js ln(num: number) -> number ``` ### Examples -```kcl +```js const myVar = ln(4) ``` diff --git a/docs/kcl/log.md b/docs/kcl/log.md index 444d8dc88..c56e6a654 100644 --- a/docs/kcl/log.md +++ b/docs/kcl/log.md @@ -8,13 +8,13 @@ Computes the logarithm of the number with respect to an arbitrary base. The result might not be correctly rounded owing to implementation details; `log2()` can produce more accurate results for base 2, and `log10()` can produce more accurate results for base 10. -``` +```js log(num: number, base: number) -> number ``` ### Examples -```kcl +```js const myVar = log(4, 2) ``` diff --git a/docs/kcl/log10.md b/docs/kcl/log10.md index 40d2aa8fd..8c0d05433 100644 --- a/docs/kcl/log10.md +++ b/docs/kcl/log10.md @@ -8,13 +8,13 @@ Computes the base 10 logarithm of the number. -``` +```js log10(num: number) -> number ``` ### Examples -```kcl +```js const myVar = log10(4) ``` diff --git a/docs/kcl/log2.md b/docs/kcl/log2.md index 72dec3aa5..bf23dd2cc 100644 --- a/docs/kcl/log2.md +++ b/docs/kcl/log2.md @@ -8,13 +8,13 @@ Computes the base 2 logarithm of the number. -``` +```js log2(num: number) -> number ``` ### Examples -```kcl +```js const myVar = log2(4) ``` diff --git a/docs/kcl/max.md b/docs/kcl/max.md index 895d7007d..284e3bcd9 100644 --- a/docs/kcl/max.md +++ b/docs/kcl/max.md @@ -8,13 +8,13 @@ Computes the maximum of the given arguments. -``` +```js max(args: [number]) -> number ``` ### Examples -```kcl +```js const myVar = max(4, 5, 6) ``` diff --git a/docs/kcl/min.md b/docs/kcl/min.md index 3b1b13bed..9cdd8638b 100644 --- a/docs/kcl/min.md +++ b/docs/kcl/min.md @@ -8,13 +8,13 @@ Computes the minimum of the given arguments. -``` +```js min(args: [number]) -> number ``` ### Examples -```kcl +```js const myVar = min(4, 5, 6) ``` diff --git a/docs/kcl/patternCircular2d.md b/docs/kcl/patternCircular2d.md index ae2a321ba..7b2cebbc3 100644 --- a/docs/kcl/patternCircular2d.md +++ b/docs/kcl/patternCircular2d.md @@ -8,13 +8,13 @@ A circular pattern on a 2D sketch. -``` +```js patternCircular2d(data: CircularPattern2dData, sketch_group: SketchGroup) -> [SketchGroup] ``` ### Examples -```kcl +```js const part = startSketchOn('XY') |> circle([0, 0], 2, %) |> patternCircular2d({ @@ -28,7 +28,7 @@ const part = startSketchOn('XY') ### Arguments * `data`: `CircularPattern2dData` - Data for a circular pattern on a 2D sketch. (REQUIRED) -``` +```js { // The arc angle (in degrees) to place the repetitions. Must be greater than 0. arcDegrees: number, @@ -41,7 +41,7 @@ const part = startSketchOn('XY') } ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/patternCircular3d.md b/docs/kcl/patternCircular3d.md index 2d4396109..07d320c00 100644 --- a/docs/kcl/patternCircular3d.md +++ b/docs/kcl/patternCircular3d.md @@ -8,13 +8,13 @@ A circular pattern on a 3D model. -``` +```js patternCircular3d(data: CircularPattern3dData, extrude_group: ExtrudeGroup) -> [ExtrudeGroup] ``` ### Examples -```kcl +```js const part = startSketchOn('XY') |> startProfileAt([0, 0], %) |> line([0, 1], %) @@ -34,7 +34,7 @@ const part = startSketchOn('XY') ### Arguments * `data`: `CircularPattern3dData` - Data for a circular pattern on a 3D model. (REQUIRED) -``` +```js { // The arc angle (in degrees) to place the repetitions. Must be greater than 0. arcDegrees: number, @@ -49,7 +49,7 @@ const part = startSketchOn('XY') } ``` * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) -``` +```js { // The id of the extrusion end cap endCapId: uuid, diff --git a/docs/kcl/patternLinear2d.md b/docs/kcl/patternLinear2d.md index deb18decb..3c1702eab 100644 --- a/docs/kcl/patternLinear2d.md +++ b/docs/kcl/patternLinear2d.md @@ -8,13 +8,13 @@ A linear pattern on a 2D sketch. -``` +```js patternLinear2d(data: LinearPattern2dData, sketch_group: SketchGroup) -> [SketchGroup] ``` ### Examples -```kcl +```js const part = startSketchOn('XY') |> circle([0, 0], 2, %) |> patternLinear2d({ @@ -27,7 +27,7 @@ const part = startSketchOn('XY') ### Arguments * `data`: `LinearPattern2dData` - Data for a linear pattern on a 2D sketch. (REQUIRED) -``` +```js { // The axis of the pattern. This is a 2D vector. axis: [number, number], @@ -38,7 +38,7 @@ const part = startSketchOn('XY') } ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/patternLinear3d.md b/docs/kcl/patternLinear3d.md index 43978cb70..61cd528ee 100644 --- a/docs/kcl/patternLinear3d.md +++ b/docs/kcl/patternLinear3d.md @@ -8,13 +8,13 @@ A linear pattern on a 3D model. -``` +```js patternLinear3d(data: LinearPattern3dData, extrude_group: ExtrudeGroup) -> [ExtrudeGroup] ``` ### Examples -```kcl +```js const part = startSketchOn('XY') |> startProfileAt([0, 0], %) |> line([0, 1], %) @@ -32,7 +32,7 @@ const part = startSketchOn('XY') ### Arguments * `data`: `LinearPattern3dData` - Data for a linear pattern on a 3D model. (REQUIRED) -``` +```js { // The axis of the pattern. axis: [number, number, number], @@ -43,7 +43,7 @@ const part = startSketchOn('XY') } ``` * `extrude_group`: `ExtrudeGroup` - An extrude group is a collection of extrude surfaces. (REQUIRED) -``` +```js { // The id of the extrusion end cap endCapId: uuid, diff --git a/docs/kcl/pi.md b/docs/kcl/pi.md index fe8607818..fee4e7658 100644 --- a/docs/kcl/pi.md +++ b/docs/kcl/pi.md @@ -8,13 +8,13 @@ Return the value of `pi`. Archimedes’ constant (π). -``` +```js pi() -> number ``` ### Examples -```kcl +```js const myVar = pi() * 3.0 ``` diff --git a/docs/kcl/pow.md b/docs/kcl/pow.md index 128886834..d1a23d5b8 100644 --- a/docs/kcl/pow.md +++ b/docs/kcl/pow.md @@ -8,13 +8,13 @@ Computes the number to a power. -``` +```js pow(num: number, pow: number) -> number ``` ### Examples -```kcl +```js const myVar = pow(4, 2) ``` diff --git a/docs/kcl/segAng.md b/docs/kcl/segAng.md index 61d6ca786..ffdebae55 100644 --- a/docs/kcl/segAng.md +++ b/docs/kcl/segAng.md @@ -8,13 +8,13 @@ Returns the angle of the segment. -``` +```js segAng(segment_name: string, sketch_group: SketchGroup) -> number ``` ### Examples -```kcl +```js const part001 = startSketchOn('XY') |> startProfileAt([4.83, 12.56], %) |> line([15.1, 2.48], %) @@ -30,7 +30,7 @@ const part001 = startSketchOn('XY') * `segment_name`: `string` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/segEndX.md b/docs/kcl/segEndX.md index b149dc517..911912144 100644 --- a/docs/kcl/segEndX.md +++ b/docs/kcl/segEndX.md @@ -8,13 +8,13 @@ Returns the segment end of x. -``` +```js segEndX(segment_name: string, sketch_group: SketchGroup) -> number ``` ### Examples -```kcl +```js startSketchOn("YZ") |> startProfileAt([0, 0], %) |> line({ to: [5, 0], tag: "thing" }, %) @@ -28,7 +28,7 @@ startSketchOn("YZ") * `segment_name`: `string` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/segEndY.md b/docs/kcl/segEndY.md index e28024200..456bc4b20 100644 --- a/docs/kcl/segEndY.md +++ b/docs/kcl/segEndY.md @@ -8,13 +8,13 @@ Returns the segment end of y. -``` +```js segEndY(segment_name: string, sketch_group: SketchGroup) -> number ``` ### Examples -```kcl +```js startSketchOn("YZ") |> startProfileAt([0, 0], %) |> line({ to: [5, 0], tag: "thing" }, %) @@ -28,7 +28,7 @@ startSketchOn("YZ") * `segment_name`: `string` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/segLen.md b/docs/kcl/segLen.md index d9f4c7366..b95b417bc 100644 --- a/docs/kcl/segLen.md +++ b/docs/kcl/segLen.md @@ -8,13 +8,13 @@ Returns the length of the segment. -``` +```js segLen(segment_name: string, sketch_group: SketchGroup) -> number ``` ### Examples -```kcl +```js startSketchOn("YZ") |> startProfileAt([0, 0], %) |> line({ to: [5, 0], tag: "thing" }, %) @@ -28,7 +28,7 @@ startSketchOn("YZ") * `segment_name`: `string` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/sin.md b/docs/kcl/sin.md index 74ad10e81..0864a1ee2 100644 --- a/docs/kcl/sin.md +++ b/docs/kcl/sin.md @@ -8,13 +8,13 @@ Computes the sine of a number (in radians). -``` +```js sin(num: number) -> number ``` ### Examples -```kcl +```js const myVar = sin(2 * pi()) ``` diff --git a/docs/kcl/sqrt.md b/docs/kcl/sqrt.md index 2752d0cb0..78069ddc7 100644 --- a/docs/kcl/sqrt.md +++ b/docs/kcl/sqrt.md @@ -8,13 +8,13 @@ Computes the square root of a number. -``` +```js sqrt(num: number) -> number ``` ### Examples -```kcl +```js const myVar = sqrt(4) ``` diff --git a/docs/kcl/startProfileAt.md b/docs/kcl/startProfileAt.md index c6e07a1fc..17e10ee49 100644 --- a/docs/kcl/startProfileAt.md +++ b/docs/kcl/startProfileAt.md @@ -8,13 +8,13 @@ Start a profile at a given point. -``` +```js startProfileAt(data: LineData, sketch_surface: SketchSurface) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('XY') |> startProfileAt([0, 0], %) |> line([10, 10], %) @@ -23,7 +23,7 @@ startSketchOn('XY') ### Arguments * `data`: `LineData` - Data to draw a line. (REQUIRED) -``` +```js { // The tag. tag: string, @@ -33,7 +33,7 @@ startSketchOn('XY') [number, number] ``` * `sketch_surface`: `SketchSurface` - A sketch group type. (REQUIRED) -``` +```js { // The id of the plane. id: uuid, @@ -97,7 +97,7 @@ startSketchOn('XY') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/startSketchAt.md b/docs/kcl/startSketchAt.md index 6847fa5ee..92827dfa8 100644 --- a/docs/kcl/startSketchAt.md +++ b/docs/kcl/startSketchAt.md @@ -8,13 +8,13 @@ Start a sketch at a given point on the 'XY' plane. -``` +```js startSketchAt(data: LineData) -> SketchGroup ``` ### Examples -```kcl +```js startSketchAt([0, 0]) |> line([10, 10], %) ``` @@ -22,7 +22,7 @@ startSketchAt([0, 0]) ### Arguments * `data`: `LineData` - Data to draw a line. (REQUIRED) -``` +```js { // The tag. tag: string, @@ -35,7 +35,7 @@ startSketchAt([0, 0]) ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/startSketchOn.md b/docs/kcl/startSketchOn.md index b334b0fc7..57ae1db85 100644 --- a/docs/kcl/startSketchOn.md +++ b/docs/kcl/startSketchOn.md @@ -8,13 +8,13 @@ Start a sketch on a specific plane or face. -``` +```js startSketchOn(data: SketchData, tag?: SketchOnFaceTag) -> SketchSurface ``` ### Examples -```kcl +```js startSketchOn('XY') |> startProfileAt([0, 0], %) |> line([10, 10], %) @@ -22,7 +22,7 @@ startSketchOn('XY') |> close(%, "edge2") ``` -```kcl +```js fn cube = (pos, scale) => { const sg = startSketchOn('XY') |> startProfileAt(pos, %) @@ -48,7 +48,7 @@ const part001 = startSketchOn(box, "start") ### Arguments * `data`: `SketchData` - Data for start sketch on. You can start a sketch on a plane or an extrude group. (REQUIRED) -``` +```js "XY" | "-XY" | "XZ" | @@ -213,7 +213,7 @@ const part001 = startSketchOn(box, "start") } ``` * `tag`: `SketchOnFaceTag` - A tag for sketch on face. (OPTIONAL) -``` +```js "start" | "end" | string ``` @@ -221,7 +221,7 @@ string ### Returns `SketchSurface` - A sketch group type. -``` +```js { // The id of the plane. id: uuid, diff --git a/docs/kcl/tan.md b/docs/kcl/tan.md index 33b172242..6aa32a847 100644 --- a/docs/kcl/tan.md +++ b/docs/kcl/tan.md @@ -8,13 +8,13 @@ Computes the tangent of a number (in radians). -``` +```js tan(num: number) -> number ``` ### Examples -```kcl +```js const myVar = tan(2 * pi()) ``` diff --git a/docs/kcl/tangentialArc.md b/docs/kcl/tangentialArc.md index d2c8cdf7a..2c869c8da 100644 --- a/docs/kcl/tangentialArc.md +++ b/docs/kcl/tangentialArc.md @@ -8,13 +8,13 @@ Draw an arc. -``` +```js tangentialArc(data: TangentialArcData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('-YZ') |> startProfileAt([0, 0], %) |> line({ to: [10, 10], tag: "edge0" }, %) @@ -26,7 +26,7 @@ startSketchOn('-YZ') ### Arguments * `data`: `TangentialArcData` - Data to draw a tangential arc. (REQUIRED) -``` +```js { // Offset of the arc, in degrees. offset: number, @@ -42,7 +42,7 @@ startSketchOn('-YZ') [number, number] ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -209,7 +209,7 @@ startSketchOn('-YZ') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/tangentialArcTo.md b/docs/kcl/tangentialArcTo.md index 106e61566..5a16b6701 100644 --- a/docs/kcl/tangentialArcTo.md +++ b/docs/kcl/tangentialArcTo.md @@ -8,13 +8,13 @@ Draw an arc. -``` +```js tangentialArcTo(to: [number], sketch_group: SketchGroup, tag?: String) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('-YZ') |> startProfileAt([0, 0], %) |> line({ to: [10, 10], tag: "edge0" }, %) @@ -26,7 +26,7 @@ startSketchOn('-YZ') * `to`: `[number]` (REQUIRED) * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -194,7 +194,7 @@ startSketchOn('-YZ') ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/tau.md b/docs/kcl/tau.md index ff2ed22ee..192f8673b 100644 --- a/docs/kcl/tau.md +++ b/docs/kcl/tau.md @@ -8,13 +8,13 @@ Return the value of `tau`. The full circle constant (τ). Equal to 2π. -``` +```js tau() -> number ``` ### Examples -```kcl +```js const myVar = tau() ``` diff --git a/docs/kcl/toDegrees.md b/docs/kcl/toDegrees.md index 78932f9da..a2db77657 100644 --- a/docs/kcl/toDegrees.md +++ b/docs/kcl/toDegrees.md @@ -8,13 +8,13 @@ Converts a number from radians to degrees. -``` +```js toDegrees(num: number) -> number ``` ### Examples -```kcl +```js const myVar = toDegrees(2 * pi()) ``` diff --git a/docs/kcl/toRadians.md b/docs/kcl/toRadians.md index 7da8a854f..39d3b591c 100644 --- a/docs/kcl/toRadians.md +++ b/docs/kcl/toRadians.md @@ -8,13 +8,13 @@ Converts a number from degrees to radians. -``` +```js toRadians(num: number) -> number ``` ### Examples -```kcl +```js const myVar = toRadians(180) ``` diff --git a/docs/kcl/xLine.md b/docs/kcl/xLine.md index 631953405..3653a4031 100644 --- a/docs/kcl/xLine.md +++ b/docs/kcl/xLine.md @@ -8,13 +8,13 @@ Draw a line on the x-axis. -``` +```js xLine(data: AxisLineData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('YZ') |> startProfileAt([0, 0], %) |> xLine(10, %) @@ -26,7 +26,7 @@ startSketchOn('YZ') ### Arguments * `data`: `AxisLineData` - Data to draw a line on an axis. (REQUIRED) -``` +```js { // The length of the line. length: number, @@ -36,7 +36,7 @@ startSketchOn('YZ') number ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -203,7 +203,7 @@ number ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/xLineTo.md b/docs/kcl/xLineTo.md index b54487d0f..b1bf0c684 100644 --- a/docs/kcl/xLineTo.md +++ b/docs/kcl/xLineTo.md @@ -8,13 +8,13 @@ Draw a line to a point on the x-axis. -``` +```js xLineTo(data: AxisLineToData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('XY') |> startProfileAt([0, 0], %) |> xLineTo({ to: 10, tag: "edge1" }, %) @@ -26,7 +26,7 @@ startSketchOn('XY') ### Arguments * `data`: `AxisLineToData` - Data to draw a line to a point on an axis. (REQUIRED) -``` +```js { // The tag. tag: string, @@ -36,7 +36,7 @@ startSketchOn('XY') number ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -203,7 +203,7 @@ number ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/yLine.md b/docs/kcl/yLine.md index 23f71b403..e0e60ada0 100644 --- a/docs/kcl/yLine.md +++ b/docs/kcl/yLine.md @@ -8,13 +8,13 @@ Draw a line on the y-axis. -``` +```js yLine(data: AxisLineData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('XY') |> startProfileAt([0, 0], %) |> yLine(10, %) @@ -26,7 +26,7 @@ startSketchOn('XY') ### Arguments * `data`: `AxisLineData` - Data to draw a line on an axis. (REQUIRED) -``` +```js { // The length of the line. length: number, @@ -36,7 +36,7 @@ startSketchOn('XY') number ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -203,7 +203,7 @@ number ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/docs/kcl/yLineTo.md b/docs/kcl/yLineTo.md index 58db8deba..409a0277d 100644 --- a/docs/kcl/yLineTo.md +++ b/docs/kcl/yLineTo.md @@ -8,13 +8,13 @@ Draw a line to a point on the y-axis. -``` +```js yLineTo(data: AxisLineToData, sketch_group: SketchGroup) -> SketchGroup ``` ### Examples -```kcl +```js startSketchOn('XZ') |> startProfileAt([0, 0], %) |> yLineTo({ to: 10, tag: "edge1" }, %) @@ -27,7 +27,7 @@ startSketchOn('XZ') ### Arguments * `data`: `AxisLineToData` - Data to draw a line to a point on an axis. (REQUIRED) -``` +```js { // The tag. tag: string, @@ -37,7 +37,7 @@ startSketchOn('XZ') number ``` * `sketch_group`: `SketchGroup` - A sketch group is a collection of paths. (REQUIRED) -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, @@ -204,7 +204,7 @@ number ### Returns `SketchGroup` - A sketch group is a collection of paths. -``` +```js { // The plane id or face id of the sketch group. entityId: uuid, diff --git a/public/expectations.md b/public/expectations.md index 6e504edc5..eef0f174c 100644 --- a/public/expectations.md +++ b/public/expectations.md @@ -23,7 +23,7 @@ Plenty of you have professional CAD experience, and may not understand why codin Before you dive straight into the app, we wanted to lay some expectations out for you. - ZMA is in early development. Kurt pitched the idea back in January, and the team has been working hard on it since then. ZMA has really basic CAD features for now, but we have plenty of features on our roadmap. Most of the features that you may be currently used to in your CAD workflow today will be available down the road. -- For a list of all scripting functions, please reference our [documentation](https://github.com/KittyCAD/modeling-app/blob/main/docs/kcl/index.md). For a basic rundown of our types, please reference [this document](https://github.com/KittyCAD/modeling-app/blob/main/docs/kcl/types.md). +- For a list of all scripting functions, please reference our [documentation](https://zoo.dev/docs/kcl). For a basic rundown of our types, please reference [this document](https://zoo.dev/docs/kcl/types). - With that being said, we have created an external new features list in [GH Discussions](https://github.com/KittyCAD/modeling-app/discussions). For our current priority list, please click [here](https://github.com/KittyCAD/modeling-app/blob/main/public/roadmap.md). Please upvote any features in the GH Discussions page that you would like to see implemented first. We will prioritize the highest upvoted items or items that are foundational for other features on the list. You can also add your own, but we will review it to make sure it’s not a duplicate or it’s feasible for the current state of the app. - Please report any and all bugs/issues you find. Even the smallest bugs are important! You can report them in a GH Issue [here](https://github.com/KittyCAD/modeling-app/issues/new). You are more than welcome to link your GH Issue in the **bugs** section of our Discord, but if you want to discuss the bug further, please keep that in the GH Issue thread. Please include the severity of the bug in your GH Issue ticket (High, Medium, or Low). If you are having trouble deciding what severity the bug is, use this guideline: - **High:** The bug is blocking you from continuing. diff --git a/src/components/CodeMenu.tsx b/src/components/CodeMenu.tsx index 153a01ee7..631dd6027 100644 --- a/src/components/CodeMenu.tsx +++ b/src/components/CodeMenu.tsx @@ -59,7 +59,7 @@ export const CodeMenu = ({ children }: PropsWithChildren) => { diff --git a/src/routes/Onboarding/CodeEditor.tsx b/src/routes/Onboarding/CodeEditor.tsx index 88dbfc620..33b58c165 100644 --- a/src/routes/Onboarding/CodeEditor.tsx +++ b/src/routes/Onboarding/CodeEditor.tsx @@ -40,7 +40,7 @@ export default function CodeEditor() { in kcl before they're available as point-and-click tools, so it's good to have a link to{' '} diff --git a/src/wasm-lib/kcl/src/std/mod.rs b/src/wasm-lib/kcl/src/std/mod.rs index f7501d42c..96db06f25 100644 --- a/src/wasm-lib/kcl/src/std/mod.rs +++ b/src/wasm-lib/kcl/src/std/mod.rs @@ -891,7 +891,7 @@ layout: manual fn_docs.push_str(&format!("{}\n\n", internal_fn.summary())); fn_docs.push_str(&format!("{}\n\n", internal_fn.description())); - fn_docs.push_str("```\n"); + fn_docs.push_str("```js\n"); let signature = internal_fn.fn_signature(); fn_docs.push_str(&signature); fn_docs.push_str("\n```\n\n"); @@ -900,7 +900,7 @@ layout: manual fn_docs.push_str("### Examples\n\n"); for example in internal_fn.examples() { - fn_docs.push_str("```kcl\n"); + fn_docs.push_str("```js\n"); fn_docs.push_str(&example); fn_docs.push_str("\n```\n\n"); } @@ -920,7 +920,7 @@ layout: manual } if should_be_indented { - fn_docs.push_str(&format!("```\n{}\n```\n", format)); + fn_docs.push_str(&format!("```js\n{}\n```\n", format)); } } @@ -934,7 +934,7 @@ layout: manual let (format, should_be_indented) = return_type.get_type_string().unwrap(); if should_be_indented { - fn_docs.push_str(&format!("```\n{}\n```\n", format)); + fn_docs.push_str(&format!("```js\n{}\n```\n", format)); } }