2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: round
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
The `round` macro rounds a corner. It is provided by the [round plugin](/reference/plugins/round/).
|
|
|
|
|
|
|
|
Note that this is only intended for 90 degree corners.
|
|
|
|
|
2022-01-19 11:31:39 +01:00
|
|
|
<Example part="plugin_round">
|
|
|
|
Example of corners rounded with the round plugin
|
|
|
|
</Example>
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
```js
|
|
|
|
macro('round', {
|
|
|
|
from: points.bottomRight,
|
|
|
|
to: points.topLeft,
|
|
|
|
via: points.topRight,
|
|
|
|
radius: 20,
|
|
|
|
prefix: 'tr',
|
|
|
|
render: true
|
|
|
|
})
|
|
|
|
```
|
|
|
|
|
2022-02-19 08:04:25 +01:00
|
|
|
| Property | Default | Type | Description |
|
2021-08-25 16:09:31 +02:00
|
|
|
|------------:|---------|---------------------|-------------|
|
|
|
|
| `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 corner to round |
|
|
|
|
| `radius` | Maximum | Number | The radius in mm in not the maximum |
|
|
|
|
| `prefix` | | String | A prefix to give to the points and paths created by this macro |
|
|
|
|
| `render` | `false` | Boolean | Whether to render the path created by this macro |
|
|
|
|
| `class` | | String | Class(es) to assign to the path created by this macro |
|