Josh Gomez requests pattern calculations take the total number of instances, not the number of extra repetitions to do. This is how we designed the patternTransform API, but we didn't do that for patternLinear/Circular.
47 lines
135 KiB
Markdown
47 lines
135 KiB
Markdown
---
|
|
title: "patternCircular3d"
|
|
excerpt: "Repeat a 3-dimensional solid some number of times along a partial or"
|
|
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 orentation of the solid with respect to the center of the circle is maintained.
|
|
|
|
```js
|
|
patternCircular3d(data: CircularPattern3dData, solid_set: SolidSet) -> [Solid]
|
|
```
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `data` | [`CircularPattern3dData`](/docs/kcl/types/CircularPattern3dData) | Data for a circular pattern on a 3D model. | Yes |
|
|
| `solid_set` | [`SolidSet`](/docs/kcl/types/SolidSet) | A solid or a group of solids. | Yes |
|
|
|
|
### Returns
|
|
|
|
[`[Solid]`](/docs/kcl/types/Solid)
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
exampleSketch = startSketchOn('XZ')
|
|
|> circle({ center: [0, 0], radius: 1 }, %)
|
|
|
|
example = extrude(-5, exampleSketch)
|
|
|> patternCircular3d({
|
|
axis: [1, -1, 0],
|
|
center: [10, -20, 0],
|
|
instances: 11,
|
|
arcDegrees: 360,
|
|
rotateDuplicates: true
|
|
}, %)
|
|
```
|
|
|
|

|
|
|
|
|