* updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * start of types docs Signed-off-by: Jess Frazelle <github@jessfraz.com> * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * add types files Signed-off-by: Jess Frazelle <github@jessfraz.com> * add links Signed-off-by: Jess Frazelle <github@jessfraz.com> * better 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> * uodates 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> * A snapshot a day keeps the bugs away! 📷🐛 (OS: ubuntu-latest) * updates Signed-off-by: Jess Frazelle <github@jessfraz.com> --------- Signed-off-by: Jess Frazelle <github@jessfraz.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
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_group_set: SketchGroupSet) -> [SketchGroup]
|
|
```
|
|
|
|
|
|
### Arguments
|
|
|
|
| Name | Type | Description | Required |
|
|
|----------|------|-------------|----------|
|
|
| `data` | [`LinearPattern2dData`](kcl/types/LinearPattern2dData) | Data for a linear pattern on a 2D sketch. | Yes |
|
|
| `sketch_group_set` | [`SketchGroupSet`](kcl/types/SketchGroupSet) | A sketch group or a group of sketch groups. | Yes |
|
|
|
|
### Returns
|
|
|
|
[`[SketchGroup]`](kcl/types/[SketchGroup])
|
|
|
|
|
|
### Examples
|
|
|
|
```js
|
|
const exampleSketch = startSketchOn('XZ')
|
|
|> circle({ center: [0, 0], radius: 1 }, %)
|
|
|> patternLinear2d({
|
|
axis: [1, 0],
|
|
repetitions: 6,
|
|
distance: 4
|
|
}, %)
|
|
|
|
const example = extrude(1, exampleSketch)
|
|
```
|
|
|
|

|
|
|
|
|