fix links for kcl docs (#1714)
* updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * more link Signed-off-by: Jess Frazelle <github@jessfraz.com> * better highlighting Signed-off-by: Jess Frazelle <github@jessfraz.com> * better highlighting Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
This commit is contained in:
@ -8,13 +8,13 @@ Computes the absolute value of a number.
|
||||
|
||||
|
||||
|
||||
```
|
||||
```js
|
||||
abs(num: number) -> number
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```kcl
|
||||
```js
|
||||
const myVar = abs(-4)
|
||||
```
|
||||
|
||||
|
||||
@ -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)
|
||||
```
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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)
|
||||
```
|
||||
|
||||
|
||||
@ -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)
|
||||
```
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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)
|
||||
```
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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())
|
||||
```
|
||||
|
||||
|
||||
@ -8,13 +8,13 @@ Return the value of Euler’s number `e`.
|
||||
|
||||
|
||||
|
||||
```
|
||||
```js
|
||||
e() -> number
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```kcl
|
||||
```js
|
||||
const myVar = e()
|
||||
```
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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)
|
||||
```
|
||||
|
||||
|
||||
@ -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],
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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)
|
||||
```
|
||||
|
||||
|
||||
@ -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)
|
||||
```
|
||||
|
||||
|
||||
@ -8,13 +8,13 @@ Returns the length of the given leg.
|
||||
|
||||
|
||||
|
||||
```
|
||||
```js
|
||||
legLen(hypotenuse: number, leg: number) -> number
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```kcl
|
||||
```js
|
||||
legLen(5, 3)
|
||||
```
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -8,13 +8,13 @@ Computes the natural logarithm of the number.
|
||||
|
||||
|
||||
|
||||
```
|
||||
```js
|
||||
ln(num: number) -> number
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```kcl
|
||||
```js
|
||||
const myVar = ln(4)
|
||||
```
|
||||
|
||||
|
||||
@ -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)
|
||||
```
|
||||
|
||||
|
||||
@ -8,13 +8,13 @@ Computes the base 10 logarithm of the number.
|
||||
|
||||
|
||||
|
||||
```
|
||||
```js
|
||||
log10(num: number) -> number
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```kcl
|
||||
```js
|
||||
const myVar = log10(4)
|
||||
```
|
||||
|
||||
|
||||
@ -8,13 +8,13 @@ Computes the base 2 logarithm of the number.
|
||||
|
||||
|
||||
|
||||
```
|
||||
```js
|
||||
log2(num: number) -> number
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```kcl
|
||||
```js
|
||||
const myVar = log2(4)
|
||||
```
|
||||
|
||||
|
||||
@ -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)
|
||||
```
|
||||
|
||||
|
||||
@ -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)
|
||||
```
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -8,13 +8,13 @@ Return the value of `pi`. Archimedes’ constant (π).
|
||||
|
||||
|
||||
|
||||
```
|
||||
```js
|
||||
pi() -> number
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```kcl
|
||||
```js
|
||||
const myVar = pi() * 3.0
|
||||
```
|
||||
|
||||
|
||||
@ -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)
|
||||
```
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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())
|
||||
```
|
||||
|
||||
|
||||
@ -8,13 +8,13 @@ Computes the square root of a number.
|
||||
|
||||
|
||||
|
||||
```
|
||||
```js
|
||||
sqrt(num: number) -> number
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```kcl
|
||||
```js
|
||||
const myVar = sqrt(4)
|
||||
```
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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())
|
||||
```
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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()
|
||||
```
|
||||
|
||||
|
||||
@ -8,13 +8,13 @@ Converts a number from radians to degrees.
|
||||
|
||||
|
||||
|
||||
```
|
||||
```js
|
||||
toDegrees(num: number) -> number
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```kcl
|
||||
```js
|
||||
const myVar = toDegrees(2 * pi())
|
||||
```
|
||||
|
||||
|
||||
@ -8,13 +8,13 @@ Converts a number from degrees to radians.
|
||||
|
||||
|
||||
|
||||
```
|
||||
```js
|
||||
toRadians(num: number) -> number
|
||||
```
|
||||
|
||||
### Examples
|
||||
|
||||
```kcl
|
||||
```js
|
||||
const myVar = toRadians(180)
|
||||
```
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
Reference in New Issue
Block a user