feat(markdown): New docs for various things
This commit is contained in:
parent
9fe93e03ce
commit
6b147d81a0
93 changed files with 1274 additions and 589 deletions
|
@ -3,18 +3,22 @@ title: banner
|
|||
---
|
||||
|
||||
The `banner` macro allows you to add repeating text along a path.
|
||||
It is provided by the [annotations plugin](/reference/plugins/annotations).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('banner', {
|
||||
String id='banner',
|
||||
String className='',
|
||||
Number dy=1,
|
||||
Number repeat=10,
|
||||
Number spaces=12,
|
||||
Path path,
|
||||
String text,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -48,13 +52,18 @@ macro('banner', {
|
|||
|-------------:|------------|------------|-------------|
|
||||
| `className` | `` | `string` | Any additional CSS classes to apply to the text |
|
||||
| `dy` | `1` | `number` | Controls how far the text will be located above the path |
|
||||
| `id` | `banner` | `string` | The id of this macro instance |
|
||||
| `path` | | `Path` | The Path to add the text on |
|
||||
| `repeat` | `10` | `number` | The number of repetitions |
|
||||
| `spaces` | `12` | `number` | The number of spaces to place between repetitions |
|
||||
| `text` | | `string` | The text to place repeat along the path |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
||||
|
||||
## Notes
|
||||
|
||||
Under the hood, this macro will:
|
||||
|
||||
- Add `data-text`, `data-text-dy`, and `data-text-class` Attributes to the path to generate the text.
|
||||
|
||||
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|
||||
|
||||
|
|
|
@ -1,14 +1,17 @@
|
|||
---
|
||||
title: bannerbox
|
||||
title: bannerBox
|
||||
---
|
||||
|
||||
The `bannerbox` macro allows you to add a box with repeating text on it.
|
||||
It is provided by the [annotations plugin](/reference/plugins/annotations).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('bannerbox', {
|
||||
String id='bannerbox',
|
||||
String textClassName='text-xs fill-note',
|
||||
String boxClassName='stroke-xs stroke-note lashed',
|
||||
Point topLeft=new Point(0,0),
|
||||
|
@ -18,6 +21,7 @@ macro('bannerbox', {
|
|||
Number dy=4,
|
||||
Number repeat=99,
|
||||
Number spaces=12,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -28,7 +32,9 @@ macro('bannerbox', {
|
|||
({ Point, points, Path, paths, macro, part }) => {
|
||||
|
||||
macro('bannerbox', {
|
||||
title: 'a bannerbox example',
|
||||
text: 'a bannerbox example',
|
||||
topLeft: new Point(0,0),
|
||||
bottomRight: new Point(80, 30)
|
||||
})
|
||||
|
||||
return part
|
||||
|
@ -40,15 +46,17 @@ macro('bannerbox', {
|
|||
|
||||
| Property | Default | Type | Description |
|
||||
|----------------:|--------------------------------|----------|-------------|
|
||||
| `textClassName` | `text-xs fill-note` | `string` | CSS classes to apply to the text |
|
||||
| `boxClassName` | `stroke-xs stroke-note lashed` | `string` | CSS classes to apply to the box path |
|
||||
| `topLeft` | `new Point(0,0)` | `Point` | Top top-left corner of the box |
|
||||
| `bottomRight` | `new Point(100,100)` | `Point` | Top top-left corner of the box |
|
||||
| `text` | `` | `string` | The text to place repeat along the box path |
|
||||
| `margin` | `15` | `number` | Controls the margin the box will apply |
|
||||
| `boxClassName` | `stroke-xs stroke-note lashed` | `string` | CSS classes to apply to the box path |
|
||||
| `dy` | `4` | `number` | Controls how far the text will be located above the path |
|
||||
| `id` | `bannerbox` | `string` | The ID of this macro instance |
|
||||
| `margin` | `15` | `number` | Controls the margin the box will apply |
|
||||
| `repeat` | `99` | `number` | The number of text repetitions. See [banner macro][banner] |
|
||||
| `spaces` | `12` | `number` | The number of spaces to place between repetitions. See [banner macro][banner] |
|
||||
| `text` | `` | `string` | The text to place repeat along the box path |
|
||||
| `textClassName` | `text-xs fill-note` | `string` | CSS classes to apply to the text |
|
||||
| `topLeft` | `new Point(0,0)` | `Point` | Top top-left corner of the box |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
||||
|
||||
## Notes
|
||||
|
||||
|
@ -68,4 +76,6 @@ needed might be a best practice to ensure that text completely surrounds
|
|||
the bannerbox, even if the pattern is scaled down, allowing more text to
|
||||
fit around the box.
|
||||
|
||||
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|
||||
|
||||
[banner]: /reference/macros/banner
|
||||
|
|
|
@ -4,12 +4,15 @@ title: bartack
|
|||
|
||||
The `bartack` macro allows you to add a _bartack_ marker to your sewing
|
||||
pattern.
|
||||
It is provided by the [annotations plugin](/reference/plugins/annotations).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('banner', {
|
||||
String id='bartack',
|
||||
Point anchor,
|
||||
Number angle=0,
|
||||
Number density=3,
|
||||
|
@ -17,6 +20,7 @@ macro('banner', {
|
|||
String prefix='',
|
||||
String suffix='',
|
||||
Number width=3,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -43,13 +47,14 @@ macro('banner', {
|
|||
| `anchor` | | `Point` | The point to start the bartack from |
|
||||
| `angle` | `0` | `number` | The angle under which to draw the bartack |
|
||||
| `density` | `3` | `number` | Controls how close the stitches are together |
|
||||
| `id` | `bartack` | `string` | The ID of this macro instance |
|
||||
| `length` | `15` | `number` | Length of the bartack |
|
||||
| `prefix` | | `string` | A prefix to apply to the name of the generated path |
|
||||
| `suffix` | | `string` | A suffix to apply to the name of the generated path |
|
||||
| `width` | `3` | `number` | Width of the bartack |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
||||
|
||||
## Result
|
||||
## Notes
|
||||
|
||||
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `paths.${prefix}bartack${suffix}` | Path generated for the bartack marker |
|
||||
|
|
|
@ -4,12 +4,15 @@ 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 [annotations plugin](/reference/plugins/annotations).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('banner', {
|
||||
macro('bartackAlong', {
|
||||
String id='bartack'
|
||||
Number angle=0,
|
||||
Number density=3,
|
||||
Number length=15,
|
||||
|
@ -17,6 +20,7 @@ macro('banner', {
|
|||
String prefix='',
|
||||
String suffix='',
|
||||
Number width=3,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -47,14 +51,16 @@ macro('banner', {
|
|||
|-------------:|------------|------------|-------------|
|
||||
| `angle` | `0` | `number` | The angle under which to draw the bartack |
|
||||
| `density` | `3` | `number` | Controls how close the stitches are together |
|
||||
| `id` | `bartackalong` | `string` | The ID of this macro instance |
|
||||
| `length` | `15` | `number` | Length of the bartack |
|
||||
| `path` | | `Path` | The path the bartack should follow |
|
||||
| `prefix` | | `string` | A prefix to apply to the name of the generated path |
|
||||
| `suffix` | | `string` | A suffix to apply to the name of the generated path |
|
||||
| `width` | `3` | `number` | Width of the bartack |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
||||
|
||||
## Notes
|
||||
|
||||
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|
||||
|
||||
## Result
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `paths.${prefix}bartack${suffix}` | Path generated for the bartack marker |
|
||||
|
|
|
@ -4,12 +4,15 @@ 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 [annotations plugin](/reference/plugins/annotations).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('banner', {
|
||||
macro('bartackFractionAlong', {
|
||||
String id="bartack",
|
||||
Number angle=0,
|
||||
Number density=3,
|
||||
Number end=1,
|
||||
|
@ -19,6 +22,7 @@ macro('banner', {
|
|||
Number start=0,
|
||||
String suffix='',
|
||||
Number width=3,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -58,9 +62,8 @@ macro('banner', {
|
|||
| `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 name of the generated path |
|
||||
| `width` | `3` | `number` | Width of the bartack |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
||||
|
||||
## Result
|
||||
## Notes
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `paths.${prefix}bartack${suffix}` | Path generated for the bartack marker |
|
||||
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: crossbox
|
||||
title: crossBox
|
||||
---
|
||||
|
||||
The `crossbox` macro is used to mark a feature on a sewing pattern
|
||||
|
@ -7,15 +7,18 @@ to attach and reinforce an attachment between two pieces.
|
|||
This is regularly done by sewing along the outside of the pieces
|
||||
that needs to be joined, and then sewing along the diagonals too.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations/).
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('crossbox', {
|
||||
Point from,
|
||||
Point to,
|
||||
String id='crossbox',
|
||||
Point topLeft,
|
||||
Point bottomRight,
|
||||
String text,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -24,25 +27,13 @@ macro('crossbox', {
|
|||
<Example caption="An example of the crossbox macro">
|
||||
```js
|
||||
({ Point, points, Path, paths, macro, part }) => {
|
||||
points.partTL = new Point(0,0)
|
||||
points.partTR = new Point(0,70)
|
||||
points.partBR = new Point(50,70)
|
||||
points.partBL = new Point(50,0)
|
||||
|
||||
paths.part = new Path()
|
||||
.move(points.partTL)
|
||||
.line(points.partTR)
|
||||
.line(points.partBR)
|
||||
.line(points.partBL)
|
||||
.close()
|
||||
|
||||
points.tl = new Point(5,5)
|
||||
points.br = new Point(45,25)
|
||||
|
||||
macro('crossbox', {
|
||||
from: points.tl,
|
||||
to: points.br,
|
||||
text: 'attach here',
|
||||
topLeft: new Point(5, 5),
|
||||
bottomRight: new Point(45, 25),
|
||||
text: 'Attach here',
|
||||
})
|
||||
|
||||
return part
|
||||
|
@ -54,22 +45,13 @@ macro('crossbox', {
|
|||
|
||||
| Property | Default | Type | Description |
|
||||
|----------------:|----------|---------------------|-------------|
|
||||
| `from` | | [Point](/reference/api/point) | The top left point of the crossbox |
|
||||
| `to` | | [Point](/reference/api/point) | The bottom right point of the crossbox |
|
||||
| `bottomRight` | | [Point](/reference/api/point) | The bottom right point of the crossbox |
|
||||
| `topLeft` | | [Point](/reference/api/point) | The top left point of the crossbox |
|
||||
| `id` | `crossbox` | `string` | The ID of this macro instance |
|
||||
| `text` | | String | Optional text to go in the center of the crossbox |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
||||
|
||||
## Result
|
||||
## Notes
|
||||
|
||||
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `points.${id}_boxTopLeft` | Point Top Left of the outer box |
|
||||
| `points.${id}_boxTopRight` | Point Top Right of the outer box |
|
||||
| `points.${id}_boxBottomLeft` | Point Bottom Left of the outer box |
|
||||
| `points.${id}_boxBottomRight` | Point Bottom Right of the outer box |
|
||||
| `points.${id}_topCrossTL` | Point Top Left of the inner box |
|
||||
| `points.${id}_topCrossTR` | Point Top Right of the inner box |
|
||||
| `points.${id}_topCrossBL` | Point Bottom Left of the inner box |
|
||||
| `points.${id}_topCrossBR` | Point Bottom Right of the inner box |
|
||||
| `points.${id}_textAnchor` | Point for the text |
|
||||
| `paths.${id}crossBox` | Path for the outer box |
|
||||
| `paths.${id}_topCross` | Path for the inner box and cross |
|
||||
|
|
|
@ -1,20 +1,24 @@
|
|||
---
|
||||
title: cutonfold
|
||||
title: cutOnFold
|
||||
---
|
||||
|
||||
The `cutonfold` macro adds a _cut on fold_ indicator to your pattern.
|
||||
It is provided by the [annotations plugin](/reference/plugins/annotations).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('cutonfold', {
|
||||
String id="cutonfold",
|
||||
Point from,
|
||||
Boolean grainline=false,
|
||||
Number margin=5,
|
||||
Number offset=15,
|
||||
String prefix='',
|
||||
Point to,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -45,47 +49,20 @@ macro('cutonfold', {
|
|||
| Property | Default | Type | Description |
|
||||
|------------:|---------|---------------------|-------------|
|
||||
| `from` | | [Point](/reference/api/point) | The startpoint of the _cut on fold_ indicator |
|
||||
| `id` | `cutonfold` | `string` | The ID of this macro instance |
|
||||
| `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` | 15 | Number | The distance in mm to offset from the line from start to end |
|
||||
| `prefix` | 'cutonfold' | String | A prefix to apply to the names of the generated path and points |
|
||||
| `grainline` | `false` | Boolean | Whether this cutonfold indicator is also the grainline |
|
||||
|
||||
## Result
|
||||
|
||||
| Generated Element | Description |
|
||||
|------|-------------|
|
||||
| `paths.${prefix}Cutonfold` | The Path for the _cut on fold_ indicator |
|
||||
| `points.${prefix}From` | Point used to create the path |
|
||||
| `points.${prefix}Via1` | Point used to create the path |
|
||||
| `points.${prefix}Via2` | Point used to create the path |
|
||||
| `points.${prefix}To}` | Point used to create the path |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
||||
|
||||
## Notes
|
||||
|
||||
### Place outside `complete`
|
||||
|
||||
The `cutonfold` macro should be placed outside of `complete` blocks
|
||||
in the part's draft method.
|
||||
|
||||
This is because it provides information about the part's foldline and
|
||||
possible grainline,
|
||||
information that is always needed by the cutting layout regardless of
|
||||
whether `complete` details and graphics are shown on the pattern.
|
||||
|
||||
The `cutonfold` macro will automatically show or hide the cut on fold
|
||||
indicator based on the `complete` setting.
|
||||
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|
||||
|
||||
### It's safe to use a corner of your pattern part for this
|
||||
|
||||
Since this is typically used on corners, the generated cut-on-fold indicator
|
||||
will not go all the way to the `to` and `from` points.
|
||||
|
||||
### Removing the cut on fold indicator
|
||||
|
||||
If you inherit a part with a cut on fold indicator and you'd like to remove it,
|
||||
you can do so by passing `false` to the macro:
|
||||
|
||||
```js
|
||||
macro('cutonfold', false)
|
||||
```
|
||||
|
|
|
@ -49,10 +49,12 @@ Now you can use these macros in your part:
|
|||
|
||||
## Macros we maintain
|
||||
|
||||
Below is a list of macros from [the plugins we maintain](/reference/plugins):
|
||||
Below is a list of macros from [the plugins we maintain](/reference/plugins).
|
||||
|
||||
<Note compact noP>
|
||||
|
||||
We use camelCase here, but macro names are case-insensitive
|
||||
</Note>
|
||||
|
||||
<ReadMore list />
|
||||
|
||||
## Notes
|
||||
|
||||
We recommend allowing to *undo* a macro by passing `false` as its parameter.
|
||||
|
|
|
@ -3,8 +3,17 @@ title: flip
|
|||
---
|
||||
|
||||
The `flip` macro flips (mirrors) an entire part vertically around either the
|
||||
X-axis or the Y-axis. It is provided by the [flip
|
||||
plugin](/reference/plugins/flip).
|
||||
X-axis or the Y-axis.
|
||||
|
||||
It is provided by the [flip plugin](/reference/plugins/flip).
|
||||
|
||||
<Note>
|
||||
##### Not a core-plugins macro
|
||||
|
||||
The `flip` macro is not provided by the [core-plugins](/reference/plugins/core),
|
||||
so you need to load the [flip plugin](/reference/plugins/flip) explicitly
|
||||
if you want to use it.
|
||||
</Note>
|
||||
|
||||
## Signature
|
||||
|
||||
|
|
|
@ -3,7 +3,14 @@ title: gore
|
|||
---
|
||||
|
||||
The `gore` macro facilitates the drafting of [gores][1] to create spherical or other roundish objects. They are are typically used in hats.
|
||||
It is provided by the [gore plugin](/reference/plugins/grainline/).
|
||||
|
||||
<Note>
|
||||
##### Not a core-plugins macro
|
||||
|
||||
The `gore` macro is not provided by the [core plugins](/reference/plugins/core),
|
||||
so you need to load the [gore plugin](/reference/plugins/gore) explicitly
|
||||
if you want to use it.
|
||||
</Note>
|
||||
|
||||
## Signature
|
||||
|
||||
|
@ -51,17 +58,6 @@ macro('gore', {
|
|||
| `class` | | boolean | Any classes to add to the generated path |
|
||||
| `prefix` | | string | A prefix to apply to the names of the generated path and points |
|
||||
|
||||
## Result
|
||||
|
||||
| Generated Element | Description |
|
||||
|------|-------------|
|
||||
| `paths.${prefix}seam` | The Path for the gore |
|
||||
| `points.${prefix}p1` | Point for the gore tip |
|
||||
| `points.${prefix}p2` | Point between the tip and side corner |
|
||||
| `points.${prefix}p3` | Point for the gore side corner |
|
||||
| `points.${prefix}Cp1` | Control Point used to create the curved path |
|
||||
| `points.${prefix}Cp2` | Control Point used to create the curved path |
|
||||
|
||||
[1]: https://en.wikipedia.org/wiki/Gore_\(segment\)
|
||||
|
||||
[2]: /reference/api/point
|
||||
|
|
|
@ -3,7 +3,9 @@ title: grainline
|
|||
---
|
||||
|
||||
The `grainline` macro adds a _grainline_ indicator to your pattern.
|
||||
It is provided by the [annotations plugin](/reference/plugins/annotations).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
|
@ -12,6 +14,7 @@ macro('grainline', {
|
|||
Point from,
|
||||
Point to,
|
||||
String text=grainline,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -43,36 +46,11 @@ macro('grainline', {
|
|||
| `from` | | [Point][1] | The startpoint of the _grainline_ indicator |
|
||||
| `to` | | [Point][1] | The endpoint of the _grainline_ indicator |
|
||||
| `text` | 'grainline' | string | The text to put on the _grainline_ indicator |
|
||||
|
||||
## Result
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `paths.grainline` | The Path for the _grainline_ indicator |
|
||||
| `points.grainlineFrom` | Point used to create the path |
|
||||
| `points.grainlineTo` | Point used to create the path |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
||||
|
||||
[1]: /reference/api/point
|
||||
|
||||
## Notes
|
||||
|
||||
### Place outside `complete`
|
||||
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|
||||
|
||||
The `grainline` macro should be placed outside of `complete` blocks
|
||||
in the part's draft method.
|
||||
|
||||
This is because it provides information about the part's grainline,
|
||||
information that is always needed by the cutting layout regardless of
|
||||
whether `complete` details and graphics are shown on the pattern.
|
||||
|
||||
The `grainline` macro will automatically show or hide the grainline
|
||||
indicator based on the `complete` setting.
|
||||
|
||||
### Removing the grainline indicator
|
||||
|
||||
If you inherit a part with a grainline indicator and you'd like to remove it,
|
||||
you can do so by passing `false` to the macro:
|
||||
|
||||
```js
|
||||
macro('grainline', false)
|
||||
```
|
||||
|
|
|
@ -3,19 +3,22 @@ title: hd
|
|||
---
|
||||
|
||||
The `hd` macro adds a _horizontal dimension_ to your pattern.
|
||||
It is provided by the [annotations plugin](/reference/plugins/annotations).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('hd', {
|
||||
String id,
|
||||
String id = 'hd',
|
||||
Point from,
|
||||
Boolean noEndMarker,
|
||||
Boolean noStartMarker,
|
||||
String text,
|
||||
Point to,
|
||||
Number y,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -28,7 +31,8 @@ macro('hd', {
|
|||
macro('hd', {
|
||||
from: new Point(0,0),
|
||||
to: new Point(100,0),
|
||||
y:15,
|
||||
y: 15,
|
||||
force: 1,
|
||||
})
|
||||
|
||||
return part
|
||||
|
@ -43,23 +47,13 @@ macro('hd', {
|
|||
| `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 which paths and points will be created |
|
||||
| `id` | `hd` | `string` | The ID of this macro instance |
|
||||
| `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 |
|
||||
|
||||
## Result
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `paths.${id}` | Path for the span of the dimension |
|
||||
| `paths.${id}_ls` | Path for the leader to the start of the dimension |
|
||||
| `paths.${id}_le` | Path for the leader to the end of the dimension |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `paperless` is `false` |
|
||||
|
||||
## Notes
|
||||
|
||||
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/)
|
||||
This macro takes the `paperless` setting into account and won't output anything when both `paperless` and `force` are `false`.
|
||||
|
||||
|
|
|
@ -3,19 +3,22 @@ title: ld
|
|||
---
|
||||
|
||||
The `ld` macro adds a _linear dimension_ to your pattern.
|
||||
It is provided by the [annotations plugin](/reference/plugins/annotations).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('ld', {
|
||||
Number d,
|
||||
String id,
|
||||
String id = 'ld',
|
||||
Point from,
|
||||
Boolean noEndMarker,
|
||||
Boolean noStartMarker,
|
||||
String text,
|
||||
Point to,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -29,6 +32,7 @@ macro('ld', {
|
|||
from: new Point(0,0),
|
||||
to: new Point(100,20),
|
||||
d:15,
|
||||
force: true,
|
||||
})
|
||||
|
||||
return part
|
||||
|
@ -43,22 +47,12 @@ macro('ld', {
|
|||
| `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 which paths and points will be created |
|
||||
| `id` | `ld` | `string` | The ID of this macro instance |
|
||||
| `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 |
|
||||
|
||||
## Result
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `paths.${id}` | Path for the span of the dimension |
|
||||
| `paths.${id}_ls` | Path for the leader to the start of the dimension |
|
||||
| `paths.${id}_le` | Path for the leader to the end of the dimension |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `paperless` is `false` |
|
||||
|
||||
## Notes
|
||||
|
||||
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/)
|
||||
This macro takes the `paperless` setting into account and won't output anything when both `paperless` and `force` are `false`.
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: miniscale
|
||||
title: miniScale
|
||||
---
|
||||
|
||||
The `miniscale` macro adds a mini _scale box_ to your pattern. This box allows
|
||||
|
@ -7,9 +7,10 @@ users to verify their pattern is printed to scale.
|
|||
The white inside of the box provides a metric scale, and the black outside
|
||||
of the box provides an imperial scale.
|
||||
|
||||
The `miniscale` macro is provided by the [annotations
|
||||
plugin](/reference/plugins/annotations).
|
||||
It is the mini version of [the scalebox macro](/reference/macros/scalebox/).
|
||||
A miniscale is the mini version of [the scalebox macro](/reference/macros/scalebox/).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
|
@ -17,6 +18,7 @@ It is the mini version of [the scalebox macro](/reference/macros/scalebox/).
|
|||
macro('miniscale', {
|
||||
Point at,
|
||||
Number rotate,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -41,23 +43,8 @@ macro('miniscale', {
|
|||
|------------:|---------|---------------------|-------------|
|
||||
| `at` | | [Point](/reference/api/point) | The point to anchor the _scale box_ on |
|
||||
| `rotate` | 0 | Number | Rotation in degrees |
|
||||
|
||||
## Result
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `paths.__miniscaleImperial` | Path of the imperial, outer box |
|
||||
| `paths.__miniscaleMetric` | Path of the metric, inner box |
|
||||
| `points.__miniscaleImperial` | Point anchoring the imperial text |
|
||||
| `points.__miniscaleMetric` | Point anchoring the metric text |
|
||||
| `points.__miniscale[Metric/Imperial][Top/Bottom][Left/Right]` | Points for the corners of the boxes |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
||||
|
||||
## Notes
|
||||
|
||||
If you inherit a part with a miniscale on it and you'd like to remove all
|
||||
points and paths generated by the miniscale macro, you can do so by passing
|
||||
`false` to the macro:
|
||||
|
||||
```js
|
||||
macro('miniscale', false)
|
||||
```
|
||||
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|
||||
|
|
|
@ -2,8 +2,10 @@
|
|||
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/).
|
||||
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/), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
|
@ -61,12 +63,3 @@ macro('mirror', {
|
|||
| `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 as a first argument and one of `path` or `point` as the second argument and should return the name for the cloned path and or point |
|
||||
|
||||
## Result
|
||||
|
||||
If `nameFormat` is set, its method determines the names of cloned, mirrored Points and Paths.
|
||||
If it is not set, the names are as below.
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `paths.${prefix}${Pathname}` | The cloned, mirrored Path(s) (with the first letter of pathname capitalized) |
|
||||
| `points.${prefix}${Pointname}` | The cloned, mirrored Point(s) (with the first letter of pointname capitalized) |
|
||||
|
|
|
@ -4,7 +4,9 @@ title: pd
|
|||
|
||||
The `pd` macro adds a _path dimension_ to your pattern, indicating the length
|
||||
of a path.
|
||||
It is provided by the [annotations plugin](/reference/plugins/annotations).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
|
@ -16,6 +18,7 @@ macro('pd', {
|
|||
Boolean noEndMarker,
|
||||
Boolean noStartMarker,
|
||||
String text,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -32,6 +35,7 @@ macro('pd', {
|
|||
macro('pd', {
|
||||
path: paths.example,
|
||||
d: 15,
|
||||
force: true,
|
||||
})
|
||||
|
||||
return part
|
||||
|
@ -46,21 +50,12 @@ macro('pd', {
|
|||
| `path` | | [Path](/reference/api/path) | The path to draw the dimension along |
|
||||
| `d` | 10 | 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 which paths and points will be created |
|
||||
| `id` | `pd` | `string` | The ID of this macro instance |
|
||||
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
|
||||
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
|
||||
|
||||
## Result
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `paths.${id}` | Path for the span of the dimension |
|
||||
| `paths.${id}_ls` | Path for the leader to the start of the dimension |
|
||||
| `paths.${id}_le` | Path for the leader to the end of the dimension |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `paperless` is `false` |
|
||||
|
||||
## Notes
|
||||
|
||||
Setting a custom ID will:
|
||||
This macro takes the `paperless` setting into account and won't output anything when both `paperless` and `force` are `false`.
|
||||
|
||||
- Allow removal of the dimension with [the `rmd` macro](/reference/macros/rmd)
|
||||
- Prevent removal of the dimension with [the `rmad` macro](/reference/macros/rmad/)
|
||||
|
|
|
@ -7,17 +7,25 @@ lines perpendicular to the line going from `from` to `to`.
|
|||
The `pleat` macro follows the convention of paths being counter-clockwise to
|
||||
determine what is the inside or outside of the part.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations/).
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('pleat', {
|
||||
String id = 'pleat',
|
||||
Point from,
|
||||
Point to,
|
||||
String prefix = 'pleat',
|
||||
Number margin = 35,
|
||||
Boolean reverse = false,
|
||||
Boolean force = false,
|
||||
Object calsses = {
|
||||
arrow: 'note',
|
||||
from: 'note',
|
||||
to: 'note dashed',
|
||||
},
|
||||
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -35,7 +43,7 @@ macro('pleat', {
|
|||
.attr('class', 'fabric')
|
||||
|
||||
points.from = new Point(40,0)
|
||||
points.to = new Point(30,0)
|
||||
points.to = new Point(10,0)
|
||||
|
||||
macro('pleat', {
|
||||
from: points.from,
|
||||
|
@ -52,19 +60,16 @@ macro('pleat', {
|
|||
| Property | Default | Type | Description |
|
||||
|----------------:|----------|---------------------|-------------|
|
||||
| `from` | | [Point](/reference/api/point) | The start point of the pleat |
|
||||
| `id` | `pleat` | `string` | The ID of this macro instance |
|
||||
| `to` | | [Point](/reference/api/point) | The end point of the pleat |
|
||||
| `prefix` | 'pleat' | String | The prefix to be used for creating all the points and paths |
|
||||
| `margin` | 35 | Number | The size (in mm) of the pleat lines |
|
||||
| `reverse` | `false` | Boolean | Reverses the two pleat lines and the arrow |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
||||
| `classes.arrow` | `note` | `string` | CSS classes to apply to the arrow |
|
||||
| `classes.from` | `note` | `string` | CSS classes to apply to the line at the `from` point |
|
||||
| `classes.to` | `note dashed` | `string` | CSS classes to apply to the line at the `to` point |
|
||||
|
||||
## Result
|
||||
## Notes
|
||||
|
||||
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `points.${prefix}From` | Copy of the `from` Point |
|
||||
| `points.${prefix}To` | Copy of the `to` Point |
|
||||
| `points.${prefix}FromIn` | Point for the inside of the `from` path |
|
||||
| `points.${prefix}ToIn` | Point for the inside of the `to` path |
|
||||
| `paths.${prefix}PleatFrom` | Path forming the from line |
|
||||
| `paths.${prefix}PleatTo` | Path forming the to line |
|
||||
| `paths.${prefix}PleatArrow` | Path forming the arrow |
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: ringsector
|
||||
title: ringSector
|
||||
---
|
||||
|
||||
The `ringsector` macro drafts a ring sector, which is like a part of a donut
|
||||
|
@ -20,6 +20,7 @@ if you want to use it.
|
|||
|
||||
```js
|
||||
macro('ringsector', {
|
||||
String id='ringsector',
|
||||
Point center = new Point(0,0),
|
||||
Number angle,
|
||||
Number insideRadius,
|
||||
|
@ -50,6 +51,7 @@ macro('ringsector', {
|
|||
|
||||
| Property | Default | Type | Description |
|
||||
|---------------:|-------------------|------------|-------------|
|
||||
| `id` | `ringsector` | `string` | The ID of this macro instance |
|
||||
| `center` | `new Point(0,0)` | [Point][1] | The center point of the ring sector |
|
||||
| `angle` | | Number | The angle the ring sector should cover |
|
||||
| `insideRadius` | | Number | The inside radius of the ring sector |
|
||||
|
@ -61,17 +63,6 @@ macro('ringsector', {
|
|||
|
||||
## Notes
|
||||
|
||||
### Nodes generated by this macro
|
||||
|
||||
This macro will add points and a single path to your part.
|
||||
Their IDs will be saved in store under:
|
||||
`parts.{part.name}.macros.@freesewing/plugin-ringsector.ids.{id}`
|
||||
|
||||
### Removing a ring sector
|
||||
|
||||
If you inherit a part with a ring sector drafted by this macro and you'd like to remove it,
|
||||
|
||||
you can do so with [the rmringsector macro](/reference/macros/rmringsector).
|
||||
### Example when rotate=true
|
||||
|
||||
<Example caption="Example of a ring sector drafted by this macro when rotate is truthy">
|
||||
|
|
|
@ -1,41 +1,14 @@
|
|||
---
|
||||
title: rmad
|
||||
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 [annotations plugin](/reference/plugins/annotations).
|
||||
The `rmad` macro removes all dimensions (all nodes created by `hd`, `vd`, `ld`, and `pd` macros).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmad')
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
<Example caption="An example of the rmad macro">
|
||||
```js
|
||||
({ Point, macro, part }) => {
|
||||
|
||||
// This will be removed
|
||||
macro('ld', {
|
||||
from: new Point(10, 0),
|
||||
to: new Point(40, 0),
|
||||
d: 5,
|
||||
})
|
||||
|
||||
// This will not removed
|
||||
macro('ld', {
|
||||
from: new Point(10, 20),
|
||||
to: new Point(80, 20),
|
||||
d: 5,
|
||||
id: 'example' // custom ID
|
||||
})
|
||||
|
||||
macro('rmad')
|
||||
|
||||
return part
|
||||
}
|
||||
```
|
||||
</Example>
|
||||
|
|
14
markdown/dev/reference/macros/rmahd/en.md
Normal file
14
markdown/dev/reference/macros/rmahd/en.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: rmaHd
|
||||
---
|
||||
|
||||
The `rmahd` macro removes all horizontal dimensions (all nodes created by `hd` macros).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmahd')
|
||||
```
|
14
markdown/dev/reference/macros/rmald/en.md
Normal file
14
markdown/dev/reference/macros/rmald/en.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: rmaLd
|
||||
---
|
||||
|
||||
The `rmald` macro removes all linear dimensions (all nodes created by `ld` macros).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmald')
|
||||
```
|
14
markdown/dev/reference/macros/rmapd/en.md
Normal file
14
markdown/dev/reference/macros/rmapd/en.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: rmaPd
|
||||
---
|
||||
|
||||
The `rmapd` macro removes all path dimensions (all nodes created by `pd` macros).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmapd')
|
||||
```
|
14
markdown/dev/reference/macros/rmavd/en.md
Normal file
14
markdown/dev/reference/macros/rmavd/en.md
Normal file
|
@ -0,0 +1,14 @@
|
|||
---
|
||||
title: rmaVd
|
||||
---
|
||||
|
||||
The `rmaVd` macro removes all path dimensions (all nodes created by `vd` macros).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmavd')
|
||||
```
|
16
markdown/dev/reference/macros/rmbanner/en.md
Normal file
16
markdown/dev/reference/macros/rmbanner/en.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: rmBanner
|
||||
---
|
||||
|
||||
The `rmBanner` macro removes the nodes added by [the banner macro](/reference/macros/banner).
|
||||
It is the recommended way to remove (the effects of) a `banner` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmBanner', id = 'banner')
|
||||
```
|
||||
|
15
markdown/dev/reference/macros/rmbannerbox/en.md
Normal file
15
markdown/dev/reference/macros/rmbannerbox/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmBannerBox
|
||||
---
|
||||
|
||||
The `rmBannerBox` macro removes the nodes added by [the bannerBox macro](/reference/macros/bannerbox).
|
||||
It is the recommended way to remove (the effects of) a `bannerBox` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmBannerBox', id = 'bannerbox')
|
||||
```
|
16
markdown/dev/reference/macros/rmbartack/en.md
Normal file
16
markdown/dev/reference/macros/rmbartack/en.md
Normal file
|
@ -0,0 +1,16 @@
|
|||
---
|
||||
title: rmBartack
|
||||
---
|
||||
|
||||
The `rmBartack` macro removes the nodes added by [the bartack macro](/reference/macros/bartack).
|
||||
It is the recommended way to remove (the effects of) a `bartack` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmBartack', id = 'bartack')
|
||||
```
|
||||
|
15
markdown/dev/reference/macros/rmbartackalong/en.md
Normal file
15
markdown/dev/reference/macros/rmbartackalong/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmBartackAlong
|
||||
---
|
||||
|
||||
The `rmBartackAlong` macro removes the nodes added by [the bartackAlong macro](/reference/macros/bartackalong).
|
||||
It is the recommended way to remove (the effects of) a `bartackAlong` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmBartackAlong', id = 'bartack')
|
||||
```
|
15
markdown/dev/reference/macros/rmbartackfractionalong/en.md
Normal file
15
markdown/dev/reference/macros/rmbartackfractionalong/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmBartackFractionAlong
|
||||
---
|
||||
|
||||
The `rmBartackFractionAlong` macro removes the nodes added by [the bartackFractionAlong macro](/reference/macros/bartackfractionalong).
|
||||
It is the recommended way to remove (the effects of) a `bartackFractionAlong` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmBartackFractionAlong', id = 'bartack')
|
||||
```
|
15
markdown/dev/reference/macros/rmcrossbox/en.md
Normal file
15
markdown/dev/reference/macros/rmcrossbox/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmCrossBox
|
||||
---
|
||||
|
||||
The `rmCrossBox` macro removes the nodes added by [the crossBox macro](/reference/macros/crossbox).
|
||||
It is the recommended way to remove (the effects of) a `crossbox` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmCrossBox', id = 'crossbox')
|
||||
```
|
15
markdown/dev/reference/macros/rmcutonfold/en.md
Normal file
15
markdown/dev/reference/macros/rmcutonfold/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmCutOnFold
|
||||
---
|
||||
|
||||
The `rmCutOnFold` macro removes the nodes added by [the cutOnFold macro](/reference/macros/cutonfold).
|
||||
It is the recommended way to remove (the effects of) a `cutOnFold` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmCutOnFold', id = 'cutonfold')
|
||||
```
|
|
@ -1,49 +0,0 @@
|
|||
---
|
||||
title: rmd
|
||||
---
|
||||
|
||||
The `rmd` macro removes a dimension.
|
||||
It is provided by the [annotations plugin](/reference/plugins/annotations).
|
||||
|
||||
To be able to use this plugin, you need to give your dimension an id:
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmd', {
|
||||
String id
|
||||
})
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
<Example caption="An example of the rmd macro">
|
||||
```js
|
||||
({ Point, macro, part }) => {
|
||||
|
||||
macro('ld', {
|
||||
from: new Point(10, 0),
|
||||
to: new Point(40, 0),
|
||||
d: 5,
|
||||
id: 'da',
|
||||
})
|
||||
|
||||
macro('ld', {
|
||||
from: new Point(10, 20),
|
||||
to: new Point(80, 20),
|
||||
d: 5,
|
||||
id: 'db',
|
||||
})
|
||||
|
||||
macro('rmd', { id: 'db' })
|
||||
|
||||
return part
|
||||
}
|
||||
```
|
||||
</Example>
|
||||
|
||||
## Configuration
|
||||
|
||||
| Property | Default | Type | Description |
|
||||
|----------|---------|----------|-------------|
|
||||
| `id` | | `string` | The id of the dimension to remove |
|
15
markdown/dev/reference/macros/rmgrainline/en.md
Normal file
15
markdown/dev/reference/macros/rmgrainline/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmGrainline
|
||||
---
|
||||
|
||||
The `rmGrainline` macro removes the nodes added by [the grainline macro](/reference/macros/grainline).
|
||||
It is the recommended way to remove (the effects of) a `grainline` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmGrainline', id = 'grainline')
|
||||
```
|
15
markdown/dev/reference/macros/rmhd/en.md
Normal file
15
markdown/dev/reference/macros/rmhd/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmHd
|
||||
---
|
||||
|
||||
The `rmHd` macro removes the nodes added by [the hd macro](/reference/macros/hd).
|
||||
It is the recommended way to remove (the effects of) a `hd` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmHd', id = 'hd')
|
||||
```
|
15
markdown/dev/reference/macros/rmld/en.md
Normal file
15
markdown/dev/reference/macros/rmld/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmLd
|
||||
---
|
||||
|
||||
The `rmLd` macro removes the nodes added by [the ld macro](/reference/macros/ld).
|
||||
It is the recommended way to remove (the effects of) a `ld` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmLd', id = 'ld')
|
||||
```
|
15
markdown/dev/reference/macros/rmminiscale/en.md
Normal file
15
markdown/dev/reference/macros/rmminiscale/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmMiniScale
|
||||
---
|
||||
|
||||
The `rmMiniscale` macro removes the nodes added by [the miniscale macro](/reference/macros/miniscale).
|
||||
It is the recommended way to remove (the effects of) a `miniscale` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmMiniscale', id = 'miniscale')
|
||||
```
|
15
markdown/dev/reference/macros/rmpd/en.md
Normal file
15
markdown/dev/reference/macros/rmpd/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmPd
|
||||
---
|
||||
|
||||
The `rmPd` macro removes the nodes added by [the pd macro](/reference/macros/pd).
|
||||
It is the recommended way to remove (the effects of) a `pd` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmPd', id = 'pd')
|
||||
```
|
15
markdown/dev/reference/macros/rmpleat/en.md
Normal file
15
markdown/dev/reference/macros/rmpleat/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmPleat
|
||||
---
|
||||
|
||||
The `rmPleat` macro removes the nodes added by [the pleat macro](/reference/macros/pleat).
|
||||
It is the recommended way to remove (the effects of) a `pleat` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmPleat', id = 'pleat')
|
||||
```
|
|
@ -1,5 +1,5 @@
|
|||
---
|
||||
title: rmringsector
|
||||
title: rmRingSector
|
||||
---
|
||||
|
||||
The `rmringsector` macro removes the nodes added by [the ringsector macro](/reference/macros/ringsector).
|
||||
|
@ -21,36 +21,3 @@ if you want to use it.
|
|||
macro('rmringsector', String id = 'ringsector')
|
||||
```
|
||||
|
||||
## Example
|
||||
|
||||
<Example caption="Example of a ring sector removed by this macro">
|
||||
```js
|
||||
({ Point, macro, Path, paths, part }) => {
|
||||
|
||||
macro('ringsector', {
|
||||
angle: 60,
|
||||
insideRadius: 30,
|
||||
outsideRadius: 45,
|
||||
})
|
||||
macro('rmringsector')
|
||||
|
||||
return part
|
||||
}
|
||||
```
|
||||
</Example>
|
||||
|
||||
## Configuration
|
||||
|
||||
| Property | Default | Type | Description |
|
||||
|---------:|--------------|--------|-------------|
|
||||
| `id` | `ringsector` | String | The id of the ringsector macro to remove |
|
||||
|
||||
## Notes
|
||||
|
||||
### Nodes removed by this macro
|
||||
|
||||
This macro will remove points and a single path from your part.
|
||||
Their IDs have been saved in store under:
|
||||
`parts.{part.name}.macros.@freesewing/plugin-ringsector.ids.{id}`
|
||||
by the [the ringsector macro](/reference/macros/ringsector).
|
||||
|
||||
|
|
15
markdown/dev/reference/macros/rmscalebox/en.md
Normal file
15
markdown/dev/reference/macros/rmscalebox/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmScaleBox
|
||||
---
|
||||
|
||||
The `rmScalebox` macro removes the nodes added by [the scalebox macro](/reference/macros/scalebox).
|
||||
It is the recommended way to remove (the effects of) a `scalebox` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmScalebox', id = 'scalebox')
|
||||
```
|
15
markdown/dev/reference/macros/rmsewtogether/en.md
Normal file
15
markdown/dev/reference/macros/rmsewtogether/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmSewTogether
|
||||
---
|
||||
|
||||
The `rmSewTogether` macro removes the nodes added by [the sewTogether macro](/reference/macros/sewtogether).
|
||||
It is the recommended way to remove (the effects of) a `sewtogether` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmSewTogether', id = 'sewtogether')
|
||||
```
|
15
markdown/dev/reference/macros/rmtitle/en.md
Normal file
15
markdown/dev/reference/macros/rmtitle/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmTitle
|
||||
---
|
||||
|
||||
The `rmTitle` macro removes the nodes added by [the title macro](/reference/macros/title).
|
||||
It is the recommended way to remove (the effects of) a `title` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmTitle', id = 'title')
|
||||
```
|
15
markdown/dev/reference/macros/rmvd/en.md
Normal file
15
markdown/dev/reference/macros/rmvd/en.md
Normal file
|
@ -0,0 +1,15 @@
|
|||
---
|
||||
title: rmVd
|
||||
---
|
||||
|
||||
The `rmVd` macro removes the nodes added by [the vd macro](/reference/macros/vd).
|
||||
It is the recommended way to remove (the effects of) a `vd` macro.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('rmVd', id = 'vd')
|
||||
```
|
|
@ -2,13 +2,16 @@
|
|||
title: round
|
||||
---
|
||||
|
||||
The `round` macro creates a rounded corner. It is provided by the [round
|
||||
plugin](/reference/plugins/round/).
|
||||
The `round` macro creates a rounded corner.
|
||||
|
||||
It is provided by [plugin-round](/reference/plugins/round), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('round', {
|
||||
String id = 'round',
|
||||
String class,
|
||||
Point from,
|
||||
Boolean hide,
|
||||
|
@ -42,6 +45,7 @@ macro('round', {
|
|||
|
||||
| Property | Default | Type | Description |
|
||||
|------------:|---------|---------------------|-------------|
|
||||
| `id` | `round` | `string` | The ID of this macro instance |
|
||||
| `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 cornerpoint to round |
|
||||
|
@ -50,15 +54,6 @@ macro('round', {
|
|||
| `hide` | `true` | Boolean | Whether to hide the path created by this macro |
|
||||
| `class` | | String | Class(es) to assign to the path created by this macro |
|
||||
|
||||
## Result
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `paths.${prefix}Rounded` | Path for the rounded corner |
|
||||
| `points.${prefix}Start` | Point for the start of the rounded corner |
|
||||
| `points.${prefix}End` | Point for the end of the rounded corner |
|
||||
| `points.${prefix}Cp1` | Control Point used to create the curved path |
|
||||
| `points.${prefix}Cp2` | Control Point used to create the curved path |
|
||||
|
||||
## Notes
|
||||
|
||||
|
|
|
@ -7,18 +7,20 @@ to verify their pattern is printed to scale.
|
|||
The white inside of the box provides a metric scale, and the black outside
|
||||
of the box provides an imperial scale.
|
||||
|
||||
The `scalebox` macro is is provided by the [annotations
|
||||
plugin](/reference/plugins/annotations).
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('scalebox', {
|
||||
String id = 'scalebox',
|
||||
Point at,
|
||||
String lead,
|
||||
Number rotate,
|
||||
String text,
|
||||
String title,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -43,34 +45,16 @@ macro('scalebox', {
|
|||
|
||||
| Property | Default | Type | Description |
|
||||
|------------:|---------|---------------------|-------------|
|
||||
| `id` | `scalebox` | `string` | The ID of this macro instance |
|
||||
| `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 |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
||||
|
||||
(\*) `freesewingIsMadeByJoostDeCockAndContributors \n withTheFinancialSupportOfOurPatrons`
|
||||
|
||||
## Result
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `paths.__scaleboxImperial` | Path of the imperial, outer box |
|
||||
| `paths.__scaleboxMetric` | Path of the metric, inner box |
|
||||
| `points.__scaleboxLead` | Point anchoring the lead text above the title |
|
||||
| `points.__scaleboxTitle` | Point anchoring the title text |
|
||||
| `points.__scaleboxTitle` | Point anchoring the text below the title |
|
||||
| `points.__scaleboxImperial` | Point anchoring the imperial text |
|
||||
| `points.__scaleboxMetric` | Point anchoring the metric text |
|
||||
| `points.__scalebox[Metric/Imperial][Top/Bottom][Left/Right]` | Points for the corners of the boxes |
|
||||
|
||||
## Notes
|
||||
|
||||
### Removing the scalebox
|
||||
|
||||
If you inherit a part with a scalebox on it and you'd like to remove all points and paths
|
||||
generated by the scalebox macro, you can do so by passing `false` to the macro:
|
||||
|
||||
```js
|
||||
macro('scalebox', false)
|
||||
```
|
||||
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|
||||
|
|
|
@ -5,17 +5,20 @@ title: sewTogether
|
|||
The `sewTogether` macro is used to mark where two parts of the same `part` need
|
||||
to be sewn together. This happens when you want to construct a cone for instance.
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations/).
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('sewTogether', {
|
||||
String id = 'sewtogether',
|
||||
Point from,
|
||||
Point to,
|
||||
Point middle = null,
|
||||
Boolean hinge = false,
|
||||
String prefix = 'sewtogether',
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -54,28 +57,19 @@ macro('sewTogether', {
|
|||
|
||||
| Property | Default | Type | Description |
|
||||
|----------------:|----------|---------------------|-------------|
|
||||
| `id` | `sewtogether` | `string` | The ID of this macro instance |
|
||||
| `from` | | [Point](/reference/api/point) | One side of what needs to be sewn together |
|
||||
| `to` | | [Point](/reference/api/point) | The other side of what needs to be sewn together |
|
||||
| `middle` | null | [Point](/reference/api/point) | The middle point (when ommitted, it will be halfway between `from` and `to`) |
|
||||
| `prefix` | 'sewtogether' | String | The prefix to be used for creating all the points and paths |
|
||||
| `hinge ` | `false` | Boolean | Draws the hinge line |
|
||||
|
||||
## Result
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `points.${prefix}From` | Copy of the `from` Point |
|
||||
| `points.${prefix}FromCP` | Control Point of the `from` Point |
|
||||
| `points.${prefix}Middle` | Copy of the `middle` Point |
|
||||
| `points.${prefix}To` | Copy of the `to` Point |
|
||||
| `points.${prefix}ToCP` | Control Point of the `to` Point |
|
||||
| `points.${prefix}Hinge` | Point for the hinge line |
|
||||
| `paths.${prefix}SewTogether` | Path forming the line |
|
||||
| `paths.${prefix}SewTogetherHinge` | Path forming the hinge line |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
||||
|
||||
## Notes
|
||||
|
||||
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|
||||
|
||||
This macro is aware of the `sa` setting. Normally it draws the
|
||||
hinge line on the inside of the part (following the counter-clockwise
|
||||
standard). When the `sa` is provided it draws the hinge line on the
|
||||
outside, up to the `sa` line.
|
||||
outside, up to the `sa` line.
|
||||
|
|
|
@ -3,7 +3,9 @@ title: sprinkle
|
|||
---
|
||||
|
||||
The `sprinkle` macro facilitates adding snippets to your pattern in bulk.
|
||||
It is provided by the [sprinkle plugin](/reference/plugins/sprinkle).
|
||||
|
||||
It is provided by [plugin-sprinkle](/reference/plugins/sprinkle), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
|
@ -54,8 +56,3 @@ macro('sprinkle', {
|
|||
| `scale` | 1 | number | Scale for the individual Snippets |
|
||||
| `rotate` | 0 | number | Rotation for the individual Snippets |
|
||||
|
||||
## Result
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `snippets.${pointname}-${snippet}` | The Snippet(s) created |
|
||||
|
|
|
@ -3,12 +3,15 @@ title: title
|
|||
---
|
||||
|
||||
The `title` macro adds a title to a pattern part.
|
||||
It is provided by the [annotations plugin](/reference/plugins/annotations).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('title', {
|
||||
String id = 'title',
|
||||
String align,
|
||||
Boolean append,
|
||||
Point at,
|
||||
|
@ -18,6 +21,7 @@ macro('title', {
|
|||
Number rotation,
|
||||
Number scale,
|
||||
String title,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -56,19 +60,15 @@ macro('title', {
|
|||
| `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 |
|
||||
| `at` | | [Point](/reference/api/point) | The point at which to insert the title |
|
||||
| `cutlist` | `true` | Boolean | Whether to include cutting instructions |
|
||||
| `id` | `title` | `string` | The ID of this macro instance |
|
||||
| `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.|
|
||||
| `rotation` | 0 | Number | An optional rotation in degrees |
|
||||
| `scale` | 1 | Number | An optional scaling factor |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
||||
|
||||
## Result
|
||||
## Notes
|
||||
|
||||
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `points._${prefix}_titleNr` | Point anchoring the part number text |
|
||||
| `points._${prefix}_titleName` | Point anchoring the part name text |
|
||||
| `points._${prefix}_titleCut_${material}_${i}` | Points anchoring the cutting instructions, by material key and instruction index |
|
||||
| `points._${prefix}_titlePattern` | Point anchoring the pattern name text |
|
||||
| `points._${prefix}_titleFor` | Point anchoring the name of the person for whom the pattern was made, if that information exists |
|
||||
| `points._${prefix}_exportDate` | Point anchoring the pattern export date |
|
||||
|
|
|
@ -3,19 +3,22 @@ title: vd
|
|||
---
|
||||
|
||||
The `vd` macro adds a _vertical dimension_ to your pattern.
|
||||
It is provided by the [annotations plugin](/reference/plugins/annotations).
|
||||
|
||||
It is provided by [plugin-annotations](/reference/plugins/annotations), which is
|
||||
part of [core-plugins](/reference/plugins/core) (so it is available by default).
|
||||
|
||||
## Signature
|
||||
|
||||
```js
|
||||
macro('vd', {
|
||||
String id,
|
||||
String id = 'vd',
|
||||
Point from,
|
||||
Boolean noEndMarker,
|
||||
Boolean noStartMarker,
|
||||
String text,
|
||||
Point to,
|
||||
Number x,
|
||||
Boolean force = false,
|
||||
})
|
||||
```
|
||||
|
||||
|
@ -29,6 +32,7 @@ macro('vd', {
|
|||
from: new Point(0,0),
|
||||
to: new Point(0,40),
|
||||
x:10,
|
||||
force: true,
|
||||
})
|
||||
|
||||
// Prevent clipping
|
||||
|
@ -49,21 +53,11 @@ macro('vd', {
|
|||
| `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 which paths and points will be created |
|
||||
| `id` | `vd` | `string` | The ID of this macro instance |
|
||||
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
|
||||
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
|
||||
|
||||
## Result
|
||||
|
||||
| Generated Element | Description |
|
||||
|-------------------|-------------|
|
||||
| `paths.${id}` | Path for the span of the dimension |
|
||||
| `paths.${id}_ls` | Path for the leader to the start of the dimension |
|
||||
| `paths.${id}_le` | Path for the leader to the end of the dimension |
|
||||
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `paperless` is `false` |
|
||||
|
||||
## Notes
|
||||
|
||||
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/)
|
||||
This macro takes the `paperless` setting into account and won't output anything when both `paperless` and `force` are `false`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue