Skip to content

Commit

Permalink
Update KCL docs (#303)
Browse files Browse the repository at this point in the history
YOYO NEW KCL DOCS!!

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
1 parent f08e7ed commit 55f144e
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 7 deletions.
4 changes: 2 additions & 2 deletions content/pages/docs/kcl/loft.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Create a 3D surface or solid by interpolating between two or more sketches.
The sketches need to closed and on the same plane.

```js
loft(sketches: [Sketch], v_degree: NonZeroU32, bez_approximate_rational: bool, base_curve_index?: u32, tolerance?: number) -> Solid
loft(sketches: [Sketch], v_degree: NonZeroU32, bez_approximate_rational: bool, base_curve_index?: integer, tolerance?: number) -> Solid
```


Expand All @@ -20,7 +20,7 @@ loft(sketches: [Sketch], v_degree: NonZeroU32, bez_approximate_rational: bool, b
| `sketches` | [`[Sketch]`](/docs/kcl/types/Sketch) | Which sketches to loft. Must include at least 2 sketches. | Yes |
| `v_degree` | `NonZeroU32` | Degree of the interpolation. Must be greater than zero. For example, use 2 for quadratic, or 3 for cubic interpolation in the V direction. This defaults to 2, if not specified. | Yes |
| `bez_approximate_rational` | `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 |
| `base_curve_index` | `u32` | This can be set to override the automatically determined topological base curve, which is usually the first section encountered. | No |
| `base_curve_index` | `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 |

### Returns
Expand Down
4 changes: 2 additions & 2 deletions content/pages/docs/kcl/patternTransform.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,15 +35,15 @@ The transform function returns a transform object. All properties of the object
- `rotation.origin` (either "local" i.e. rotate around its own center, "global" i.e. rotate around the scene's center, or a 3D point, defaults to "local")

```js
patternTransform(total_instances: u32, transform_function: FunctionParam, solid_set: SolidSet) -> [Solid]
patternTransform(total_instances: integer, transform_function: FunctionParam, solid_set: SolidSet) -> [Solid]
```


### Arguments

| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `total_instances` | `u32` | | Yes |
| `total_instances` | `integer` | | Yes |
| `transform_function` | `FunctionParam` | | Yes |
| `solid_set` | [`SolidSet`](/docs/kcl/types/SolidSet) | A solid or a group of solids. | Yes |

Expand Down
4 changes: 2 additions & 2 deletions content/pages/docs/kcl/patternTransform2d.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ Just like patternTransform, but works on 2D sketches not 3D solids.


```js
patternTransform2d(total_instances: u32, transform_function: FunctionParam, solid_set: SketchSet) -> [Sketch]
patternTransform2d(total_instances: integer, transform_function: FunctionParam, solid_set: SketchSet) -> [Sketch]
```


### Arguments

| Name | Type | Description | Required |
|----------|------|-------------|----------|
| `total_instances` | `u32` | | Yes |
| `total_instances` | `integer` | | Yes |
| `transform_function` | `FunctionParam` | | Yes |
| `solid_set` | [`SketchSet`](/docs/kcl/types/SketchSet) | A sketch or a group of sketches. | Yes |

Expand Down
7 changes: 6 additions & 1 deletion content/pages/docs/kcl/types/AngledLineData.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,18 @@ Data to draw an angled line.

An angle and length with explicitly named parameters

[`PolarCoordsData`](/docs/kcl/types/PolarCoordsData)
**Type:** `object`





## Properties

| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `angle` |`number`| The angle of the line (in degrees). | No |
| `length` |`number`| The length of the line. | No |


----
Expand Down
17 changes: 17 additions & 0 deletions content/pages/docs/kcl/types/KclValue.md
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,23 @@ Data for an imported geometry.



## Properties

| Property | Type | Description | Required |
|----------|------|-------------|----------|
| `type` |enum: `Module`| | No |
| `value` |[`ModuleId`](/docs/kcl/types/ModuleId)| Any KCL value. | No |
| `__meta` |`[` [`Metadata`](/docs/kcl/types/Metadata) `]`| | No |


----

**Type:** `object`





## Properties

| Property | Type | Description | Required |
Expand Down
16 changes: 16 additions & 0 deletions content/pages/docs/kcl/types/ModuleId.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
---
title: "ModuleId"
excerpt: "Identifier of a source file. Uses a u32 to keep the size small."
layout: manual
---

Identifier of a source file. Uses a u32 to keep the size small.

**Type:** `integer` (`uint32`)







0 comments on commit 55f144e

Please sign in to comment.