From 55f144e60a27c88eafbcfbd94254a79250a84ee9 Mon Sep 17 00:00:00 2001 From: "zoo-github-actions-auth[bot]" <155849648+zoo-github-actions-auth[bot]@users.noreply.github.com> Date: Mon, 16 Dec 2024 12:40:33 -0800 Subject: [PATCH] Update KCL docs (#303) YOYO NEW KCL DOCS!! Co-authored-by: github-actions[bot] --- content/pages/docs/kcl/loft.md | 4 ++-- content/pages/docs/kcl/patternTransform.md | 4 ++-- content/pages/docs/kcl/patternTransform2d.md | 4 ++-- content/pages/docs/kcl/types/AngledLineData.md | 7 ++++++- content/pages/docs/kcl/types/KclValue.md | 17 +++++++++++++++++ content/pages/docs/kcl/types/ModuleId.md | 16 ++++++++++++++++ 6 files changed, 45 insertions(+), 7 deletions(-) create mode 100644 content/pages/docs/kcl/types/ModuleId.md diff --git a/content/pages/docs/kcl/loft.md b/content/pages/docs/kcl/loft.md index bdc9126..e73aa69 100644 --- a/content/pages/docs/kcl/loft.md +++ b/content/pages/docs/kcl/loft.md @@ -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 ``` @@ -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 diff --git a/content/pages/docs/kcl/patternTransform.md b/content/pages/docs/kcl/patternTransform.md index 6cba339..2b4854b 100644 --- a/content/pages/docs/kcl/patternTransform.md +++ b/content/pages/docs/kcl/patternTransform.md @@ -35,7 +35,7 @@ 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] ``` @@ -43,7 +43,7 @@ patternTransform(total_instances: u32, transform_function: FunctionParam, solid_ | 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 | diff --git a/content/pages/docs/kcl/patternTransform2d.md b/content/pages/docs/kcl/patternTransform2d.md index 749246b..353ce75 100644 --- a/content/pages/docs/kcl/patternTransform2d.md +++ b/content/pages/docs/kcl/patternTransform2d.md @@ -9,7 +9,7 @@ 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] ``` @@ -17,7 +17,7 @@ patternTransform2d(total_instances: u32, transform_function: FunctionParam, soli | 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 | diff --git a/content/pages/docs/kcl/types/AngledLineData.md b/content/pages/docs/kcl/types/AngledLineData.md index 8b75d8b..f49fc8c 100644 --- a/content/pages/docs/kcl/types/AngledLineData.md +++ b/content/pages/docs/kcl/types/AngledLineData.md @@ -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 | ---- diff --git a/content/pages/docs/kcl/types/KclValue.md b/content/pages/docs/kcl/types/KclValue.md index f71daf6..cabf631 100644 --- a/content/pages/docs/kcl/types/KclValue.md +++ b/content/pages/docs/kcl/types/KclValue.md @@ -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 | diff --git a/content/pages/docs/kcl/types/ModuleId.md b/content/pages/docs/kcl/types/ModuleId.md new file mode 100644 index 0000000..9ed25fc --- /dev/null +++ b/content/pages/docs/kcl/types/ModuleId.md @@ -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`) + + + + + + +