1
0
Fork 0

feat: Flat import of markdown repo

This is a flat (without history) import of (some of) the content
from our markdown module.

We've imported this without history because the repo contains our
blog posts and showcases posts content prior to porting them to strapi.

Since this contains many images, it would balloon the size of this repo
to import the full history.

Instead, please refer to the history of the (archived) markdown repo
at: https://github.com/freesewing/markdown
This commit is contained in:
Joost De Cock 2021-08-25 16:09:31 +02:00
parent 1671a896b5
commit b34a2ee2ed
6132 changed files with 244167 additions and 0 deletions

View file

@ -0,0 +1,28 @@
---
title: bartack
---
The `bartack` macro allows you to add a *bartack* marker to your sewing pattern.
It is provided by the [bartack plugin](/reference/plugins/bartack/).
<Example part="plugin_bartack" caption="Example of the bartack macro" />
```js
points.a = new Point(15, 15)
macro('bartack', {
anchor: points.a,
angle: 30,
length: 15
})
```
| Property | Default | Type | Description |
|-------------:|------------|------------|-------------|
| `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 |
| `nameFormat` | | `function` | A method that receives the name of the path or point and should return the name for the cloned path and or point |
| `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 |

View file

@ -0,0 +1,44 @@
---
title: bartackAlong
---
The `bartackAlong` macro allows you to add a *bartack* marker to your sewing pattern.
More specifically, a bartack along a path.
It is provided by the [bartack plugin](/reference/plugins/bartack/).
<Example part="plugin_bartackalong" caption="Example of the bartackAlong macro" />
```js
points.a = new Point(15, 15)
points.b = new Point(20, 20)
points.c = new Point(30, 20)
points.d = new Point(35, 15)
points.e = new Point(20, 10)
points.f = new Point(30, 10)
paths.a = new Path()
.move(points.a)
.curve(points.b, points.c, points.d)
.setRender(false)
macro('bartackAlong', {
path: paths.a
})
macro('sprinkle', {
snippet: 'notch',
on: ['e', 'f']
})
```
| Property | Default | Type | Description |
|-------------:|------------|------------|-------------|
| `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 |
| `nameFormat` | | `function` | A method that receives the name of the path or point and should return the name for the cloned path and or point |
| `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 |

View file

@ -0,0 +1,48 @@
---
title: bartackFractionAlong
---
The `bartackFractionAlong` macro allows you to add a *bartack* marker to your sewing pattern.
More specifically, a bartack along a fraction of a path.
It is provided by the [bartack plugin](/reference/plugins/bartack/).
<Example part="plugin_bartackfractionalong" caption="Example of the bartackFractionAlong macro" />
```js
points.a = new Point(15, 15)
points.b = new Point(20, 20)
points.c = new Point(30, 20)
points.d = new Point(35, 15)
points.e = new Point(20, 10)
points.f = new Point(30, 10)
paths.a = new Path()
.move(points.a)
.curve(points.b, points.c, points.d)
.setRender(false)
macro('bartackAlong', {
path: paths.a,
start: 0.2,
end: 0.8
})
macro('sprinkle', {
snippet: 'notch',
on: ['e', 'f']
})
```
| Property | Default | Type | Description |
|-------------:|------------|------------|-------------|
| `angle` | `0` | `number` | The angle under which to draw the bartack |
| `density` | `3` | `number` | Controls how close the stitches are togeter |
| `end` | `1` | `number` | At which fraction of the path length (from `0` to `1`) should the bartack end |
| `length` | `15` | `number` | Length of the bartack |
| `nameFormat` | | `function` | A method that receives the name of the path or point and should return the name for the cloned path and or point |
| `path` | | `Path` | The path the bartack should follow |
| `prefix` | | `string` | A prefix to apply to the names of the generated path and points |
| `start` | `0` | `number` | At which fraction of the path length (from `0` to `1`) should the bartack start |
| `suffix` | | `string` | A suffix to apply to the names of the generated path and points |
| `width` | `3` | `number` | Width of the bartack |

View file

@ -0,0 +1,22 @@
---
title: cutonfold
---
Adds a *cut on fold* indicator to your pattern.
| Property | Default | Type | Description |
| ----------- | ------- | ----------------------------- | ------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the *cut on fold* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *cut on fold* indicator |
| `margin` | 5 | [Point](/reference/api/point) | The distance in % to keep from the start/end edge |
| `offset` | 50 | Number | The distance in mm to offset from the line from start to end |
| `grainline` | `false` | Boolean | Whether this cutonfold indicator is also the grainline |
<Note>
The `cutonfold` macro is provided by the [cutonfold plugin](/reference/plugins/cutonfold).
</Note>

View file

@ -0,0 +1,27 @@
---
title: cutonfold
---
The `cutonfold` macro adds a *cut on fold* indicator to your pattern.
It is provided by the [cutonfold plugin](/reference/plugins/cutonfold).
<Example part="plugin_cutonfold" caption="Example of the cut on fold indicator added by this macro" />
```js
macro('cutonfold', {
from: points.cofLeft,
to: points.cofRight,
grainline: true
}
```
| Property | Default | Type | Description |
|------------:|---------|---------------------|-------------|
| `from` | | [Point](/reference/api/point) | The startpoint of the *cut on fold* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *cut on fold* indicator |
| `margin` | 5 | [Point](/reference/api/point) | The distance in % to keep from the start/end edge |
| `offset` | 50 | Number | The distance in mm to offset from the line from start to end |
| `grainline` | `false` | Boolean | Whether this cutonfold indicator is also the grainline |

View file

@ -0,0 +1,22 @@
---
title: cutonfold
---
Adds a *cut on fold* indicator to your pattern.
| Property | Default | Type | Description |
| ----------- | ------- | ----------------------------- | ------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the *cut on fold* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *cut on fold* indicator |
| `margin` | 5 | [Point](/reference/api/point) | The distance in % to keep from the start/end edge |
| `offset` | 50 | Number | The distance in mm to offset from the line from start to end |
| `grainline` | `false` | Boolean | Whether this cutonfold indicator is also the grainline |
<Note>
The `cutonfold` macro is provided by the [cutonfold plugin](/reference/plugins/cutonfold).
</Note>

View file

