2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: bartackAlong
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-02-20 14:35:50 +01:00
|
|
|
The `bartackAlong` macro allows you to add a _bartack_ marker to your sewing pattern.
|
2021-08-25 16:09:31 +02:00
|
|
|
More specifically, a bartack along a path.
|
|
|
|
It is provided by the [bartack plugin](/reference/plugins/bartack/).
|
|
|
|
|
2022-09-30 01:45:37 +02:00
|
|
|
## Signature
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
```js
|
2022-09-30 01:45:37 +02:00
|
|
|
macro('banner', {
|
|
|
|
Number angle=0,
|
|
|
|
Number density=3,
|
|
|
|
Number length=15,
|
|
|
|
Path path,
|
|
|
|
String prefix='',
|
|
|
|
String suffix='',
|
|
|
|
Number width=3,
|
2021-08-25 16:09:31 +02:00
|
|
|
})
|
2022-09-30 01:45:37 +02:00
|
|
|
```
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-30 01:45:37 +02:00
|
|
|
## Example
|
|
|
|
|
|
|
|
<Example caption="Example of the bartackAlong macro">
|
|
|
|
```js
|
|
|
|
({ Point, Path, macro, part }) => {
|
|
|
|
|
|
|
|
macro('bartackAlong', {
|
|
|
|
path: new Path()
|
|
|
|
.move(new Point(15,15))
|
|
|
|
.curve(
|
|
|
|
new Point(20, 20),
|
|
|
|
new Point(30, 20),
|
|
|
|
new Point(35, 15),
|
|
|
|
)
|
|
|
|
})
|
|
|
|
|
|
|
|
return part
|
|
|
|
}
|
2021-08-25 16:09:31 +02:00
|
|
|
```
|
2022-09-30 01:45:37 +02:00
|
|
|
</Example>
|
|
|
|
|
|
|
|
## Configuration
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
| Property | Default | Type | Description |
|
2021-08-25 16:09:31 +02:00
|
|
|
|-------------:|------------|------------|-------------|
|
|
|
|
| `angle` | `0` | `number` | The angle under which to draw the bartack |
|
|
|
|
| `density` | `3` | `number` | Controls how close the stitches are togeter |
|
|
|
|
| `length` | `15` | `number` | Length of the bartack |
|
|
|
|
| `path` | | `Path` | The path the bartack should follow |
|
|
|
|
| `prefix` | | `string` | A prefix to apply to the names of the generated path and points |
|
|
|
|
| `suffix` | | `string` | A suffix to apply to the names of the generated path and points |
|
|
|
|
| `width` | `3` | `number` | Width of the bartack |
|