1
0
Fork 0
freesewing/markdown/dev/reference/macros/miniscale/en.md

1.7 KiB

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 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. It is the mini version of the scalebox macro.

Signature

macro('miniscale', {
  Point at,
  Number rotate,
})

Example

```js ({ Point, macro, part }) => {

macro('miniscale', { at: new Point(0,0), })

return part }

</Example>

## Configuration

| Property    | Default | Type                | Description |
|------------:|---------|---------------------|-------------|
| `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 |

## 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)