@ -0,0 +1,22 @@
---
title: cutonfold
---
Adds a *cut on fold* indicator to your pattern.
| Propriété | Défaut | Type | Description |
| ----------- | ------- | ----------------------------- | --------------------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint of the *cut on fold* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *cut on fold* indicator |
| `margin` | 5 | [Point](/reference/api/point) | La distance en % à garder à partir du bord de départ/fin |
| `offset` | 50 | Nombre | La distance en mm de décalage par rapport à la ligne du début à la fin |
| `grainline` | `false` | Booléen | Si cet indicateur de découpage correspond également à la ligne de droit-fil |
<Note>
The `cutonfold` macro is provided by the [cutonfold plugin](/reference/plugins/cutonfold).
</Note>

View file

@ -0,0 +1,22 @@
---
title: cutonfold
---
Adds a *cut on fold* indicator to your pattern.
| Property | Default | Type | Description |
| ----------- | ------- | ----------------------------- | ------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the *cut on fold* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *cut on fold* indicator |
| `margin` | 5 | [Point](/reference/api/point) | The distance in % to keep from the start/end edge |
| `offset` | 50 | Number | The distance in mm to offset from the line from start to end |
| `grainline` | `false` | Boolean | Whether this cutonfold indicator is also the grainline |
<Note>
The `cutonfold` macro is provided by the [cutonfold plugin](/reference/plugins/cutonfold).
</Note>

View file

@ -0,0 +1,14 @@
---
title: Macros
---
<Note>All macros take a single object as their configuration. </Note>
<Tip>
For more info on a specific macro and examples, follow the link to the plugin that provides the macro.
</Tip>
<ReadMore root='reference/macros' title="List of macros" />

View file

@ -0,0 +1,22 @@
---
title: Macros
for: developers
about: Complete list of all available macros and how to use them
---
Macros are a way to combine different operations into a single command,
and are typically provided by plugins.
Below is a list of available macros:
<ReadMore list />
<Note>All macros take a single object as their configuration. </Note>
<Tip>
For more info on a specific macro and examples, follow the link to the plugin that provides the macro.
</Tip>

View file

@ -0,0 +1,14 @@
---
title: Macros
---
<Note>All macros take a single object as their configuration. </Note>
<Tip>
For more info on a specific macro and examples, follow the link to the plugin that provides the macro.
</Tip>
<ReadMore root='reference/macros' title="List of macros" />

View file

@ -0,0 +1,20 @@
---
title: flip
---
The `flip` macro flips (mirrors) an entire part vertically around the Y-axis. It takes no arguments.
Under the hood, this macro will:
- Go through all Points in your Part, and multiply their X-coordinate by -1
- Go through all the Paths in your Part, and for each drawing operation will multiply the X-coordinare by -1
- Go through all the Snippets in your Part and multiply the X-coordinate of the anchor point by -1
<Note>
The `flip` macro is provided by the [flip plugin](/reference/plugins/flip).
</Note>

View file

@ -0,0 +1,18 @@
---
title: flip
---
The `flip` macro flips (mirrors) an entire part vertically around the Y-axis.
It takes no arguments, and is provided by the [flip plugin](/reference/plugins/flip).
```js
macro("flip")
```
Under the hood, this macro will:
- Go through all Points in your Part, and multiply their X-coordinate by -1
- Go through all the Paths in your Part, and for each drawing operation will multiply the X-coordinare by -1
- Go through all the Snippets in your Part and multiply the X-coordinate of the anchor point by -1

View file

@ -0,0 +1,20 @@
---
title: flip
---
The `flip` macro flips (mirrors) an entire part vertically around the Y-axis. It takes no arguments.
Under the hood, this macro will:
- Go through all Points in your Part, and multiply their X-coordinate by -1
- Go through all the Paths in your Part, and for each drawing operation will multiply the X-coordinare by -1
- Go through all the Snippets in your Part and multiply the X-coordinate of the anchor point by -1
<Note>
The `flip` macro is provided by the [flip plugin](/reference/plugins/flip).
</Note>

View file

@ -0,0 +1,20 @@
---
title: flip
---
The `flip` macro flips (mirrors) an entire part vertically around the Y-axis. It takes no arguments.
Under the hood, this macro will:
- Go through all Points in your Part, and multiply their X-coordinate by -1
- Go through all the Paths in your Part, and for each drawing operation will multiply the X-coordinare by -1
- Go through all the Snippets in your Part and multiply the X-coordinate of the anchor point by -1
<Note>
The `flip` macro is provided by the [flip plugin](/reference/plugins/flip).
</Note>

View file

@ -0,0 +1,20 @@
---
title: flip
---
The `flip` macro flips (mirrors) an entire part vertically around the Y-axis. It takes no arguments.
Under the hood, this macro will:
- Go through all Points in your Part, and multiply their X-coordinate by -1
- Go through all the Paths in your Part, and for each drawing operation will multiply the X-coordinare by -1
- Go through all the Snippets in your Part and multiply the X-coordinate of the anchor point by -1
<Note>
The `flip` macro is provided by the [flip plugin](/reference/plugins/flip).
</Note>

View file

@ -0,0 +1,14 @@
---
title: Macros
---
<Note>All macros take a single object as their configuration. </Note>
<Tip>
Pour plus d'informations sur une macro spécifique et des exemples, suivez le lien vers le plugin qui fournit la macro.
</Tip>
<ReadMore root='reference/macros' title="List of macros" />

View file

@ -0,0 +1,19 @@
---
title: grainline
---
Adds a *grainline* indicator to your pattern.
| Property | Default | Type | Description |
| -------- | ------- | ----------------------------- | ------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint of the *grainline* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *grainline* indicator |
<Note>
The `grainline` macro is provided by the [grainline plugin](/reference/plugins/grainline).
</Note>

View file

@ -0,0 +1,21 @@
---
title: grainline
---
The `grainline` macro adds a *grainline* indicator to your pattern.
It is provided by the [grainline plugin](/reference/plugins/grainline/).
<Example part="plugin_grainline" caption="Example of the grainline indicator added by this macro" />
```js
macro("grainline", {
from: points.grainlineFrom,
to: points.grainlineTo,
}
```
| Property | Default | Type | Description |
|------------:|---------|---------------------|-------------|
| `from` | | [Point](/reference/api/point) | The startpoint of the *grainline* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *grainline* indicator |

