@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
title: "AngledLineThatIntersectsData"
|
|
||||||
excerpt: "Data for drawing an angled line that intersects with a given line."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for drawing an angled line that intersects with a given line.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `angle` |`TyF64`| The angle of the line. | No |
|
|
||||||
| `intersectTag` |[`TagIdentifier`](/docs/kcl/types#tag-identifier)| The tag of the line to intersect with. | No |
|
|
||||||
| `offset` |`TyF64`| The offset from the intersecting line. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
title: "AppearanceData"
|
|
||||||
excerpt: "Data for appearance."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for appearance.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `color` |`string`| Color of the new material, a hex string like "#ff0000". | No |
|
|
||||||
| `metalness` |`number` (**maximum:** 100.0)| Metalness of the new material, a percentage like 95.7. | No |
|
|
||||||
| `roughness` |`number` (**maximum:** 100.0)| Roughness of the new material, a percentage like 95.7. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,54 +0,0 @@
|
|||||||
---
|
|
||||||
title: "ArcData"
|
|
||||||
excerpt: "Data to draw an arc."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data to draw an arc.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**This schema accepts any of the following:**
|
|
||||||
|
|
||||||
Angles and radius with an optional tag.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `angleStart` |`TyF64`| The start angle. | No |
|
|
||||||
| `angleEnd` |`TyF64`| The end angle. | No |
|
|
||||||
| `radius` |`TyF64`| The radius. | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Center, to and radius with an optional tag.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `center` |`[, `TyF64`, `TyF64`]`| The center. | No |
|
|
||||||
| `to` |`[, `TyF64`, `TyF64`]`| The to point. | No |
|
|
||||||
| `radius` |`TyF64`| The radius. | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
title: "ArcToData"
|
|
||||||
excerpt: "Data to draw a three point arc (arcTo)."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data to draw a three point arc (arcTo).
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `end` |`[, `TyF64`, `TyF64`]`| End point of the arc. A point in 3D space | No |
|
|
||||||
| `interior` |`[, `TyF64`, `TyF64`]`| Interior point of the arc. A point in 3D space | No |
|
|
||||||
|
|
||||||
|
|
@ -1,46 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Axis"
|
|
||||||
excerpt: "Co-ordinate axis specifier."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Co-ordinate axis specifier.
|
|
||||||
|
|
||||||
See [cglearn.eu] for background reading.
|
|
||||||
|
|
||||||
[cglearn.eu]: https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**This schema accepts exactly one of the following:**
|
|
||||||
|
|
||||||
'Y' axis.
|
|
||||||
|
|
||||||
**enum:** `y`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
'Z' axis.
|
|
||||||
|
|
||||||
**enum:** `z`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Axis2dOrEdgeReference"
|
|
||||||
excerpt: "A 2D axis or tagged edge."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
A 2D axis or tagged edge.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**This schema accepts any of the following:**
|
|
||||||
|
|
||||||
2D axis and origin.
|
|
||||||
|
|
||||||
[`AxisAndOrigin2d`](/docs/kcl/types/AxisAndOrigin2d)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Tagged edge.
|
|
||||||
|
|
||||||
[`EdgeReference`](/docs/kcl/types/EdgeReference)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Axis3dOrEdgeReference"
|
|
||||||
excerpt: "A 3D axis or tagged edge."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
A 3D axis or tagged edge.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**This schema accepts any of the following:**
|
|
||||||
|
|
||||||
3D axis and origin.
|
|
||||||
|
|
||||||
[`AxisAndOrigin3d`](/docs/kcl/types/AxisAndOrigin3d)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Tagged edge.
|
|
||||||
|
|
||||||
[`EdgeReference`](/docs/kcl/types/EdgeReference)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,81 +0,0 @@
|
|||||||
---
|
|
||||||
title: "AxisAndOrigin2d"
|
|
||||||
excerpt: "A 2D axis and origin."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
A 2D axis and origin.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**This schema accepts exactly one of the following:**
|
|
||||||
|
|
||||||
X-axis.
|
|
||||||
|
|
||||||
**enum:** `X`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Y-axis.
|
|
||||||
|
|
||||||
**enum:** `Y`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Flip the X-axis.
|
|
||||||
|
|
||||||
**enum:** `-X`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Flip the Y-axis.
|
|
||||||
|
|
||||||
**enum:** `-Y`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `custom` |`object`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,105 +0,0 @@
|
|||||||
---
|
|
||||||
title: "AxisAndOrigin3d"
|
|
||||||
excerpt: "A 3D axis and origin."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
A 3D axis and origin.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**This schema accepts exactly one of the following:**
|
|
||||||
|
|
||||||
X-axis.
|
|
||||||
|
|
||||||
**enum:** `X`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Y-axis.
|
|
||||||
|
|
||||||
**enum:** `Y`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Z-axis.
|
|
||||||
|
|
||||||
**enum:** `Z`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Flip the X-axis.
|
|
||||||
|
|
||||||
**enum:** `-X`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Flip the Y-axis.
|
|
||||||
|
|
||||||
**enum:** `-Y`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Flip the Z-axis.
|
|
||||||
|
|
||||||
**enum:** `-Z`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `custom` |`object`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
title: "AxisDirectionPair"
|
|
||||||
excerpt: "An [[`Axis`](/docs/kcl/types/Axis)] paired with a [[`Direction`](/docs/kcl/types/Direction)]."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
An [[`Axis`](/docs/kcl/types/Axis)] paired with a [[`Direction`](/docs/kcl/types/Direction)].
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `axis` |[`Axis`](/docs/kcl/types/Axis)| Axis specifier. | No |
|
|
||||||
| `direction` |[`Direction`](/docs/kcl/types/Direction)| Specifies which direction the axis is pointing. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
title: "BezierData"
|
|
||||||
excerpt: "Data to draw a bezier curve."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data to draw a bezier curve.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `to` |`[, `TyF64`, `TyF64`]`| The to point. | No |
|
|
||||||
| `control1` |`[, `TyF64`, `TyF64`]`| The first control point. | No |
|
|
||||||
| `control2` |`[, `TyF64`, `TyF64`]`| The second control point. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
title: "ChamferData"
|
|
||||||
excerpt: "Data for chamfers."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for chamfers.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `length` |`number`| The length of the chamfer. | No |
|
|
||||||
| `tags` |`[` [`EdgeReference`](/docs/kcl/types/EdgeReference) `]`| The tags of the paths you want to chamfer. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
title: "CircleData"
|
|
||||||
excerpt: "Data for drawing an circle"
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for drawing an circle
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `center` |`[number, number]`| The center of the circle. | No |
|
|
||||||
| `radius` |`number`| The circle radius | No |
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
title: "CircleThreePointData"
|
|
||||||
excerpt: "Data for drawing a 3-point circle"
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for drawing a 3-point circle
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `p1` |`[number, number]`| Point one for circle derivation. | No |
|
|
||||||
| `p2` |`[number, number]`| Point two for circle derivation. | No |
|
|
||||||
| `p3` |`[number, number]`| Point three for circle derivation. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,25 +0,0 @@
|
|||||||
---
|
|
||||||
title: "CircularPattern2dData"
|
|
||||||
excerpt: "Data for a circular pattern on a 2D sketch."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for a circular pattern on a 2D sketch.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `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. | No |
|
|
||||||
| `center` |`[number, number]`| The center about which to make the pattern. This is a 2D vector. | No |
|
|
||||||
| `arcDegrees` |`number`| The arc angle (in degrees) to place the repetitions. Must be greater than 0. | No |
|
|
||||||
| `rotateDuplicates` |`boolean`| Whether or not to rotate the duplicates as they are copied. | No |
|
|
||||||
| `useOriginal` |`boolean`| If the target being patterned is itself a pattern, then, should you use the original solid, or the pattern? | No |
|
|
||||||
|
|
||||||
|
|
@ -1,26 +0,0 @@
|
|||||||
---
|
|
||||||
title: "CircularPattern3dData"
|
|
||||||
excerpt: "Data for a circular pattern on a 3D model."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for a circular pattern on a 3D model.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `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. | No |
|
|
||||||
| `axis` |`[number, number, number]`| The axis around which to make the pattern. This is a 3D vector. | No |
|
|
||||||
| `center` |`[number, number, number]`| The center about which to make the pattern. This is a 3D vector. | No |
|
|
||||||
| `arcDegrees` |`number`| The arc angle (in degrees) to place the repetitions. Must be greater than 0. | No |
|
|
||||||
| `rotateDuplicates` |`boolean`| Whether or not to rotate the duplicates as they are copied. | No |
|
|
||||||
| `useOriginal` |`boolean`| If the target being patterned is itself a pattern, then, should you use the original solid, or the pattern? | No |
|
|
||||||
|
|
||||||
|
|
@ -1,42 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Direction"
|
|
||||||
excerpt: "Specifies the sign of a co-ordinate axis."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Specifies the sign of a co-ordinate axis.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**This schema accepts exactly one of the following:**
|
|
||||||
|
|
||||||
Increasing numbers.
|
|
||||||
|
|
||||||
**enum:** `positive`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Decreasing numbers.
|
|
||||||
|
|
||||||
**enum:** `negative`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,41 +0,0 @@
|
|||||||
---
|
|
||||||
title: "EdgeReference"
|
|
||||||
excerpt: "A tag or a uuid of an edge."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
A tag or a uuid of an edge.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**This schema accepts any of the following:**
|
|
||||||
|
|
||||||
A uuid of an edge.
|
|
||||||
|
|
||||||
**Type:** [`string`](/docs/kcl/types/string) (`uuid`)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
A tag of an edge.
|
|
||||||
|
|
||||||
[`TagIdentifier`](/docs/kcl/types#tag-identifier)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Environment"
|
|
||||||
excerpt: ""
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `bindings` |`object`| | No |
|
|
||||||
| `parent` |`integer`| | No |
|
|
||||||
|
|
||||||
|
|
@ -1,17 +0,0 @@
|
|||||||
---
|
|
||||||
title: "EnvironmentRef"
|
|
||||||
excerpt: "An index pointing to a snapshot within a specific (unspecified) environment."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
An index pointing to a snapshot within a specific (unspecified) environment.
|
|
||||||
|
|
||||||
[`SnapshotRef`](/docs/kcl/types/SnapshotRef)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
title: "FilletData"
|
|
||||||
excerpt: "Data for fillets."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for fillets.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `radius` |`number`| The radius of the fillet. | No |
|
|
||||||
| `tags` |`[` [`EdgeReference`](/docs/kcl/types/EdgeReference) `]`| The tags of the paths you want to fillet. | No |
|
|
||||||
| `tolerance` |`number`| The tolerance for the fillet. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
---
|
|
||||||
title: "HelixRevolutionsData"
|
|
||||||
excerpt: "Data for helix revolutions."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for helix revolutions.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `revolutions` |[`number`](/docs/kcl/types/number)| Number of revolutions. | No |
|
|
||||||
| `angleStart` |[`number`](/docs/kcl/types/number)| Start angle (in degrees). | No |
|
|
||||||
| `ccw` |`boolean`| Is the helix rotation counter clockwise? The default is `false`. | No |
|
|
||||||
| `length` |[`number`](/docs/kcl/types/number)| Length of the helix. If this argument is not provided, the height of the solid is used. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,27 +0,0 @@
|
|||||||
---
|
|
||||||
title: "HelixValue"
|
|
||||||
excerpt: "A helix."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
A helix.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `value` |[`string`](/docs/kcl/types/string)| The id of the helix. | No |
|
|
||||||
| `artifactId` |[`string`](/docs/kcl/types/string)| The artifact ID. | No |
|
|
||||||
| `revolutions` |[`number`](/docs/kcl/types/number)| Number of revolutions. | No |
|
|
||||||
| `angleStart` |[`number`](/docs/kcl/types/number)| Start angle (in degrees). | No |
|
|
||||||
| `ccw` |`boolean`| Is the helix rotation counter clockwise? | No |
|
|
||||||
| `cylinderId` |[`string`](/docs/kcl/types/string)| The cylinder the helix was created on. | No |
|
|
||||||
| `units` |[`UnitLen`](/docs/kcl/types/UnitLen)| A unit of length. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,136 +0,0 @@
|
|||||||
---
|
|
||||||
title: "ImportFormat"
|
|
||||||
excerpt: "Import format specifier"
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Import format specifier
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**This schema accepts exactly one of the following:**
|
|
||||||
|
|
||||||
Autodesk Filmbox (FBX) format
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `format` |enum: `fbx`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Binary glTF 2.0. We refer to this as glTF since that is how our customers refer to it, but this can also import binary glTF (glb).
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `format` |enum: `gltf`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Wavefront OBJ format.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `format` |enum: `obj`| | No |
|
|
||||||
| `coords` |[`System`](/docs/kcl/types/System)| Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system. | No |
|
|
||||||
| `units` |[`UnitLength`](/docs/kcl/types/UnitLength)| The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters. | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
The PLY Polygon File Format.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `format` |enum: `ply`| | No |
|
|
||||||
| `coords` |[`System`](/docs/kcl/types/System)| Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system. | No |
|
|
||||||
| `units` |[`UnitLength`](/docs/kcl/types/UnitLength)| The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters. | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
SolidWorks part (SLDPRT) format.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `format` |enum: `sldprt`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
ISO 10303-21 (STEP) format.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `format` |enum: `step`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
ST**ereo**L**ithography format.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `format` |enum: `stl`| | No |
|
|
||||||
| `coords` |[`System`](/docs/kcl/types/System)| Co-ordinate system of input data. Defaults to the [KittyCAD co-ordinate system. | No |
|
|
||||||
| `units` |[`UnitLength`](/docs/kcl/types/UnitLength)| The units of the input data. This is very important for correct scaling and when calculating physics properties like mass, etc. Defaults to millimeters. | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
title: "ImportedGeometry"
|
|
||||||
excerpt: "Data for an imported geometry."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for an imported geometry.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `id` |[`string`](/docs/kcl/types/string)| The ID of the imported geometry. | No |
|
|
||||||
| `value` |`[` [`string`](/docs/kcl/types/string) `]`| The original file paths. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
title: "LinearPattern2dData"
|
|
||||||
excerpt: "Data for a linear pattern on a 2D sketch."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for a linear pattern on a 2D sketch.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `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. | No |
|
|
||||||
| `distance` |`number`| The distance between each repetition. This can also be referred to as spacing. | No |
|
|
||||||
| `axis` |`[number, number]`| The axis of the pattern. This is a 2D vector. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
title: "LinearPattern3dData"
|
|
||||||
excerpt: "Data for a linear pattern on a 3D model."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for a linear pattern on a 3D model.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `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. | No |
|
|
||||||
| `distance` |`number`| The distance between each repetition. This can also be referred to as spacing. | No |
|
|
||||||
| `axis` |`[number, number, number]`| The axis of the pattern. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
---
|
|
||||||
title: "LoftData"
|
|
||||||
excerpt: "Data for a loft."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for a loft.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `vDegree` |`integer` (**minimum:** 1.0)| 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. | No |
|
|
||||||
| `bezApproximateRational` |`boolean`| 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. | No |
|
|
||||||
| `baseCurveIndex` |`integer`| This can be set to override the automatically determined topological base curve, which is usually the first section encountered. | No |
|
|
||||||
| `tolerance` |`number`| Tolerance for the loft operation. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Metadata"
|
|
||||||
excerpt: "Metadata."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Metadata.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `sourceRange` |[`SourceRange`](/docs/kcl/types/SourceRange)| The source range. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
title: "Mirror2dData"
|
|
||||||
excerpt: "Data for a mirror."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for a mirror.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `axis` |[`Axis2dOrEdgeReference`](/docs/kcl/types/Axis2dOrEdgeReference)| Axis to use as mirror. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
---
|
|
||||||
title: "PolygonData"
|
|
||||||
excerpt: "Data for drawing a polygon"
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for drawing a polygon
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `radius` |`TyF64`| The radius of the polygon | No |
|
|
||||||
| `numSides` |`integer`| The number of sides in the polygon | No |
|
|
||||||
| `center` |`[, `TyF64`, `TyF64`]`| The center point of the polygon | No |
|
|
||||||
| `inscribed` |`boolean`| Whether the polygon is inscribed (true) or circumscribed (false) about a circle with the specified radius | No |
|
|
||||||
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
|||||||
---
|
|
||||||
title: "ProgramMemory"
|
|
||||||
excerpt: ""
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `environments` |`[` [`Environment`](/docs/kcl/types/Environment) `]`| | No |
|
|
||||||
| `currentEnv` |`integer`| | No |
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
title: "RevolveData"
|
|
||||||
excerpt: "Data for revolution surfaces."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for revolution surfaces.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `angle` |[`number`](/docs/kcl/types/number) (**maximum:** 360.0) (**minimum:** -360.0)| Angle to revolve (in degrees). Default is 360. | No |
|
|
||||||
| `axis` |[`Axis2dOrEdgeReference`](/docs/kcl/types/Axis2dOrEdgeReference)| Axis of revolution. | No |
|
|
||||||
| `tolerance` |[`number`](/docs/kcl/types/number)| Tolerance for the revolve operation. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
title: "ShellData"
|
|
||||||
excerpt: "Data for shells."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for shells.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `thickness` |`number`| The thickness of the shell. | No |
|
|
||||||
| `faces` |`[` [`FaceTag`](/docs/kcl/types/FaceTag) `]`| The faces you want removed. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,16 +0,0 @@
|
|||||||
---
|
|
||||||
title: "SnapshotRef"
|
|
||||||
excerpt: "An index pointing to a snapshot within a specific (unspecified) environment."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
An index pointing to a snapshot within a specific (unspecified) environment.
|
|
||||||
|
|
||||||
**Type:** `integer` (`uint`)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
|||||||
---
|
|
||||||
title: "SweepData"
|
|
||||||
excerpt: "Data for a sweep."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data for a sweep.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `path` |[`SweepPath`](/docs/kcl/types/SweepPath)| The path to sweep along. | No |
|
|
||||||
| `sectional` |`boolean`| If true, the sweep will be broken up into sub-sweeps (extrusions, revolves, sweeps) based on the trajectory path components. | No |
|
|
||||||
| `tolerance` |`number`| Tolerance for the sweep operation. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,28 +0,0 @@
|
|||||||
---
|
|
||||||
title: "System"
|
|
||||||
excerpt: "Co-ordinate system definition."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Co-ordinate system definition.
|
|
||||||
|
|
||||||
The `up` axis must be orthogonal to the `forward` axis.
|
|
||||||
|
|
||||||
See [cglearn.eu] for background reading.
|
|
||||||
|
|
||||||
[cglearn.eu](https://cglearn.eu/pub/computer-graphics/introduction-to-geometry#material-coordinate-systems-1)
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `forward` |[`AxisDirectionPair`](/docs/kcl/types/AxisDirectionPair)| Axis the front face of a model looks along. | No |
|
|
||||||
| `up` |[`AxisDirectionPair`](/docs/kcl/types/AxisDirectionPair)| Axis pointing up and away from a model. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,24 +0,0 @@
|
|||||||
---
|
|
||||||
title: "TagEngineInfo"
|
|
||||||
excerpt: "Engine information for a tag."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Engine information for a tag.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `id` |[`string`](/docs/kcl/types/string)| The id of the tagged object. | No |
|
|
||||||
| `sketch` |[`string`](/docs/kcl/types/string)| The sketch the tag is on. | No |
|
|
||||||
| `path` |[`Path`](/docs/kcl/types/Path)| The path the tag is on. | No |
|
|
||||||
| `surface` |[`ExtrudeSurface`](/docs/kcl/types/ExtrudeSurface)| The surface information for the tag. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,22 +0,0 @@
|
|||||||
---
|
|
||||||
title: "TangentialArcData"
|
|
||||||
excerpt: "Data to draw a tangential arc."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
Data to draw a tangential arc.
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `radius` |`TyF64`| Radius of the arc. Not to be confused with Raiders of the Lost Ark. | No |
|
|
||||||
| `offset` |`TyF64`| Offset of the arc, in degrees. | No |
|
|
||||||
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
|||||||
---
|
|
||||||
title: "TyF64"
|
|
||||||
excerpt: ""
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
**Type:** [`number`](/docs/kcl/types/number) (`double`)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,90 +0,0 @@
|
|||||||
---
|
|
||||||
title: "UnitLength"
|
|
||||||
excerpt: "The valid types of length units."
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
The valid types of length units.
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**This schema accepts exactly one of the following:**
|
|
||||||
|
|
||||||
Centimeters <https://en.wikipedia.org/wiki/Centimeter>
|
|
||||||
|
|
||||||
**enum:** `cm`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Feet <https://en.wikipedia.org/wiki/Foot_(unit)>
|
|
||||||
|
|
||||||
**enum:** `ft`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Inches <https://en.wikipedia.org/wiki/Inch>
|
|
||||||
|
|
||||||
**enum:** `in`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Meters <https://en.wikipedia.org/wiki/Meter>
|
|
||||||
|
|
||||||
**enum:** `m`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Millimeters <https://en.wikipedia.org/wiki/Millimeter>
|
|
||||||
|
|
||||||
**enum:** `mm`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
Yards <https://en.wikipedia.org/wiki/Yard>
|
|
||||||
|
|
||||||
**enum:** `yd`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -1,186 +0,0 @@
|
|||||||
---
|
|
||||||
title: "UnitType"
|
|
||||||
excerpt: ""
|
|
||||||
layout: manual
|
|
||||||
---
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**This schema accepts exactly one of the following:**
|
|
||||||
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `type` |enum: `Count`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**This schema accepts exactly one of the following:**
|
|
||||||
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `type` |enum: `Mm`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `type` |enum: `Cm`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `type` |enum: `M`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `type` |enum: `Inches`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `type` |enum: `Feet`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `type` |enum: `Yards`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `type` |enum: `Length`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
**This schema accepts exactly one of the following:**
|
|
||||||
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `type` |enum: `Degrees`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
**Type:** `object`
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `type` |enum: `Radians`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
## Properties
|
|
||||||
|
|
||||||
| Property | Type | Description | Required |
|
|
||||||
|----------|------|-------------|----------|
|
|
||||||
| `type` |enum: `Angle`| | No |
|
|
||||||
|
|
||||||
|
|
||||||
----
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -6,8 +6,6 @@ use kcmc::{each_cmd as mcmd, ModelingCmd};
|
|||||||
use kittycad_modeling_cmds::{self as kcmc, shared::Color};
|
use kittycad_modeling_cmds::{self as kcmc, shared::Color};
|
||||||
use regex::Regex;
|
use regex::Regex;
|
||||||
use rgba_simple::Hex;
|
use rgba_simple::Hex;
|
||||||
use schemars::JsonSchema;
|
|
||||||
use serde::Serialize;
|
|
||||||
|
|
||||||
use super::args::TyF64;
|
use super::args::TyF64;
|
||||||
use crate::{
|
use crate::{
|
||||||
@ -20,23 +18,6 @@ lazy_static::lazy_static! {
|
|||||||
static ref HEX_REGEX: Regex = Regex::new(r"^#[0-9a-fA-F]{6}$").unwrap();
|
static ref HEX_REGEX: Regex = Regex::new(r"^#[0-9a-fA-F]{6}$").unwrap();
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Data for appearance.
|
|
||||||
#[derive(Debug, Clone, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
|
||||||
#[ts(export)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
struct AppearanceData {
|
|
||||||
/// Color of the new material, a hex string like "#ff0000".
|
|
||||||
#[schemars(regex(pattern = "#[0-9a-fA-F]{6}"))]
|
|
||||||
pub color: String,
|
|
||||||
/// Metalness of the new material, a percentage like 95.7.
|
|
||||||
#[validate(range(min = 0.0, max = 100.0))]
|
|
||||||
pub metalness: Option<TyF64>,
|
|
||||||
/// Roughness of the new material, a percentage like 95.7.
|
|
||||||
#[validate(range(min = 0.0, max = 100.0))]
|
|
||||||
pub roughness: Option<TyF64>,
|
|
||||||
// TODO(jess): we can also ambient occlusion here I just don't know what it is.
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Set the appearance of a solid. This only works on solids, not sketches or individual paths.
|
/// Set the appearance of a solid. This only works on solids, not sketches or individual paths.
|
||||||
pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||||
let solids = args.get_unlabeled_kw_arg_typed(
|
let solids = args.get_unlabeled_kw_arg_typed(
|
||||||
@ -48,25 +29,20 @@ pub async fn appearance(exec_state: &mut ExecState, args: Args) -> Result<KclVal
|
|||||||
let color: String = args.get_kw_arg("color")?;
|
let color: String = args.get_kw_arg("color")?;
|
||||||
let metalness: Option<TyF64> = args.get_kw_arg_opt_typed("metalness", &RuntimeType::count(), exec_state)?;
|
let metalness: Option<TyF64> = args.get_kw_arg_opt_typed("metalness", &RuntimeType::count(), exec_state)?;
|
||||||
let roughness: Option<TyF64> = args.get_kw_arg_opt_typed("roughness", &RuntimeType::count(), exec_state)?;
|
let roughness: Option<TyF64> = args.get_kw_arg_opt_typed("roughness", &RuntimeType::count(), exec_state)?;
|
||||||
let data = AppearanceData {
|
|
||||||
color,
|
|
||||||
metalness,
|
|
||||||
roughness,
|
|
||||||
};
|
|
||||||
|
|
||||||
// Make sure the color if set is valid.
|
// Make sure the color if set is valid.
|
||||||
if !HEX_REGEX.is_match(&data.color) {
|
if !HEX_REGEX.is_match(&color) {
|
||||||
return Err(KclError::Semantic(KclErrorDetails {
|
return Err(KclError::Semantic(KclErrorDetails {
|
||||||
message: format!("Invalid hex color (`{}`), try something like `#fff000`", data.color),
|
message: format!("Invalid hex color (`{}`), try something like `#fff000`", color),
|
||||||
source_ranges: vec![args.source_range],
|
source_ranges: vec![args.source_range],
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
|
|
||||||
let result = inner_appearance(
|
let result = inner_appearance(
|
||||||
solids,
|
solids,
|
||||||
data.color,
|
color,
|
||||||
data.metalness.map(|t| t.n),
|
metalness.map(|t| t.n),
|
||||||
data.roughness.map(|t| t.n),
|
roughness.map(|t| t.n),
|
||||||
exec_state,
|
exec_state,
|
||||||
args,
|
args,
|
||||||
)
|
)
|
||||||
|
@ -4,7 +4,6 @@ use anyhow::Result;
|
|||||||
use indexmap::IndexMap;
|
use indexmap::IndexMap;
|
||||||
use kcmc::{each_cmd as mcmd, length_unit::LengthUnit, shared::CutType, ModelingCmd};
|
use kcmc::{each_cmd as mcmd, length_unit::LengthUnit, shared::CutType, ModelingCmd};
|
||||||
use kittycad_modeling_cmds as kcmc;
|
use kittycad_modeling_cmds as kcmc;
|
||||||
use schemars::JsonSchema;
|
|
||||||
use serde::{Deserialize, Serialize};
|
use serde::{Deserialize, Serialize};
|
||||||
|
|
||||||
use super::{args::TyF64, DEFAULT_TOLERANCE};
|
use super::{args::TyF64, DEFAULT_TOLERANCE};
|
||||||
@ -19,8 +18,7 @@ use crate::{
|
|||||||
};
|
};
|
||||||
|
|
||||||
/// A tag or a uuid of an edge.
|
/// A tag or a uuid of an edge.
|
||||||
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, ts_rs::TS, JsonSchema, Eq, Hash)]
|
#[derive(Debug, Clone, Deserialize, Serialize, PartialEq, Eq, Hash)]
|
||||||
#[ts(export)]
|
|
||||||
#[serde(untagged)]
|
#[serde(untagged)]
|
||||||
pub enum EdgeReference {
|
pub enum EdgeReference {
|
||||||
/// A uuid of an edge.
|
/// A uuid of an edge.
|
||||||
|
@ -12,7 +12,6 @@ use kittycad_modeling_cmds::{
|
|||||||
self as kcmc,
|
self as kcmc,
|
||||||
shared::{Angle, OriginType, Rotation},
|
shared::{Angle, OriginType, Rotation},
|
||||||
};
|
};
|
||||||
use schemars::JsonSchema;
|
|
||||||
use serde::Serialize;
|
use serde::Serialize;
|
||||||
use uuid::Uuid;
|
use uuid::Uuid;
|
||||||
|
|
||||||
@ -33,22 +32,6 @@ use crate::{
|
|||||||
|
|
||||||
const MUST_HAVE_ONE_INSTANCE: &str = "There must be at least 1 instance of your geometry";
|
const MUST_HAVE_ONE_INSTANCE: &str = "There must be at least 1 instance of your geometry";
|
||||||
|
|
||||||
/// Data for a linear pattern on a 3D model.
|
|
||||||
#[derive(Debug, Clone, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
|
||||||
#[ts(export)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
|
||||||
pub struct LinearPattern3dData {
|
|
||||||
/// 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.
|
|
||||||
pub instances: u32,
|
|
||||||
/// The distance between each repetition. This can also be referred to as spacing.
|
|
||||||
pub distance: TyF64,
|
|
||||||
/// The axis of the pattern.
|
|
||||||
pub axis: [TyF64; 3],
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Repeat some 3D solid, changing each repetition slightly.
|
/// Repeat some 3D solid, changing each repetition slightly.
|
||||||
pub async fn pattern_transform(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
pub async fn pattern_transform(exec_state: &mut ExecState, args: Args) -> Result<KclValue, KclError> {
|
||||||
let solids = args.get_unlabeled_kw_arg_typed("solids", &RuntimeType::solids(), exec_state)?;
|
let solids = args.get_unlabeled_kw_arg_typed("solids", &RuntimeType::solids(), exec_state)?;
|
||||||
@ -917,8 +900,7 @@ async fn inner_pattern_linear_3d(
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Data for a circular pattern on a 2D sketch.
|
/// Data for a circular pattern on a 2D sketch.
|
||||||
#[derive(Debug, Clone, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
#[derive(Debug, Clone, Serialize, PartialEq)]
|
||||||
#[ts(export)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
struct CircularPattern2dData {
|
struct CircularPattern2dData {
|
||||||
/// The number of total instances. Must be greater than or equal to 1.
|
/// The number of total instances. Must be greater than or equal to 1.
|
||||||
@ -939,10 +921,9 @@ struct CircularPattern2dData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/// Data for a circular pattern on a 3D model.
|
/// Data for a circular pattern on a 3D model.
|
||||||
#[derive(Debug, Clone, Serialize, PartialEq, ts_rs::TS, JsonSchema)]
|
#[derive(Debug, Clone, Serialize, PartialEq)]
|
||||||
#[ts(export)]
|
|
||||||
#[serde(rename_all = "camelCase")]
|
#[serde(rename_all = "camelCase")]
|
||||||
pub struct CircularPattern3dData {
|
struct CircularPattern3dData {
|
||||||
/// The number of total instances. Must be greater than or equal to 1.
|
/// The number of total instances. Must be greater than or equal to 1.
|
||||||
/// This includes the original entity. For example, if instances is 2,
|
/// This includes the original entity. For example, if instances is 2,
|
||||||
/// there will be two copies -- the original, and one new copy.
|
/// there will be two copies -- the original, and one new copy.
|
||||||
|
Reference in New Issue
Block a user