2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: margin
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2021-10-17 18:26:00 +02:00
|
|
|
Allows you to specify a part margin (in mm). The default is 2mm.
|
2021-08-25 16:09:31 +02:00
|
|
|
Each part will have this margin applied. This means that:
|
|
|
|
|
2021-10-17 18:26:00 +02:00
|
|
|
- At the edge of the SVG, the margin will be `margin * 1` (2mm by default)
|
|
|
|
- Between parts, the margin will be `margin * 2` (4mm by default)
|
|
|
|
|
2021-08-25 16:09:31 +02:00
|
|
|
Note that setting the margin to zero (or below) will cause parts to overlap.
|
|
|
|
|
|
|
|
```js
|
|
|
|
import brian from "@freesewing/brian";
|
|
|
|
|
|
|
|
let pattern = new brian({
|
|
|
|
margin: 5
|
|
|
|
})
|
|
|
|
```
|
|
|
|
|
|
|
|
<Note>
|
|
|
|
|
|
|
|
###### For paperless, the minimal margin is 10mm
|
|
|
|
|
2021-10-17 18:26:00 +02:00
|
|
|
In paperless mode, the margin will not go below 10mm.
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
That is because text is not taken into account when calculating the bounding box of the part.
|
2021-10-17 18:26:00 +02:00
|
|
|
Since dimensions are typically the outermost elements in a paperless part,
|
2021-08-25 16:09:31 +02:00
|
|
|
a too narrow margin would cause the dimension text to get cut off.
|
|
|
|
|
|
|
|
</Note>
|