View file

@ -0,0 +1,19 @@
---
title: grainline
---
Adds a *grainline* indicator to your pattern.
| Property | Default | Type | Description |
| -------- | ------- | ----------------------------- | ------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint of the *grainline* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *grainline* indicator |
<Note>
The `grainline` macro is provided by the [grainline plugin](/reference/plugins/grainline).
</Note>

View file

@ -0,0 +1,19 @@
---
title: grainline
---
Adds a *grainline* indicator to your pattern.
| Propriété | Défaut | Type | Description |
| --------- | ------ | ----------------------------- | ------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint of the *grainline* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *grainline* indicator |
<Note>
The `grainline` macro is provided by the [grainline plugin](/reference/plugins/grainline).
</Note>

View file

@ -0,0 +1,19 @@
---
title: grainline
---
Adds a *grainline* indicator to your pattern.
| Property | Default | Type | Description |
| -------- | ------- | ----------------------------- | ------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint of the *grainline* indicator |
| `to` | | [Point](/reference/api/point) | The endpoint of the *grainline* indicator |
<Note>
The `grainline` macro is provided by the [grainline plugin](/reference/plugins/grainline).
</Note>

View file

@ -0,0 +1,23 @@
---
title: hd
---
Adds a *horizontal dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | ------------------- | ----------------------------- | ---------------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `y` | | Number | The Y-value at which to draw the dimension |
| `text` | Horizontal distance | Number | The text to go on the dimension if not the from-to horizontal distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `hd` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,39 @@
---
title: hd
---
The `hd` macro adds a *horizontal dimension* to your pattern.
It is provided by the [dimension plugin](/reference/plugins/dimension/).
<Example
part="point_dx"
caption="An example of a horizontal dimension"
/>
```js
macro('hd', {
from: points.from,
to: points.to,
y: 25
})
```
| Property | Default | Type | Description |
|----------------:|----------|---------------------|-------------|
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `y` | | Number | The Y-value at which to draw the dimension |
| `id` | auto-assigned | String | A custom ID under wich paths and points will be created |
| `text` | Horizontal distance | Number | The text to go on the dimension if not the from-to horizontal distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
Setting a custom ID will:
- Allow removal of the dimension with [the `rmd` macro](/reference/macros/rmd)
- Prevent removal of the dimension with [the `rmad` macro](/reference/macros/rmad/)
</Note>

View file

@ -0,0 +1,23 @@
---
title: hd
---
Adds a *horizontal dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | ------------------- | ----------------------------- | ---------------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `y` | | Number | The Y-value at which to draw the dimension |
| `text` | Horizontal distance | Number | The text to go on the dimension if not the from-to horizontal distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `hd` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,23 @@
---
title: hd
---
Adds a *horizontal dimension* to your pattern.
| Propriété | Défaut | Type | Description |
| --------------- | -------------------- | ----------------------------- | ------------------------------------------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | Le point de départ de la dimension |
| `to` | | [Point](/reference/api/point) | Le point final de la dimension |
| `y` | | Nombre | La valeur en Y où dessiner la dimension |
| `text` | Distance horizontale | Nombre | Le texte à indiquer sur une dimension s'il ne s'agit pas de la de la distance horizontale from-to |
| `noStartMarker` | `false` | Booléen | Ne pas dessiner un marqueur de début |
| `noEndMarker` | `false` | Booléen | Ne pas dessiner un marqueur de fin |
<Note>
The `hd` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,23 @@
---
title: hd
---
Adds a *horizontal dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | ------------------- | ----------------------------- | ---------------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `y` | | Number | The Y-value at which to draw the dimension |
| `text` | Horizontal distance | Number | The text to go on the dimension if not the from-to horizontal distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `hd` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,23 @@
---
title: ld
---
Adds a *linear dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | --------------- | ----------------------------- | ------------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `d` | 0 | Number | The offset at which to draw the dimension |
| `text` | Linear distance | Number | The text to go on the dimension if not the from-to linear distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `ld` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,40 @@
---
title: ld
---
The `ld` macro adds a *linear dimension* to your pattern.
It is provided by the [dimension plugin](/reference/plugins/dimension/).
<Example
part="point_dist"
caption="An example of a linear dimension"
/>
```js
macro('ld', {
from: points.from,
to: points.to,
d: 0
})
```
| Property | Default | Type | Description |
|-----------------|---------|---------------------|-------------|
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `d` | 0 | Number | The offset at which to draw the dimension |
| `id` | auto-assigned | String | A custom ID under wich paths and points will be created |
| `text` | Linear distance | Number | The text to go on the dimension if not the from-to linear distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
Setting a custom ID will:
- Allow removal of the dimension with [the `rmd` macro](/reference/macros/rmd)
- Prevent removal of the dimension with [the `rmad` macro](/reference/macros/rmad/)
</Note>

View file

@ -0,0 +1,23 @@
---
title: ld
---
Adds a *linear dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | --------------- | ----------------------------- | ------------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `d` | 0 | Number | The offset at which to draw the dimension |
| `text` | Linear distance | Number | The text to go on the dimension if not the from-to linear distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `ld` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,23 @@
---
title: ld
---
Adds a *linear dimension* to your pattern.
| Propriété | Défaut | Type | Description |
| --------------- | ----------------- | ----------------------------- | ------------------------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | Le point de départ de la dimension |
| `to` | | [Point](/reference/api/point) | Le point final de la dimension |
| `d` | 0 | Nombre | Le décalage avec lequel dessiner la dimension |
| `text` | Distance linéaire | Nombre | Le texte à accoler à la dimension si ce n'est pas la distance linéaire from-to |
| `noStartMarker` | `false` | Booléen | Ne pas dessiner un marqueur de début |
| `noEndMarker` | `false` | Booléen | Ne pas dessiner un marqueur de fin |
<Note>
The `ld` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,23 @@
---
title: ld
---
Adds a *linear dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | --------------- | ----------------------------- | ------------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `d` | 0 | Number | The offset at which to draw the dimension |
| `text` | Linear distance | Number | The text to go on the dimension if not the from-to linear distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `ld` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,24 @@
---
title: scalebox
---
Adds a *scale box* to your pattern.
| Property | Default | Type | Description |
| -------- | ------------------------ | ----------------------------- | -------------------------------------- |
| `at` | | [Point](/reference/api/point) | The point to anchor the *scale box* on |
| `lead` | FreeSewing | String | The lead text above the title |
| `title` | *pattern name + version* | String | The title text |
| `text` | (\*) | String | The text below the title |
| `rotate` | 0 | Number | Rotation in degrees |
(\*) `freesewingIsMadeByJoostDeCockAndContributors \n withTheFinancialSupportOfOurPatrons`
<Note>
The `round` macro is provided by the [round plugin](/reference/plugins/round).
</Note>

