2021-10-17 18:26:00 +02:00
|
|
|
---
|
|
|
|
title: millimeter
|
|
|
|
---
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-01-19 19:04:43 +01:00
|
|
|
While FreeSewing supports millimeter options, we recommend
|
|
|
|
using [percentage options][1] and will not accept
|
|
|
|
contributions that use millimeter options.
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-02-05 17:44:23 +01:00
|
|
|
## Structure
|
|
|
|
|
|
|
|
A millimeter option should be a plain object with these properties:
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2021-10-17 18:26:00 +02:00
|
|
|
- `mm` : The default value in millimeter
|
|
|
|
- `min` : The minimul that's allowed
|
|
|
|
- `max` : The maximum that's allowed
|
2022-02-05 17:44:23 +01:00
|
|
|
- `hide` <small>(optional)</small> : A method to [control the optional display of the option][hide]
|
|
|
|
|
|
|
|
[hide]: /reference/api/config/options#optionally-hide-options-by-configuring-a-hide-method
|
|
|
|
|
|
|
|
## Example
|
2021-08-25 16:09:31 +02:00
|
|
|
|
|
|
|
```js
|
|
|
|
options: {
|
|
|
|
elasticWidth: {
|
|
|
|
mm: 35,
|
|
|
|
min: 5,
|
|
|
|
max: 80
|
|
|
|
}
|
|
|
|
}
|
|
|
|
```
|
|
|
|
|
2022-01-19 19:04:43 +01:00
|
|
|
<Comment by="joost">
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-01-19 19:04:43 +01:00
|
|
|
##### What's wrong with millimeter options?
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-01-19 19:04:43 +01:00
|
|
|
Millimeter options do not scale.
|
|
|
|
Parametric design is the _raison d'être_ of FreeSewing and that core belief
|
|
|
|
that things should seamlessly adapt goes out the window when you use a `mm`
|
|
|
|
option because now you have a value that will not change based on the
|
|
|
|
input measurements.
|
2021-08-25 16:09:31 +02:00
|
|
|
|
2022-01-19 19:04:43 +01:00
|
|
|
You could argue that it's fine because _you can just lower the option_
|
|
|
|
but that breaks the principle of _sensible defaults_ (aka no surprises).
|
|
|
|
The fact that you can sidestep the bullet does not mean you're not creating
|
|
|
|
a footgun.
|
|
|
|
|
|
|
|
When you need a millimeter option, reach for a [snapped
|
|
|
|
percentage option][1] instead.
|
|
|
|
|
|
|
|
</Comment>
|
|
|
|
|
2022-02-05 17:44:23 +01:00
|
|
|
[1]: /reference/api/config/options/pct
|