1
0
Fork 0
freesewing/markdown/dev/reference/api/pattern/samplemeasurement/en.md
2021-10-17 18:26:00 +02:00

1.1 KiB

title
Pattern.sampleMeasurement()

A pattern's sampleMeasurement() method will sample a given measurement, which means to draft it in different iterations while adjusting the input value of the given measurement. In practice, it will draft 10 iterations of the pattern while adapting the measurement between 90% and 110% of its original value.

The goal of measurement sampling is to understand the impact of a given measurement on a pattern.

This method is chainable as it returns the Pattern object

The goal of option sampling is to verify the impact of an option on the pattern, and verify that its min and max boundaries are correct and its default value is sensible.

Pattern.sampleMeasurement() signature

Pattern pattern.sampleMeasurement(string measurement)

Pattern.sampleMeasurement() example

import Aaron from "@freesewing/aaron"
import models from "@freesewing/models"

const pattern = new Aaron({ measurements: models.manSize38 })

const svg = pattern.sampleMeasurement("chest").render()