View file

@ -0,0 +1,24 @@
---
title: miniscale
---
The `miniscale` macro adds a mini *scale box* to your pattern. This box allows
users to verify their pattern is printed to scale.
The `miniscale` macro is provided by the [scalebox plugin](/reference/plugins/scalebox).
It is the mini version of [the scalebox macro](/reference/macros/scalebox/).
<Example part="plugin_scalebox" caption="Example of a scalebox (left) and miniscale (right)" />
```js
macro('miniscale', {
at: points.anchor
})
```
| Property | Default | Type | Description |
|-------------|---------|---------------------|-------------|
| `at` | | [Point](/reference/api/point) | The point to anchor the *scale box* on |
| `rotate` | 0 | Number | Rotation in degrees |

View file

@ -0,0 +1,24 @@
---
title: scalebox
---
Adds a *scale box* to your pattern.
| Property | Default | Type | Description |
| -------- | ------------------------ | ----------------------------- | -------------------------------------- |
| `at` | | [Point](/reference/api/point) | The point to anchor the *scale box* on |
| `lead` | FreeSewing | String | The lead text above the title |
| `title` | *pattern name + version* | String | The title text |
| `text` | (\*) | String | The text below the title |
| `rotate` | 0 | Number | Rotation in degrees |
(\*) `freesewingIsMadeByJoostDeCockAndContributors \n withTheFinancialSupportOfOurPatrons`
<Note>
The `round` macro is provided by the [round plugin](/reference/plugins/round).
</Note>

View file

@ -0,0 +1,24 @@
---
title: scalebox
---
Adds a *scale box* to your pattern.
| Propriété | Défaut | Type | Description |
| --------- | -------------------------- | ----------------------------- | -------------------------------------- |
| `at` | | [Point](/reference/api/point) | The point to anchor the *scale box* on |
| `lead` | FreeSewing | Chaîne de caractères | Le texte au dessus du titre |
| `title` | *nom du patron et version* | Chaîne de caractères | Le texte du titre |
| `text` | (\*) | Chaîne de caractères | Le texte en dessous du titre |
| `rotate` | 0 | Nombre | Rotation en degrés |
(\*) `freesewingEstCrééParJoostDeCockEtContributeurs \n avecLeSoutienFinancierDeNosMécènes`
<Note>
The `round` macro is provided by the [round plugin](/reference/plugins/round).
</Note>

View file

@ -0,0 +1,24 @@
---
title: scalebox
---
Adds a *scale box* to your pattern.
| Property | Default | Type | Description |
| -------- | ------------------------ | ----------------------------- | -------------------------------------- |
| `at` | | [Point](/reference/api/point) | The point to anchor the *scale box* on |
| `lead` | FreeSewing | String | The lead text above the title |
| `title` | *pattern name + version* | String | The title text |
| `text` | (\*) | String | The text below the title |
| `rotate` | 0 | Number | Rotation in degrees |
(\*) `freesewingIsMadeByJoostDeCockAndContributors \n withTheFinancialSupportOfOurPatrons`
<Note>
The `round` macro is provided by the [round plugin](/reference/plugins/round).
</Note>

View file

@ -0,0 +1,42 @@
---
title: mirror
---
The `mirror` macro allows you to mirror points and/or paths around a mirror line.
It is provided by the [mirror plugin](/reference/plugins/mirror/).
<Example part="plugin_mirror" caption="Example of the mirror plugin" />
```js
points.a = new Point(5,5)
points.b = new Point(45,30)
points.c = new Point(5,30)
points.d = new Point(45,5)
points.mid = new Point(25,15)
paths.a = new Path()
.move(points.a)
.curve(points.b, points.c, points.d)
macro('mirror', {
mirror: [points.b, points.d],
points: [points.mid],
paths: [paths.a]
})
macro('sprinkle', {
snippet: 'notch',
on: ['mid', 'mirroredMid']
})
```
| Property | Default | Type | Description |
|-------------:|------------|------------|-------------|
| `mirror` | | `array` | Array with 2 [Point](/reference/api/point) objects that define the *mirror line* |
| `clone` | `true` | `bool` | Whether to clone mirrored points and or paths |
| `points` | | `array` | An array of [Point](/reference/api/point) objects |
| `paths` | | `array` | An array of [Path](/reference/api/path) objects |
| `prefix` | `mirrored` | `string` | A prefix to apply to the names of the clones points and or paths. Ignored if `nameFormat` is set |
| `nameFormat` | | `function` | A method that receives the name of the path or point and should return the name for the cloned path and or point |

View file

@ -0,0 +1,14 @@
---
title: Macros
---
<Note>All macros take a single object as their configuration. </Note>
<Tip>
For more info on a specific macro and examples, follow the link to the plugin that provides the macro.
</Tip>
<ReadMore root='reference/macros' title="List of macros" />

View file

@ -0,0 +1,22 @@
---
title: pd
---
Adds a *path dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | ----------- | --------------------------- | ------------------------------------------------------------- |
| `path` | | [Path](/reference/api/path) | The path to draw the dimension along |
| `offset` | 0 | Number | The offset at which to draw the dimension |
| `text` | Path length | Number | The text to go on the dimension if not the length of the path |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `pd` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,35 @@
---
title: pd
---
The `pd` macro adds a *path dimension* to your pattern, indicating the length of a path.
It is provided by the [dimension plugin](/reference/plugins/dimension/).
<Example part="path_length" caption="Example of a multiple path dimensions" />
```js
macro('pd', {
path: paths.example,
d: -20
})
```
| Property | Default | Type | Description |
|----------------:|---------|---------------------|-------------|
| `path` | | [Path](/reference/api/path) | The path to draw the dimension along |
| `offset` | 0 | Number | The offset at which to draw the dimension |
| `text` | Path length | Number | The text to go on the dimension if not the length of the path |
| `id` | auto-assigned | String | A custom ID under wich paths and points will be created |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
Setting a custom ID will:
- Allow removal of the dimension with [the `rmd` macro](/reference/macros/rmd)
- Prevent removal of the dimension with [the `rmad` macro](/reference/macros/rmad/)
</Note>

