Move sketch functions to KCL; remove Rust decl dead code (#7335)
Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
@ -1,24 +1,23 @@
|
||||
---
|
||||
title: "appearance::hexString"
|
||||
subtitle: "Function in std::appearance"
|
||||
excerpt: ""
|
||||
excerpt: "Build a color from its red, green and blue components. These must be between 0 and 255."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
Build a color from its red, green and blue components. These must be between 0 and 255.
|
||||
|
||||
```kcl
|
||||
appearance::hexString(@rgb: [number(_); 3]): string
|
||||
```
|
||||
|
||||
Build a color from its red, green and blue components.
|
||||
These must be between 0 and 255.
|
||||
|
||||
|
||||
### Arguments
|
||||
|
||||
| Name | Type | Description | Required |
|
||||
|----------|------|-------------|----------|
|
||||
| `rgb` | [`[number(_); 3]`](/docs/kcl-std/types/std-types-number) | | Yes |
|
||||
| `rgb` | [`[number(_); 3]`](/docs/kcl-std/types/std-types-number) | The red, blue and green components of the color. Must be between 0 and 255. | Yes |
|
||||
|
||||
### Returns
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "reduce"
|
||||
subtitle: "Function in std::array"
|
||||
excerpt: ""
|
||||
excerpt: "Take a starting value. Then, for each element of an array, calculate the next value, using the previous value and the element."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
Take a starting value. Then, for each element of an array, calculate the next value, using the previous value and the element.
|
||||
|
||||
```kcl
|
||||
reduce(
|
||||
@ -15,8 +15,7 @@ reduce(
|
||||
): any
|
||||
```
|
||||
|
||||
Take a starting value. Then, for each element of an array, calculate the next value,
|
||||
using the previous value and the element.
|
||||
|
||||
|
||||
### Arguments
|
||||
|
||||
@ -28,7 +27,7 @@ using the previous value and the element.
|
||||
|
||||
### Returns
|
||||
|
||||
[`any`](/docs/kcl-std/types/std-types-any)
|
||||
[`any`](/docs/kcl-std/types/std-types-any) - The [`any`](/docs/kcl-std/types/std-types-any) type is the type of all possible values in KCL. I.e., if a function accepts an argument with type [`any`](/docs/kcl-std/types/std-types-any), then it can accept any value.
|
||||
|
||||
|
||||
### Examples
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "assert"
|
||||
subtitle: "Function in std"
|
||||
excerpt: ""
|
||||
excerpt: "Check a value meets some expected conditions at runtime. Program terminates with an error if conditions aren't met. If you provide multiple conditions, they will all be checked and all must be met."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
Check a value meets some expected conditions at runtime. Program terminates with an error if conditions aren't met. If you provide multiple conditions, they will all be checked and all must be met.
|
||||
|
||||
```kcl
|
||||
assert(
|
||||
@ -20,8 +20,7 @@ assert(
|
||||
)
|
||||
```
|
||||
|
||||
Check a value meets some expected conditions at runtime. Program terminates with an error if conditions aren't met.
|
||||
If you provide multiple conditions, they will all be checked and all must be met.
|
||||
|
||||
|
||||
### Arguments
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "polar"
|
||||
subtitle: "Function in std::math"
|
||||
excerpt: ""
|
||||
excerpt: "Convert polar/sphere (azimuth, elevation, distance) coordinates to cartesian (x/y/z grid) coordinates."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
Convert polar/sphere (azimuth, elevation, distance) coordinates to cartesian (x/y/z grid) coordinates.
|
||||
|
||||
```kcl
|
||||
polar(
|
||||
@ -14,8 +14,7 @@ polar(
|
||||
): Point2d
|
||||
```
|
||||
|
||||
Convert polar/sphere (azimuth, elevation, distance) coordinates to
|
||||
cartesian (x/y/z grid) coordinates.
|
||||
|
||||
|
||||
### Arguments
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "rem"
|
||||
subtitle: "Function in std::math"
|
||||
excerpt: ""
|
||||
excerpt: "Compute the remainder after dividing `num` by `div`. If `num` is negative, the result will be too."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
Compute the remainder after dividing `num` by `div`. If `num` is negative, the result will be too.
|
||||
|
||||
```kcl
|
||||
rem(
|
||||
@ -14,8 +14,7 @@ rem(
|
||||
): number
|
||||
```
|
||||
|
||||
Compute the remainder after dividing `num` by `div`.
|
||||
If `num` is negative, the result will be too.
|
||||
|
||||
|
||||
### Arguments
|
||||
|
||||
|
62
docs/kcl-std/functions/std-sketch-angledLine.md
Normal file
62
docs/kcl-std/functions/std-sketch-angledLine.md
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
80
docs/kcl-std/functions/std-sketch-arc.md
Normal file
80
docs/kcl-std/functions/std-sketch-arc.md
Normal file
File diff suppressed because one or more lines are too long
74
docs/kcl-std/functions/std-sketch-bezierCurve.md
Normal file
74
docs/kcl-std/functions/std-sketch-bezierCurve.md
Normal file
File diff suppressed because one or more lines are too long
@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "circle"
|
||||
subtitle: "Function in std::sketch"
|
||||
excerpt: ""
|
||||
excerpt: "Construct a 2-dimensional circle, of the specified radius, centered at the provided (x, y) origin point."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
Construct a 2-dimensional circle, of the specified radius, centered at the provided (x, y) origin point.
|
||||
|
||||
```kcl
|
||||
circle(
|
||||
@ -17,8 +17,7 @@ circle(
|
||||
): Sketch
|
||||
```
|
||||
|
||||
Construct a 2-dimensional circle, of the specified radius, centered at
|
||||
the provided (x, y) origin point.
|
||||
|
||||
|
||||
### Arguments
|
||||
|
||||
|
59
docs/kcl-std/functions/std-sketch-close.md
Normal file
59
docs/kcl-std/functions/std-sketch-close.md
Normal file
File diff suppressed because one or more lines are too long
@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "extrude"
|
||||
subtitle: "Function in std::sketch"
|
||||
excerpt: ""
|
||||
excerpt: "Extend a 2-dimensional sketch through a third dimension in order to create new 3-dimensional volume, or if extruded into an existing volume, cut into an existing solid."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
Extend a 2-dimensional sketch through a third dimension in order to create new 3-dimensional volume, or if extruded into an existing volume, cut into an existing solid.
|
||||
|
||||
```kcl
|
||||
extrude(
|
||||
@ -18,9 +18,6 @@ extrude(
|
||||
): [Solid; 1+]
|
||||
```
|
||||
|
||||
Extend a 2-dimensional sketch through a third dimension in order to
|
||||
create new 3-dimensional volume, or if extruded into an existing volume,cut into an existing solid.
|
||||
|
||||
You can provide more than one sketch to extrude, and they will all be
|
||||
extruded in the same direction.
|
||||
|
||||
|
52
docs/kcl-std/functions/std-sketch-involuteCircular.md
Normal file
52
docs/kcl-std/functions/std-sketch-involuteCircular.md
Normal file
File diff suppressed because one or more lines are too long
62
docs/kcl-std/functions/std-sketch-line.md
Normal file
62
docs/kcl-std/functions/std-sketch-line.md
Normal file
File diff suppressed because one or more lines are too long
@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "patternCircular2d"
|
||||
subtitle: "Function in std::sketch"
|
||||
excerpt: ""
|
||||
excerpt: "Repeat a 2-dimensional sketch some number of times along a partial or complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orientation of the solid with respect to the center of the circle is maintained."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
Repeat a 2-dimensional sketch some number of times along a partial or complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orientation of the solid with respect to the center of the circle is maintained.
|
||||
|
||||
```kcl
|
||||
patternCircular2d(
|
||||
@ -18,9 +18,7 @@ patternCircular2d(
|
||||
): [Sketch; 1+]
|
||||
```
|
||||
|
||||
Repeat a 2-dimensional sketch some number of times along a partial or
|
||||
complete circle some specified number of times. Each object mayadditionally be rotated along the circle, ensuring orientation of the
|
||||
solid with respect to the center of the circle is maintained.
|
||||
|
||||
|
||||
### Arguments
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "patternLinear2d"
|
||||
subtitle: "Function in std::sketch"
|
||||
excerpt: ""
|
||||
excerpt: "Repeat a 2-dimensional sketch along some dimension, with a dynamic amount of distance between each repetition, some specified number of times."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
Repeat a 2-dimensional sketch along some dimension, with a dynamic amount of distance between each repetition, some specified number of times.
|
||||
|
||||
```kcl
|
||||
patternLinear2d(
|
||||
@ -17,8 +17,7 @@ patternLinear2d(
|
||||
): [Sketch; 1+]
|
||||
```
|
||||
|
||||
Repeat a 2-dimensional sketch along some dimension, with a dynamic amount
|
||||
of distance between each repetition, some specified number of times.
|
||||
|
||||
|
||||
### Arguments
|
||||
|
||||
|
41
docs/kcl-std/functions/std-sketch-profileStart.md
Normal file
41
docs/kcl-std/functions/std-sketch-profileStart.md
Normal file
File diff suppressed because one or more lines are too long
39
docs/kcl-std/functions/std-sketch-profileStartX.md
Normal file
39
docs/kcl-std/functions/std-sketch-profileStartX.md
Normal file
File diff suppressed because one or more lines are too long
38
docs/kcl-std/functions/std-sketch-profileStartY.md
Normal file
38
docs/kcl-std/functions/std-sketch-profileStartY.md
Normal file
File diff suppressed because one or more lines are too long
74
docs/kcl-std/functions/std-sketch-startProfile.md
Normal file
74
docs/kcl-std/functions/std-sketch-startProfile.md
Normal file
File diff suppressed because one or more lines are too long
215
docs/kcl-std/functions/std-sketch-startSketchOn.md
Normal file
215
docs/kcl-std/functions/std-sketch-startSketchOn.md
Normal file
File diff suppressed because one or more lines are too long
67
docs/kcl-std/functions/std-sketch-subtract2d.md
Normal file
67
docs/kcl-std/functions/std-sketch-subtract2d.md
Normal file
File diff suppressed because one or more lines are too long
98
docs/kcl-std/functions/std-sketch-tangentialArc.md
Normal file
98
docs/kcl-std/functions/std-sketch-tangentialArc.md
Normal file
File diff suppressed because one or more lines are too long
59
docs/kcl-std/functions/std-sketch-xLine.md
Normal file
59
docs/kcl-std/functions/std-sketch-xLine.md
Normal file
File diff suppressed because one or more lines are too long
54
docs/kcl-std/functions/std-sketch-yLine.md
Normal file
54
docs/kcl-std/functions/std-sketch-yLine.md
Normal file
File diff suppressed because one or more lines are too long
@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "intersect"
|
||||
subtitle: "Function in std::solid"
|
||||
excerpt: ""
|
||||
excerpt: "Intersect returns the shared volume between multiple solids, preserving only overlapping regions."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
Intersect returns the shared volume between multiple solids, preserving only overlapping regions.
|
||||
|
||||
```kcl
|
||||
intersect(
|
||||
@ -14,8 +14,6 @@ intersect(
|
||||
): [Solid; 1+]
|
||||
```
|
||||
|
||||
Intersect returns the shared volume between multiple solids, preserving only
|
||||
overlapping regions.
|
||||
Intersect computes the geometric intersection of multiple solid bodies,
|
||||
returning a new solid representing the volume that is common to all input
|
||||
solids. This operation is useful for determining shared material regions,
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "patternCircular3d"
|
||||
subtitle: "Function in std::solid"
|
||||
excerpt: ""
|
||||
excerpt: "Repeat a 3-dimensional solid some number of times along a partial or complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orientation of the solid with respect to the center of the circle is maintained."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
Repeat a 3-dimensional solid some number of times along a partial or complete circle some specified number of times. Each object may additionally be rotated along the circle, ensuring orientation of the solid with respect to the center of the circle is maintained.
|
||||
|
||||
```kcl
|
||||
patternCircular3d(
|
||||
@ -19,9 +19,7 @@ patternCircular3d(
|
||||
): [Solid; 1+]
|
||||
```
|
||||
|
||||
Repeat a 3-dimensional solid some number of times along a partial or
|
||||
complete circle some specified number of times. Each object mayadditionally be rotated along the circle, ensuring orientation of the
|
||||
solid with respect to the center of the circle is maintained.
|
||||
|
||||
|
||||
### Arguments
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "patternLinear3d"
|
||||
subtitle: "Function in std::solid"
|
||||
excerpt: ""
|
||||
excerpt: "Repeat a 3-dimensional solid along a linear path, with a dynamic amount of distance between each repetition, some specified number of times."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
Repeat a 3-dimensional solid along a linear path, with a dynamic amount of distance between each repetition, some specified number of times.
|
||||
|
||||
```kcl
|
||||
patternLinear3d(
|
||||
@ -17,8 +17,7 @@ patternLinear3d(
|
||||
): [Solid; 1+]
|
||||
```
|
||||
|
||||
Repeat a 3-dimensional solid along a linear path, with a dynamic amount
|
||||
of distance between each repetition, some specified number of times.
|
||||
|
||||
|
||||
### Arguments
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
---
|
||||
title: "shell"
|
||||
subtitle: "Function in std::solid"
|
||||
excerpt: ""
|
||||
excerpt: "Remove volume from a 3-dimensional shape such that a wall of the provided thickness remains, taking volume starting at the provided face, leaving it open in that direction."
|
||||
layout: manual
|
||||
---
|
||||
|
||||
|
||||
Remove volume from a 3-dimensional shape such that a wall of the provided thickness remains, taking volume starting at the provided face, leaving it open in that direction.
|
||||
|
||||
```kcl
|
||||
shell(
|
||||
@ -15,8 +15,7 @@ shell(
|
||||
): [Solid]
|
||||
```
|
||||
|
||||
Remove volume from a 3-dimensional shape such that a wall of the
|
||||
provided thickness remains, taking volume starting at the providedface, leaving it open in that direction.
|
||||
|
||||
|
||||
### Arguments
|
||||
|
||||
|
Reference in New Issue
Block a user