2022-09-21 09:55:21 +02:00
|
|
|
---
|
|
|
|
title: Part measurements
|
|
|
|
---
|
|
|
|
|
|
|
|
The `measurements` and `optionalMeasurements` properties on the
|
|
|
|
part configuration object list the part's required and optional
|
|
|
|
measurements respectively.
|
|
|
|
|
2024-09-28 13:13:48 +02:00
|
|
|
:::tipYou should only include what's required by the part itself, not its dependencies:::
|
2022-09-21 09:55:21 +02:00
|
|
|
|
|
|
|
## measurements
|
|
|
|
|
2022-12-07 14:20:07 -08:00
|
|
|
The `measurements` property should hold the names of the measurements
|
2022-09-21 09:55:21 +02:00
|
|
|
that are required to draft the current part.
|
|
|
|
|
|
|
|
```js
|
|
|
|
const part = {
|
|
|
|
name: 'example.front',
|
|
|
|
measurements: [ 'head', 'chest' ],
|
|
|
|
draft: ({ part }) => part
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
|
|
|
## optionalMeasurements
|
|
|
|
|
2022-12-07 14:20:07 -08:00
|
|
|
The `optionalMeasurements` property should hold the names of the measurements
|
2022-09-21 09:55:21 +02:00
|
|
|
that are optional to draft the current part.
|
|
|
|
|
|
|
|
```js
|
|
|
|
import { pluginBust } from '@freesewing/plugin-bust'
|
|
|
|
|
|
|
|
const part = {
|
|
|
|
name: 'example.front',
|
|
|
|
plugins: [ pluginBust ],
|
|
|
|
measurements: [ 'head', 'chest' ],
|
|
|
|
optionalMeasurements: [ 'highBust' ],
|
|
|
|
draft: ({ part }) => part
|
|
|
|
}
|
|
|
|
```
|