View file

@ -0,0 +1,22 @@
---
title: pd
---
Adds a *path dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | ----------- | --------------------------- | ------------------------------------------------------------- |
| `path` | | [Path](/reference/api/path) | The path to draw the dimension along |
| `offset` | 0 | Number | The offset at which to draw the dimension |
| `text` | Path length | Number | The text to go on the dimension if not the length of the path |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `pd` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,22 @@
---
title: pd
---
Adds a *path dimension* to your pattern.
| Propriété | Défaut | Type | Description |
| --------------- | ------------------ | ----------------------------- | ------------------------------------------------------------------ |
| `path` | | [Chemin](/reference/api/path) | Le chemin le long duquel dessiner la dimension |
| `offset` | 0 | Nombre | Le décalage avec lequel dessiner la dimension |
| `text` | Longueur du chemin | Nombre | Le texte à accoler au chemin si ce n'est pas la longueur du chemin |
| `noStartMarker` | `false` | Booléen | Ne pas dessiner un marqueur de début |
| `noEndMarker` | `false` | Booléen | Ne pas dessiner un marqueur de fin |
<Note>
The `pd` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,22 @@
---
title: pd
---
Adds a *path dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | ----------- | --------------------------- | ------------------------------------------------------------- |
| `path` | | [Path](/reference/api/path) | The path to draw the dimension along |
| `offset` | 0 | Number | The offset at which to draw the dimension |
| `text` | Path length | Number | The text to go on the dimension if not the length of the path |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `pd` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,23 @@
---
title: ld
---
Adds a *linear dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | --------------- | ----------------------------- | ------------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `d` | 0 | Number | The offset at which to draw the dimension |
| `text` | Linear distance | Number | The text to go on the dimension if not the from-to linear distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `ld` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,26 @@
---
title: rmad
---
The `rmad` macro removes all dimensions with the exception of those that were created with a custom ID.
It is provided by the [dimension plugin](/reference/plugins/dimension/).
To be able to use this plugin, you need to give your dimension an id:
```js
// This will be removed
macro('ld', {
from: points.from,
to: points.to,
d: 0,
})
// This will not removed
macro('ld', {
from: points.from,
to: points.to,
d: 0,
id: 'example' // custom ID
})
macro('rmad')
```

View file

@ -0,0 +1,23 @@
---
title: ld
---
Adds a *linear dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | --------------- | ----------------------------- | ------------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `d` | 0 | Number | The offset at which to draw the dimension |
| `text` | Linear distance | Number | The text to go on the dimension if not the from-to linear distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `ld` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,23 @@
---
title: ld
---
Adds a *linear dimension* to your pattern.
| Propriété | Défaut | Type | Description |
| --------------- | ----------------- | ----------------------------- | ------------------------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | Le point de départ de la dimension |
| `to` | | [Point](/reference/api/point) | Le point final de la dimension |
| `d` | 0 | Nombre | Le décalage avec lequel dessiner la dimension |
| `text` | Distance linéaire | Nombre | Le texte à accoler à la dimension si ce n'est pas la distance linéaire from-to |
| `noStartMarker` | `false` | Booléen | Ne pas dessiner un marqueur de début |
| `noEndMarker` | `false` | Booléen | Ne pas dessiner un marqueur de fin |
<Note>
The `ld` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,23 @@
---
title: ld
---
Adds a *linear dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | --------------- | ----------------------------- | ------------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `d` | 0 | Number | The offset at which to draw the dimension |
| `text` | Linear distance | Number | The text to go on the dimension if not the from-to linear distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `ld` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,23 @@
---
title: ld
---
Adds a *linear dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | --------------- | ----------------------------- | ------------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `d` | 0 | Number | The offset at which to draw the dimension |
| `text` | Linear distance | Number | The text to go on the dimension if not the from-to linear distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `ld` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,30 @@
---
title: rmd
---
The `rmd` macro removes a dimension.
It is provided by the [dimension plugin](/reference/plugins/dimension/).
To be able to use this plugin, you need to give your dimension an id:
```js
macro('ld', {
from: points.from,
to: points.to,
d: 0,
id: 'example'
})
```
Now you can remove it as such:
```js
macro('rmd', {
id: 'example'
})
```
| Property | Default | Type | Description |
|----------|---------|----------|-------------|
| `id` | | `string` | The id of the dimension to remove |

View file

@ -0,0 +1,23 @@
---
title: ld
---
Adds a *linear dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | --------------- | ----------------------------- | ------------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `d` | 0 | Number | The offset at which to draw the dimension |
| `text` | Linear distance | Number | The text to go on the dimension if not the from-to linear distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `ld` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,23 @@
---
title: ld
---
Adds a *linear dimension* to your pattern.
| Propriété | Défaut | Type | Description |
| --------------- | ----------------- | ----------------------------- | ------------------------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | Le point de départ de la dimension |
| `to` | | [Point](/reference/api/point) | Le point final de la dimension |
| `d` | 0 | Nombre | Le décalage avec lequel dessiner la dimension |
| `text` | Distance linéaire | Nombre | Le texte à accoler à la dimension si ce n'est pas la distance linéaire from-to |
| `noStartMarker` | `false` | Booléen | Ne pas dessiner un marqueur de début |
| `noEndMarker` | `false` | Booléen | Ne pas dessiner un marqueur de fin |
<Note>
The `ld` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,23 @@
---
title: ld
---
Adds a *linear dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | --------------- | ----------------------------- | ------------------------------------------------------------------ |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `d` | 0 | Number | The offset at which to draw the dimension |
| `text` | Linear distance | Number | The text to go on the dimension if not the from-to linear distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `ld` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,24 @@
---
title: round
---
Rounds a corner. Note that this is only intended for 90 degree corners.
| Property | Default | Type | Description |
| -------- | ------- | ----------------------------- | -------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint towards the corner to round |
| `to` | | [Point](/reference/api/point) | The endpoint away from the corner to round |
| `via` | | [Point](/reference/api/point) | The corner to round |
| `radius` | Maximum | Number | The radius in mm in not the maximum |
| `prefix` | | String | A prefix to give to the points and paths created by this macro |
| `render` | `false` | Boolean | Whether to render the path created by this macro |
| `class` | | String | Class(es) to assign to the path created by this macro |
<Note>
The `round` macro is provided by the [round plugin](/reference/plugins/round).
</Note>

