2021-10-17 18:26:00 +02:00
|
|
|
---
|
2023-10-29 17:20:35 +01:00
|
|
|
title: miniScale
|
2021-10-17 18:26:00 +02:00
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-02-20 14:35:50 +01:00
|
|
|
The `miniscale` macro adds a mini _scale box_ to your pattern. This box allows
|
2021-08-25 16:09:31 +02:00
|
|
|
users to verify their pattern is printed to scale.
|
2022-12-09 20:59:53 -08:00
|
|
|
The white inside of the box provides a metric scale, and the black outside
|
|
|
|
of the box provides an imperial scale.
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2023-10-29 17:20:35 +01:00
|
|
|
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).
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-30 04:39:30 +02:00
|
|
|
## Signature
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
```js
|
|
|
|
macro('miniscale', {
|
2022-09-30 04:39:30 +02:00
|
|
|
Point at,
|
|
|
|
Number rotate,
|
2023-10-29 17:20:35 +01:00
|
|
|
Boolean force = false,
|
2021-08-25 16:09:31 +02:00
|
|
|
})
|
|
|
|
```
|
|
|
|
|
2022-09-30 04:39:30 +02:00
|
|
|
## Example
|
|
|
|
|
|
|
|
<Example caption="An example of the miniscale macro">
|
|
|
|
```js
|
|
|
|
({ Point, macro, part }) => {
|
|
|
|
|
|
|
|
macro('miniscale', {
|
|
|
|
at: new Point(0,0),
|
|
|
|
})
|
|
|
|
|
|
|
|
return part
|
|
|
|
}
|
|
|
|
```
|
|
|
|
</Example>
|
|
|
|
|
|
|
|
## Configuration
|
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
| Property | Default | Type | Description |
|
2022-12-09 20:59:53 -08:00
|
|
|
|------------:|---------|---------------------|-------------|
|
2022-02-20 14:35:50 +01:00
|
|
|
| `at` | | [Point](/reference/api/point) | The point to anchor the _scale box_ on |
|
2021-08-25 16:09:31 +02:00
|
|
|
| `rotate` | 0 | Number | Rotation in degrees |
|
2023-10-29 17:20:35 +01:00
|
|
|
| `force` | `false` | `boolean` | Set this to `true` to display the macro output even when `complete` is `false` |
|
2022-12-09 20:59:53 -08:00
|
|
|
|
2022-09-30 04:39:30 +02:00
|
|
|
## Notes
|
2022-07-10 16:09:12 +02:00
|
|
|
|
2023-10-29 17:20:35 +01:00
|
|
|
This macro takes the `complete` setting into account and won't output anything when both complete and `force` are `false`.
|