45 lines
63 KiB
Markdown
45 lines
63 KiB
Markdown
---
|
|
title: "patternLinear2d"
|
|
excerpt: "Repeat a 2-dimensional sketch along some dimension, with a dynamic amount"
|
|
layout: manual
|
|
---
|
|
|
|
Repeat a 2-dimensional sketch along some dimension, with a dynamic amount
|
|
|
|
of distance between each repetition, some specified number of times.
|
|
|
|
```js
|
|
patternLinear2d(data: LinearPattern2dData, sketch_set: SketchSet) -> [Sketch]
|
|
```
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `data` | [`LinearPattern2dData`](/docs/kcl/types/LinearPattern2dData) | Data for a linear pattern on a 2D sketch. | Yes |
|
|
| `sketch_set` | [`SketchSet`](/docs/kcl/types/SketchSet) | A sketch or a group of sketches. | Yes |
|
|
|
|
### Returns
|
|
|
|
[`[Sketch]`](/docs/kcl/types/Sketch)
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
exampleSketch = startSketchOn('XZ')
|
|
|> circle({ center = [0, 0], radius = 1 }, %)
|
|
|> patternLinear2d({
|
|
axis = [1, 0],
|
|
instances = 7,
|
|
distance = 4
|
|
}, %)
|
|
|
|
example = extrude(1, exampleSketch)
|
|
```
|
|
|
|

|
|
|
|
|