View file

@ -0,0 +1,31 @@
---
title: round
---
The `round` macro rounds a corner. It is provided by the [round plugin](/reference/plugins/round/).
Note that this is only intended for 90 degree corners.
<Example part="plugin_round" caption="Example of corners rounded with the round plugin" />
```js
macro('round', {
from: points.bottomRight,
to: points.topLeft,
via: points.topRight,
radius: 20,
prefix: 'tr',
render: true
})
```
| Property | Default | Type | Description |
|------------:|---------|---------------------|-------------|
| `from` | | [Point](/reference/api/point) | The startpoint towards the corner to round |
| `to` | | [Point](/reference/api/point) | The endpoint away from the corner to round |
| `via` | | [Point](/reference/api/point) | The corner to round |
| `radius` | Maximum | Number | The radius in mm in not the maximum |
| `prefix` | | String | A prefix to give to the points and paths created by this macro |
| `render` | `false` | Boolean | Whether to render the path created by this macro |
| `class` | | String | Class(es) to assign to the path created by this macro |

View file

@ -0,0 +1,24 @@
---
title: round
---
Rounds a corner. Note that this is only intended for 90 degree corners.
| Property | Default | Type | Description |
| -------- | ------- | ----------------------------- | -------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint towards the corner to round |
| `to` | | [Point](/reference/api/point) | The endpoint away from the corner to round |
| `via` | | [Point](/reference/api/point) | The corner to round |
| `radius` | Maximum | Number | The radius in mm in not the maximum |
| `prefix` | | String | A prefix to give to the points and paths created by this macro |
| `render` | `false` | Boolean | Whether to render the path created by this macro |
| `class` | | String | Class(es) to assign to the path created by this macro |
<Note>
The `round` macro is provided by the [round plugin](/reference/plugins/round).
</Note>

View file

@ -0,0 +1,24 @@
---
title: round
---
Arrondit un coin. Notez que cela ne s'adresse qu'aux coins à 90 degrés.
| Propriété | Défaut | Type | Description |
| --------- | ------- | ----------------------------- | ------------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | Le point de départ de l'arrondi |
| `to` | | [Point](/reference/api/point) | Le point final de l'arrondi |
| `via` | | [Point](/reference/api/point) | Le coin à arrondir |
| `radius` | Maximum | Nombre | Le rayon en mm si c'est pas le maximum |
| `prefix` | | Chaîne de caractères | Un préfixe à donner aux points et aux chemins créés par cette macro |
| `render` | `false` | Booléen | Afficher le chemin créé par cette macro |
| `class` | | Chaîne de caractères | Classe(s) à assigner au chemin créé par cette macro |
<Note>
The `round` macro is provided by the [round plugin](/reference/plugins/round).
</Note>

View file

@ -0,0 +1,24 @@
---
title: round
---
Rounds a corner. Note that this is only intended for 90 degree corners.
| Property | Default | Type | Description |
| -------- | ------- | ----------------------------- | -------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint towards the corner to round |
| `to` | | [Point](/reference/api/point) | The endpoint away from the corner to round |
| `via` | | [Point](/reference/api/point) | The corner to round |
| `radius` | Maximum | Number | The radius in mm in not the maximum |
| `prefix` | | String | A prefix to give to the points and paths created by this macro |
| `render` | `false` | Boolean | Whether to render the path created by this macro |
| `class` | | String | Class(es) to assign to the path created by this macro |
<Note>
The `round` macro is provided by the [round plugin](/reference/plugins/round).
</Note>

View file

@ -0,0 +1,24 @@
---
title: scalebox
---
Adds a *scale box* to your pattern.
| Property | Default | Type | Description |
| -------- | ------------------------ | ----------------------------- | -------------------------------------- |
| `at` | | [Point](/reference/api/point) | The point to anchor the *scale box* on |
| `lead` | FreeSewing | String | The lead text above the title |
| `title` | *pattern name + version* | String | The title text |
| `text` | (\*) | String | The text below the title |
| `rotate` | 0 | Number | Rotation in degrees |
(\*) `freesewingIsMadeByJoostDeCockAndContributors \n withTheFinancialSupportOfOurPatrons`
<Note>
The `round` macro is provided by the [round plugin](/reference/plugins/round).
</Note>

View file

@ -0,0 +1,27 @@
---
title: scalebox
---
The `scalebox` macro adds a *scale box* to your pattern. This box allows
users to verify their pattern is printed to scale.
The `scalebox` macro is provided by the [scalebox plugin](/reference/plugins/scalebox).
<Example part="plugin_scalebox" caption="Example of the scalebox added by this macro" />
```js
macro('scalebox', {
at: points.anchor
})
```
| Property | Default | Type | Description |
|-------------|---------|---------------------|-------------|
| `at` | | [Point](/reference/api/point) | The point to anchor the *scale box* on |
| `lead` | FreeSewing | String | The lead text above the title |
| `title` | *pattern name + version* | String | The title text |
| `text` | (\*) | String | The text below the title |
| `rotate` | 0 | Number | Rotation in degrees |
(\*) `freesewingIsMadeByJoostDeCockAndContributors \n withTheFinancialSupportOfOurPatrons`

View file

