2022-02-19 08:04:25 +01:00
|
|
|
---
|
2021-10-17 18:26:00 +02:00
|
|
|
title: margin
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
The `margin` setting allows you to specify a part margin (in mm).
|
2022-12-14 21:02:30 -08:00
|
|
|
Each part will have this margin applied when they are laid out on the pattern.
|
2022-12-26 07:00:16 -08:00
|
|
|
The default is `2 mm`.
|
2021-12-28 21:07:45 +01:00
|
|
|
|
2022-10-02 17:41:04 +02:00
|
|
|
## Signature
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-02 17:41:04 +02:00
|
|
|
```js
|
|
|
|
const settings = {
|
|
|
|
Number margin=2
|
|
|
|
}
|
|
|
|
```
|
2022-02-19 08:04:25 +01:00
|
|
|
|
2022-10-02 17:41:04 +02:00
|
|
|
## Example
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
```js
|
2022-10-02 17:41:04 +02:00
|
|
|
import { Aaron } from "@freesewing/aaron"
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-02 17:41:04 +02:00
|
|
|
const pattern = new Aaron({
|
2021-08-25 16:09:31 +02:00
|
|
|
margin: 5
|
|
|
|
})
|
|
|
|
```
|
|
|
|
|
2022-10-02 17:41:04 +02:00
|
|
|
## Notes
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-10-02 17:41:04 +02:00
|
|
|
The _margin_ implies that:
|
2022-12-26 07:00:16 -08:00
|
|
|
- At the edge of the SVG, the margin will be `margin * 1` (2 mm by default)
|
|
|
|
- Between parts, the margin will be `margin * 2` (4 mm by default)
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-12-14 21:02:30 -08:00
|
|
|
Setting the margin to zero (or below) will cause parts to overlap.
|
2022-10-02 17:41:04 +02:00
|
|
|
|
2022-12-26 07:00:16 -08:00
|
|
|
In paperless mode, the margin will not go below 10 mm.
|
2022-10-02 17:41:04 +02:00
|
|
|
That is because text is not taken into account when calculating the bounding
|
|
|
|
box of the part. Since dimensions are typically the outermost elements in a
|
|
|
|
paperless part, a too narrow margin would cause the dimension text to get cut
|
|
|
|
off.
|