2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: rmad
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-09-30 04:39:30 +02:00
|
|
|
The `rmad` macro removes all dimensions with the exception of those that were
|
|
|
|
created with a custom ID. It is provided by the [dimension
|
|
|
|
plugin](/reference/plugins/dimension/).
|
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('rmad')
|
|
|
|
```
|
2022-09-30 04:39:30 +02:00
|
|
|
|
|
|
|
## Example
|
|
|
|
|
|
|
|
<Example caption="An example of the rmad macro">
|
|
|
|
```js
|
|
|
|
({ Point, macro, part }) => {
|
|
|
|
|
|
|
|
// This will be removed
|
|
|
|
macro('ld', {
|
|
|
|
from: new Point(10, 0),
|
|
|
|
to: new Point(40, 0),
|
|
|
|
d: 5,
|
|
|
|
})
|
|
|
|
|
|
|
|
// This will not removed
|
|
|
|
macro('ld', {
|
|
|
|
from: new Point(10, 20),
|
|
|
|
to: new Point(80, 20),
|
|
|
|
d: 5,
|
|
|
|
id: 'example' // custom ID
|
|
|
|
})
|
|
|
|
|
|
|
|
macro('rmad')
|
|
|
|
|
|
|
|
return part
|
|
|
|
}
|
|
|
|
```
|
|
|
|
</Example>
|