@ -0,0 +1,24 @@
---
title: scalebox
---
Adds a *scale box* to your pattern.
| Property | Default | Type | Description |
| -------- | ------------------------ | ----------------------------- | -------------------------------------- |
| `at` | | [Point](/reference/api/point) | The point to anchor the *scale box* on |
| `lead` | FreeSewing | String | The lead text above the title |
| `title` | *pattern name + version* | String | The title text |
| `text` | (\*) | String | The text below the title |
| `rotate` | 0 | Number | Rotation in degrees |
(\*) `freesewingIsMadeByJoostDeCockAndContributors \n withTheFinancialSupportOfOurPatrons`
<Note>
The `round` macro is provided by the [round plugin](/reference/plugins/round).
</Note>

View file

@ -0,0 +1,24 @@
---
title: scalebox
---
Adds a *scale box* to your pattern.
| Propriété | Défaut | Type | Description |
| --------- | -------------------------- | ----------------------------- | -------------------------------------- |
| `at` | | [Point](/reference/api/point) | The point to anchor the *scale box* on |
| `lead` | FreeSewing | Chaîne de caractères | Le texte au dessus du titre |
| `title` | *nom du patron et version* | Chaîne de caractères | Le texte du titre |
| `text` | (\*) | Chaîne de caractères | Le texte en dessous du titre |
| `rotate` | 0 | Nombre | Rotation en degrés |
(\*) `freesewingEstCrééParJoostDeCockEtContributeurs \n avecLeSoutienFinancierDeNosMécènes`
<Note>
The `round` macro is provided by the [round plugin](/reference/plugins/round).
</Note>

View file

@ -0,0 +1,24 @@
---
title: scalebox
---
Adds a *scale box* to your pattern.
| Property | Default | Type | Description |
| -------- | ------------------------ | ----------------------------- | -------------------------------------- |
| `at` | | [Point](/reference/api/point) | The point to anchor the *scale box* on |
| `lead` | FreeSewing | String | The lead text above the title |
| `title` | *pattern name + version* | String | The title text |
| `text` | (\*) | String | The text below the title |
| `rotate` | 0 | Number | Rotation in degrees |
(\*) `freesewingIsMadeByJoostDeCockAndContributors \n withTheFinancialSupportOfOurPatrons`
<Note>
The `round` macro is provided by the [round plugin](/reference/plugins/round).
</Note>

View file

@ -0,0 +1,19 @@
---
title: sprinkle
---
Bulk-adds snippets to your pattern.
| Property | Default | Type | Description |
| --------- | ------- | ---------------- | --------------------------------------------------------- |
| `snippet` | | String | Name of the snippet to sprinkle |
| `on` | `[]` | Array of strings | An array with *the names* of points to add the snippet on |
<Note>
The `sprinkle` macro is provided by the [sprinkle plugin](/reference/plugins/sprinkle).
</Note>

View file

@ -0,0 +1,22 @@
---
title: sprinkle
---
The `sprinkle` macro facilitates adding snippets to your pattern in bulk.
It is by the [sprinkle plugin](/reference/plugins/sprinkle).
<Example part="plugin_sprinkle" caption="Example of button snippets sprinkled on a pattern by this macro" />
```js
macro('sprinkle', {
snippet: 'button',
on: ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i']
})
```
| Property | Default | Type | Description |
|------------:|---------|------------------|-------------|
| `snippet` | | String | Name of the snippet to sprinkle |
| `on` | `[]` | Array of strings | An array with **the names** of points to add the snippet on |

View file

@ -0,0 +1,19 @@
---
title: sprinkle
---
Bulk-adds snippets to your pattern.
| Property | Default | Type | Description |
| --------- | ------- | ---------------- | --------------------------------------------------------- |
| `snippet` | | String | Name of the snippet to sprinkle |
| `on` | `[]` | Array of strings | An array with *the names* of points to add the snippet on |
<Note>
The `sprinkle` macro is provided by the [sprinkle plugin](/reference/plugins/sprinkle).
</Note>

View file

@ -0,0 +1,19 @@
---
title: sprinkle
---
Ajoute en brut des snippets à votre patron.
| Propriété | Défaut | Type | Description |
| --------- | ------ | ------------------------------- | --------------------------------------------------------- |
| `snippet` | | Chaîne de caractères | Nom du snippet à ajouter |
| `on` | `[]` | Tableau de chaîne de caractères | An array with *the names* of points to add the snippet on |
<Note>
The `sprinkle` macro is provided by the [sprinkle plugin](/reference/plugins/sprinkle).
</Note>

View file

@ -0,0 +1,19 @@
---
title: sprinkle
---
Bulk-adds snippets to your pattern.
| Property | Default | Type | Description |
| --------- | ------- | ---------------- | --------------------------------------------------------- |
| `snippet` | | String | Name of the snippet to sprinkle |
| `on` | `[]` | Array of strings | An array with *the names* of points to add the snippet on |
<Note>
The `sprinkle` macro is provided by the [sprinkle plugin](/reference/plugins/sprinkle).
</Note>

View file

@ -0,0 +1,24 @@
---
title: title
---
Bulk-adds snippets to your pattern.
| Property | Default | Type | Description |
| ---------- |:-------:| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `at` | | [Point](/reference/api/point) | The point at which to insert the title |
| `nr` | | String | The number of the pattern part |
| `title` | | String | The name of the pattern part. If title is not set or is an empty string, this won't be rendered, and the version will go beneath the nr. |
| `prefix` | | String | A prefix to add to the created points. This allow for more than 1 title per part, as long as you give them a different prefix. |
| `append` | `false` | Boolean | Set this to `true` to append the `nr` to any text already set in Point `at`'s attributes, rather than overwrite it |
| `rotation` | 0 | Number | An optional rotation in degrees |
| `scale` | 1 | Number | An optional scaling factor |
<Note>
The `title` macro is provided by the [title plugin](/reference/plugins/title).
</Note>

View file

@ -0,0 +1,19 @@
---
title: title
---
The `title` macro adds a title to a pattern part.
It is provided by the [title plugin](/reference/plugins/title).
<Example part="plugin_title" caption="Example of a title added by this macro" />
| Property | Default | Type | Description |
| ----------:| :-----: | ---------------------------------------------------------- |
| `at` | | [Point](/reference/api/point) | The point at which to insert the title |
| `nr` | | String | The number of the pattern part |
| `title` | | String | The name of the pattern part. If title is not set or is an empty string, this won't be rendered, and the version will go beneath the nr.|
| `prefix` | | String | A prefix to add to the created points. This allow for more than 1 title per part, as long as you give them a different prefix.|
| `append` | `false` | Boolean | Set this to `true` to append the `nr` to any text already set in Point `at`'s attributes, rather than overwrite it |
| `rotation` | 0 | Number | An optional rotation in degrees |
| `scale` | 1 | Number | An optional scaling factor |

