Plan fabric length to buy
plan_fabric_lengthWorks out how much fabric to buy before washing so that the usable length needed remains afterwards: required length = (usable length + extra) ÷ (1 − lengthwise shrinkage), then rounded up to the shop’s selling increment. Works in metres or yards (any one unit). A negative shrinkage rate means growth.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| unit | No | Unit of the lengths (only used to label the answer). Default m. | |
| extra_length | No | Optional extra usable length after washing (default 0). Do not count an allowance the pattern already includes. | |
| usable_length | Yes | Length needed after washing (check the pattern layout), greater than 0. | |
| shop_increment | No | The shop’s selling increment to round up to, e.g. 0.25 for quarter metres or 0.125 for eighth yards. 0 for no rounding (default 0). | |
| shrinkage_percent | Yes | Measured lengthwise shrinkage in percent, e.g. 5 for 5%. Negative means growth. |