2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: pd
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2021-10-17 18:26:00 +02:00
|
|
|
The `pd` macro adds a *path dimension* to your pattern, indicating the length of a path.
|
2021-08-25 16:09:31 +02:00
|
|
|
It is provided by the [dimension plugin](/reference/plugins/dimension/).
|
|
|
|
|
|
|
|
<Example part="path_length" caption="Example of a multiple path dimensions" />
|
|
|
|
|
|
|
|
```js
|
|
|
|
macro('pd', {
|
|
|
|
path: paths.example,
|
|
|
|
d: -20
|
|
|
|
})
|
|
|
|
```
|
|
|
|
|
2021-10-17 18:26:00 +02:00
|
|
|
| Property | Default | Type | Description |
|
2021-08-25 16:09:31 +02:00
|
|
|
|----------------:|---------|---------------------|-------------|
|
|
|
|
| `path` | | [Path](/reference/api/path) | The path to draw the dimension along |
|
2022-01-18 08:31:04 +01:00
|
|
|
| `d` | 0 | Number | The offset at which to draw the dimension |
|
2021-08-25 16:09:31 +02:00
|
|
|
| `text` | Path length | Number | The text to go on the dimension if not the length of the path |
|
|
|
|
| `id` | auto-assigned | String | A custom ID under wich paths and points will be created |
|
|
|
|
| `noStartMarker` | `false` | Boolean | Whether to not draw a start marker |
|
2022-01-18 08:31:04 +01:00
|
|
|
| `noEndMarker` | `false` | Boolean | Whether to not draw an end marker |
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
<Note>
|
|
|
|
|
|
|
|
Setting a custom ID will:
|
|
|
|
|
2021-10-17 18:26:00 +02:00
|
|
|
- Allow removal of the dimension with [the `rmd` macro](/reference/macros/rmd)
|
|
|
|
- Prevent removal of the dimension with [the `rmad` macro](/reference/macros/rmad/)
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
</Note>
|
2021-10-17 18:26:00 +02:00
|
|
|
|
|
|
|
|