View file

@ -0,0 +1,24 @@
---
title: title
---
Bulk-adds snippets to your pattern.
| Property | Default | Type | Description |
| ---------- |:-------:| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `at` | | [Point](/reference/api/point) | The point at which to insert the title |
| `nr` | | String | The number of the pattern part |
| `title` | | String | The name of the pattern part. If title is not set or is an empty string, this won't be rendered, and the version will go beneath the nr. |
| `prefix` | | String | A prefix to add to the created points. This allow for more than 1 title per part, as long as you give them a different prefix. |
| `append` | `false` | Boolean | Set this to `true` to append the `nr` to any text already set in Point `at`'s attributes, rather than overwrite it |
| `rotation` | 0 | Number | An optional rotation in degrees |
| `scale` | 1 | Number | An optional scaling factor |
<Note>
The `title` macro is provided by the [title plugin](/reference/plugins/title).
</Note>

View file

@ -0,0 +1,24 @@
---
title: title
---
Ajoute en brut des snippets à votre patron.
| Propriété | Défaut | Type | Description |
| ---------- |:-------:| ----------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `at` | | [Point](/reference/api/point) | Le point où insérer le titre |
| `nr` | | Chaîne de caractères | Le nombre de parties de patron |
| `title` | | Chaîne de caractères | Le nom de la partie de patron. Si le titre n'est pas paramétré ou bien une chaîne de caractères vide, cela ne sera pas affiché, et la version apparaîtra en dessous de nr. |
| `prefix` | | Chaîne de caractères | Un préfixe à ajouter aux points créés. Cela autorise plus d'un titre par partie, du moment que vous leur donnez un préfixe différent. |
| `append` | `false` | Booléen | Réglez ça sur `true` pour ajouter `nr` à n'importe quel texte déjà indiqué dans l'attribut `at` de Point, plutôt que de l'écraser |
| `rotation` | 0 | Nombre | Une rotation optionnelle en degrés |
| `scale` | 1 | Nombre | Un facteur optionnel de mise à l'échelle |
<Note>
The `title` macro is provided by the [title plugin](/reference/plugins/title).
</Note>

View file

@ -0,0 +1,24 @@
---
title: title
---
Bulk-adds snippets to your pattern.
| Property | Default | Type | Description |
| ---------- |:-------:| ----------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------- |
| `at` | | [Point](/reference/api/point) | The point at which to insert the title |
| `nr` | | String | The number of the pattern part |
| `title` | | String | The name of the pattern part. If title is not set or is an empty string, this won't be rendered, and the version will go beneath the nr. |
| `prefix` | | String | A prefix to add to the created points. This allow for more than 1 title per part, as long as you give them a different prefix. |
| `append` | `false` | Boolean | Set this to `true` to append the `nr` to any text already set in Point `at`'s attributes, rather than overwrite it |
| `rotation` | 0 | Number | An optional rotation in degrees |
| `scale` | 1 | Number | An optional scaling factor |
<Note>
The `title` macro is provided by the [title plugin](/reference/plugins/title).
</Note>

View file

@ -0,0 +1,25 @@
---
title: vd
---
Adds a *vertical dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | ----------------- | ----------------------------- | -------------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `x` | | Number | The X-value at which to draw the dimension |
| `text` | Vertical distance | Number | The text to go on the dimension if not the from-to vertical distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `vd` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,41 @@
---
title: vd
---
The `vd` macro adds a *vertical dimension* to your pattern.
It is provided by the [dimension plugin](/reference/plugins/dimension/).
<Example
part="point_dy"
caption="An example of a vertical dimension"
/>
```js
macro('vd', {
from: points.from,
to: points.to,
x: 25
})
```
| Property | Default | Type | Description |
|----------------:|---------|---------------------|-------------|
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `x` | | Number | The X-value at which to draw the dimension |
| `text` | Vertical distance | Number | The text to go on the dimension if not the from-to vertical distance |
| `id` | auto-assigned | String | A custom ID under wich paths and points will be created |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
Setting a custom ID will:
- Allow removal of the dimension with [the `rmd` macro](/reference/macros/rmd)
- Prevent removal of the dimension with [the `rmad` macro](/reference/macros/rmad/)
</Note>

View file

@ -0,0 +1,25 @@
---
title: vd
---
Adds a *vertical dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | ----------------- | ----------------------------- | -------------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `x` | | Number | The X-value at which to draw the dimension |
| `text` | Vertical distance | Number | The text to go on the dimension if not the from-to vertical distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `vd` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,25 @@
---
title: vd
---
Adds a *vertical dimension* to your pattern.
| Propriété | Défaut | Type | Description |
| --------------- | ------------------ | ----------------------------- | ----------------------------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | Le point de départ de la dimension |
| `to` | | [Point](/reference/api/point) | Le point final de la dimension |
| `x` | | Nombre | La valeur en X à laquelle dessiner la dimension |
| `text` | Distance verticale | Nombre | Le texte correspondant à la dimension si ce n'est pas la distance verticale from-to |
| `noStartMarker` | `false` | Booléen | Ne pas dessiner un marqueur de début |
| `noEndMarker` | `false` | Booléen | Ne pas dessiner un marqueur de fin |
<Note>
The `vd` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>

View file

@ -0,0 +1,25 @@
---
title: vd
---
Adds a *vertical dimension* to your pattern.
| Property | Default | Type | Description |
| --------------- | ----------------- | ----------------------------- | -------------------------------------------------------------------- |
| `from` | | [Point](/reference/api/point) | The startpoint of the dimension |
| `to` | | [Point](/reference/api/point) | The endpoint of the dimension |
| `x` | | Number | The X-value at which to draw the dimension |
| `text` | Vertical distance | Number | The text to go on the dimension if not the from-to vertical distance |
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
<Note>
The `vd` macro is provided by the [dimension plugin](/reference/plugins/dimension).
</Note>