2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: flip
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-01-18 09:01:58 +01:00
|
|
|
The `flip` macro flips (mirrors) an entire part vertically around either the X-axis or the Y-axis.
|
|
|
|
It is provided by the [flip plugin](/reference/plugins/flip).
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
```js
|
2022-01-18 09:01:58 +01:00
|
|
|
macro("flip", {
|
|
|
|
axis: 'x'
|
|
|
|
})
|
2021-08-25 16:09:31 +02:00
|
|
|
```
|
|
|
|
|
2022-01-18 09:01:58 +01:00
|
|
|
| Property | Default | Type | Description |
|
|
|
|
|----------------:|---------|---------------------|-------------|
|
|
|
|
| `axis` | 'x' | The axis to flip around. Either `x` or `y` |
|
|
|
|
|
|
|
|
<Note>
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-01-18 09:01:58 +01:00
|
|
|
Under the hood, this macro will:
|
2021-10-17 18:26:00 +02:00
|
|
|
|
2022-01-18 09:01:58 +01:00
|
|
|
- Go through all Points in your Part, and multiply their (X or Y)-coordinate by -1
|
|
|
|
- Go through all the Paths in your Part, and for each drawing operation will multiply the (X or Y)-coordinare by -1
|
|
|
|
- Go through all the Snippets in your Part and multiply the (X or Y)-coordinate of the anchor point by -1
|
2021-10-17 18:26:00 +02:00
|
|
|
|
2022-01-18 09:01:58 +01:00
|
|
|
</Note>
|