* updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * comment out Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * update artifacts Signed-off-by: Jess Frazelle <github@jessfraz.com> * small Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * last of the artifacts Signed-off-by: Jess Frazelle <github@jessfraz.com> * update playwirght Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * add crazy multi-profile test Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * steps Signed-off-by: Jess Frazelle <github@jessfraz.com> * fix artifact graph Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * cleanup Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates ; Signed-off-by: Jess Frazelle <github@jessfraz.com> * more artifact grph Signed-off-by: Jess Frazelle <github@jessfraz.com> * turn back on playwright Signed-off-by: Jess Frazelle <github@jessfraz.com> * fmt Signed-off-by: Jess Frazelle <github@jessfraz.com> * playwright fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> * playwright fixes Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com>
108 lines
727 KiB
Markdown
108 lines
727 KiB
Markdown
---
|
|
title: "helix"
|
|
excerpt: "Create a helix."
|
|
layout: manual
|
|
---
|
|
|
|
Create a helix.
|
|
|
|
|
|
|
|
```js
|
|
helix(
|
|
revolutions: number,
|
|
angleStart: number,
|
|
ccw?: bool,
|
|
radius: number,
|
|
axis: Axis3dOrEdgeReference,
|
|
length?: number,
|
|
): HelixValue
|
|
```
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `revolutions` | [`number`](/docs/kcl/types/number) | Number of revolutions. | Yes |
|
|
| `angleStart` | [`number`](/docs/kcl/types/number) | Start angle (in degrees). | Yes |
|
|
| `ccw` | [`bool`](/docs/kcl/types/bool) | Is the helix rotation counter clockwise? The default is `false`. | No |
|
|
| `radius` | [`number`](/docs/kcl/types/number) | Radius of the helix. | Yes |
|
|
| `axis` | [`Axis3dOrEdgeReference`](/docs/kcl/types/Axis3dOrEdgeReference) | Axis to use for the helix. | Yes |
|
|
| `length` | [`number`](/docs/kcl/types/number) | 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 |
|
|
|
|
### Returns
|
|
|
|
[`HelixValue`](/docs/kcl/types/HelixValue) - A helix.
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
// Create a helix around the Z axis.
|
|
helixPath = helix(
|
|
angleStart = 0,
|
|
ccw = true,
|
|
revolutions = 5,
|
|
length = 10,
|
|
radius = 5,
|
|
axis = 'Z',
|
|
)
|
|
|
|
// Create a spring by sweeping around the helix path.
|
|
springSketch = startSketchOn('YZ')
|
|
|> circle(center = [0, 0], radius = 0.5)
|
|
|> sweep(path = helixPath)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
// Create a helix around an edge.
|
|
helper001 = startSketchOn('XZ')
|
|
|> startProfileAt([0, 0], %)
|
|
|> line(end = [0, 10], tag = $edge001)
|
|
|
|
helixPath = helix(
|
|
angleStart = 0,
|
|
ccw = true,
|
|
revolutions = 5,
|
|
length = 10,
|
|
radius = 5,
|
|
axis = edge001,
|
|
)
|
|
|
|
// Create a spring by sweeping around the helix path.
|
|
springSketch = startSketchOn('XY')
|
|
|> circle(center = [0, 0], radius = 0.5)
|
|
|> sweep(path = helixPath)
|
|
```
|
|
|
|

|
|
|
|
```js
|
|
// Create a helix around a custom axis.
|
|
helixPath = helix(
|
|
angleStart = 0,
|
|
ccw = true,
|
|
revolutions = 5,
|
|
length = 10,
|
|
radius = 5,
|
|
axis = {
|
|
custom = {
|
|
axis = [0, 0, 1.0],
|
|
origin = [0, 0.25, 0]
|
|
}
|
|
},
|
|
)
|
|
|
|
// Create a spring by sweeping around the helix path.
|
|
springSketch = startSketchOn('XY')
|
|
|> circle(center = [0, 0], radius = 1)
|
|
|> sweep(path = helixPath)
|
|
```
|
|
|
|

|
|
|
|
|