* Replace tag type with tagIdent and tagDecl Signed-off-by: Nick Cameron <nrc@ncameron.org> * Replace tagIdent with TaggedEdge and TaggedFace Signed-off-by: Nick Cameron <nrc@ncameron.org> --------- Signed-off-by: Nick Cameron <nrc@ncameron.org>
54 lines
112 KiB
Markdown
54 lines
112 KiB
Markdown
---
|
|
title: "extrudeTwist"
|
|
subtitle: "Function in std::sketch"
|
|
excerpt: "Works just like the `extrude` command, but also twists the sketch around some center point while it's extruding."
|
|
layout: manual
|
|
---
|
|
|
|
Works just like the `extrude` command, but also twists the sketch around some center point while it's extruding.
|
|
|
|
```kcl
|
|
extrudeTwist(
|
|
@sketches: [Sketch; 1+],
|
|
angle: number(Angle),
|
|
length: number(Length),
|
|
angleStep?: number(Angle),
|
|
tagStart?: tag,
|
|
tagEnd?: tag,
|
|
center?: Point2d,
|
|
): [Solid; 1+]
|
|
```
|
|
|
|
You can provide more than one sketch to extrude, and they will all be
|
|
extruded in the same direction with the same twist.
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `sketches` | [`[Sketch; 1+]`](/docs/kcl-std/types/std-types-Sketch) | Which sketch or sketches should be extruded. | Yes |
|
|
| `angle` | [`number(Angle)`](/docs/kcl-std/types/std-types-number) | The total angle that the sketch will be twisted around | Yes |
|
|
| `length` | [`number(Length)`](/docs/kcl-std/types/std-types-number) | How far to extrude the given sketches. | Yes |
|
|
| `angleStep` | [`number(Angle)`](/docs/kcl-std/types/std-types-number) | The size of each intermediate angle as the sketch twists around. Must be between 4 and 90 degrees. Defaults to 15 degrees. | No |
|
|
| `tagStart` | `tag` | A named tag for the face at the start of the extrusion, i.e. the original sketch. | No |
|
|
| `tagEnd` | `tag` | A named tag for the face at the end of the extrusion, i.e. the new face created by extruding the original sketch. | No |
|
|
| `center` | [`Point2d`](/docs/kcl-std/types/std-types-Point2d) | The center around which the sketch will be twisted. Relative to the sketch's center. If not given, defaults to 0,0 i.e. the sketch's center. | No |
|
|
|
|
### Returns
|
|
|
|
[`[Solid; 1+]`](/docs/kcl-std/types/std-types-Solid)
|
|
|
|
|
|
### Examples
|
|
|
|
```kcl
|
|
example = startSketchOn(XZ)
|
|
|> polygon(radius = 10, numSides = 3, center = [0, 0])
|
|
|> extrudeTwist(length = 10, angle = 120deg)
|
|
|
|
```
|
|
|
|

|
|
|
|
|