1
0
Fork 0
freesewing/markdown/dev/reference/api/pattern/samplemodels/en.md
Joost De Cock b34a2ee2ed feat: Flat import of markdown repo
This is a flat (without history) import of (some of) the content
from our markdown module.

We've imported this without history because the repo contains our
blog posts and showcases posts content prior to porting them to strapi.

Since this contains many images, it would balloon the size of this repo
to import the full history.

Instead, please refer to the history of the (archived) markdown repo
at: https://github.com/freesewing/markdown
2021-08-25 16:09:31 +02:00

1.1 KiB

title
sampleModels()
Pattern pattern.sampleModels(object models, string focus)

Samples a pattern for a number of models you pass to it.

The goal of model sampling is to verify that a pattern grades correctly up and down as sizes change.

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

let aaron = new Aaron({
  settings: {
    embed: true,
    measurements: models.manSize38
  }, 
})

let svg = aaron.sampleModels(models, "manSize38").render()
Model focus: Making a comparison

When sampling models, you can put the focus on one of the models, thereby making it easier to see a comparison between a given set of measrurements, and the rest.

To do so, pass a second parameter to the sampleModels() method. This should be the key of the model in the models object for that model you want the focus to be on.

Alternatively, you can use the sample() method and set settings.sample.focus to the key identifying your model in the models object.