fix: Needed to support the bad request flow, the toast will hang forever, the return control flows don't dismiss a forever toast
This commit is contained in:
5
docs/kcl/README.md
Normal file
5
docs/kcl/README.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Autogenerated docs
|
||||
|
||||
Everything in this directory and its subdirectories (except this file) is automatically generated. Do not edit anything in this directory directly, your changes will be lost.
|
||||
|
||||
The directory contents are generated by running the `test_generate_stdlib_markdown_docs` test in `/rust/kcl-lib/src/docs/gen_std_tests.rs`. Files are generated from the standard library declared in KCL (`/rust/kcl-lib/std`) and in Rust (`/rust/kcl-lib/src/std`), and by copying files from `../kcl-src`.
|
@ -10,15 +10,15 @@ Draw a line segment relative to the current origin using the polar measure of so
|
||||
|
||||
```kcl
|
||||
angledLine(
|
||||
sketch: [Sketch](/docs/kcl/types/Sketch),
|
||||
angle: [number](/docs/kcl/types/number),
|
||||
length?: [number](/docs/kcl/types/number),
|
||||
lengthX?: [number](/docs/kcl/types/number),
|
||||
lengthY?: [number](/docs/kcl/types/number),
|
||||
endAbsoluteX?: [number](/docs/kcl/types/number),
|
||||
endAbsoluteY?: [number](/docs/kcl/types/number),
|
||||
tag?: [TagDeclarator](/docs/kcl/types#tag-declaration),
|
||||
): [Sketch](/docs/kcl/types/Sketch)
|
||||
sketch: Sketch,
|
||||
angle: number,
|
||||
length?: number,
|
||||
lengthX?: number,
|
||||
lengthY?: number,
|
||||
endAbsoluteX?: number,
|
||||
endAbsoluteY?: number,
|
||||
tag?: TagDeclarator,
|
||||
): Sketch
|
||||
```
|
||||
|
||||
|
||||
@ -26,18 +26,18 @@ angledLine(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | Which sketch should this path be added to? | Yes |
|
||||
| `angle` | [`number`](/docs/kcl/types/number) | Which angle should the line be drawn at? | Yes |
|
||||
| `length` | [`number`](/docs/kcl/types/number) | Draw the line this distance along the given angle. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
|
||||
| `lengthX` | [`number`](/docs/kcl/types/number) | Draw the line this distance along the X axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
|
||||
| `lengthY` | [`number`](/docs/kcl/types/number) | Draw the line this distance along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
|
||||
| `endAbsoluteX` | [`number`](/docs/kcl/types/number) | Draw the line along the given angle until it reaches this point along the X axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
|
||||
| `endAbsoluteY` | [`number`](/docs/kcl/types/number) | Draw the line along the given angle until it reaches this point along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
|
||||
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Create a new tag which refers to this line | No |
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
|
||||
| `angle` | [`number`](/docs/kcl/types/std-types-number) | Which angle should the line be drawn at? | Yes |
|
||||
| `length` | [`number`](/docs/kcl/types/std-types-number) | Draw the line this distance along the given angle. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
|
||||
| `lengthX` | [`number`](/docs/kcl/types/std-types-number) | Draw the line this distance along the X axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
|
||||
| `lengthY` | [`number`](/docs/kcl/types/std-types-number) | Draw the line this distance along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
|
||||
| `endAbsoluteX` | [`number`](/docs/kcl/types/std-types-number) | Draw the line along the given angle until it reaches this point along the X axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
|
||||
| `endAbsoluteY` | [`number`](/docs/kcl/types/std-types-number) | Draw the line along the given angle until it reaches this point along the Y axis. Only one of `length`, `lengthX`, `lengthY`, `endAbsoluteX`, `endAbsoluteY` can be given. | No |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Sketch`](/docs/kcl/types/Sketch)
|
||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,12 +10,12 @@ Draw an angled line from the current origin, constructing a line segment such th
|
||||
|
||||
```kcl
|
||||
angledLineThatIntersects(
|
||||
sketch: [Sketch](/docs/kcl/types/Sketch),
|
||||
angle: [number](/docs/kcl/types/number),
|
||||
intersectTag: [TagIdentifier](/docs/kcl/types#tag-identifier),
|
||||
offset?: [number](/docs/kcl/types/number),
|
||||
tag?: [TagDeclarator](/docs/kcl/types#tag-declaration),
|
||||
): [Sketch](/docs/kcl/types/Sketch)
|
||||
sketch: Sketch,
|
||||
angle: number,
|
||||
intersectTag: TagIdentifier,
|
||||
offset?: number,
|
||||
tag?: TagDeclarator,
|
||||
): Sketch
|
||||
```
|
||||
|
||||
|
||||
@ -23,15 +23,15 @@ angledLineThatIntersects(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | Which sketch should this path be added to? | Yes |
|
||||
| `angle` | [`number`](/docs/kcl/types/number) | Which angle should the line be drawn at? | Yes |
|
||||
| `intersectTag` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | The tag of the line to intersect with | Yes |
|
||||
| `offset` | [`number`](/docs/kcl/types/number) | The offset from the intersecting line. Defaults to 0. | No |
|
||||
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Create a new tag which refers to this line | No |
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
|
||||
| `angle` | [`number`](/docs/kcl/types/std-types-number) | Which angle should the line be drawn at? | Yes |
|
||||
| `intersectTag` | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The tag of the line to intersect with | Yes |
|
||||
| `offset` | [`number`](/docs/kcl/types/std-types-number) | The offset from the intersecting line. Defaults to 0. | No |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Sketch`](/docs/kcl/types/Sketch)
|
||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,11 +10,11 @@ This will work on any solid, including extruded solids, revolved solids, and she
|
||||
|
||||
```kcl
|
||||
appearance(
|
||||
solids: [[Solid](/docs/kcl/types/Solid)OrImportedGeometry](/docs/kcl/types/[Solid](/docs/kcl/types/Solid)OrImportedGeometry),
|
||||
color: String,
|
||||
metalness?: [number](/docs/kcl/types/number),
|
||||
roughness?: [number](/docs/kcl/types/number),
|
||||
): [[Solid](/docs/kcl/types/Solid)OrImportedGeometry](/docs/kcl/types/[Solid](/docs/kcl/types/Solid)OrImportedGeometry)
|
||||
solids: [Solid] | ImportedGeometry,
|
||||
color: string,
|
||||
metalness?: number,
|
||||
roughness?: number,
|
||||
): [Solid] | ImportedGeometry
|
||||
```
|
||||
|
||||
|
||||
@ -22,14 +22,14 @@ appearance(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `solids` | [`SolidOrImportedGeometry`](/docs/kcl/types/SolidOrImportedGeometry) | The solid(s) whose appearance is being set | Yes |
|
||||
| `color` | `String` | Color of the new material, a hex string like '#ff0000' | Yes |
|
||||
| `metalness` | [`number`](/docs/kcl/types/number) | Metalness of the new material, a percentage like 95.7. | No |
|
||||
| `roughness` | [`number`](/docs/kcl/types/number) | Roughness of the new material, a percentage like 95.7. | No |
|
||||
| `solids` | [`[Solid]`](/docs/kcl/types/std-types-Solid) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) | The solid(s) whose appearance is being set | Yes |
|
||||
| `color` | [`string`](/docs/kcl/types/std-types-string) | Color of the new material, a hex string like '#ff0000' | Yes |
|
||||
| `metalness` | [`number`](/docs/kcl/types/std-types-number) | Metalness of the new material, a percentage like 95.7. | No |
|
||||
| `roughness` | [`number`](/docs/kcl/types/std-types-number) | Roughness of the new material, a percentage like 95.7. | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`SolidOrImportedGeometry`](/docs/kcl/types/SolidOrImportedGeometry) - Data for a solid or an imported geometry.
|
||||
[`[Solid]`](/docs/kcl/types/std-types-Solid) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) - Data for a solid or an imported geometry.
|
||||
|
||||
|
||||
### Examples
|
||||
@ -72,9 +72,9 @@ fn cube(center) {
|
||||
|> extrude(length = 10)
|
||||
}
|
||||
|
||||
example0 = cube([0, 0])
|
||||
example1 = cube([20, 0])
|
||||
example2 = cube([40, 0])
|
||||
example0 = cube(center = [0, 0])
|
||||
example1 = cube(center = [20, 0])
|
||||
example2 = cube(center = [40, 0])
|
||||
|
||||
appearance(
|
||||
[example0, example1],
|
||||
|
@ -12,14 +12,14 @@ Unless this makes a lot of sense and feels like what you're looking for to const
|
||||
|
||||
```kcl
|
||||
arc(
|
||||
sketch: [Sketch](/docs/kcl/types/Sketch),
|
||||
angleStart?: [number](/docs/kcl/types/number),
|
||||
angleEnd?: [number](/docs/kcl/types/number),
|
||||
radius?: [number](/docs/kcl/types/number),
|
||||
interiorAbsolute?: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
endAbsolute?: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
tag?: [TagDeclarator](/docs/kcl/types#tag-declaration),
|
||||
): [Sketch](/docs/kcl/types/Sketch)
|
||||
sketch: Sketch,
|
||||
angleStart?: number,
|
||||
angleEnd?: number,
|
||||
radius?: number,
|
||||
interiorAbsolute?: Point2d,
|
||||
endAbsolute?: Point2d,
|
||||
tag?: TagDeclarator,
|
||||
): Sketch
|
||||
```
|
||||
|
||||
|
||||
@ -27,17 +27,17 @@ arc(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | Which sketch should this path be added to? | Yes |
|
||||
| `angleStart` | [`number`](/docs/kcl/types/number) | Where along the circle should this arc start? | No |
|
||||
| `angleEnd` | [`number`](/docs/kcl/types/number) | Where along the circle should this arc end? | No |
|
||||
| `radius` | [`number`](/docs/kcl/types/number) | How large should the circle be? | No |
|
||||
| `interiorAbsolute` | [`[number]`](/docs/kcl/types/number) | Any point between the arc's start and end? Requires `endAbsolute`. Incompatible with `angleStart` or `angleEnd` | No |
|
||||
| `endAbsolute` | [`[number]`](/docs/kcl/types/number) | Where should this arc end? Requires `interiorAbsolute`. Incompatible with `angleStart` or `angleEnd` | No |
|
||||
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Create a new tag which refers to this line | No |
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
|
||||
| `angleStart` | [`number`](/docs/kcl/types/std-types-number) | Where along the circle should this arc start? | No |
|
||||
| `angleEnd` | [`number`](/docs/kcl/types/std-types-number) | Where along the circle should this arc end? | No |
|
||||
| `radius` | [`number`](/docs/kcl/types/std-types-number) | How large should the circle be? | No |
|
||||
| `interiorAbsolute` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | Any point between the arc's start and end? Requires `endAbsolute`. Incompatible with `angleStart` or `angleEnd` | No |
|
||||
| `endAbsolute` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | Where should this arc end? Requires `interiorAbsolute`. Incompatible with `angleStart` or `angleEnd` | No |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Sketch`](/docs/kcl/types/Sketch)
|
||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,14 +10,14 @@ Check a value meets some expected conditions at runtime. Program terminates with
|
||||
|
||||
```kcl
|
||||
assert(
|
||||
actual: [number](/docs/kcl/types/number),
|
||||
isGreaterThan?: [number](/docs/kcl/types/number),
|
||||
isLessThan?: [number](/docs/kcl/types/number),
|
||||
isGreaterThanOrEqual?: [number](/docs/kcl/types/number),
|
||||
isLessThanOrEqual?: [number](/docs/kcl/types/number),
|
||||
isEqualTo?: [number](/docs/kcl/types/number),
|
||||
tolerance?: [number](/docs/kcl/types/number),
|
||||
error?: String,
|
||||
actual: number,
|
||||
isGreaterThan?: number,
|
||||
isLessThan?: number,
|
||||
isGreaterThanOrEqual?: number,
|
||||
isLessThanOrEqual?: number,
|
||||
isEqualTo?: number,
|
||||
tolerance?: number,
|
||||
error?: string,
|
||||
): ()
|
||||
```
|
||||
|
||||
@ -26,14 +26,14 @@ assert(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `actual` | [`number`](/docs/kcl/types/number) | Value to check. It will be compared with one of the comparison arguments. | Yes |
|
||||
| `isGreaterThan` | [`number`](/docs/kcl/types/number) | Comparison argument. If given, checks the `actual` value is greater than this. | No |
|
||||
| `isLessThan` | [`number`](/docs/kcl/types/number) | Comparison argument. If given, checks the `actual` value is less than this. | No |
|
||||
| `isGreaterThanOrEqual` | [`number`](/docs/kcl/types/number) | Comparison argument. If given, checks the `actual` value is greater than or equal to this. | No |
|
||||
| `isLessThanOrEqual` | [`number`](/docs/kcl/types/number) | Comparison argument. If given, checks the `actual` value is less than or equal to this. | No |
|
||||
| `isEqualTo` | [`number`](/docs/kcl/types/number) | Comparison argument. If given, checks the `actual` value is less than or equal to this. | No |
|
||||
| `tolerance` | [`number`](/docs/kcl/types/number) | If `isEqualTo` is used, this is the tolerance to allow for the comparison. This tolerance is used because KCL's number system has some floating-point imprecision when used with very large decimal places. | No |
|
||||
| `error` | `String` | If the value was false, the program will terminate with this error message | No |
|
||||
| `actual` | [`number`](/docs/kcl/types/std-types-number) | Value to check. It will be compared with one of the comparison arguments. | Yes |
|
||||
| `isGreaterThan` | [`number`](/docs/kcl/types/std-types-number) | Comparison argument. If given, checks the `actual` value is greater than this. | No |
|
||||
| `isLessThan` | [`number`](/docs/kcl/types/std-types-number) | Comparison argument. If given, checks the `actual` value is less than this. | No |
|
||||
| `isGreaterThanOrEqual` | [`number`](/docs/kcl/types/std-types-number) | Comparison argument. If given, checks the `actual` value is greater than or equal to this. | No |
|
||||
| `isLessThanOrEqual` | [`number`](/docs/kcl/types/std-types-number) | Comparison argument. If given, checks the `actual` value is less than or equal to this. | No |
|
||||
| `isEqualTo` | [`number`](/docs/kcl/types/std-types-number) | Comparison argument. If given, checks the `actual` value is less than or equal to this. | No |
|
||||
| `tolerance` | [`number`](/docs/kcl/types/std-types-number) | If `isEqualTo` is used, this is the tolerance to allow for the comparison. This tolerance is used because KCL's number system has some floating-point imprecision when used with very large decimal places. | No |
|
||||
| `error` | [`string`](/docs/kcl/types/std-types-string) | If the value was false, the program will terminate with this error message | No |
|
||||
|
||||
### Returns
|
||||
|
||||
|
@ -10,8 +10,8 @@ Asserts that a value is the boolean value true.
|
||||
|
||||
```kcl
|
||||
assertIs(
|
||||
actual: [bool](/docs/kcl/types/bool),
|
||||
error?: String,
|
||||
actual: bool,
|
||||
error?: string,
|
||||
): ()
|
||||
```
|
||||
|
||||
@ -20,8 +20,8 @@ assertIs(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `actual` | [`bool`](/docs/kcl/types/bool) | Value to check. If this is the boolean value true, assert passes. Otherwise it fails. | Yes |
|
||||
| `error` | `String` | If the value was false, the program will terminate with this error message | No |
|
||||
| `actual` | [`bool`](/docs/kcl/types/std-types-bool) | Value to check. If this is the boolean value true, assert passes. Otherwise it fails. | Yes |
|
||||
| `error` | [`string`](/docs/kcl/types/std-types-string) | If the value was false, the program will terminate with this error message | No |
|
||||
|
||||
### Returns
|
||||
|
||||
|
@ -10,12 +10,12 @@ Draw a smooth, continuous, curved line segment from the current origin to the de
|
||||
|
||||
```kcl
|
||||
bezierCurve(
|
||||
sketch: [Sketch](/docs/kcl/types/Sketch),
|
||||
control1: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
control2: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
end: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
tag?: [TagDeclarator](/docs/kcl/types#tag-declaration),
|
||||
): [Sketch](/docs/kcl/types/Sketch)
|
||||
sketch: Sketch,
|
||||
control1: Point2d,
|
||||
control2: Point2d,
|
||||
end: Point2d,
|
||||
tag?: TagDeclarator,
|
||||
): Sketch
|
||||
```
|
||||
|
||||
|
||||
@ -23,15 +23,15 @@ bezierCurve(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | Which sketch should this path be added to? | Yes |
|
||||
| `control1` | [`[number]`](/docs/kcl/types/number) | First control point for the cubic | Yes |
|
||||
| `control2` | [`[number]`](/docs/kcl/types/number) | Second control point for the cubic | Yes |
|
||||
| `end` | [`[number]`](/docs/kcl/types/number) | How far away (along the X and Y axes) should this line go? | Yes |
|
||||
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Create a new tag which refers to this line | No |
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
|
||||
| `control1` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | First control point for the cubic | Yes |
|
||||
| `control2` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | Second control point for the cubic | Yes |
|
||||
| `end` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | How far away (along the X and Y axes) should this line go? | Yes |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Sketch`](/docs/kcl/types/Sketch)
|
||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,12 +10,12 @@ Construct a circle derived from 3 points.
|
||||
|
||||
```kcl
|
||||
circleThreePoint(
|
||||
sketchSurfaceOrGroup: [[Sketch](/docs/kcl/types/Sketch)OrSurface](/docs/kcl/types/[Sketch](/docs/kcl/types/Sketch)OrSurface),
|
||||
p1: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
p2: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
p3: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
tag?: [TagDeclarator](/docs/kcl/types#tag-declaration),
|
||||
): [Sketch](/docs/kcl/types/Sketch)
|
||||
sketchSurfaceOrGroup: Sketch | Plane | Face,
|
||||
p1: Point2d,
|
||||
p2: Point2d,
|
||||
p3: Point2d,
|
||||
tag?: TagDeclarator,
|
||||
): Sketch
|
||||
```
|
||||
|
||||
|
||||
@ -23,15 +23,15 @@ circleThreePoint(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketchSurfaceOrGroup` | [`SketchOrSurface`](/docs/kcl/types/SketchOrSurface) | Plane or surface to sketch on. | Yes |
|
||||
| `p1` | [`[number]`](/docs/kcl/types/number) | 1st point to derive the circle. | Yes |
|
||||
| `p2` | [`[number]`](/docs/kcl/types/number) | 2nd point to derive the circle. | Yes |
|
||||
| `p3` | [`[number]`](/docs/kcl/types/number) | 3rd point to derive the circle. | Yes |
|
||||
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Identifier for the circle to reference elsewhere. | No |
|
||||
| `sketchSurfaceOrGroup` | [`Sketch`](/docs/kcl/types/std-types-Sketch) or [`Plane`](/docs/kcl/types/std-types-Plane) or [`Face`](/docs/kcl/types/std-types-Face) | Plane or surface to sketch on. | Yes |
|
||||
| `p1` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | 1st point to derive the circle. | Yes |
|
||||
| `p2` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | 2nd point to derive the circle. | Yes |
|
||||
| `p3` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | 3rd point to derive the circle. | Yes |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Identifier for the circle to reference elsewhere. | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Sketch`](/docs/kcl/types/Sketch)
|
||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -13,7 +13,7 @@ This doesn't really have much utility unless you need the equivalent of a double
|
||||
Really only use this function if YOU ARE SURE you need it. In most cases you do not need clone and using a pattern with `instance = 2` is more appropriate.
|
||||
|
||||
```kcl
|
||||
clone(geometry: [GeometryWithImportedGeometry](/docs/kcl/types/GeometryWithImportedGeometry)): [GeometryWithImportedGeometry](/docs/kcl/types/GeometryWithImportedGeometry)
|
||||
clone(geometry: Solid | Sketch | ImportedGeometry): Solid | Sketch | ImportedGeometry
|
||||
```
|
||||
|
||||
|
||||
@ -21,11 +21,11 @@ clone(geometry: [GeometryWithImportedGeometry](/docs/kcl/types/GeometryWithImpor
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `geometry` | [`GeometryWithImportedGeometry`](/docs/kcl/types/GeometryWithImportedGeometry) | The sketch, solid, or imported geometry to be cloned | Yes |
|
||||
| `geometry` | [`Solid`](/docs/kcl/types/std-types-Solid) or [`Sketch`](/docs/kcl/types/std-types-Sketch) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) | The sketch, solid, or imported geometry to be cloned | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`GeometryWithImportedGeometry`](/docs/kcl/types/GeometryWithImportedGeometry) - A geometry including an imported geometry.
|
||||
[`Solid`](/docs/kcl/types/std-types-Solid) or [`Sketch`](/docs/kcl/types/std-types-Sketch) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) - A geometry including an imported geometry.
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,9 +10,9 @@ Construct a line segment from the current origin back to the profile's origin, e
|
||||
|
||||
```kcl
|
||||
close(
|
||||
sketch: [Sketch](/docs/kcl/types/Sketch),
|
||||
tag?: [TagDeclarator](/docs/kcl/types#tag-declaration),
|
||||
): [Sketch](/docs/kcl/types/Sketch)
|
||||
sketch: Sketch,
|
||||
tag?: TagDeclarator,
|
||||
): Sketch
|
||||
```
|
||||
|
||||
|
||||
@ -20,12 +20,12 @@ close(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | The sketch you want to close | Yes |
|
||||
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Create a new tag which refers to this line | No |
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | The sketch you want to close | Yes |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Sketch`](/docs/kcl/types/Sketch)
|
||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
||||
|
File diff suppressed because one or more lines are too long
@ -10,13 +10,13 @@ You can provide more than one sketch to extrude, and they will all be extruded i
|
||||
|
||||
```kcl
|
||||
extrude(
|
||||
sketches: [[[Sketch](/docs/kcl/types/Sketch)]](/docs/kcl/types/[Sketch](/docs/kcl/types/Sketch)),
|
||||
length: [number](/docs/kcl/types/number),
|
||||
symmetric?: [bool](/docs/kcl/types/bool),
|
||||
bidirectionalLength?: [number](/docs/kcl/types/number),
|
||||
tagStart?: [TagDeclarator](/docs/kcl/types#tag-declaration),
|
||||
tagEnd?: [TagDeclarator](/docs/kcl/types#tag-declaration),
|
||||
): [[[Solid](/docs/kcl/types/Solid)]](/docs/kcl/types/[Solid](/docs/kcl/types/Solid))
|
||||
sketches: [Sketch],
|
||||
length: number,
|
||||
symmetric?: bool,
|
||||
bidirectionalLength?: number,
|
||||
tagStart?: TagDeclarator,
|
||||
tagEnd?: TagDeclarator,
|
||||
): [Solid]
|
||||
```
|
||||
|
||||
|
||||
@ -24,16 +24,16 @@ extrude(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketches` | [`[Sketch]`](/docs/kcl/types/Sketch) | Which sketch or sketches should be extruded | Yes |
|
||||
| `length` | [`number`](/docs/kcl/types/number) | How far to extrude the given sketches | Yes |
|
||||
| `symmetric` | [`bool`](/docs/kcl/types/bool) | If true, the extrusion will happen symmetrically around the sketch. Otherwise, the | No |
|
||||
| `bidirectionalLength` | [`number`](/docs/kcl/types/number) | If specified, will also extrude in the opposite direction to 'distance' to the specified distance. If 'symmetric' is true, this value is ignored. | No |
|
||||
| `tagStart` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | A named tag for the face at the start of the extrusion, i.e. the original sketch | No |
|
||||
| `tagEnd` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | A named tag for the face at the end of the extrusion, i.e. the new face created by extruding the original sketch | No |
|
||||
| `sketches` | [`[Sketch]`](/docs/kcl/types/std-types-Sketch) | Which sketch or sketches should be extruded | Yes |
|
||||
| `length` | [`number`](/docs/kcl/types/std-types-number) | How far to extrude the given sketches | Yes |
|
||||
| `symmetric` | [`bool`](/docs/kcl/types/std-types-bool) | If true, the extrusion will happen symmetrically around the sketch. Otherwise, the | No |
|
||||
| `bidirectionalLength` | [`number`](/docs/kcl/types/std-types-number) | If specified, will also extrude in the opposite direction to 'distance' to the specified distance. If 'symmetric' is true, this value is ignored. | No |
|
||||
| `tagStart` | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | A named tag for the face at the start of the extrusion, i.e. the original sketch | No |
|
||||
| `tagEnd` | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | A named tag for the face at the end of the extrusion, i.e. the new face created by extruding the original sketch | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`[Solid]`](/docs/kcl/types/Solid)
|
||||
[`[Solid]`](/docs/kcl/types/std-types-Solid)
|
||||
|
||||
|
||||
### Examples
|
||||
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -10,14 +10,14 @@ Create a helix.
|
||||
|
||||
```kcl
|
||||
helix(
|
||||
revolutions: [number](/docs/kcl/types/number)(_),
|
||||
angleStart: [number](/docs/kcl/types/number)(Angle),
|
||||
ccw?: [bool](/docs/kcl/types/bool),
|
||||
radius?: [number](/docs/kcl/types/number)(Length),
|
||||
axis?: [Axis3d](/docs/kcl/types/Axis3d) | [Edge](/docs/kcl/types/Edge),
|
||||
length?: [number](/docs/kcl/types/number)(Length),
|
||||
cylinder?: [Solid](/docs/kcl/types/Solid),
|
||||
): [Helix](/docs/kcl/types/Helix)
|
||||
revolutions: number(_),
|
||||
angleStart: number(Angle),
|
||||
ccw?: bool,
|
||||
radius?: number(Length),
|
||||
axis?: Axis3d | Edge,
|
||||
length?: number(Length),
|
||||
cylinder?: Solid,
|
||||
): Helix
|
||||
```
|
||||
|
||||
|
||||
@ -27,15 +27,15 @@ helix(
|
||||
|----------|------|-------------|----------|
|
||||
| `revolutions` | `number(_)` | Number of revolutions. | Yes |
|
||||
| `angleStart` | `number(Angle)` | Start angle. | Yes |
|
||||
| `ccw` | [`bool`](/docs/kcl/types/bool) | Is the helix rotation counter clockwise? The default is `false`. | No |
|
||||
| `ccw` | [`bool`](/docs/kcl/types/std-types-bool) | Is the helix rotation counter clockwise? The default is `false`. | No |
|
||||
| `radius` | `number(Length)` | Radius of the helix. | No |
|
||||
| `axis` | [`Axis3d`](/docs/kcl/types/Axis3d) or [`Edge`](/docs/kcl/types/Edge) | Axis to use for the helix. | No |
|
||||
| `axis` | [`Axis3d`](/docs/kcl/types/std-types-Axis3d) or [`Edge`](/docs/kcl/types/std-types-Edge) | Axis to use for the helix. | No |
|
||||
| `length` | `number(Length)` | Length of the helix. This is not necessary if the helix is created around an edge. If not given the length of the edge is used. | No |
|
||||
| `cylinder` | [`Solid`](/docs/kcl/types/Solid) | Cylinder to create the helix on. | No |
|
||||
| `cylinder` | [`Solid`](/docs/kcl/types/std-types-Solid) | Cylinder to create the helix on. | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Helix`](/docs/kcl/types/Helix)
|
||||
[`Helix`](/docs/kcl/types/std-types-Helix)
|
||||
|
||||
|
||||
### Examples
|
@ -9,7 +9,7 @@ Compute the absolute value of a number.
|
||||
|
||||
|
||||
```kcl
|
||||
abs(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number)
|
||||
abs(@input: number): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ abs(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number)
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `input` | [`number`](/docs/kcl/types/number) | | Yes |
|
||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
@ -9,7 +9,7 @@ Compute the arccosine of a number.
|
||||
|
||||
|
||||
```kcl
|
||||
acos(@num: [number](/docs/kcl/types/number)(_)): [number](/docs/kcl/types/number)(rad)
|
||||
acos(@num: number(_)): number(rad)
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Compute the arcsine of a number.
|
||||
|
||||
|
||||
```kcl
|
||||
asin(@num: [number](/docs/kcl/types/number)(_)): [number](/docs/kcl/types/number)(rad)
|
||||
asin(@num: number(_)): number(rad)
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Compute the arctangent of a number.
|
||||
Consider using `atan2()` instead for the true inverse of tangent.
|
||||
|
||||
```kcl
|
||||
atan(@num: [number](/docs/kcl/types/number)(_)): [number](/docs/kcl/types/number)(rad)
|
||||
atan(@num: number(_)): number(rad)
|
||||
```
|
||||
|
||||
|
@ -10,9 +10,9 @@ Compute the four quadrant arctangent of Y and X.
|
||||
|
||||
```kcl
|
||||
atan2(
|
||||
y: [number](/docs/kcl/types/number)(Length),
|
||||
x: [number](/docs/kcl/types/number)(Length),
|
||||
): [number](/docs/kcl/types/number)(rad)
|
||||
y: number(Length),
|
||||
x: number(Length),
|
||||
): number(rad)
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Compute the smallest integer greater than or equal to a number.
|
||||
|
||||
|
||||
```kcl
|
||||
ceil(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number)
|
||||
ceil(@input: number): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ ceil(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number)
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `input` | [`number`](/docs/kcl/types/number) | | Yes |
|
||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
@ -9,7 +9,7 @@ Compute the cosine of a number.
|
||||
|
||||
|
||||
```kcl
|
||||
cos(@num: [number](/docs/kcl/types/number)(Angle)): [number](/docs/kcl/types/number)(_)
|
||||
cos(@num: number(Angle)): number(_)
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Compute the largest integer less than or equal to a number.
|
||||
|
||||
|
||||
```kcl
|
||||
floor(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number)
|
||||
floor(@input: number): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ floor(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `input` | [`number`](/docs/kcl/types/number) | | Yes |
|
||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
@ -9,7 +9,7 @@ Compute the natural logarithm of the number.
|
||||
|
||||
|
||||
```kcl
|
||||
ln(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number)
|
||||
ln(@input: number): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ ln(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number)
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `input` | [`number`](/docs/kcl/types/number) | | Yes |
|
||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
@ -12,9 +12,9 @@ and `log10` can produce more accurate results for base 10.
|
||||
|
||||
```kcl
|
||||
log(
|
||||
@input: [number](/docs/kcl/types/number),
|
||||
base: [number](/docs/kcl/types/number)(_),
|
||||
): [number](/docs/kcl/types/number)
|
||||
@input: number,
|
||||
base: number(_),
|
||||
): number
|
||||
```
|
||||
|
||||
|
||||
@ -22,12 +22,12 @@ log(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `input` | [`number`](/docs/kcl/types/number) | The number to compute the logarithm of. | Yes |
|
||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | The number to compute the logarithm of. | Yes |
|
||||
| `base` | `number(_)` | The base of the logarithm. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
@ -9,7 +9,7 @@ Compute the base 10 logarithm of the number.
|
||||
|
||||
|
||||
```kcl
|
||||
log10(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number)
|
||||
log10(@input: number): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ log10(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `input` | [`number`](/docs/kcl/types/number) | | Yes |
|
||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
@ -9,7 +9,7 @@ Compute the base 2 logarithm of the number.
|
||||
|
||||
|
||||
```kcl
|
||||
log2(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number)
|
||||
log2(@input: number): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ log2(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number)
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `input` | [`number`](/docs/kcl/types/number) | | Yes |
|
||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
@ -9,7 +9,7 @@ Compute the maximum of the given arguments.
|
||||
|
||||
|
||||
```kcl
|
||||
max(@input: [[number](/docs/kcl/types/number); 1+]): [number](/docs/kcl/types/number)
|
||||
max(@input: [number; 1+]): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ max(@input: [[number](/docs/kcl/types/number); 1+]): [number](/docs/kcl/types/nu
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `input` | `[number; 1+]` | An array of numbers to compute the maximum of. | Yes |
|
||||
| `input` | [`[number; 1+]`](/docs/kcl/types/std-types-number) | An array of numbers to compute the maximum of. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
@ -9,7 +9,7 @@ Compute the minimum of the given arguments.
|
||||
|
||||
|
||||
```kcl
|
||||
min(@input: [[number](/docs/kcl/types/number); 1+]): [number](/docs/kcl/types/number)
|
||||
min(@input: [number; 1+]): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ min(@input: [[number](/docs/kcl/types/number); 1+]): [number](/docs/kcl/types/nu
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `input` | `[number; 1+]` | An array of numbers to compute the minimum of. | Yes |
|
||||
| `input` | [`[number; 1+]`](/docs/kcl/types/std-types-number) | An array of numbers to compute the minimum of. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
@ -11,9 +11,9 @@ cartesian (x/y/z grid) coordinates.
|
||||
|
||||
```kcl
|
||||
polar(
|
||||
angle: [number](/docs/kcl/types/number)(rad),
|
||||
length: [number](/docs/kcl/types/number)(Length),
|
||||
): [Point2d](/docs/kcl/types/Point2d)
|
||||
angle: number(rad),
|
||||
length: number(Length),
|
||||
): Point2d
|
||||
```
|
||||
|
||||
|
||||
@ -26,7 +26,7 @@ polar(
|
||||
|
||||
### Returns
|
||||
|
||||
[`Point2d`](/docs/kcl/types/Point2d)
|
||||
[`Point2d`](/docs/kcl/types/std-types-Point2d)
|
||||
|
||||
|
||||
### Examples
|
@ -10,9 +10,9 @@ Compute the number to a power.
|
||||
|
||||
```kcl
|
||||
pow(
|
||||
@input: [number](/docs/kcl/types/number),
|
||||
exp: [number](/docs/kcl/types/number)(_),
|
||||
): [number](/docs/kcl/types/number)
|
||||
@input: number,
|
||||
exp: number(_),
|
||||
): number
|
||||
```
|
||||
|
||||
|
||||
@ -20,12 +20,12 @@ pow(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `input` | [`number`](/docs/kcl/types/number) | The number to raise. | Yes |
|
||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | The number to raise. | Yes |
|
||||
| `exp` | `number(_)` | The power to raise to. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
@ -11,9 +11,9 @@ If `num` is negative, the result will be too.
|
||||
|
||||
```kcl
|
||||
rem(
|
||||
@num: [number](/docs/kcl/types/number),
|
||||
divisor: [number](/docs/kcl/types/number),
|
||||
): [number](/docs/kcl/types/number)
|
||||
@num: number,
|
||||
divisor: number,
|
||||
): number
|
||||
```
|
||||
|
||||
|
||||
@ -21,12 +21,12 @@ rem(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `num` | [`number`](/docs/kcl/types/number) | The number which will be divided by `divisor`. | Yes |
|
||||
| `divisor` | [`number`](/docs/kcl/types/number) | The number which will divide `num`. | Yes |
|
||||
| `num` | [`number`](/docs/kcl/types/std-types-number) | The number which will be divided by `divisor`. | Yes |
|
||||
| `divisor` | [`number`](/docs/kcl/types/std-types-number) | The number which will divide `num`. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
@ -9,7 +9,7 @@ Round a number to the nearest integer.
|
||||
|
||||
|
||||
```kcl
|
||||
round(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number)
|
||||
round(@input: number): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ round(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `input` | [`number`](/docs/kcl/types/number) | | Yes |
|
||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
@ -9,7 +9,7 @@ Compute the sine of a number.
|
||||
|
||||
|
||||
```kcl
|
||||
sin(@num: [number](/docs/kcl/types/number)(Angle)): [number](/docs/kcl/types/number)(_)
|
||||
sin(@num: number(Angle)): number(_)
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Compute the square root of a number.
|
||||
|
||||
|
||||
```kcl
|
||||
sqrt(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number)
|
||||
sqrt(@input: number): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ sqrt(@input: [number](/docs/kcl/types/number)): [number](/docs/kcl/types/number)
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `input` | [`number`](/docs/kcl/types/number) | | Yes |
|
||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
@ -9,7 +9,7 @@ Compute the tangent of a number.
|
||||
|
||||
|
||||
```kcl
|
||||
tan(@num: [number](/docs/kcl/types/number)(Angle)): [number](/docs/kcl/types/number)(_)
|
||||
tan(@num: number(Angle)): number(_)
|
||||
```
|
||||
|
||||
|
@ -10,10 +10,10 @@ For example, if you offset the `XZ` plane by 10, the new plane will be parallel
|
||||
plane and 10 units away from it.
|
||||
|
||||
```kcl
|
||||
offset[Plane](/docs/kcl/types/Plane)(
|
||||
@plane: [Plane](/docs/kcl/types/Plane),
|
||||
offset: [number](/docs/kcl/types/number)(Length),
|
||||
): [Plane](/docs/kcl/types/Plane)
|
||||
offsetPlane(
|
||||
@plane: Plane,
|
||||
offset: number(Length),
|
||||
): Plane
|
||||
```
|
||||
|
||||
|
||||
@ -21,12 +21,12 @@ offset[Plane](/docs/kcl/types/Plane)(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `plane` | [`Plane`](/docs/kcl/types/Plane) | The plane (e.g. `XY`) which this new plane is created from. | Yes |
|
||||
| `plane` | [`Plane`](/docs/kcl/types/std-types-Plane) | The plane (e.g. `XY`) which this new plane is created from. | Yes |
|
||||
| `offset` | `number(Length)` | Distance from the standard plane this new plane will be created at. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Plane`](/docs/kcl/types/Plane)
|
||||
[`Plane`](/docs/kcl/types/std-types-Plane)
|
||||
|
||||
|
||||
### Examples
|
@ -19,15 +19,15 @@ revolved around the same axis.
|
||||
|
||||
```kcl
|
||||
revolve(
|
||||
@sketches: [[Sketch](/docs/kcl/types/Sketch); 1+],
|
||||
axis: [Axis2d](/docs/kcl/types/Axis2d) | [Edge](/docs/kcl/types/Edge),
|
||||
angle?: [number](/docs/kcl/types/number)(Angle),
|
||||
tolerance?: [number](/docs/kcl/types/number)(Length),
|
||||
symmetric?: [bool](/docs/kcl/types/bool),
|
||||
bidirectionalAngle?: [number](/docs/kcl/types/number)(Angle),
|
||||
@sketches: [Sketch; 1+],
|
||||
axis: Axis2d | Edge,
|
||||
angle?: number(Angle),
|
||||
tolerance?: number(Length),
|
||||
symmetric?: bool,
|
||||
bidirectionalAngle?: number(Angle),
|
||||
tagStart?: tag,
|
||||
tagEnd?: tag,
|
||||
): [Solid](/docs/kcl/types/Solid)
|
||||
): Solid
|
||||
```
|
||||
|
||||
|
||||
@ -35,18 +35,18 @@ revolve(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketches` | `[Sketch; 1+]` | The sketch or set of sketches that should be revolved | Yes |
|
||||
| `axis` | [`Axis2d`](/docs/kcl/types/Axis2d) or [`Edge`](/docs/kcl/types/Edge) | Axis of revolution. | Yes |
|
||||
| `sketches` | [`[Sketch; 1+]`](/docs/kcl/types/std-types-Sketch) | The sketch or set of sketches that should be revolved | Yes |
|
||||
| `axis` | [`Axis2d`](/docs/kcl/types/std-types-Axis2d) or [`Edge`](/docs/kcl/types/std-types-Edge) | Axis of revolution. | Yes |
|
||||
| `angle` | `number(Angle)` | Angle to revolve (in degrees). Default is 360. | No |
|
||||
| `tolerance` | `number(Length)` | Tolerance for the revolve operation. | No |
|
||||
| `symmetric` | [`bool`](/docs/kcl/types/bool) | If true, the extrusion will happen symmetrically around the sketch. Otherwise, the extrusion will happen on only one side of the sketch. | No |
|
||||
| `symmetric` | [`bool`](/docs/kcl/types/std-types-bool) | If true, the extrusion will happen symmetrically around the sketch. Otherwise, the extrusion will happen on only one side of the sketch. | No |
|
||||
| `bidirectionalAngle` | `number(Angle)` | If specified, will also revolve in the opposite direction to 'angle' to the specified angle. If 'symmetric' is true, this value is ignored. | No |
|
||||
| `tagStart` | `tag` | A named tag for the face at the start of the revolve, i.e. the original sketch. | No |
|
||||
| `tagEnd` | `tag` | A named tag for the face at the end of the revolve. | No |
|
||||
| `tagStart` | [`tag`](/docs/kcl/types/std-types-tag) | A named tag for the face at the start of the revolve, i.e. the original sketch. | No |
|
||||
| `tagEnd` | [`tag`](/docs/kcl/types/std-types-tag) | A named tag for the face at the end of the revolve. | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Solid`](/docs/kcl/types/Solid)
|
||||
[`Solid`](/docs/kcl/types/std-types-Solid)
|
||||
|
||||
|
||||
### Examples
|
@ -11,11 +11,11 @@ the provided (x, y) origin point.
|
||||
|
||||
```kcl
|
||||
circle(
|
||||
@sketch_or_surface: [Sketch](/docs/kcl/types/Sketch) | [Plane](/docs/kcl/types/Plane) | [Face](/docs/kcl/types/Face),
|
||||
center: [Point2d](/docs/kcl/types/Point2d),
|
||||
radius: [number](/docs/kcl/types/number)(Length),
|
||||
@sketch_or_surface: Sketch | Plane | Face,
|
||||
center: Point2d,
|
||||
radius: number(Length),
|
||||
tag?: tag,
|
||||
): [Sketch](/docs/kcl/types/Sketch)
|
||||
): Sketch
|
||||
```
|
||||
|
||||
|
||||
@ -23,14 +23,14 @@ circle(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketch_or_surface` | [`Sketch`](/docs/kcl/types/Sketch) or [`Plane`](/docs/kcl/types/Plane) or [`Face`](/docs/kcl/types/Face) | Sketch to extend, or plane or surface to sketch on. | Yes |
|
||||
| `center` | [`Point2d`](/docs/kcl/types/Point2d) | The center of the circle. | Yes |
|
||||
| `sketch_or_surface` | [`Sketch`](/docs/kcl/types/std-types-Sketch) or [`Plane`](/docs/kcl/types/std-types-Plane) or [`Face`](/docs/kcl/types/std-types-Face) | Sketch to extend, or plane or surface to sketch on. | Yes |
|
||||
| `center` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | The center of the circle. | Yes |
|
||||
| `radius` | `number(Length)` | The radius of the circle. | Yes |
|
||||
| `tag` | `tag` | Create a new tag which refers to this circle. | No |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`tag`](/docs/kcl/types/std-types-tag) | Create a new tag which refers to this circle. | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Sketch`](/docs/kcl/types/Sketch)
|
||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
@ -12,9 +12,9 @@ Mirror occurs around a local sketch axis rather than a global axis.
|
||||
|
||||
```kcl
|
||||
mirror2d(
|
||||
@sketches: [[Sketch](/docs/kcl/types/Sketch); 1+],
|
||||
axis: [Axis2d](/docs/kcl/types/Axis2d) | [Edge](/docs/kcl/types/Edge),
|
||||
): [Sketch](/docs/kcl/types/Sketch)
|
||||
@sketches: [Sketch; 1+],
|
||||
axis: Axis2d | Edge,
|
||||
): Sketch
|
||||
```
|
||||
|
||||
|
||||
@ -22,12 +22,12 @@ mirror2d(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketches` | `[Sketch; 1+]` | The sketch or sketches to be reflected. | Yes |
|
||||
| `axis` | [`Axis2d`](/docs/kcl/types/Axis2d) or [`Edge`](/docs/kcl/types/Edge) | The axis to reflect around. | Yes |
|
||||
| `sketches` | [`[Sketch; 1+]`](/docs/kcl/types/std-types-Sketch) | The sketch or sketches to be reflected. | Yes |
|
||||
| `axis` | [`Axis2d`](/docs/kcl/types/std-types-Axis2d) or [`Edge`](/docs/kcl/types/std-types-Edge) | The axis to reflect around. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Sketch`](/docs/kcl/types/Sketch)
|
||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
@ -12,11 +12,11 @@ a sharp, straight transitional edge.
|
||||
|
||||
```kcl
|
||||
chamfer(
|
||||
@solid: [Solid](/docs/kcl/types/Solid),
|
||||
length: [number](/docs/kcl/types/number)(Length),
|
||||
tags: [[Edge](/docs/kcl/types/Edge); 1+],
|
||||
@solid: Solid,
|
||||
length: number(Length),
|
||||
tags: [Edge; 1+],
|
||||
tag?: tag,
|
||||
): [Solid](/docs/kcl/types/Solid)
|
||||
): Solid
|
||||
```
|
||||
|
||||
|
||||
@ -24,14 +24,14 @@ chamfer(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `solid` | [`Solid`](/docs/kcl/types/Solid) | The solid whose edges should be chamfered | Yes |
|
||||
| `solid` | [`Solid`](/docs/kcl/types/std-types-Solid) | The solid whose edges should be chamfered | Yes |
|
||||
| `length` | `number(Length)` | The length of the chamfer | Yes |
|
||||
| `tags` | `[Edge; 1+]` | The paths you want to chamfer | Yes |
|
||||
| `tag` | `tag` | Create a new tag which refers to this chamfer | No |
|
||||
| `tags` | [`[Edge; 1+]`](/docs/kcl/types/std-types-Edge) | The paths you want to chamfer | Yes |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`tag`](/docs/kcl/types/std-types-tag) | Create a new tag which refers to this chamfer | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Solid`](/docs/kcl/types/Solid)
|
||||
[`Solid`](/docs/kcl/types/std-types-Solid)
|
||||
|
||||
|
||||
### Examples
|
||||
@ -76,7 +76,7 @@ sg = startSketchOn(XY)
|
||||
return sg
|
||||
}
|
||||
|
||||
part001 = cube([0,0], 20)
|
||||
part001 = cube(pos = [0,0], scale = 20)
|
||||
|> close(tag = $line1)
|
||||
|> extrude(length = 20)
|
||||
// We tag the chamfer to reference it later.
|
@ -12,12 +12,12 @@ will smoothly blend the transition.
|
||||
|
||||
```kcl
|
||||
fillet(
|
||||
@solid: [Solid](/docs/kcl/types/Solid),
|
||||
radius: [number](/docs/kcl/types/number)(Length),
|
||||
tags: [[Edge](/docs/kcl/types/Edge); 1+],
|
||||
tolerance?: [number](/docs/kcl/types/number)(Length),
|
||||
@solid: Solid,
|
||||
radius: number(Length),
|
||||
tags: [Edge; 1+],
|
||||
tolerance?: number(Length),
|
||||
tag?: tag,
|
||||
): [Solid](/docs/kcl/types/Solid)
|
||||
): Solid
|
||||
```
|
||||
|
||||
|
||||
@ -25,15 +25,15 @@ fillet(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `solid` | [`Solid`](/docs/kcl/types/Solid) | The solid whose edges should be filletted | Yes |
|
||||
| `solid` | [`Solid`](/docs/kcl/types/std-types-Solid) | The solid whose edges should be filletted | Yes |
|
||||
| `radius` | `number(Length)` | The radius of the fillet | Yes |
|
||||
| `tags` | `[Edge; 1+]` | The paths you want to fillet | Yes |
|
||||
| `tags` | [`[Edge; 1+]`](/docs/kcl/types/std-types-Edge) | The paths you want to fillet | Yes |
|
||||
| `tolerance` | `number(Length)` | The tolerance for this fillet | No |
|
||||
| `tag` | `tag` | Create a new tag which refers to this fillet | No |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`tag`](/docs/kcl/types/std-types-tag) | Create a new tag which refers to this fillet | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Solid`](/docs/kcl/types/Solid)
|
||||
[`Solid`](/docs/kcl/types/std-types-Solid)
|
||||
|
||||
|
||||
### Examples
|
@ -11,9 +11,9 @@ provided thickness remains around the exterior of the shape.
|
||||
|
||||
```kcl
|
||||
hollow(
|
||||
@solid: [Solid](/docs/kcl/types/Solid),
|
||||
thickness: [number](/docs/kcl/types/number)(Length),
|
||||
): [Solid](/docs/kcl/types/Solid)
|
||||
@solid: Solid,
|
||||
thickness: number(Length),
|
||||
): Solid
|
||||
```
|
||||
|
||||
|
||||
@ -21,12 +21,12 @@ hollow(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `solid` | [`Solid`](/docs/kcl/types/Solid) | Which solid to hollow out | Yes |
|
||||
| `solid` | [`Solid`](/docs/kcl/types/std-types-Solid) | Which solid to hollow out | Yes |
|
||||
| `thickness` | `number(Length)` | The thickness of the remaining shell | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Solid`](/docs/kcl/types/Solid)
|
||||
[`Solid`](/docs/kcl/types/std-types-Solid)
|
||||
|
||||
|
||||
### Examples
|
@ -11,10 +11,10 @@ provided thickness remains, taking volume starting at the providedface, leaving
|
||||
|
||||
```kcl
|
||||
shell(
|
||||
@solids: [[Solid](/docs/kcl/types/Solid); 1+],
|
||||
thickness: [number](/docs/kcl/types/number)(Length),
|
||||
@solids: [Solid; 1+],
|
||||
thickness: number(Length),
|
||||
faces: [tag; 1+],
|
||||
): [[[Solid](/docs/kcl/types/Solid)]](/docs/kcl/types/[Solid](/docs/kcl/types/Solid))
|
||||
): [Solid]
|
||||
```
|
||||
|
||||
|
||||
@ -22,13 +22,13 @@ shell(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `solids` | `[Solid; 1+]` | Which solid (or solids) to shell out | Yes |
|
||||
| `solids` | [`[Solid; 1+]`](/docs/kcl/types/std-types-Solid) | Which solid (or solids) to shell out | Yes |
|
||||
| `thickness` | `number(Length)` | The thickness of the shell | Yes |
|
||||
| `faces` | `[tag; 1+]` | The faces you want removed | Yes |
|
||||
| `faces` | [`[tag; 1+]`](/docs/kcl/types/std-types-tag) | The faces you want removed | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`[Solid]`](/docs/kcl/types/Solid)
|
||||
[`[Solid]`](/docs/kcl/types/std-types-Solid)
|
||||
|
||||
|
||||
### Examples
|
@ -9,7 +9,7 @@ Convert a number to centimeters from its current units.
|
||||
|
||||
|
||||
```kcl
|
||||
units::toCentimeters(@num: [number](/docs/kcl/types/number)(cm)): [number](/docs/kcl/types/number)(cm)
|
||||
units::toCentimeters(@num: number(cm)): number(cm)
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Converts a number to degrees from its current units.
|
||||
|
||||
|
||||
```kcl
|
||||
units::toDegrees(@num: [number](/docs/kcl/types/number)(deg)): [number](/docs/kcl/types/number)(deg)
|
||||
units::toDegrees(@num: number(deg)): number(deg)
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Convert a number to feet from its current units.
|
||||
|
||||
|
||||
```kcl
|
||||
units::toFeet(@num: [number](/docs/kcl/types/number)(ft)): [number](/docs/kcl/types/number)(ft)
|
||||
units::toFeet(@num: number(ft)): number(ft)
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Convert a number to inches from its current units.
|
||||
|
||||
|
||||
```kcl
|
||||
units::toInches(@num: [number](/docs/kcl/types/number)(in)): [number](/docs/kcl/types/number)(in)
|
||||
units::toInches(@num: number(in)): number(in)
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Convert a number to meters from its current units.
|
||||
|
||||
|
||||
```kcl
|
||||
units::toMeters(@num: [number](/docs/kcl/types/number)(m)): [number](/docs/kcl/types/number)(m)
|
||||
units::toMeters(@num: number(m)): number(m)
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Convert a number to millimeters from its current units.
|
||||
|
||||
|
||||
```kcl
|
||||
units::toMillimeters(@num: [number](/docs/kcl/types/number)(mm)): [number](/docs/kcl/types/number)(mm)
|
||||
units::toMillimeters(@num: number(mm)): number(mm)
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Converts a number to radians from its current units.
|
||||
|
||||
|
||||
```kcl
|
||||
units::toRadians(@num: [number](/docs/kcl/types/number)(rad)): [number](/docs/kcl/types/number)(rad)
|
||||
units::toRadians(@num: number(rad)): number(rad)
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Converts a number to yards from its current units.
|
||||
|
||||
|
||||
```kcl
|
||||
units::toYards(@num: [number](/docs/kcl/types/number)(yd)): [number](/docs/kcl/types/number)(yd)
|
||||
units::toYards(@num: number(yd)): number(yd)
|
||||
```
|
||||
|
||||
|
@ -9,7 +9,7 @@ Get the shared edge between two faces.
|
||||
|
||||
|
||||
```kcl
|
||||
getCommon[Edge](/docs/kcl/types/Edge)(faces: [[TagIdentifier](/docs/kcl/types#tag-identifier)]): Uuid
|
||||
getCommonEdge(faces: [TagIdentifier]): Uuid
|
||||
```
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ getCommon[Edge](/docs/kcl/types/Edge)(faces: [[TagIdentifier](/docs/kcl/types#ta
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `faces` | `[TagIdentifier]` | The tags of the faces you want to find the common edge between | Yes |
|
||||
| `faces` | [`[TagIdentifier]`](/docs/kcl/types#TagIdentifier) | The tags of the faces you want to find the common edge between | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
|
@ -9,7 +9,7 @@ Get the next adjacent edge to the edge given.
|
||||
|
||||
|
||||
```kcl
|
||||
getNextAdjacent[Edge](/docs/kcl/types/Edge)(edge: [TagIdentifier](/docs/kcl/types#tag-identifier)): Uuid
|
||||
getNextAdjacentEdge(edge: TagIdentifier): Uuid
|
||||
```
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ getNextAdjacent[Edge](/docs/kcl/types/Edge)(edge: [TagIdentifier](/docs/kcl/type
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `edge` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | The tag of the edge you want to find the next adjacent edge of. | Yes |
|
||||
| `edge` | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The tag of the edge you want to find the next adjacent edge of. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
|
@ -9,7 +9,7 @@ Get the opposite edge to the edge given.
|
||||
|
||||
|
||||
```kcl
|
||||
getOpposite[Edge](/docs/kcl/types/Edge)(edge: [TagIdentifier](/docs/kcl/types#tag-identifier)): Uuid
|
||||
getOppositeEdge(edge: TagIdentifier): Uuid
|
||||
```
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ getOpposite[Edge](/docs/kcl/types/Edge)(edge: [TagIdentifier](/docs/kcl/types#ta
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `edge` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | The tag of the edge you want to find the opposite edge of. | Yes |
|
||||
| `edge` | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The tag of the edge you want to find the opposite edge of. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
|
@ -9,7 +9,7 @@ Get the previous adjacent edge to the edge given.
|
||||
|
||||
|
||||
```kcl
|
||||
getPreviousAdjacent[Edge](/docs/kcl/types/Edge)(edge: [TagIdentifier](/docs/kcl/types#tag-identifier)): Uuid
|
||||
getPreviousAdjacentEdge(edge: TagIdentifier): Uuid
|
||||
```
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ getPreviousAdjacent[Edge](/docs/kcl/types/Edge)(edge: [TagIdentifier](/docs/kcl/
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `edge` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | The tag of the edge you want to find the previous adjacent edge of. | Yes |
|
||||
| `edge` | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The tag of the edge you want to find the previous adjacent edge of. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
|
@ -12,24 +12,10 @@ layout: manual
|
||||
* [`Modules`](kcl/modules)
|
||||
* [`Settings`](kcl/settings)
|
||||
* [`Known Issues`](kcl/known-issues)
|
||||
* [`Constants`](kcl/consts)
|
||||
|
||||
### Standard library
|
||||
### Functions
|
||||
|
||||
* **Primitive types**
|
||||
* [`bool`](kcl/types/bool)
|
||||
* [`number`](kcl/types/number)
|
||||
* [`string`](kcl/types/string)
|
||||
* [`tag`](kcl/types/tag)
|
||||
* **std**
|
||||
* [`END`](kcl/consts/std-END)
|
||||
* [`START`](kcl/consts/std-START)
|
||||
* [`X`](kcl/consts/std-X)
|
||||
* [`XY`](kcl/consts/std-XY)
|
||||
* [`XZ`](kcl/consts/std-XZ)
|
||||
* [`Y`](kcl/consts/std-Y)
|
||||
* [`YZ`](kcl/consts/std-YZ)
|
||||
* [`Z`](kcl/consts/std-Z)
|
||||
* [`angledLine`](kcl/angledLine)
|
||||
* [`angledLineThatIntersects`](kcl/angledLineThatIntersects)
|
||||
* [`appearance`](kcl/appearance)
|
||||
@ -45,7 +31,7 @@ layout: manual
|
||||
* [`getNextAdjacentEdge`](kcl/getNextAdjacentEdge)
|
||||
* [`getOppositeEdge`](kcl/getOppositeEdge)
|
||||
* [`getPreviousAdjacentEdge`](kcl/getPreviousAdjacentEdge)
|
||||
* [`helix`](kcl/std-helix)
|
||||
* [`helix`](kcl/functions/std-helix)
|
||||
* [`intersect`](kcl/intersect)
|
||||
* [`involuteCircular`](kcl/involuteCircular)
|
||||
* [`lastSegX`](kcl/lastSegX)
|
||||
@ -56,7 +42,7 @@ layout: manual
|
||||
* [`line`](kcl/line)
|
||||
* [`loft`](kcl/loft)
|
||||
* [`map`](kcl/map)
|
||||
* [`offsetPlane`](kcl/std-offsetPlane)
|
||||
* [`offsetPlane`](kcl/functions/std-offsetPlane)
|
||||
* [`patternCircular2d`](kcl/patternCircular2d)
|
||||
* [`patternCircular3d`](kcl/patternCircular3d)
|
||||
* [`patternLinear2d`](kcl/patternLinear2d)
|
||||
@ -70,7 +56,7 @@ layout: manual
|
||||
* [`profileStartY`](kcl/profileStartY)
|
||||
* [`push`](kcl/push)
|
||||
* [`reduce`](kcl/reduce)
|
||||
* [`revolve`](kcl/std-revolve)
|
||||
* [`revolve`](kcl/functions/std-revolve)
|
||||
* [`rotate`](kcl/rotate)
|
||||
* [`scale`](kcl/scale)
|
||||
* [`segAng`](kcl/segAng)
|
||||
@ -92,61 +78,90 @@ layout: manual
|
||||
* [`union`](kcl/union)
|
||||
* [`xLine`](kcl/xLine)
|
||||
* [`yLine`](kcl/yLine)
|
||||
* **std::math**
|
||||
* [`abs`](kcl/functions/std-math-abs)
|
||||
* [`acos`](kcl/functions/std-math-acos)
|
||||
* [`asin`](kcl/functions/std-math-asin)
|
||||
* [`atan`](kcl/functions/std-math-atan)
|
||||
* [`atan2`](kcl/functions/std-math-atan2)
|
||||
* [`ceil`](kcl/functions/std-math-ceil)
|
||||
* [`cos`](kcl/functions/std-math-cos)
|
||||
* [`floor`](kcl/functions/std-math-floor)
|
||||
* [`ln`](kcl/functions/std-math-ln)
|
||||
* [`log`](kcl/functions/std-math-log)
|
||||
* [`log10`](kcl/functions/std-math-log10)
|
||||
* [`log2`](kcl/functions/std-math-log2)
|
||||
* [`max`](kcl/functions/std-math-max)
|
||||
* [`min`](kcl/functions/std-math-min)
|
||||
* [`polar`](kcl/functions/std-math-polar)
|
||||
* [`pow`](kcl/functions/std-math-pow)
|
||||
* [`rem`](kcl/functions/std-math-rem)
|
||||
* [`round`](kcl/functions/std-math-round)
|
||||
* [`sin`](kcl/functions/std-math-sin)
|
||||
* [`sqrt`](kcl/functions/std-math-sqrt)
|
||||
* [`tan`](kcl/functions/std-math-tan)
|
||||
* **std::sketch**
|
||||
* [`circle`](kcl/functions/std-sketch-circle)
|
||||
* [`mirror2d`](kcl/functions/std-sketch-mirror2d)
|
||||
* **std::solid**
|
||||
* [`chamfer`](kcl/functions/std-solid-chamfer)
|
||||
* [`fillet`](kcl/functions/std-solid-fillet)
|
||||
* [`hollow`](kcl/functions/std-solid-hollow)
|
||||
* [`shell`](kcl/functions/std-solid-shell)
|
||||
* **std::units**
|
||||
* [`units::toCentimeters`](kcl/functions/std-units-toCentimeters)
|
||||
* [`units::toDegrees`](kcl/functions/std-units-toDegrees)
|
||||
* [`units::toFeet`](kcl/functions/std-units-toFeet)
|
||||
* [`units::toInches`](kcl/functions/std-units-toInches)
|
||||
* [`units::toMeters`](kcl/functions/std-units-toMeters)
|
||||
* [`units::toMillimeters`](kcl/functions/std-units-toMillimeters)
|
||||
* [`units::toRadians`](kcl/functions/std-units-toRadians)
|
||||
* [`units::toYards`](kcl/functions/std-units-toYards)
|
||||
|
||||
### Constants
|
||||
|
||||
* **std**
|
||||
* [`END`](kcl/consts/std-END)
|
||||
* [`START`](kcl/consts/std-START)
|
||||
* [`X`](kcl/consts/std-X)
|
||||
* [`XY`](kcl/consts/std-XY)
|
||||
* [`XZ`](kcl/consts/std-XZ)
|
||||
* [`Y`](kcl/consts/std-Y)
|
||||
* [`YZ`](kcl/consts/std-YZ)
|
||||
* [`Z`](kcl/consts/std-Z)
|
||||
* **std::math**
|
||||
* [`E`](kcl/consts/std-math-E)
|
||||
* [`PI`](kcl/consts/std-math-PI)
|
||||
* [`TAU`](kcl/consts/std-math-TAU)
|
||||
* [`abs`](kcl/std-math-abs)
|
||||
* [`acos`](kcl/std-math-acos)
|
||||
* [`asin`](kcl/std-math-asin)
|
||||
* [`atan`](kcl/std-math-atan)
|
||||
* [`atan2`](kcl/std-math-atan2)
|
||||
* [`ceil`](kcl/std-math-ceil)
|
||||
* [`cos`](kcl/std-math-cos)
|
||||
* [`floor`](kcl/std-math-floor)
|
||||
* [`ln`](kcl/std-math-ln)
|
||||
* [`log`](kcl/std-math-log)
|
||||
* [`log10`](kcl/std-math-log10)
|
||||
* [`log2`](kcl/std-math-log2)
|
||||
* [`max`](kcl/std-math-max)
|
||||
* [`min`](kcl/std-math-min)
|
||||
* [`polar`](kcl/std-math-polar)
|
||||
* [`pow`](kcl/std-math-pow)
|
||||
* [`rem`](kcl/std-math-rem)
|
||||
* [`round`](kcl/std-math-round)
|
||||
* [`sin`](kcl/std-math-sin)
|
||||
* [`sqrt`](kcl/std-math-sqrt)
|
||||
* [`tan`](kcl/std-math-tan)
|
||||
* **std::sketch**
|
||||
* [`circle`](kcl/std-sketch-circle)
|
||||
* [`mirror2d`](kcl/std-sketch-mirror2d)
|
||||
* **std::solid**
|
||||
* [`chamfer`](kcl/std-solid-chamfer)
|
||||
* [`fillet`](kcl/std-solid-fillet)
|
||||
* [`hollow`](kcl/std-solid-hollow)
|
||||
* [`shell`](kcl/std-solid-shell)
|
||||
* **std::turns**
|
||||
* [`turns::HALF_TURN`](kcl/consts/std-turns-HALF_TURN)
|
||||
* [`turns::QUARTER_TURN`](kcl/consts/std-turns-QUARTER_TURN)
|
||||
* [`turns::THREE_QUARTER_TURN`](kcl/consts/std-turns-THREE_QUARTER_TURN)
|
||||
* [`turns::ZERO`](kcl/consts/std-turns-ZERO)
|
||||
|
||||
### Types
|
||||
|
||||
See also the [types overview](types)
|
||||
|
||||
* **Primitive types**
|
||||
* [`End`](kcl/types.md#End)
|
||||
* [`ImportedGeometry`](kcl/types.md#ImportedGeometry)
|
||||
* [`Start`](kcl/types.md#Start)
|
||||
* [`TagDeclarator`](kcl/types.md#TagDeclarator)
|
||||
* [`TagIdentifier`](kcl/types.md#TagIdentifier)
|
||||
* [`any`](kcl/types/std-types-any)
|
||||
* [`bool`](kcl/types/std-types-bool)
|
||||
* [`number`](kcl/types/std-types-number)
|
||||
* [`string`](kcl/types/std-types-string)
|
||||
* [`tag`](kcl/types/std-types-tag)
|
||||
* **std::types**
|
||||
* [`Axis2d`](kcl/types/Axis2d)
|
||||
* [`Axis3d`](kcl/types/Axis3d)
|
||||
* [`Edge`](kcl/types/Edge)
|
||||
* [`Face`](kcl/types/Face)
|
||||
* [`Helix`](kcl/types/Helix)
|
||||
* [`Plane`](kcl/types/Plane)
|
||||
* [`Point2d`](kcl/types/Point2d)
|
||||
* [`Point3d`](kcl/types/Point3d)
|
||||
* [`Sketch`](kcl/types/Sketch)
|
||||
* [`Solid`](kcl/types/Solid)
|
||||
* **std::units**
|
||||
* [`units::toCentimeters`](kcl/std-units-toCentimeters)
|
||||
* [`units::toDegrees`](kcl/std-units-toDegrees)
|
||||
* [`units::toFeet`](kcl/std-units-toFeet)
|
||||
* [`units::toInches`](kcl/std-units-toInches)
|
||||
* [`units::toMeters`](kcl/std-units-toMeters)
|
||||
* [`units::toMillimeters`](kcl/std-units-toMillimeters)
|
||||
* [`units::toRadians`](kcl/std-units-toRadians)
|
||||
* [`units::toYards`](kcl/std-units-toYards)
|
||||
* [`Axis2d`](kcl/types/std-types-Axis2d)
|
||||
* [`Axis3d`](kcl/types/std-types-Axis3d)
|
||||
* [`Edge`](kcl/types/std-types-Edge)
|
||||
* [`Face`](kcl/types/std-types-Face)
|
||||
* [`Helix`](kcl/types/std-types-Helix)
|
||||
* [`Plane`](kcl/types/std-types-Plane)
|
||||
* [`Point2d`](kcl/types/std-types-Point2d)
|
||||
* [`Point3d`](kcl/types/std-types-Point3d)
|
||||
* [`Sketch`](kcl/types/std-types-Sketch)
|
||||
* [`Solid`](kcl/types/std-types-Solid)
|
||||
|
File diff suppressed because one or more lines are too long
@ -10,9 +10,9 @@ Intersect computes the geometric intersection of multiple solid bodies, returnin
|
||||
|
||||
```kcl
|
||||
intersect(
|
||||
solids: [[[Solid](/docs/kcl/types/Solid)]](/docs/kcl/types/[Solid](/docs/kcl/types/Solid)),
|
||||
tolerance?: [number](/docs/kcl/types/number),
|
||||
): [[[Solid](/docs/kcl/types/Solid)]](/docs/kcl/types/[Solid](/docs/kcl/types/Solid))
|
||||
solids: [Solid],
|
||||
tolerance?: number,
|
||||
): [Solid]
|
||||
```
|
||||
|
||||
|
||||
@ -20,12 +20,12 @@ intersect(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `solids` | [`[Solid]`](/docs/kcl/types/Solid) | The solids to intersect. | Yes |
|
||||
| `tolerance` | [`number`](/docs/kcl/types/number) | The tolerance to use for the intersection operation. | No |
|
||||
| `solids` | [`[Solid]`](/docs/kcl/types/std-types-Solid) | The solids to intersect. | Yes |
|
||||
| `tolerance` | [`number`](/docs/kcl/types/std-types-number) | The tolerance to use for the intersection operation. | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`[Solid]`](/docs/kcl/types/Solid)
|
||||
[`[Solid]`](/docs/kcl/types/std-types-Solid)
|
||||
|
||||
|
||||
### Examples
|
||||
@ -44,8 +44,8 @@ fn cube(center, size) {
|
||||
|> extrude(length = 10)
|
||||
}
|
||||
|
||||
part001 = cube([0, 0], 10)
|
||||
part002 = cube([7, 3], 5)
|
||||
part001 = cube(center = [0, 0], size = 10)
|
||||
part002 = cube(center = [7, 3], size = 5)
|
||||
|> translate(z = 1)
|
||||
|
||||
intersectedPart = intersect([part001, part002])
|
||||
@ -69,8 +69,8 @@ fn cube(center, size) {
|
||||
|> extrude(length = 10)
|
||||
}
|
||||
|
||||
part001 = cube([0, 0], 10)
|
||||
part002 = cube([7, 3], 5)
|
||||
part001 = cube(center = [0, 0], size = 10)
|
||||
part002 = cube(center = [7, 3], size = 5)
|
||||
|> translate(z = 1)
|
||||
|
||||
// This is the equivalent of: intersect([part001, part002])
|
||||
|
@ -10,13 +10,13 @@ Extend the current sketch with a new involute circular curve.
|
||||
|
||||
```kcl
|
||||
involuteCircular(
|
||||
sketch: [Sketch](/docs/kcl/types/Sketch),
|
||||
startRadius: [number](/docs/kcl/types/number),
|
||||
endRadius: [number](/docs/kcl/types/number),
|
||||
angle: [number](/docs/kcl/types/number),
|
||||
reverse?: [bool](/docs/kcl/types/bool),
|
||||
tag?: [TagDeclarator](/docs/kcl/types#tag-declaration),
|
||||
): [Sketch](/docs/kcl/types/Sketch)
|
||||
sketch: Sketch,
|
||||
startRadius: number,
|
||||
endRadius: number,
|
||||
angle: number,
|
||||
reverse?: bool,
|
||||
tag?: TagDeclarator,
|
||||
): Sketch
|
||||
```
|
||||
|
||||
|
||||
@ -24,16 +24,16 @@ involuteCircular(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | Which sketch should this path be added to? | Yes |
|
||||
| `startRadius` | [`number`](/docs/kcl/types/number) | The involute is described between two circles, start_radius is the radius of the inner circle. | Yes |
|
||||
| `endRadius` | [`number`](/docs/kcl/types/number) | The involute is described between two circles, end_radius is the radius of the outer circle. | Yes |
|
||||
| `angle` | [`number`](/docs/kcl/types/number) | The angle to rotate the involute by. A value of zero will produce a curve with a tangent along the x-axis at the start point of the curve. | Yes |
|
||||
| `reverse` | [`bool`](/docs/kcl/types/bool) | If reverse is true, the segment will start from the end of the involute, otherwise it will start from that start. Defaults to false. | No |
|
||||
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Create a new tag which refers to this line | No |
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
|
||||
| `startRadius` | [`number`](/docs/kcl/types/std-types-number) | The involute is described between two circles, start_radius is the radius of the inner circle. | Yes |
|
||||
| `endRadius` | [`number`](/docs/kcl/types/std-types-number) | The involute is described between two circles, end_radius is the radius of the outer circle. | Yes |
|
||||
| `angle` | [`number`](/docs/kcl/types/std-types-number) | The angle to rotate the involute by. A value of zero will produce a curve with a tangent along the x-axis at the start point of the curve. | Yes |
|
||||
| `reverse` | [`bool`](/docs/kcl/types/std-types-bool) | If reverse is true, the segment will start from the end of the involute, otherwise it will start from that start. Defaults to false. | No |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Sketch`](/docs/kcl/types/Sketch)
|
||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -9,7 +9,7 @@ Extract the 'x' axis value of the last line segment in the provided 2-d sketch.
|
||||
|
||||
|
||||
```kcl
|
||||
lastSegX(sketch: [Sketch](/docs/kcl/types/Sketch)): [number](/docs/kcl/types/number)
|
||||
lastSegX(sketch: Sketch): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ lastSegX(sketch: [Sketch](/docs/kcl/types/Sketch)): [number](/docs/kcl/types/num
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | The sketch whose line segment is being queried | Yes |
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | The sketch whose line segment is being queried | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -9,7 +9,7 @@ Extract the 'y' axis value of the last line segment in the provided 2-d sketch.
|
||||
|
||||
|
||||
```kcl
|
||||
lastSegY(sketch: [Sketch](/docs/kcl/types/Sketch)): [number](/docs/kcl/types/number)
|
||||
lastSegY(sketch: Sketch): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ lastSegY(sketch: [Sketch](/docs/kcl/types/Sketch)): [number](/docs/kcl/types/num
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | The sketch whose line segment is being queried | Yes |
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | The sketch whose line segment is being queried | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,9 +10,9 @@ Compute the angle of the given leg for x.
|
||||
|
||||
```kcl
|
||||
legAngX(
|
||||
hypotenuse: [number](/docs/kcl/types/number),
|
||||
leg: [number](/docs/kcl/types/number),
|
||||
): [number](/docs/kcl/types/number)
|
||||
hypotenuse: number,
|
||||
leg: number,
|
||||
): number
|
||||
```
|
||||
|
||||
### Tags
|
||||
@ -24,12 +24,12 @@ legAngX(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `hypotenuse` | [`number`](/docs/kcl/types/number) | The length of the triangle's hypotenuse | Yes |
|
||||
| `leg` | [`number`](/docs/kcl/types/number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
|
||||
| `hypotenuse` | [`number`](/docs/kcl/types/std-types-number) | The length of the triangle's hypotenuse | Yes |
|
||||
| `leg` | [`number`](/docs/kcl/types/std-types-number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,9 +10,9 @@ Compute the angle of the given leg for y.
|
||||
|
||||
```kcl
|
||||
legAngY(
|
||||
hypotenuse: [number](/docs/kcl/types/number),
|
||||
leg: [number](/docs/kcl/types/number),
|
||||
): [number](/docs/kcl/types/number)
|
||||
hypotenuse: number,
|
||||
leg: number,
|
||||
): number
|
||||
```
|
||||
|
||||
### Tags
|
||||
@ -24,12 +24,12 @@ legAngY(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `hypotenuse` | [`number`](/docs/kcl/types/number) | The length of the triangle's hypotenuse | Yes |
|
||||
| `leg` | [`number`](/docs/kcl/types/number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
|
||||
| `hypotenuse` | [`number`](/docs/kcl/types/std-types-number) | The length of the triangle's hypotenuse | Yes |
|
||||
| `leg` | [`number`](/docs/kcl/types/std-types-number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,9 +10,9 @@ Compute the length of the given leg.
|
||||
|
||||
```kcl
|
||||
legLen(
|
||||
hypotenuse: [number](/docs/kcl/types/number),
|
||||
leg: [number](/docs/kcl/types/number),
|
||||
): [number](/docs/kcl/types/number)
|
||||
hypotenuse: number,
|
||||
leg: number,
|
||||
): number
|
||||
```
|
||||
|
||||
### Tags
|
||||
@ -24,12 +24,12 @@ legLen(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `hypotenuse` | [`number`](/docs/kcl/types/number) | The length of the triangle's hypotenuse | Yes |
|
||||
| `leg` | [`number`](/docs/kcl/types/number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
|
||||
| `hypotenuse` | [`number`](/docs/kcl/types/std-types-number) | The length of the triangle's hypotenuse | Yes |
|
||||
| `leg` | [`number`](/docs/kcl/types/std-types-number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,11 +10,11 @@ Extend the current sketch with a new straight line.
|
||||
|
||||
```kcl
|
||||
line(
|
||||
sketch: [Sketch](/docs/kcl/types/Sketch),
|
||||
endAbsolute?: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
end?: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
tag?: [TagDeclarator](/docs/kcl/types#tag-declaration),
|
||||
): [Sketch](/docs/kcl/types/Sketch)
|
||||
sketch: Sketch,
|
||||
endAbsolute?: Point2d,
|
||||
end?: Point2d,
|
||||
tag?: TagDeclarator,
|
||||
): Sketch
|
||||
```
|
||||
|
||||
|
||||
@ -22,14 +22,14 @@ line(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/Sketch) | Which sketch should this path be added to? | Yes |
|
||||
| `endAbsolute` | [`[number]`](/docs/kcl/types/number) | Which absolute point should this line go to? Incompatible with `end`. | No |
|
||||
| `end` | [`[number]`](/docs/kcl/types/number) | How far away (along the X and Y axes) should this line go? Incompatible with `endAbsolute`. | No |
|
||||
| `tag` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | Create a new tag which refers to this line | No |
|
||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
|
||||
| `endAbsolute` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | Which absolute point should this line go to? Incompatible with `end`. | No |
|
||||
| `end` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | How far away (along the X and Y axes) should this line go? Incompatible with `endAbsolute`. | No |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Sketch`](/docs/kcl/types/Sketch)
|
||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,14 +10,14 @@ The sketches need to closed and on the same plane.
|
||||
|
||||
```kcl
|
||||
loft(
|
||||
sketches: [[[Sketch](/docs/kcl/types/Sketch)]](/docs/kcl/types/[Sketch](/docs/kcl/types/Sketch)),
|
||||
vDegree: NonZeroU32,
|
||||
bezApproximateRational: [bool](/docs/kcl/types/bool),
|
||||
baseCurveIndex?: integer,
|
||||
tolerance?: [number](/docs/kcl/types/number),
|
||||
tagStart?: [TagDeclarator](/docs/kcl/types#tag-declaration),
|
||||
tagEnd?: [TagDeclarator](/docs/kcl/types#tag-declaration),
|
||||
): [Solid](/docs/kcl/types/Solid)
|
||||
sketches: [Sketch],
|
||||
vDegree: number,
|
||||
bezApproximateRational: bool,
|
||||
baseCurveIndex?: number,
|
||||
tolerance?: number,
|
||||
tagStart?: TagDeclarator,
|
||||
tagEnd?: TagDeclarator,
|
||||
): Solid
|
||||
```
|
||||
|
||||
|
||||
@ -25,17 +25,17 @@ loft(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketches` | [`[Sketch]`](/docs/kcl/types/Sketch) | Which sketches to loft. Must include at least 2 sketches. | Yes |
|
||||
| `vDegree` | `NonZeroU32` | Degree of the interpolation. Must be greater than zero. For example, use 2 for quadratic, or 3 for cubic interpolation in the V direction. This defaults to 2, if not specified. | Yes |
|
||||
| `bezApproximateRational` | [`bool`](/docs/kcl/types/bool) | Attempt to approximate rational curves (such as arcs) using a bezier. This will remove banding around interpolations between arcs and non-arcs. It may produce errors in other scenarios Over time, this field won't be necessary. | Yes |
|
||||
| `baseCurveIndex` | `integer` | This can be set to override the automatically determined topological base curve, which is usually the first section encountered. | No |
|
||||
| `tolerance` | [`number`](/docs/kcl/types/number) | Tolerance for the loft operation. | No |
|
||||
| `tagStart` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | A named tag for the face at the start of the loft, i.e. the original sketch | No |
|
||||
| `tagEnd` | [`TagDeclarator`](/docs/kcl/types#tag-declaration) | A named tag for the face at the end of the loft, i.e. the last sketch | No |
|
||||
| `sketches` | [`[Sketch]`](/docs/kcl/types/std-types-Sketch) | Which sketches to loft. Must include at least 2 sketches. | Yes |
|
||||
| `vDegree` | [`number`](/docs/kcl/types/std-types-number) | Degree of the interpolation. Must be greater than zero. For example, use 2 for quadratic, or 3 for cubic interpolation in the V direction. This defaults to 2, if not specified. | Yes |
|
||||
| `bezApproximateRational` | [`bool`](/docs/kcl/types/std-types-bool) | Attempt to approximate rational curves (such as arcs) using a bezier. This will remove banding around interpolations between arcs and non-arcs. It may produce errors in other scenarios Over time, this field won't be necessary. | Yes |
|
||||
| `baseCurveIndex` | [`number`](/docs/kcl/types/std-types-number) | This can be set to override the automatically determined topological base curve, which is usually the first section encountered. | No |
|
||||
| `tolerance` | [`number`](/docs/kcl/types/std-types-number) | Tolerance for the loft operation. | No |
|
||||
| `tagStart` | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | A named tag for the face at the start of the loft, i.e. the original sketch | No |
|
||||
| `tagEnd` | [`TagDeclarator`](/docs/kcl/types#TagDeclarator) | A named tag for the face at the end of the loft, i.e. the last sketch | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Solid`](/docs/kcl/types/Solid)
|
||||
[`Solid`](/docs/kcl/types/std-types-Solid)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,9 +10,9 @@ Given a list like `[a, b, c]`, and a function like `f`, returns `[f(a), f(b), f(
|
||||
|
||||
```kcl
|
||||
map(
|
||||
array: [[[KclValue](/docs/kcl/types/KclValue)]](/docs/kcl/types/[KclValue](/docs/kcl/types/KclValue)),
|
||||
array: [any],
|
||||
f: FunctionSource,
|
||||
): [[[KclValue](/docs/kcl/types/KclValue)]](/docs/kcl/types/[KclValue](/docs/kcl/types/KclValue))
|
||||
): [any]
|
||||
```
|
||||
|
||||
|
||||
@ -20,19 +20,19 @@ map(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `array` | [`[KclValue]`](/docs/kcl/types/KclValue) | Input array. The output array is this input array, but every element has had the function `f` run on it. | Yes |
|
||||
| `array` | [`[any]`](/docs/kcl/types/std-types-any) | Input array. The output array is this input array, but every element has had the function `f` run on it. | Yes |
|
||||
| `f` | `FunctionSource` | A function. The output array is just the input array, but `f` has been run on every item. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`[KclValue]`](/docs/kcl/types/KclValue)
|
||||
[`[any]`](/docs/kcl/types/std-types-any)
|
||||
|
||||
|
||||
### Examples
|
||||
|
||||
```kcl
|
||||
r = 10 // radius
|
||||
fn drawCircle(id) {
|
||||
fn drawCircle(@id) {
|
||||
return startSketchOn(XY)
|
||||
|> circle(center = [id * 2 * r, 0], radius = r)
|
||||
}
|
||||
|
@ -12,7 +12,7 @@ to other modules.
|
||||
|
||||
```kcl
|
||||
// util.kcl
|
||||
export fn increment(x) {
|
||||
export fn increment(@x) {
|
||||
return x + 1
|
||||
}
|
||||
```
|
||||
@ -37,11 +37,11 @@ Multiple functions can be exported in a file.
|
||||
|
||||
```kcl
|
||||
// util.kcl
|
||||
export fn increment(x) {
|
||||
export fn increment(@x) {
|
||||
return x + 1
|
||||
}
|
||||
|
||||
export fn decrement(x) {
|
||||
export fn decrement(@x) {
|
||||
return x - 1
|
||||
}
|
||||
```
|
||||
@ -81,7 +81,7 @@ fn cube(center) {
|
||||
|> extrude(length = 10)
|
||||
}
|
||||
|
||||
myCube = cube([0, 0])
|
||||
myCube = cube(center = [0, 0])
|
||||
```
|
||||
|
||||
*Pros*
|
||||
|
@ -10,13 +10,13 @@ Repeat a 2-dimensional sketch some number of times along a partial or complete c
|
||||
|
||||
```kcl
|
||||
patternCircular2d(
|
||||
sketchSet: [[[Sketch](/docs/kcl/types/Sketch)]](/docs/kcl/types/[Sketch](/docs/kcl/types/Sketch)),
|
||||
instances: integer,
|
||||
center: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
arcDegrees: [number](/docs/kcl/types/number),
|
||||
rotateDuplicates: [bool](/docs/kcl/types/bool),
|
||||
useOriginal?: [bool](/docs/kcl/types/bool),
|
||||
): [[[Sketch](/docs/kcl/types/Sketch)]](/docs/kcl/types/[Sketch](/docs/kcl/types/Sketch))
|
||||
sketchSet: [Sketch],
|
||||
instances: number,
|
||||
center: Point2d,
|
||||
arcDegrees: number,
|
||||
rotateDuplicates: bool,
|
||||
useOriginal?: bool,
|
||||
): [Sketch]
|
||||
```
|
||||
|
||||
|
||||
@ -24,16 +24,16 @@ patternCircular2d(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketchSet` | [`[Sketch]`](/docs/kcl/types/Sketch) | Which sketch(es) to pattern | Yes |
|
||||
| `instances` | `integer` | The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | Yes |
|
||||
| `center` | [`[number]`](/docs/kcl/types/number) | The center about which to make the pattern. This is a 2D vector. | Yes |
|
||||
| `arcDegrees` | [`number`](/docs/kcl/types/number) | The arc angle (in degrees) to place the repetitions. Must be greater than 0. | Yes |
|
||||
| `rotateDuplicates` | [`bool`](/docs/kcl/types/bool) | Whether or not to rotate the duplicates as they are copied. | Yes |
|
||||
| `useOriginal` | [`bool`](/docs/kcl/types/bool) | If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false. | No |
|
||||
| `sketchSet` | [`[Sketch]`](/docs/kcl/types/std-types-Sketch) | Which sketch(es) to pattern | Yes |
|
||||
| `instances` | [`number`](/docs/kcl/types/std-types-number) | The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | Yes |
|
||||
| `center` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | The center about which to make the pattern. This is a 2D vector. | Yes |
|
||||
| `arcDegrees` | [`number`](/docs/kcl/types/std-types-number) | The arc angle (in degrees) to place the repetitions. Must be greater than 0. | Yes |
|
||||
| `rotateDuplicates` | [`bool`](/docs/kcl/types/std-types-bool) | Whether or not to rotate the duplicates as they are copied. | Yes |
|
||||
| `useOriginal` | [`bool`](/docs/kcl/types/std-types-bool) | If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false. | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`[Sketch]`](/docs/kcl/types/Sketch)
|
||||
[`[Sketch]`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,14 +10,14 @@ Repeat a 3-dimensional solid some number of times along a partial or complete ci
|
||||
|
||||
```kcl
|
||||
patternCircular3d(
|
||||
solids: [[[Solid](/docs/kcl/types/Solid)]](/docs/kcl/types/[Solid](/docs/kcl/types/Solid)),
|
||||
instances: integer,
|
||||
axis: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
center: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
arcDegrees: [number](/docs/kcl/types/number),
|
||||
rotateDuplicates: [bool](/docs/kcl/types/bool),
|
||||
useOriginal?: [bool](/docs/kcl/types/bool),
|
||||
): [[[Solid](/docs/kcl/types/Solid)]](/docs/kcl/types/[Solid](/docs/kcl/types/Solid))
|
||||
solids: [Solid],
|
||||
instances: number,
|
||||
axis: [number],
|
||||
center: Point3d,
|
||||
arcDegrees: number,
|
||||
rotateDuplicates: bool,
|
||||
useOriginal?: bool,
|
||||
): [Solid]
|
||||
```
|
||||
|
||||
|
||||
@ -25,17 +25,17 @@ patternCircular3d(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `solids` | [`[Solid]`](/docs/kcl/types/Solid) | Which solid(s) to pattern | Yes |
|
||||
| `instances` | `integer` | The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | Yes |
|
||||
| `axis` | [`[number]`](/docs/kcl/types/number) | The axis around which to make the pattern. This is a 3D vector | Yes |
|
||||
| `center` | [`[number]`](/docs/kcl/types/number) | The center about which to make the pattern. This is a 3D vector. | Yes |
|
||||
| `arcDegrees` | [`number`](/docs/kcl/types/number) | The arc angle (in degrees) to place the repetitions. Must be greater than 0. | Yes |
|
||||
| `rotateDuplicates` | [`bool`](/docs/kcl/types/bool) | Whether or not to rotate the duplicates as they are copied. | Yes |
|
||||
| `useOriginal` | [`bool`](/docs/kcl/types/bool) | If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false. | No |
|
||||
| `solids` | [`[Solid]`](/docs/kcl/types/std-types-Solid) | Which solid(s) to pattern | Yes |
|
||||
| `instances` | [`number`](/docs/kcl/types/std-types-number) | The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | Yes |
|
||||
| `axis` | [`[number]`](/docs/kcl/types/std-types-number) | The axis around which to make the pattern. This is a 3D vector | Yes |
|
||||
| `center` | [`Point3d`](/docs/kcl/types/std-types-Point3d) | The center about which to make the pattern. This is a 3D vector. | Yes |
|
||||
| `arcDegrees` | [`number`](/docs/kcl/types/std-types-number) | The arc angle (in degrees) to place the repetitions. Must be greater than 0. | Yes |
|
||||
| `rotateDuplicates` | [`bool`](/docs/kcl/types/std-types-bool) | Whether or not to rotate the duplicates as they are copied. | Yes |
|
||||
| `useOriginal` | [`bool`](/docs/kcl/types/std-types-bool) | If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false. | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`[Solid]`](/docs/kcl/types/Solid)
|
||||
[`[Solid]`](/docs/kcl/types/std-types-Solid)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,12 +10,12 @@ Repeat a 2-dimensional sketch along some dimension, with a dynamic amount of dis
|
||||
|
||||
```kcl
|
||||
patternLinear2d(
|
||||
sketches: [[[Sketch](/docs/kcl/types/Sketch)]](/docs/kcl/types/[Sketch](/docs/kcl/types/Sketch)),
|
||||
instances: integer,
|
||||
distance: [number](/docs/kcl/types/number),
|
||||
axis: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
useOriginal?: [bool](/docs/kcl/types/bool),
|
||||
): [[[Sketch](/docs/kcl/types/Sketch)]](/docs/kcl/types/[Sketch](/docs/kcl/types/Sketch))
|
||||
sketches: [Sketch],
|
||||
instances: number,
|
||||
distance: number,
|
||||
axis: Point2d,
|
||||
useOriginal?: bool,
|
||||
): [Sketch]
|
||||
```
|
||||
|
||||
|
||||
@ -23,15 +23,15 @@ patternLinear2d(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketches` | [`[Sketch]`](/docs/kcl/types/Sketch) | The sketch(es) to duplicate | Yes |
|
||||
| `instances` | `integer` | The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | Yes |
|
||||
| `distance` | [`number`](/docs/kcl/types/number) | Distance between each repetition. Also known as 'spacing'. | Yes |
|
||||
| `axis` | [`[number]`](/docs/kcl/types/number) | The axis of the pattern. A 2D vector. | Yes |
|
||||
| `useOriginal` | [`bool`](/docs/kcl/types/bool) | If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false. | No |
|
||||
| `sketches` | [`[Sketch]`](/docs/kcl/types/std-types-Sketch) | The sketch(es) to duplicate | Yes |
|
||||
| `instances` | [`number`](/docs/kcl/types/std-types-number) | The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | Yes |
|
||||
| `distance` | [`number`](/docs/kcl/types/std-types-number) | Distance between each repetition. Also known as 'spacing'. | Yes |
|
||||
| `axis` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | The axis of the pattern. A 2D vector. | Yes |
|
||||
| `useOriginal` | [`bool`](/docs/kcl/types/std-types-bool) | If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false. | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`[Sketch]`](/docs/kcl/types/Sketch)
|
||||
[`[Sketch]`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,12 +10,12 @@ Repeat a 3-dimensional solid along a linear path, with a dynamic amount of dista
|
||||
|
||||
```kcl
|
||||
patternLinear3d(
|
||||
solids: [[[Solid](/docs/kcl/types/Solid)]](/docs/kcl/types/[Solid](/docs/kcl/types/Solid)),
|
||||
instances: integer,
|
||||
distance: [number](/docs/kcl/types/number),
|
||||
axis: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
useOriginal?: [bool](/docs/kcl/types/bool),
|
||||
): [[[Solid](/docs/kcl/types/Solid)]](/docs/kcl/types/[Solid](/docs/kcl/types/Solid))
|
||||
solids: [Solid],
|
||||
instances: number,
|
||||
distance: number,
|
||||
axis: Point3d,
|
||||
useOriginal?: bool,
|
||||
): [Solid]
|
||||
```
|
||||
|
||||
|
||||
@ -23,15 +23,15 @@ patternLinear3d(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `solids` | [`[Solid]`](/docs/kcl/types/Solid) | The solid(s) to duplicate | Yes |
|
||||
| `instances` | `integer` | The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | Yes |
|
||||
| `distance` | [`number`](/docs/kcl/types/number) | Distance between each repetition. Also known as 'spacing'. | Yes |
|
||||
| `axis` | [`[number]`](/docs/kcl/types/number) | The axis of the pattern. A 2D vector. | Yes |
|
||||
| `useOriginal` | [`bool`](/docs/kcl/types/bool) | If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false. | No |
|
||||
| `solids` | [`[Solid]`](/docs/kcl/types/std-types-Solid) | The solid(s) to duplicate | Yes |
|
||||
| `instances` | [`number`](/docs/kcl/types/std-types-number) | The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | Yes |
|
||||
| `distance` | [`number`](/docs/kcl/types/std-types-number) | Distance between each repetition. Also known as 'spacing'. | Yes |
|
||||
| `axis` | [`Point3d`](/docs/kcl/types/std-types-Point3d) | The axis of the pattern. A 2D vector. | Yes |
|
||||
| `useOriginal` | [`bool`](/docs/kcl/types/std-types-bool) | If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false. | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`[Solid]`](/docs/kcl/types/Solid)
|
||||
[`[Solid]`](/docs/kcl/types/std-types-Solid)
|
||||
|
||||
|
||||
### Examples
|
||||
|
File diff suppressed because one or more lines are too long
@ -10,11 +10,11 @@ Just like patternTransform, but works on 2D sketches not 3D solids.
|
||||
|
||||
```kcl
|
||||
patternTransform2d(
|
||||
sketches: [[[Sketch](/docs/kcl/types/Sketch)]](/docs/kcl/types/[Sketch](/docs/kcl/types/Sketch)),
|
||||
instances: integer,
|
||||
sketches: [Sketch],
|
||||
instances: number,
|
||||
transform: FunctionSource,
|
||||
useOriginal?: [bool](/docs/kcl/types/bool),
|
||||
): [[[Sketch](/docs/kcl/types/Sketch)]](/docs/kcl/types/[Sketch](/docs/kcl/types/Sketch))
|
||||
useOriginal?: bool,
|
||||
): [Sketch]
|
||||
```
|
||||
|
||||
|
||||
@ -22,21 +22,21 @@ patternTransform2d(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketches` | [`[Sketch]`](/docs/kcl/types/Sketch) | The sketch(es) to duplicate | Yes |
|
||||
| `instances` | `integer` | The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | Yes |
|
||||
| `sketches` | [`[Sketch]`](/docs/kcl/types/std-types-Sketch) | The sketch(es) to duplicate | Yes |
|
||||
| `instances` | [`number`](/docs/kcl/types/std-types-number) | The number of total instances. Must be greater than or equal to 1. This includes the original entity. For example, if instances is 2, there will be two copies -- the original, and one new copy. If instances is 1, this has no effect. | Yes |
|
||||
| `transform` | `FunctionSource` | How each replica should be transformed. The transform function takes a single parameter: an integer representing which number replication the transform is for. E.g. the first replica to be transformed will be passed the argument `1`. This simplifies your math: the transform function can rely on id `0` being the original instance passed into the `patternTransform`. See the examples. | Yes |
|
||||
| `useOriginal` | [`bool`](/docs/kcl/types/bool) | If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false. | No |
|
||||
| `useOriginal` | [`bool`](/docs/kcl/types/std-types-bool) | If the target was sketched on an extrusion, setting this will use the original sketch as the target, not the entire joined solid. Defaults to false. | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`[Sketch]`](/docs/kcl/types/Sketch)
|
||||
[`[Sketch]`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
||||
|
||||
```kcl
|
||||
// Each instance will be shifted along the X axis.
|
||||
fn transform(id) {
|
||||
fn transform(@id) {
|
||||
return { translate = [4 * id, 0] }
|
||||
}
|
||||
|
||||
|
File diff suppressed because one or more lines are too long
@ -10,12 +10,12 @@ Create a regular polygon with the specified number of sides that is either inscr
|
||||
|
||||
```kcl
|
||||
polygon(
|
||||
sketchSurfaceOrGroup: [[Sketch](/docs/kcl/types/Sketch)OrSurface](/docs/kcl/types/[Sketch](/docs/kcl/types/Sketch)OrSurface),
|
||||
radius: [number](/docs/kcl/types/number),
|
||||
sketchSurfaceOrGroup: Sketch | Plane | Face,
|
||||
radius: number,
|
||||
numSides: u64,
|
||||
center: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
inscribed?: [bool](/docs/kcl/types/bool),
|
||||
): [Sketch](/docs/kcl/types/Sketch)
|
||||
center: Point2d,
|
||||
inscribed?: bool,
|
||||
): Sketch
|
||||
```
|
||||
|
||||
|
||||
@ -23,15 +23,15 @@ polygon(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `sketchSurfaceOrGroup` | [`SketchOrSurface`](/docs/kcl/types/SketchOrSurface) | Plane or surface to sketch on | Yes |
|
||||
| `radius` | [`number`](/docs/kcl/types/number) | The radius of the polygon | Yes |
|
||||
| `sketchSurfaceOrGroup` | [`Sketch`](/docs/kcl/types/std-types-Sketch) or [`Plane`](/docs/kcl/types/std-types-Plane) or [`Face`](/docs/kcl/types/std-types-Face) | Plane or surface to sketch on | Yes |
|
||||
| `radius` | [`number`](/docs/kcl/types/std-types-number) | The radius of the polygon | Yes |
|
||||
| `numSides` | `u64` | The number of sides in the polygon | Yes |
|
||||
| `center` | [`[number]`](/docs/kcl/types/number) | The center point of the polygon | Yes |
|
||||
| `inscribed` | [`bool`](/docs/kcl/types/bool) | Whether the polygon is inscribed (true, the default) or circumscribed (false) about a circle with the specified radius | No |
|
||||
| `center` | [`Point2d`](/docs/kcl/types/std-types-Point2d) | The center point of the polygon | Yes |
|
||||
| `inscribed` | [`bool`](/docs/kcl/types/std-types-bool) | Whether the polygon is inscribed (true, the default) or circumscribed (false) about a circle with the specified radius | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`Sketch`](/docs/kcl/types/Sketch)
|
||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -9,7 +9,7 @@ Remove the last element from an array.
|
||||
Returns a new array with the last element removed.
|
||||
|
||||
```kcl
|
||||
pop(array: [[[KclValue](/docs/kcl/types/KclValue)]](/docs/kcl/types/[KclValue](/docs/kcl/types/KclValue))): [KclValue](/docs/kcl/types/KclValue)
|
||||
pop(array: [any]): any
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ pop(array: [[[KclValue](/docs/kcl/types/KclValue)]](/docs/kcl/types/[KclValue](/
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `array` | [`[KclValue]`](/docs/kcl/types/KclValue) | The array to pop from. Must not be empty. | Yes |
|
||||
| `array` | [`[any]`](/docs/kcl/types/std-types-any) | The array to pop from. Must not be empty. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`KclValue`](/docs/kcl/types/KclValue) - Any KCL value.
|
||||
[`any`](/docs/kcl/types/std-types-any) - Any KCL value.
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -9,7 +9,7 @@ Extract the provided 2-dimensional sketch's profile's origin value.
|
||||
|
||||
|
||||
```kcl
|
||||
profileStart(profile: [Sketch](/docs/kcl/types/Sketch)): [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number))
|
||||
profileStart(profile: Sketch): [number]
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ profileStart(profile: [Sketch](/docs/kcl/types/Sketch)): [[[number](/docs/kcl/ty
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `profile` | [`Sketch`](/docs/kcl/types/Sketch) | Profile whose start is being used | Yes |
|
||||
| `profile` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Profile whose start is being used | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`[number]`](/docs/kcl/types/number)
|
||||
[`[number]`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -9,7 +9,7 @@ Extract the provided 2-dimensional sketch's profile's origin's 'x' value.
|
||||
|
||||
|
||||
```kcl
|
||||
profileStartX(profile: [Sketch](/docs/kcl/types/Sketch)): [number](/docs/kcl/types/number)
|
||||
profileStartX(profile: Sketch): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ profileStartX(profile: [Sketch](/docs/kcl/types/Sketch)): [number](/docs/kcl/typ
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `profile` | [`Sketch`](/docs/kcl/types/Sketch) | Profile whose start is being used | Yes |
|
||||
| `profile` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Profile whose start is being used | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -9,7 +9,7 @@ Extract the provided 2-dimensional sketch's profile's origin's 'y' value.
|
||||
|
||||
|
||||
```kcl
|
||||
profileStartY(profile: [Sketch](/docs/kcl/types/Sketch)): [number](/docs/kcl/types/number)
|
||||
profileStartY(profile: Sketch): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ profileStartY(profile: [Sketch](/docs/kcl/types/Sketch)): [number](/docs/kcl/typ
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `profile` | [`Sketch`](/docs/kcl/types/Sketch) | Profile whose start is being used | Yes |
|
||||
| `profile` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Profile whose start is being used | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,9 +10,9 @@ Returns a new array with the element appended.
|
||||
|
||||
```kcl
|
||||
push(
|
||||
array: [[[KclValue](/docs/kcl/types/KclValue)]](/docs/kcl/types/[KclValue](/docs/kcl/types/KclValue)),
|
||||
item: [KclValue](/docs/kcl/types/KclValue),
|
||||
): [KclValue](/docs/kcl/types/KclValue)
|
||||
array: [any],
|
||||
item: any,
|
||||
): any
|
||||
```
|
||||
|
||||
|
||||
@ -20,12 +20,12 @@ push(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `array` | [`[KclValue]`](/docs/kcl/types/KclValue) | The array which you're adding a new item to. | Yes |
|
||||
| `item` | [`KclValue`](/docs/kcl/types/KclValue) | The new item to add to the array | Yes |
|
||||
| `array` | [`[any]`](/docs/kcl/types/std-types-any) | The array which you're adding a new item to. | Yes |
|
||||
| `item` | [`any`](/docs/kcl/types/std-types-any) | The new item to add to the array | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`KclValue`](/docs/kcl/types/KclValue) - Any KCL value.
|
||||
[`any`](/docs/kcl/types/std-types-any) - Any KCL value.
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -10,10 +10,10 @@ Take a starting value. Then, for each element of an array, calculate the next va
|
||||
|
||||
```kcl
|
||||
reduce(
|
||||
array: [[[KclValue](/docs/kcl/types/KclValue)]](/docs/kcl/types/[KclValue](/docs/kcl/types/KclValue)),
|
||||
initial: [KclValue](/docs/kcl/types/KclValue),
|
||||
array: [any],
|
||||
initial: any,
|
||||
f: FunctionSource,
|
||||
): [KclValue](/docs/kcl/types/KclValue)
|
||||
): any
|
||||
```
|
||||
|
||||
|
||||
@ -21,13 +21,13 @@ reduce(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `array` | [`[KclValue]`](/docs/kcl/types/KclValue) | Each element of this array gets run through the function `f`, combined with the previous output from `f`, and then used for the next run. | Yes |
|
||||
| `initial` | [`KclValue`](/docs/kcl/types/KclValue) | The first time `f` is run, it will be called with the first item of `array` and this initial starting value. | Yes |
|
||||
| `array` | [`[any]`](/docs/kcl/types/std-types-any) | Each element of this array gets run through the function `f`, combined with the previous output from `f`, and then used for the next run. | Yes |
|
||||
| `initial` | [`any`](/docs/kcl/types/std-types-any) | The first time `f` is run, it will be called with the first item of `array` and this initial starting value. | Yes |
|
||||
| `f` | `FunctionSource` | Run once per item in the input `array`. This function takes an item from the array, and the previous output from `f` (or `initial` on the very first run). The final time `f` is run, its output is returned as the final output from `reduce`. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`KclValue`](/docs/kcl/types/KclValue) - Any KCL value.
|
||||
[`any`](/docs/kcl/types/std-types-any) - Any KCL value.
|
||||
|
||||
|
||||
### Examples
|
||||
@ -41,7 +41,7 @@ fn add(a, b) {
|
||||
// This function adds an array of numbers.
|
||||
// It uses the `reduce` function, to call the `add` function on every
|
||||
// element of the `arr` parameter. The starting value is 0.
|
||||
fn sum(arr) {
|
||||
fn sum(@arr) {
|
||||
return reduce(arr, initial = 0, f = add)
|
||||
}
|
||||
|
||||
@ -91,7 +91,7 @@ assert(
|
||||
|
||||
```kcl
|
||||
// Declare a function that sketches a decagon.
|
||||
fn decagon(radius) {
|
||||
fn decagon(@radius) {
|
||||
// Each side of the decagon is turned this many radians from the previous angle.
|
||||
stepAngle = (1 / 10 * TAU): number(rad)
|
||||
|
||||
|
@ -28,14 +28,14 @@ When rotating a part around an axis, you specify the axis of rotation and the an
|
||||
|
||||
```kcl
|
||||
rotate(
|
||||
objects: [[Solid](/docs/kcl/types/Solid)Or[Sketch](/docs/kcl/types/Sketch)OrImportedGeometry](/docs/kcl/types/[Solid](/docs/kcl/types/Solid)Or[Sketch](/docs/kcl/types/Sketch)OrImportedGeometry),
|
||||
roll?: [number](/docs/kcl/types/number),
|
||||
pitch?: [number](/docs/kcl/types/number),
|
||||
yaw?: [number](/docs/kcl/types/number),
|
||||
axis?: [[[number](/docs/kcl/types/number)]](/docs/kcl/types/[number](/docs/kcl/types/number)),
|
||||
angle?: [number](/docs/kcl/types/number),
|
||||
global?: [bool](/docs/kcl/types/bool),
|
||||
): [[Solid](/docs/kcl/types/Solid)Or[Sketch](/docs/kcl/types/Sketch)OrImportedGeometry](/docs/kcl/types/[Solid](/docs/kcl/types/Solid)Or[Sketch](/docs/kcl/types/Sketch)OrImportedGeometry)
|
||||
objects: [Solid] | [Sketch] | ImportedGeometry,
|
||||
roll?: number,
|
||||
pitch?: number,
|
||||
yaw?: number,
|
||||
axis?: [number],
|
||||
angle?: number,
|
||||
global?: bool,
|
||||
): [Solid] | [Sketch] | ImportedGeometry
|
||||
```
|
||||
|
||||
|
||||
@ -43,17 +43,17 @@ rotate(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `objects` | [`SolidOrSketchOrImportedGeometry`](/docs/kcl/types/SolidOrSketchOrImportedGeometry) | The solid, sketch, or set of solids or sketches to rotate. | Yes |
|
||||
| `roll` | [`number`](/docs/kcl/types/number) | The roll angle in degrees. Must be between -360 and 360. Default is 0 if not given. | No |
|
||||
| `pitch` | [`number`](/docs/kcl/types/number) | The pitch angle in degrees. Must be between -360 and 360. Default is 0 if not given. | No |
|
||||
| `yaw` | [`number`](/docs/kcl/types/number) | The yaw angle in degrees. Must be between -360 and 360. Default is 0 if not given. | No |
|
||||
| `axis` | [`[number]`](/docs/kcl/types/number) | The axis to rotate around. Must be used with `angle`. | No |
|
||||
| `angle` | [`number`](/docs/kcl/types/number) | The angle to rotate in degrees. Must be used with `axis`. Must be between -360 and 360. | No |
|
||||
| `global` | [`bool`](/docs/kcl/types/bool) | If true, the transform is applied in global space. The origin of the model will move. By default, the transform is applied in local sketch axis, therefore the origin will not move. | No |
|
||||
| `objects` | [`[Solid]`](/docs/kcl/types/std-types-Solid) or [`[Sketch]`](/docs/kcl/types/std-types-Sketch) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) | The solid, sketch, or set of solids or sketches to rotate. | Yes |
|
||||
| `roll` | [`number`](/docs/kcl/types/std-types-number) | The roll angle in degrees. Must be between -360 and 360. Default is 0 if not given. | No |
|
||||
| `pitch` | [`number`](/docs/kcl/types/std-types-number) | The pitch angle in degrees. Must be between -360 and 360. Default is 0 if not given. | No |
|
||||
| `yaw` | [`number`](/docs/kcl/types/std-types-number) | The yaw angle in degrees. Must be between -360 and 360. Default is 0 if not given. | No |
|
||||
| `axis` | [`[number]`](/docs/kcl/types/std-types-number) | The axis to rotate around. Must be used with `angle`. | No |
|
||||
| `angle` | [`number`](/docs/kcl/types/std-types-number) | The angle to rotate in degrees. Must be used with `axis`. Must be between -360 and 360. | No |
|
||||
| `global` | [`bool`](/docs/kcl/types/std-types-bool) | If true, the transform is applied in global space. The origin of the model will move. By default, the transform is applied in local sketch axis, therefore the origin will not move. | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`SolidOrSketchOrImportedGeometry`](/docs/kcl/types/SolidOrSketchOrImportedGeometry) - Data for a solid, sketch, or an imported geometry.
|
||||
[`[Solid]`](/docs/kcl/types/std-types-Solid) or [`[Sketch]`](/docs/kcl/types/std-types-Sketch) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) - Data for a solid, sketch, or an imported geometry.
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -16,12 +16,12 @@ If you want to apply the transform in global space, set `global` to `true`. The
|
||||
|
||||
```kcl
|
||||
scale(
|
||||
objects: [[Solid](/docs/kcl/types/Solid)Or[Sketch](/docs/kcl/types/Sketch)OrImportedGeometry](/docs/kcl/types/[Solid](/docs/kcl/types/Solid)Or[Sketch](/docs/kcl/types/Sketch)OrImportedGeometry),
|
||||
x?: [number](/docs/kcl/types/number),
|
||||
y?: [number](/docs/kcl/types/number),
|
||||
z?: [number](/docs/kcl/types/number),
|
||||
global?: [bool](/docs/kcl/types/bool),
|
||||
): [[Solid](/docs/kcl/types/Solid)Or[Sketch](/docs/kcl/types/Sketch)OrImportedGeometry](/docs/kcl/types/[Solid](/docs/kcl/types/Solid)Or[Sketch](/docs/kcl/types/Sketch)OrImportedGeometry)
|
||||
objects: [Solid] | [Sketch] | ImportedGeometry,
|
||||
x?: number,
|
||||
y?: number,
|
||||
z?: number,
|
||||
global?: bool,
|
||||
): [Solid] | [Sketch] | ImportedGeometry
|
||||
```
|
||||
|
||||
|
||||
@ -29,15 +29,15 @@ scale(
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `objects` | [`SolidOrSketchOrImportedGeometry`](/docs/kcl/types/SolidOrSketchOrImportedGeometry) | The solid, sketch, or set of solids or sketches to scale. | Yes |
|
||||
| `x` | [`number`](/docs/kcl/types/number) | The scale factor for the x axis. Default is 1 if not provided. | No |
|
||||
| `y` | [`number`](/docs/kcl/types/number) | The scale factor for the y axis. Default is 1 if not provided. | No |
|
||||
| `z` | [`number`](/docs/kcl/types/number) | The scale factor for the z axis. Default is 1 if not provided. | No |
|
||||
| `global` | [`bool`](/docs/kcl/types/bool) | If true, the transform is applied in global space. The origin of the model will move. By default, the transform is applied in local sketch axis, therefore the origin will not move. | No |
|
||||
| `objects` | [`[Solid]`](/docs/kcl/types/std-types-Solid) or [`[Sketch]`](/docs/kcl/types/std-types-Sketch) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) | The solid, sketch, or set of solids or sketches to scale. | Yes |
|
||||
| `x` | [`number`](/docs/kcl/types/std-types-number) | The scale factor for the x axis. Default is 1 if not provided. | No |
|
||||
| `y` | [`number`](/docs/kcl/types/std-types-number) | The scale factor for the y axis. Default is 1 if not provided. | No |
|
||||
| `z` | [`number`](/docs/kcl/types/std-types-number) | The scale factor for the z axis. Default is 1 if not provided. | No |
|
||||
| `global` | [`bool`](/docs/kcl/types/std-types-bool) | If true, the transform is applied in global space. The origin of the model will move. By default, the transform is applied in local sketch axis, therefore the origin will not move. | No |
|
||||
|
||||
### Returns
|
||||
|
||||
[`SolidOrSketchOrImportedGeometry`](/docs/kcl/types/SolidOrSketchOrImportedGeometry) - Data for a solid, sketch, or an imported geometry.
|
||||
[`[Solid]`](/docs/kcl/types/std-types-Solid) or [`[Sketch]`](/docs/kcl/types/std-types-Sketch) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) - Data for a solid, sketch, or an imported geometry.
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -9,7 +9,7 @@ Compute the angle (in degrees) of the provided line segment.
|
||||
|
||||
|
||||
```kcl
|
||||
segAng(tag: [TagIdentifier](/docs/kcl/types#tag-identifier)): [number](/docs/kcl/types/number)
|
||||
segAng(tag: TagIdentifier): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ segAng(tag: [TagIdentifier](/docs/kcl/types#tag-identifier)): [number](/docs/kcl
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `tag` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | The line segment being queried by its tag | Yes |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The line segment being queried by its tag | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@ Compute the ending point of the provided line segment along the 'x' axis.
|
||||
|
||||
|
||||
```kcl
|
||||
segEndX(tag: [TagIdentifier](/docs/kcl/types#tag-identifier)): [number](/docs/kcl/types/number)
|
||||
segEndX(tag: TagIdentifier): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ segEndX(tag: [TagIdentifier](/docs/kcl/types#tag-identifier)): [number](/docs/kc
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `tag` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | The line segment being queried by its tag | Yes |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The line segment being queried by its tag | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -9,7 +9,7 @@ Compute the ending point of the provided line segment along the 'y' axis.
|
||||
|
||||
|
||||
```kcl
|
||||
segEndY(tag: [TagIdentifier](/docs/kcl/types#tag-identifier)): [number](/docs/kcl/types/number)
|
||||
segEndY(tag: TagIdentifier): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ segEndY(tag: [TagIdentifier](/docs/kcl/types#tag-identifier)): [number](/docs/kc
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `tag` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | The line segment being queried by its tag | Yes |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The line segment being queried by its tag | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -9,7 +9,7 @@ Compute the length of the provided line segment.
|
||||
|
||||
|
||||
```kcl
|
||||
segLen(tag: [TagIdentifier](/docs/kcl/types#tag-identifier)): [number](/docs/kcl/types/number)
|
||||
segLen(tag: TagIdentifier): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ segLen(tag: [TagIdentifier](/docs/kcl/types#tag-identifier)): [number](/docs/kcl
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `tag` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | The line segment being queried by its tag | Yes |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The line segment being queried by its tag | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
File diff suppressed because one or more lines are too long
@ -9,7 +9,7 @@ Compute the starting point of the provided line segment along the 'x' axis.
|
||||
|
||||
|
||||
```kcl
|
||||
segStartX(tag: [TagIdentifier](/docs/kcl/types#tag-identifier)): [number](/docs/kcl/types/number)
|
||||
segStartX(tag: TagIdentifier): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ segStartX(tag: [TagIdentifier](/docs/kcl/types#tag-identifier)): [number](/docs/
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `tag` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | The line segment being queried by its tag | Yes |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The line segment being queried by its tag | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -9,7 +9,7 @@ Compute the starting point of the provided line segment along the 'y' axis.
|
||||
|
||||
|
||||
```kcl
|
||||
segStartY(tag: [TagIdentifier](/docs/kcl/types#tag-identifier)): [number](/docs/kcl/types/number)
|
||||
segStartY(tag: TagIdentifier): number
|
||||
```
|
||||
|
||||
|
||||
@ -17,11 +17,11 @@ segStartY(tag: [TagIdentifier](/docs/kcl/types#tag-identifier)): [number](/docs/
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `tag` | [`TagIdentifier`](/docs/kcl/types#tag-identifier) | The line segment being queried by its tag | Yes |
|
||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The line segment being queried by its tag | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
[`number`](/docs/kcl/types/number)
|
||||
[`number`](/docs/kcl/types/std-types-number)
|
||||
|
||||
|
||||
### Examples
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user