Add modules to docs (#6699)
* Support modules in docs Signed-off-by: Nick Cameron <nrc@ncameron.org> * shuffle around directories Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -1,3 +1,3 @@
|
|||||||
[codespell]
|
[codespell]
|
||||||
ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,atleast,ue,afterall,ser,fromM,FromM
|
ignore-words-list: crate,everytime,inout,co-ordinate,ot,nwo,atleast,ue,afterall,ser,fromM,FromM
|
||||||
skip: **/target,node_modules,build,dist,./out,**/Cargo.lock,./docs/kcl/*.md,./e2e/playwright/lib/console-error-whitelist.ts,.package-lock.json,**/package-lock.json,./openapi/*.json,./packages/codemirror-lang-kcl/test/all.test.ts,./public/kcl-samples,./rust/kcl-lib/tests/kcl_samples,tsconfig.tsbuildinfo,./src/lib/machine-api.d.ts
|
skip: **/target,node_modules,build,dist,./out,**/Cargo.lock,./docs/**/*.md,./e2e/playwright/lib/console-error-whitelist.ts,.package-lock.json,**/package-lock.json,./openapi/*.json,./packages/codemirror-lang-kcl/test/all.test.ts,./public/kcl-samples,./rust/kcl-lib/tests/kcl_samples,tsconfig.tsbuildinfo,./src/lib/machine-api.d.ts
|
||||||
|
12
docs/kcl-lang/index.md
Normal file
12
docs/kcl-lang/index.md
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
---
|
||||||
|
title: "KCL Language Guide"
|
||||||
|
excerpt: "Documentation of the KCL language for the Zoo Design Studio."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
## Topics
|
||||||
|
|
||||||
|
* [`Types`](/docs/kcl-lang/types)
|
||||||
|
* [`Modules`](/docs/kcl-lang/modules)
|
||||||
|
* [`Settings`](/docs/kcl-lang/settings)
|
||||||
|
* [`Known Issues`](/docs/kcl-lang/known-issues)
|
@ -26,18 +26,18 @@ angledLine(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
|
| `sketch` | [`Sketch`](/docs/kcl-std/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 |
|
| `angle` | [`number`](/docs/kcl-std/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 |
|
| `length` | [`number`](/docs/kcl-std/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 |
|
| `lengthX` | [`number`](/docs/kcl-std/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 |
|
| `lengthY` | [`number`](/docs/kcl-std/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 |
|
| `endAbsoluteX` | [`number`](/docs/kcl-std/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 |
|
| `endAbsoluteY` | [`number`](/docs/kcl-std/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 |
|
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -23,15 +23,15 @@ angledLineThatIntersects(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
|
| `sketch` | [`Sketch`](/docs/kcl-std/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 |
|
| `angle` | [`number`](/docs/kcl-std/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 |
|
| `intersectTag` | [`TagIdentifier`](/docs/kcl-lang/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 |
|
| `offset` | [`number`](/docs/kcl-std/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 |
|
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -22,14 +22,14 @@ appearance(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `solids` | [`[Solid]`](/docs/kcl/types/std-types-Solid) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) | The solid(s) whose appearance is being set | Yes |
|
| `solids` | [`[Solid]`](/docs/kcl-std/types/std-types-Solid) or [`ImportedGeometry`](/docs/kcl-lang/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 |
|
| `color` | [`string`](/docs/kcl-std/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 |
|
| `metalness` | [`number`](/docs/kcl-std/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 |
|
| `roughness` | [`number`](/docs/kcl-std/types/std-types-number) | Roughness of the new material, a percentage like 95.7. | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`[Solid]`](/docs/kcl/types/std-types-Solid) or [`ImportedGeometry`](/docs/kcl/types#ImportedGeometry) - Data for a solid or an imported geometry.
|
[`[Solid]`](/docs/kcl-std/types/std-types-Solid) or [`ImportedGeometry`](/docs/kcl-lang/types#ImportedGeometry) - Data for a solid or an imported geometry.
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -27,17 +27,17 @@ arc(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
|
| `sketch` | [`Sketch`](/docs/kcl-std/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 |
|
| `angleStart` | [`number`](/docs/kcl-std/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 |
|
| `angleEnd` | [`number`](/docs/kcl-std/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 |
|
| `radius` | [`number`](/docs/kcl-std/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 |
|
| `interiorAbsolute` | [`Point2d`](/docs/kcl-std/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 |
|
| `endAbsolute` | [`Point2d`](/docs/kcl-std/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 |
|
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -26,14 +26,14 @@ assert(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `actual` | [`number`](/docs/kcl/types/std-types-number) | Value to check. It will be compared with one of the comparison arguments. | Yes |
|
| `actual` | [`number`](/docs/kcl-std/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 |
|
| `isGreaterThan` | [`number`](/docs/kcl-std/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 |
|
| `isLessThan` | [`number`](/docs/kcl-std/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 |
|
| `isGreaterThanOrEqual` | [`number`](/docs/kcl-std/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 |
|
| `isLessThanOrEqual` | [`number`](/docs/kcl-std/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 |
|
| `isEqualTo` | [`number`](/docs/kcl-std/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 |
|
| `tolerance` | [`number`](/docs/kcl-std/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 |
|
| `error` | [`string`](/docs/kcl-std/types/std-types-string) | If the value was false, the program will terminate with this error message | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
@ -20,8 +20,8 @@ assertIs(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `actual` | [`bool`](/docs/kcl/types/std-types-bool) | Value to check. If this is the boolean value true, assert passes. Otherwise it fails. | Yes |
|
| `actual` | [`bool`](/docs/kcl-std/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 |
|
| `error` | [`string`](/docs/kcl-std/types/std-types-string) | If the value was false, the program will terminate with this error message | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
@ -23,15 +23,15 @@ bezierCurve(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
|
| `sketch` | [`Sketch`](/docs/kcl-std/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 |
|
| `control1` | [`Point2d`](/docs/kcl-std/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 |
|
| `control2` | [`Point2d`](/docs/kcl-std/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 |
|
| `end` | [`Point2d`](/docs/kcl-std/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 |
|
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -23,15 +23,15 @@ circleThreePoint(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `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 |
|
| `sketchSurfaceOrGroup` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) or [`Plane`](/docs/kcl-std/types/std-types-Plane) or [`Face`](/docs/kcl-std/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 |
|
| `p1` | [`Point2d`](/docs/kcl-std/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 |
|
| `p2` | [`Point2d`](/docs/kcl-std/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 |
|
| `p3` | [`Point2d`](/docs/kcl-std/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 |
|
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Identifier for the circle to reference elsewhere. | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -21,11 +21,11 @@ clone(geometry: Solid | Sketch | ImportedGeometry): Solid | Sketch | ImportedGeo
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `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 |
|
| `geometry` | [`Solid`](/docs/kcl-std/types/std-types-Solid) or [`Sketch`](/docs/kcl-std/types/std-types-Sketch) or [`ImportedGeometry`](/docs/kcl-lang/types#ImportedGeometry) | The sketch, solid, or imported geometry to be cloned | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`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.
|
[`Solid`](/docs/kcl-std/types/std-types-Solid) or [`Sketch`](/docs/kcl-std/types/std-types-Sketch) or [`ImportedGeometry`](/docs/kcl-lang/types#ImportedGeometry) - A geometry including an imported geometry.
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -20,12 +20,12 @@ close(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | The sketch you want to close | Yes |
|
| `sketch` | [`Sketch`](/docs/kcl-std/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 |
|
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -24,16 +24,16 @@ extrude(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketches` | [`[Sketch]`](/docs/kcl/types/std-types-Sketch) | Which sketch or sketches should be extruded | Yes |
|
| `sketches` | [`[Sketch]`](/docs/kcl-std/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 |
|
| `length` | [`number`](/docs/kcl-std/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 |
|
| `symmetric` | [`bool`](/docs/kcl-std/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 |
|
| `bidirectionalLength` | [`number`](/docs/kcl-std/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 |
|
| `tagStart` | [`TagDeclarator`](/docs/kcl-lang/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 |
|
| `tagEnd` | [`TagDeclarator`](/docs/kcl-lang/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
|
### Returns
|
||||||
|
|
||||||
[`[Solid]`](/docs/kcl/types/std-types-Solid)
|
[`[Solid]`](/docs/kcl-std/types/std-types-Solid)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -27,15 +27,15 @@ helix(
|
|||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `revolutions` | `number(_)` | Number of revolutions. | Yes |
|
| `revolutions` | `number(_)` | Number of revolutions. | Yes |
|
||||||
| `angleStart` | `number(Angle)` | Start angle. | Yes |
|
| `angleStart` | `number(Angle)` | Start angle. | Yes |
|
||||||
| `ccw` | [`bool`](/docs/kcl/types/std-types-bool) | Is the helix rotation counter clockwise? The default is `false`. | No |
|
| `ccw` | [`bool`](/docs/kcl-std/types/std-types-bool) | Is the helix rotation counter clockwise? The default is `false`. | No |
|
||||||
| `radius` | `number(Length)` | Radius of the helix. | No |
|
| `radius` | `number(Length)` | Radius of 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 |
|
| `axis` | [`Axis3d`](/docs/kcl-std/types/std-types-Axis3d) or [`Edge`](/docs/kcl-std/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 |
|
| `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/std-types-Solid) | Cylinder to create the helix on. | No |
|
| `cylinder` | [`Solid`](/docs/kcl-std/types/std-types-Solid) | Cylinder to create the helix on. | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Helix`](/docs/kcl/types/std-types-Helix)
|
[`Helix`](/docs/kcl-std/types/std-types-Helix)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -17,11 +17,11 @@ abs(@input: number): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -17,11 +17,11 @@ ceil(@input: number): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -17,11 +17,11 @@ floor(@input: number): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -17,11 +17,11 @@ ln(@input: number): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -22,12 +22,12 @@ log(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | The number to compute the logarithm of. | Yes |
|
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | The number to compute the logarithm of. | Yes |
|
||||||
| `base` | `number(_)` | The base of the logarithm. | Yes |
|
| `base` | `number(_)` | The base of the logarithm. | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -17,11 +17,11 @@ log10(@input: number): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -17,11 +17,11 @@ log2(@input: number): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -17,11 +17,11 @@ max(@input: [number; 1+]): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `input` | [`[number; 1+]`](/docs/kcl/types/std-types-number) | An array of numbers to compute the maximum of. | Yes |
|
| `input` | [`[number; 1+]`](/docs/kcl-std/types/std-types-number) | An array of numbers to compute the maximum of. | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -17,11 +17,11 @@ min(@input: [number; 1+]): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `input` | [`[number; 1+]`](/docs/kcl/types/std-types-number) | An array of numbers to compute the minimum of. | Yes |
|
| `input` | [`[number; 1+]`](/docs/kcl-std/types/std-types-number) | An array of numbers to compute the minimum of. | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -26,7 +26,7 @@ polar(
|
|||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Point2d`](/docs/kcl/types/std-types-Point2d)
|
[`Point2d`](/docs/kcl-std/types/std-types-Point2d)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -20,12 +20,12 @@ pow(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | The number to raise. | Yes |
|
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | The number to raise. | Yes |
|
||||||
| `exp` | `number(_)` | The power to raise to. | Yes |
|
| `exp` | `number(_)` | The power to raise to. | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -21,12 +21,12 @@ rem(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `num` | [`number`](/docs/kcl/types/std-types-number) | The number which will be divided by `divisor`. | Yes |
|
| `num` | [`number`](/docs/kcl-std/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 |
|
| `divisor` | [`number`](/docs/kcl-std/types/std-types-number) | The number which will divide `num`. | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -17,11 +17,11 @@ round(@input: number): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -17,11 +17,11 @@ sqrt(@input: number): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `input` | [`number`](/docs/kcl/types/std-types-number) | | Yes |
|
| `input` | [`number`](/docs/kcl-std/types/std-types-number) | | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -21,12 +21,12 @@ offsetPlane(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `plane` | [`Plane`](/docs/kcl/types/std-types-Plane) | The plane (e.g. `XY`) which this new plane is created from. | Yes |
|
| `plane` | [`Plane`](/docs/kcl-std/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 |
|
| `offset` | `number(Length)` | Distance from the standard plane this new plane will be created at. | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Plane`](/docs/kcl/types/std-types-Plane)
|
[`Plane`](/docs/kcl-std/types/std-types-Plane)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -35,18 +35,18 @@ revolve(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketches` | [`[Sketch; 1+]`](/docs/kcl/types/std-types-Sketch) | The sketch or set of sketches that should be revolved | Yes |
|
| `sketches` | [`[Sketch; 1+]`](/docs/kcl-std/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 |
|
| `axis` | [`Axis2d`](/docs/kcl-std/types/std-types-Axis2d) or [`Edge`](/docs/kcl-std/types/std-types-Edge) | Axis of revolution. | Yes |
|
||||||
| `angle` | `number(Angle)` | Angle to revolve (in degrees). Default is 360. | No |
|
| `angle` | `number(Angle)` | Angle to revolve (in degrees). Default is 360. | No |
|
||||||
| `tolerance` | `number(Length)` | Tolerance for the revolve operation. | No |
|
| `tolerance` | `number(Length)` | Tolerance for the revolve operation. | 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 |
|
| `symmetric` | [`bool`](/docs/kcl-std/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 |
|
| `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`](/docs/kcl/types/std-types-tag) | A named tag for the face at the start of the revolve, i.e. the original sketch. | No |
|
| `tagStart` | [`tag`](/docs/kcl-std/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 |
|
| `tagEnd` | [`tag`](/docs/kcl-std/types/std-types-tag) | A named tag for the face at the end of the revolve. | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Solid`](/docs/kcl/types/std-types-Solid)
|
[`Solid`](/docs/kcl-std/types/std-types-Solid)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -23,14 +23,14 @@ circle(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `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 |
|
| `sketch_or_surface` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) or [`Plane`](/docs/kcl-std/types/std-types-Plane) or [`Face`](/docs/kcl-std/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 |
|
| `center` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | The center of the circle. | Yes |
|
||||||
| `radius` | `number(Length)` | The radius of the circle. | Yes |
|
| `radius` | `number(Length)` | The radius of the circle. | Yes |
|
||||||
| [`tag`](/docs/kcl/types/std-types-tag) | [`tag`](/docs/kcl/types/std-types-tag) | Create a new tag which refers to this circle. | No |
|
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this circle. | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -22,12 +22,12 @@ mirror2d(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketches` | [`[Sketch; 1+]`](/docs/kcl/types/std-types-Sketch) | The sketch or sketches to be reflected. | Yes |
|
| `sketches` | [`[Sketch; 1+]`](/docs/kcl-std/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 |
|
| `axis` | [`Axis2d`](/docs/kcl-std/types/std-types-Axis2d) or [`Edge`](/docs/kcl-std/types/std-types-Edge) | The axis to reflect around. | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -24,14 +24,14 @@ chamfer(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `solid` | [`Solid`](/docs/kcl/types/std-types-Solid) | The solid whose edges should be chamfered | Yes |
|
| `solid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) | The solid whose edges should be chamfered | Yes |
|
||||||
| `length` | `number(Length)` | The length of the chamfer | Yes |
|
| `length` | `number(Length)` | The length of the chamfer | Yes |
|
||||||
| `tags` | [`[Edge; 1+]`](/docs/kcl/types/std-types-Edge) | The paths you want to chamfer | Yes |
|
| `tags` | [`[Edge; 1+]`](/docs/kcl-std/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 |
|
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this chamfer | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Solid`](/docs/kcl/types/std-types-Solid)
|
[`Solid`](/docs/kcl-std/types/std-types-Solid)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -25,15 +25,15 @@ fillet(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `solid` | [`Solid`](/docs/kcl/types/std-types-Solid) | The solid whose edges should be filletted | Yes |
|
| `solid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) | The solid whose edges should be filletted | Yes |
|
||||||
| `radius` | `number(Length)` | The radius of the fillet | Yes |
|
| `radius` | `number(Length)` | The radius of the fillet | Yes |
|
||||||
| `tags` | [`[Edge; 1+]`](/docs/kcl/types/std-types-Edge) | The paths you want to fillet | Yes |
|
| `tags` | [`[Edge; 1+]`](/docs/kcl-std/types/std-types-Edge) | The paths you want to fillet | Yes |
|
||||||
| `tolerance` | `number(Length)` | The tolerance for this fillet | No |
|
| `tolerance` | `number(Length)` | The tolerance for 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 |
|
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`tag`](/docs/kcl-std/types/std-types-tag) | Create a new tag which refers to this fillet | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Solid`](/docs/kcl/types/std-types-Solid)
|
[`Solid`](/docs/kcl-std/types/std-types-Solid)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -21,12 +21,12 @@ hollow(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `solid` | [`Solid`](/docs/kcl/types/std-types-Solid) | Which solid to hollow out | Yes |
|
| `solid` | [`Solid`](/docs/kcl-std/types/std-types-Solid) | Which solid to hollow out | Yes |
|
||||||
| `thickness` | `number(Length)` | The thickness of the remaining shell | Yes |
|
| `thickness` | `number(Length)` | The thickness of the remaining shell | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Solid`](/docs/kcl/types/std-types-Solid)
|
[`Solid`](/docs/kcl-std/types/std-types-Solid)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -22,13 +22,13 @@ shell(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `solids` | [`[Solid; 1+]`](/docs/kcl/types/std-types-Solid) | Which solid (or solids) to shell out | Yes |
|
| `solids` | [`[Solid; 1+]`](/docs/kcl-std/types/std-types-Solid) | Which solid (or solids) to shell out | Yes |
|
||||||
| `thickness` | `number(Length)` | The thickness of the shell | Yes |
|
| `thickness` | `number(Length)` | The thickness of the shell | Yes |
|
||||||
| `faces` | [`[tag; 1+]`](/docs/kcl/types/std-types-tag) | The faces you want removed | Yes |
|
| `faces` | [`[tag; 1+]`](/docs/kcl-std/types/std-types-tag) | The faces you want removed | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`[Solid]`](/docs/kcl/types/std-types-Solid)
|
[`[Solid]`](/docs/kcl-std/types/std-types-Solid)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -17,7 +17,7 @@ getCommonEdge(faces: [TagIdentifier]): Uuid
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `faces` | [`[TagIdentifier]`](/docs/kcl/types#TagIdentifier) | The tags of the faces you want to find the common edge between | Yes |
|
| `faces` | [`[TagIdentifier]`](/docs/kcl-lang/types#TagIdentifier) | The tags of the faces you want to find the common edge between | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
@ -17,7 +17,7 @@ getNextAdjacentEdge(edge: TagIdentifier): Uuid
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `edge` | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The tag of the edge you want to find the next adjacent edge of. | Yes |
|
| `edge` | [`TagIdentifier`](/docs/kcl-lang/types#TagIdentifier) | The tag of the edge you want to find the next adjacent edge of. | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
@ -17,7 +17,7 @@ getOppositeEdge(edge: TagIdentifier): Uuid
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `edge` | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The tag of the edge you want to find the opposite edge of. | Yes |
|
| `edge` | [`TagIdentifier`](/docs/kcl-lang/types#TagIdentifier) | The tag of the edge you want to find the opposite edge of. | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
@ -17,7 +17,7 @@ getPreviousAdjacentEdge(edge: TagIdentifier): Uuid
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `edge` | [`TagIdentifier`](/docs/kcl/types#TagIdentifier) | The tag of the edge you want to find the previous adjacent edge of. | Yes |
|
| `edge` | [`TagIdentifier`](/docs/kcl-lang/types#TagIdentifier) | The tag of the edge you want to find the previous adjacent edge of. | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
160
docs/kcl-std/index.md
Normal file
160
docs/kcl-std/index.md
Normal file
@ -0,0 +1,160 @@
|
|||||||
|
---
|
||||||
|
title: "KCL Standard Library"
|
||||||
|
excerpt: "Documentation for the KCL standard library for the Zoo Design Studio."
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
## Table of Contents
|
||||||
|
|
||||||
|
### Functions
|
||||||
|
|
||||||
|
* [**std**](/docs/kcl-std/modules/std)
|
||||||
|
* [`angledLine`](/docs/kcl-std/angledLine)
|
||||||
|
* [`angledLineThatIntersects`](/docs/kcl-std/angledLineThatIntersects)
|
||||||
|
* [`appearance`](/docs/kcl-std/appearance)
|
||||||
|
* [`arc`](/docs/kcl-std/arc)
|
||||||
|
* [`assert`](/docs/kcl-std/assert)
|
||||||
|
* [`assertIs`](/docs/kcl-std/assertIs)
|
||||||
|
* [`bezierCurve`](/docs/kcl-std/bezierCurve)
|
||||||
|
* [`circleThreePoint`](/docs/kcl-std/circleThreePoint)
|
||||||
|
* [`clone`](/docs/kcl-std/clone)
|
||||||
|
* [`close`](/docs/kcl-std/close)
|
||||||
|
* [`extrude`](/docs/kcl-std/extrude)
|
||||||
|
* [`getCommonEdge`](/docs/kcl-std/getCommonEdge)
|
||||||
|
* [`getNextAdjacentEdge`](/docs/kcl-std/getNextAdjacentEdge)
|
||||||
|
* [`getOppositeEdge`](/docs/kcl-std/getOppositeEdge)
|
||||||
|
* [`getPreviousAdjacentEdge`](/docs/kcl-std/getPreviousAdjacentEdge)
|
||||||
|
* [`helix`](/docs/kcl-std/functions/std-helix)
|
||||||
|
* [`intersect`](/docs/kcl-std/intersect)
|
||||||
|
* [`involuteCircular`](/docs/kcl-std/involuteCircular)
|
||||||
|
* [`lastSegX`](/docs/kcl-std/lastSegX)
|
||||||
|
* [`lastSegY`](/docs/kcl-std/lastSegY)
|
||||||
|
* [`legAngX`](/docs/kcl-std/legAngX)
|
||||||
|
* [`legAngY`](/docs/kcl-std/legAngY)
|
||||||
|
* [`legLen`](/docs/kcl-std/legLen)
|
||||||
|
* [`line`](/docs/kcl-std/line)
|
||||||
|
* [`loft`](/docs/kcl-std/loft)
|
||||||
|
* [`map`](/docs/kcl-std/map)
|
||||||
|
* [`offsetPlane`](/docs/kcl-std/functions/std-offsetPlane)
|
||||||
|
* [`patternCircular2d`](/docs/kcl-std/patternCircular2d)
|
||||||
|
* [`patternCircular3d`](/docs/kcl-std/patternCircular3d)
|
||||||
|
* [`patternLinear2d`](/docs/kcl-std/patternLinear2d)
|
||||||
|
* [`patternLinear3d`](/docs/kcl-std/patternLinear3d)
|
||||||
|
* [`patternTransform`](/docs/kcl-std/patternTransform)
|
||||||
|
* [`patternTransform2d`](/docs/kcl-std/patternTransform2d)
|
||||||
|
* [`polygon`](/docs/kcl-std/polygon)
|
||||||
|
* [`pop`](/docs/kcl-std/pop)
|
||||||
|
* [`profileStart`](/docs/kcl-std/profileStart)
|
||||||
|
* [`profileStartX`](/docs/kcl-std/profileStartX)
|
||||||
|
* [`profileStartY`](/docs/kcl-std/profileStartY)
|
||||||
|
* [`push`](/docs/kcl-std/push)
|
||||||
|
* [`reduce`](/docs/kcl-std/reduce)
|
||||||
|
* [`revolve`](/docs/kcl-std/functions/std-revolve)
|
||||||
|
* [`rotate`](/docs/kcl-std/rotate)
|
||||||
|
* [`scale`](/docs/kcl-std/scale)
|
||||||
|
* [`segAng`](/docs/kcl-std/segAng)
|
||||||
|
* [`segEnd`](/docs/kcl-std/segEnd)
|
||||||
|
* [`segEndX`](/docs/kcl-std/segEndX)
|
||||||
|
* [`segEndY`](/docs/kcl-std/segEndY)
|
||||||
|
* [`segLen`](/docs/kcl-std/segLen)
|
||||||
|
* [`segStart`](/docs/kcl-std/segStart)
|
||||||
|
* [`segStartX`](/docs/kcl-std/segStartX)
|
||||||
|
* [`segStartY`](/docs/kcl-std/segStartY)
|
||||||
|
* [`startProfile`](/docs/kcl-std/startProfile)
|
||||||
|
* [`startSketchOn`](/docs/kcl-std/startSketchOn)
|
||||||
|
* [`subtract`](/docs/kcl-std/subtract)
|
||||||
|
* [`subtract2d`](/docs/kcl-std/subtract2d)
|
||||||
|
* [`sweep`](/docs/kcl-std/sweep)
|
||||||
|
* [`tangentToEnd`](/docs/kcl-std/tangentToEnd)
|
||||||
|
* [`tangentialArc`](/docs/kcl-std/tangentialArc)
|
||||||
|
* [`translate`](/docs/kcl-std/translate)
|
||||||
|
* [`union`](/docs/kcl-std/union)
|
||||||
|
* [`xLine`](/docs/kcl-std/xLine)
|
||||||
|
* [`yLine`](/docs/kcl-std/yLine)
|
||||||
|
* [**std::math**](/docs/kcl-std/modules/std-math)
|
||||||
|
* [`abs`](/docs/kcl-std/functions/std-math-abs)
|
||||||
|
* [`acos`](/docs/kcl-std/functions/std-math-acos)
|
||||||
|
* [`asin`](/docs/kcl-std/functions/std-math-asin)
|
||||||
|
* [`atan`](/docs/kcl-std/functions/std-math-atan)
|
||||||
|
* [`atan2`](/docs/kcl-std/functions/std-math-atan2)
|
||||||
|
* [`ceil`](/docs/kcl-std/functions/std-math-ceil)
|
||||||
|
* [`cos`](/docs/kcl-std/functions/std-math-cos)
|
||||||
|
* [`floor`](/docs/kcl-std/functions/std-math-floor)
|
||||||
|
* [`ln`](/docs/kcl-std/functions/std-math-ln)
|
||||||
|
* [`log`](/docs/kcl-std/functions/std-math-log)
|
||||||
|
* [`log10`](/docs/kcl-std/functions/std-math-log10)
|
||||||
|
* [`log2`](/docs/kcl-std/functions/std-math-log2)
|
||||||
|
* [`max`](/docs/kcl-std/functions/std-math-max)
|
||||||
|
* [`min`](/docs/kcl-std/functions/std-math-min)
|
||||||
|
* [`polar`](/docs/kcl-std/functions/std-math-polar)
|
||||||
|
* [`pow`](/docs/kcl-std/functions/std-math-pow)
|
||||||
|
* [`rem`](/docs/kcl-std/functions/std-math-rem)
|
||||||
|
* [`round`](/docs/kcl-std/functions/std-math-round)
|
||||||
|
* [`sin`](/docs/kcl-std/functions/std-math-sin)
|
||||||
|
* [`sqrt`](/docs/kcl-std/functions/std-math-sqrt)
|
||||||
|
* [`tan`](/docs/kcl-std/functions/std-math-tan)
|
||||||
|
* [**std::sketch**](/docs/kcl-std/modules/std-sketch)
|
||||||
|
* [`circle`](/docs/kcl-std/functions/std-sketch-circle)
|
||||||
|
* [`mirror2d`](/docs/kcl-std/functions/std-sketch-mirror2d)
|
||||||
|
* [**std::solid**](/docs/kcl-std/modules/std-solid)
|
||||||
|
* [`chamfer`](/docs/kcl-std/functions/std-solid-chamfer)
|
||||||
|
* [`fillet`](/docs/kcl-std/functions/std-solid-fillet)
|
||||||
|
* [`hollow`](/docs/kcl-std/functions/std-solid-hollow)
|
||||||
|
* [`shell`](/docs/kcl-std/functions/std-solid-shell)
|
||||||
|
* [**std::units**](/docs/kcl-std/modules/std-units)
|
||||||
|
* [`units::toCentimeters`](/docs/kcl-std/functions/std-units-toCentimeters)
|
||||||
|
* [`units::toDegrees`](/docs/kcl-std/functions/std-units-toDegrees)
|
||||||
|
* [`units::toFeet`](/docs/kcl-std/functions/std-units-toFeet)
|
||||||
|
* [`units::toInches`](/docs/kcl-std/functions/std-units-toInches)
|
||||||
|
* [`units::toMeters`](/docs/kcl-std/functions/std-units-toMeters)
|
||||||
|
* [`units::toMillimeters`](/docs/kcl-std/functions/std-units-toMillimeters)
|
||||||
|
* [`units::toRadians`](/docs/kcl-std/functions/std-units-toRadians)
|
||||||
|
* [`units::toYards`](/docs/kcl-std/functions/std-units-toYards)
|
||||||
|
|
||||||
|
### Constants
|
||||||
|
|
||||||
|
* [**std**](/docs/kcl-std/modules/std)
|
||||||
|
* [`END`](/docs/kcl-std/consts/std-END)
|
||||||
|
* [`START`](/docs/kcl-std/consts/std-START)
|
||||||
|
* [`X`](/docs/kcl-std/consts/std-X)
|
||||||
|
* [`XY`](/docs/kcl-std/consts/std-XY)
|
||||||
|
* [`XZ`](/docs/kcl-std/consts/std-XZ)
|
||||||
|
* [`Y`](/docs/kcl-std/consts/std-Y)
|
||||||
|
* [`YZ`](/docs/kcl-std/consts/std-YZ)
|
||||||
|
* [`Z`](/docs/kcl-std/consts/std-Z)
|
||||||
|
* [**std::math**](/docs/kcl-std/modules/std-math)
|
||||||
|
* [`E`](/docs/kcl-std/consts/std-math-E)
|
||||||
|
* [`PI`](/docs/kcl-std/consts/std-math-PI)
|
||||||
|
* [`TAU`](/docs/kcl-std/consts/std-math-TAU)
|
||||||
|
* [**std::turns**](/docs/kcl-std/modules/std-turns)
|
||||||
|
* [`turns::HALF_TURN`](/docs/kcl-std/consts/std-turns-HALF_TURN)
|
||||||
|
* [`turns::QUARTER_TURN`](/docs/kcl-std/consts/std-turns-QUARTER_TURN)
|
||||||
|
* [`turns::THREE_QUARTER_TURN`](/docs/kcl-std/consts/std-turns-THREE_QUARTER_TURN)
|
||||||
|
* [`turns::ZERO`](/docs/kcl-std/consts/std-turns-ZERO)
|
||||||
|
|
||||||
|
### Types
|
||||||
|
|
||||||
|
See also the [types overview](/docs/kcl-lang/types)
|
||||||
|
|
||||||
|
* [**Primitive types**](/docs/kcl-std/modules/Primitive types)
|
||||||
|
* [`End`](/docs/kcl-std/types#End)
|
||||||
|
* [`ImportedGeometry`](/docs/kcl-std/types#ImportedGeometry)
|
||||||
|
* [`Start`](/docs/kcl-std/types#Start)
|
||||||
|
* [`TagDeclarator`](/docs/kcl-std/types#TagDeclarator)
|
||||||
|
* [`TagIdentifier`](/docs/kcl-std/types#TagIdentifier)
|
||||||
|
* [`any`](/docs/kcl-std/types/std-types-any)
|
||||||
|
* [`bool`](/docs/kcl-std/types/std-types-bool)
|
||||||
|
* [`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
* [`string`](/docs/kcl-std/types/std-types-string)
|
||||||
|
* [`tag`](/docs/kcl-std/types/std-types-tag)
|
||||||
|
* [**std::types**](/docs/kcl-std/modules/std-types)
|
||||||
|
* [`Axis2d`](/docs/kcl-std/types/std-types-Axis2d)
|
||||||
|
* [`Axis3d`](/docs/kcl-std/types/std-types-Axis3d)
|
||||||
|
* [`Edge`](/docs/kcl-std/types/std-types-Edge)
|
||||||
|
* [`Face`](/docs/kcl-std/types/std-types-Face)
|
||||||
|
* [`Helix`](/docs/kcl-std/types/std-types-Helix)
|
||||||
|
* [`Plane`](/docs/kcl-std/types/std-types-Plane)
|
||||||
|
* [`Point2d`](/docs/kcl-std/types/std-types-Point2d)
|
||||||
|
* [`Point3d`](/docs/kcl-std/types/std-types-Point3d)
|
||||||
|
* [`Sketch`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
* [`Solid`](/docs/kcl-std/types/std-types-Solid)
|
@ -20,12 +20,12 @@ intersect(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `solids` | [`[Solid]`](/docs/kcl/types/std-types-Solid) | The solids to intersect. | Yes |
|
| `solids` | [`[Solid]`](/docs/kcl-std/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 |
|
| `tolerance` | [`number`](/docs/kcl-std/types/std-types-number) | The tolerance to use for the intersection operation. | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`[Solid]`](/docs/kcl/types/std-types-Solid)
|
[`[Solid]`](/docs/kcl-std/types/std-types-Solid)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -24,16 +24,16 @@ involuteCircular(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
|
| `sketch` | [`Sketch`](/docs/kcl-std/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 |
|
| `startRadius` | [`number`](/docs/kcl-std/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 |
|
| `endRadius` | [`number`](/docs/kcl-std/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 |
|
| `angle` | [`number`](/docs/kcl-std/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 |
|
| `reverse` | [`bool`](/docs/kcl-std/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 |
|
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -17,11 +17,11 @@ lastSegX(sketch: Sketch): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | The sketch whose line segment is being queried | Yes |
|
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | The sketch whose line segment is being queried | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -17,11 +17,11 @@ lastSegY(sketch: Sketch): number
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | The sketch whose line segment is being queried | Yes |
|
| `sketch` | [`Sketch`](/docs/kcl-std/types/std-types-Sketch) | The sketch whose line segment is being queried | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -24,12 +24,12 @@ legAngX(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `hypotenuse` | [`number`](/docs/kcl/types/std-types-number) | The length of the triangle's hypotenuse | Yes |
|
| `hypotenuse` | [`number`](/docs/kcl-std/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 |
|
| `leg` | [`number`](/docs/kcl-std/types/std-types-number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -24,12 +24,12 @@ legAngY(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `hypotenuse` | [`number`](/docs/kcl/types/std-types-number) | The length of the triangle's hypotenuse | Yes |
|
| `hypotenuse` | [`number`](/docs/kcl-std/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 |
|
| `leg` | [`number`](/docs/kcl-std/types/std-types-number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -24,12 +24,12 @@ legLen(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `hypotenuse` | [`number`](/docs/kcl/types/std-types-number) | The length of the triangle's hypotenuse | Yes |
|
| `hypotenuse` | [`number`](/docs/kcl-std/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 |
|
| `leg` | [`number`](/docs/kcl-std/types/std-types-number) | The length of one of the triangle's legs (i.e. non-hypotenuse side) | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`number`](/docs/kcl/types/std-types-number)
|
[`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -22,14 +22,14 @@ line(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketch` | [`Sketch`](/docs/kcl/types/std-types-Sketch) | Which sketch should this path be added to? | Yes |
|
| `sketch` | [`Sketch`](/docs/kcl-std/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 |
|
| `endAbsolute` | [`Point2d`](/docs/kcl-std/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 |
|
| `end` | [`Point2d`](/docs/kcl-std/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 |
|
| [`tag`](/docs/kcl-std/types/std-types-tag) | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | Create a new tag which refers to this line | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Sketch`](/docs/kcl/types/std-types-Sketch)
|
[`Sketch`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -25,17 +25,17 @@ loft(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketches` | [`[Sketch]`](/docs/kcl/types/std-types-Sketch) | Which sketches to loft. Must include at least 2 sketches. | Yes |
|
| `sketches` | [`[Sketch]`](/docs/kcl-std/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 |
|
| `vDegree` | [`number`](/docs/kcl-std/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 |
|
| `bezApproximateRational` | [`bool`](/docs/kcl-std/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 |
|
| `baseCurveIndex` | [`number`](/docs/kcl-std/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 |
|
| `tolerance` | [`number`](/docs/kcl-std/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 |
|
| `tagStart` | [`TagDeclarator`](/docs/kcl-lang/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 |
|
| `tagEnd` | [`TagDeclarator`](/docs/kcl-lang/types#TagDeclarator) | A named tag for the face at the end of the loft, i.e. the last sketch | No |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`Solid`](/docs/kcl/types/std-types-Solid)
|
[`Solid`](/docs/kcl-std/types/std-types-Solid)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -20,12 +20,12 @@ map(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `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 |
|
| `array` | [`[any]`](/docs/kcl-std/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 |
|
| `f` | `FunctionSource` | A function. The output array is just the input array, but `f` has been run on every item. | Yes |
|
||||||
|
|
||||||
### Returns
|
### Returns
|
||||||
|
|
||||||
[`[any]`](/docs/kcl/types/std-types-any)
|
[`[any]`](/docs/kcl-std/types/std-types-any)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
38
docs/kcl-std/modules/std-math.md
Normal file
38
docs/kcl-std/modules/std-math.md
Normal file
@ -0,0 +1,38 @@
|
|||||||
|
---
|
||||||
|
title: "std::math"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Functions and constants
|
||||||
|
|
||||||
|
* [`E`](/docs/kcl-std/consts/std-math-E)
|
||||||
|
* [`PI`](/docs/kcl-std/consts/std-math-PI)
|
||||||
|
* [`TAU`](/docs/kcl-std/consts/std-math-TAU)
|
||||||
|
* [`abs`](/docs/kcl-std/functions/std-math-abs)
|
||||||
|
* [`acos`](/docs/kcl-std/functions/std-math-acos)
|
||||||
|
* [`asin`](/docs/kcl-std/functions/std-math-asin)
|
||||||
|
* [`atan`](/docs/kcl-std/functions/std-math-atan)
|
||||||
|
* [`atan2`](/docs/kcl-std/functions/std-math-atan2)
|
||||||
|
* [`ceil`](/docs/kcl-std/functions/std-math-ceil)
|
||||||
|
* [`cos`](/docs/kcl-std/functions/std-math-cos)
|
||||||
|
* [`floor`](/docs/kcl-std/functions/std-math-floor)
|
||||||
|
* [`ln`](/docs/kcl-std/functions/std-math-ln)
|
||||||
|
* [`log`](/docs/kcl-std/functions/std-math-log)
|
||||||
|
* [`log10`](/docs/kcl-std/functions/std-math-log10)
|
||||||
|
* [`log2`](/docs/kcl-std/functions/std-math-log2)
|
||||||
|
* [`max`](/docs/kcl-std/functions/std-math-max)
|
||||||
|
* [`min`](/docs/kcl-std/functions/std-math-min)
|
||||||
|
* [`polar`](/docs/kcl-std/functions/std-math-polar)
|
||||||
|
* [`pow`](/docs/kcl-std/functions/std-math-pow)
|
||||||
|
* [`rem`](/docs/kcl-std/functions/std-math-rem)
|
||||||
|
* [`round`](/docs/kcl-std/functions/std-math-round)
|
||||||
|
* [`sin`](/docs/kcl-std/functions/std-math-sin)
|
||||||
|
* [`sqrt`](/docs/kcl-std/functions/std-math-sqrt)
|
||||||
|
* [`tan`](/docs/kcl-std/functions/std-math-tan)
|
||||||
|
|
16
docs/kcl-std/modules/std-sketch.md
Normal file
16
docs/kcl-std/modules/std-sketch.md
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
---
|
||||||
|
title: "std::sketch"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Functions and constants
|
||||||
|
|
||||||
|
* [`circle`](/docs/kcl-std/functions/std-sketch-circle)
|
||||||
|
* [`mirror2d`](/docs/kcl-std/functions/std-sketch-mirror2d)
|
||||||
|
|
18
docs/kcl-std/modules/std-solid.md
Normal file
18
docs/kcl-std/modules/std-solid.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
title: "std::solid"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Functions and constants
|
||||||
|
|
||||||
|
* [`chamfer`](/docs/kcl-std/functions/std-solid-chamfer)
|
||||||
|
* [`fillet`](/docs/kcl-std/functions/std-solid-fillet)
|
||||||
|
* [`hollow`](/docs/kcl-std/functions/std-solid-hollow)
|
||||||
|
* [`shell`](/docs/kcl-std/functions/std-solid-shell)
|
||||||
|
|
18
docs/kcl-std/modules/std-turns.md
Normal file
18
docs/kcl-std/modules/std-turns.md
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
---
|
||||||
|
title: "std::turns"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Functions and constants
|
||||||
|
|
||||||
|
* [`turns::HALF_TURN`](/docs/kcl-std/consts/std-turns-HALF_TURN)
|
||||||
|
* [`turns::QUARTER_TURN`](/docs/kcl-std/consts/std-turns-QUARTER_TURN)
|
||||||
|
* [`turns::THREE_QUARTER_TURN`](/docs/kcl-std/consts/std-turns-THREE_QUARTER_TURN)
|
||||||
|
* [`turns::ZERO`](/docs/kcl-std/consts/std-turns-ZERO)
|
||||||
|
|
29
docs/kcl-std/modules/std-types.md
Normal file
29
docs/kcl-std/modules/std-types.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
---
|
||||||
|
title: "std::types"
|
||||||
|
excerpt: ""
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Types
|
||||||
|
|
||||||
|
* [`Axis2d`](/docs/kcl-std/types/std-types-Axis2d)
|
||||||
|
* [`Axis3d`](/docs/kcl-std/types/std-types-Axis3d)
|
||||||
|
* [`Edge`](/docs/kcl-std/types/std-types-Edge)
|
||||||
|
* [`Face`](/docs/kcl-std/types/std-types-Face)
|
||||||
|
* [`Helix`](/docs/kcl-std/types/std-types-Helix)
|
||||||
|
* [`Plane`](/docs/kcl-std/types/std-types-Plane)
|
||||||
|
* [`Point2d`](/docs/kcl-std/types/std-types-Point2d)
|
||||||
|
* [`Point3d`](/docs/kcl-std/types/std-types-Point3d)
|
||||||
|
* [`Sketch`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
* [`Solid`](/docs/kcl-std/types/std-types-Solid)
|
||||||
|
* [`any`](/docs/kcl-std/types/std-types-any)
|
||||||
|
* [`bool`](/docs/kcl-std/types/std-types-bool)
|
||||||
|
* [`number`](/docs/kcl-std/types/std-types-number)
|
||||||
|
* [`string`](/docs/kcl-std/types/std-types-string)
|
||||||
|
* [`tag`](/docs/kcl-std/types/std-types-tag)
|
22
docs/kcl-std/modules/std-units.md
Normal file
22
docs/kcl-std/modules/std-units.md
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
title: "std::units"
|
||||||
|
excerpt: "Functions for converting numbers to different units. "
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
Functions for converting numbers to different units.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
## Functions and constants
|
||||||
|
|
||||||
|
* [`units::toCentimeters`](/docs/kcl-std/functions/std-units-toCentimeters)
|
||||||
|
* [`units::toDegrees`](/docs/kcl-std/functions/std-units-toDegrees)
|
||||||
|
* [`units::toFeet`](/docs/kcl-std/functions/std-units-toFeet)
|
||||||
|
* [`units::toInches`](/docs/kcl-std/functions/std-units-toInches)
|
||||||
|
* [`units::toMeters`](/docs/kcl-std/functions/std-units-toMeters)
|
||||||
|
* [`units::toMillimeters`](/docs/kcl-std/functions/std-units-toMillimeters)
|
||||||
|
* [`units::toRadians`](/docs/kcl-std/functions/std-units-toRadians)
|
||||||
|
* [`units::toYards`](/docs/kcl-std/functions/std-units-toYards)
|
||||||
|
|
33
docs/kcl-std/modules/std.md
Normal file
33
docs/kcl-std/modules/std.md
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
---
|
||||||
|
title: "std"
|
||||||
|
excerpt: "The KCL standard library "
|
||||||
|
layout: manual
|
||||||
|
---
|
||||||
|
|
||||||
|
The KCL standard library
|
||||||
|
|
||||||
|
Contains frequently used constants, functions for interacting with the KittyCAD servers to create sketches and geometry, and utility functions.
|
||||||
|
|
||||||
|
## Modules
|
||||||
|
|
||||||
|
* [`math`](/docs/kcl-std/modules/std-math)
|
||||||
|
* [`sketch`](/docs/kcl-std/modules/std-sketch)
|
||||||
|
* [`solid`](/docs/kcl-std/modules/std-solid)
|
||||||
|
* [`turns::turns`](/docs/kcl-std/modules/std-turns)
|
||||||
|
* [`types`](/docs/kcl-std/modules/std-types)
|
||||||
|
* [`units::units`](/docs/kcl-std/modules/std-units)
|
||||||
|
|
||||||
|
## Functions and constants
|
||||||
|
|
||||||
|
* [`END`](/docs/kcl-std/consts/std-END)
|
||||||
|
* [`START`](/docs/kcl-std/consts/std-START)
|
||||||
|
* [`X`](/docs/kcl-std/consts/std-X)
|
||||||
|
* [`XY`](/docs/kcl-std/consts/std-XY)
|
||||||
|
* [`XZ`](/docs/kcl-std/consts/std-XZ)
|
||||||
|
* [`Y`](/docs/kcl-std/consts/std-Y)
|
||||||
|
* [`YZ`](/docs/kcl-std/consts/std-YZ)
|
||||||
|
* [`Z`](/docs/kcl-std/consts/std-Z)
|
||||||
|
* [`helix`](/docs/kcl-std/functions/std-helix)
|
||||||
|
* [`offsetPlane`](/docs/kcl-std/functions/std-offsetPlane)
|
||||||
|
* [`revolve`](/docs/kcl-std/functions/std-revolve)
|
||||||
|
|
@ -24,16 +24,16 @@ patternCircular2d(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketchSet` | [`[Sketch]`](/docs/kcl/types/std-types-Sketch) | Which sketch(es) to pattern | Yes |
|
| `sketchSet` | [`[Sketch]`](/docs/kcl-std/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 |
|
| `instances` | [`number`](/docs/kcl-std/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 |
|
| `center` | [`Point2d`](/docs/kcl-std/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 |
|
| `arcDegrees` | [`number`](/docs/kcl-std/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 |
|
| `rotateDuplicates` | [`bool`](/docs/kcl-std/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 |
|
| `useOriginal` | [`bool`](/docs/kcl-std/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
|
### Returns
|
||||||
|
|
||||||
[`[Sketch]`](/docs/kcl/types/std-types-Sketch)
|
[`[Sketch]`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -25,17 +25,17 @@ patternCircular3d(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `solids` | [`[Solid]`](/docs/kcl/types/std-types-Solid) | Which solid(s) to pattern | Yes |
|
| `solids` | [`[Solid]`](/docs/kcl-std/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 |
|
| `instances` | [`number`](/docs/kcl-std/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 |
|
| `axis` | [`[number]`](/docs/kcl-std/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 |
|
| `center` | [`Point3d`](/docs/kcl-std/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 |
|
| `arcDegrees` | [`number`](/docs/kcl-std/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 |
|
| `rotateDuplicates` | [`bool`](/docs/kcl-std/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 |
|
| `useOriginal` | [`bool`](/docs/kcl-std/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
|
### Returns
|
||||||
|
|
||||||
[`[Solid]`](/docs/kcl/types/std-types-Solid)
|
[`[Solid]`](/docs/kcl-std/types/std-types-Solid)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -23,15 +23,15 @@ patternLinear2d(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `sketches` | [`[Sketch]`](/docs/kcl/types/std-types-Sketch) | The sketch(es) to duplicate | Yes |
|
| `sketches` | [`[Sketch]`](/docs/kcl-std/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 |
|
| `instances` | [`number`](/docs/kcl-std/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 |
|
| `distance` | [`number`](/docs/kcl-std/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 |
|
| `axis` | [`Point2d`](/docs/kcl-std/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 |
|
| `useOriginal` | [`bool`](/docs/kcl-std/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
|
### Returns
|
||||||
|
|
||||||
[`[Sketch]`](/docs/kcl/types/std-types-Sketch)
|
[`[Sketch]`](/docs/kcl-std/types/std-types-Sketch)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
@ -23,15 +23,15 @@ patternLinear3d(
|
|||||||
|
|
||||||
| Name | Type | Description | Required |
|
| Name | Type | Description | Required |
|
||||||
|----------|------|-------------|----------|
|
|----------|------|-------------|----------|
|
||||||
| `solids` | [`[Solid]`](/docs/kcl/types/std-types-Solid) | The solid(s) to duplicate | Yes |
|
| `solids` | [`[Solid]`](/docs/kcl-std/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 |
|
| `instances` | [`number`](/docs/kcl-std/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 |
|
| `distance` | [`number`](/docs/kcl-std/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 |
|
| `axis` | [`Point3d`](/docs/kcl-std/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 |
|
| `useOriginal` | [`bool`](/docs/kcl-std/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
|
### Returns
|
||||||
|
|
||||||
[`[Solid]`](/docs/kcl/types/std-types-Solid)
|
[`[Solid]`](/docs/kcl-std/types/std-types-Solid)
|
||||||
|
|
||||||
|
|
||||||
### Examples
|
### Examples
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user