Make the function signature less prominent, add an early example to docs

Signed-off-by: Nick Cameron <nrc@ncameron.org>
This commit is contained in:
Nick Cameron
2025-06-19 17:08:46 +12:00
parent 6358eed7e4
commit ff1be99351
99 changed files with 2137 additions and 686 deletions

View File

@ -8,17 +8,17 @@ layout: manual
Repeat a 2-dimensional sketch along some dimension, with a dynamic amount of distance between each repetition, some specified number of times.
```kcl
patternLinear2d(
@sketches: [Sketch; 1+],
instances: number(_),
distance: number(Length),
axis: Axis2d | Point2d,
useOriginal?: bool,
): [Sketch; 1+]
// / Pattern using a named axis.
exampleSketch = startSketchOn(XZ)
|> circle(center = [0, 0], radius = 1)
|> patternLinear2d(axis = X, instances = 7, distance = 4)
example = extrude(exampleSketch, length = 1)
```
### Arguments
| Name | Type | Description | Required |
@ -34,6 +34,18 @@ patternLinear2d(
[`[Sketch; 1+]`](/docs/kcl-std/types/std-types-Sketch)
### Function signature
```kcl
patternLinear2d(
@sketches: [Sketch; 1+],
instances: number(_),
distance: number(Length),
axis: Axis2d | Point2d,
useOriginal?: bool,
): [Sketch; 1+]
```
### Examples
```kcl