Documentation & page contents

Get a Pattern in · 04 · grade_sizes

Grade a Pattern from a size chart

You have one size and a chart. Infer the rest of the cut.

You have

one size and a chart

You want

Infer the rest of the cut

You have a Pattern at one size (here: M) and a size chart on the Product. You want the rest of the range (XS–2XL).

This is 2D. Construction does not grade. Body is selected per size. Drape uses the Pattern of that size — you do not scale a draped M in 3D.

Steps

  1. product.get product
  2. pattern.get reference
  3. pattern.grade graded
  4. pattern.preflight
  5. body.select body
  6. material.get material
  7. garment.drape run
  8. garment.measure measure

Sample inputs

KeyValue
product_idaop-hoodie
sizes["XS","S","M","L","XL","2XL"]
prove_sizeS
material_idfleece_250gsm

Expected fixture checks

These are the checks declared by this sample, not a captured production result. Referenced sample files are included in the gated SDK checkout.

{
  "graded.ok": true,
  "graded.patterns.S.size": "S",
  "graded.patterns.XL.size": "XL",
  "run.phase": "draped",
  "measure.ok": true
}

Run

Obtain and install the SDK before running this example from its root directory.

python examples/run_workflow.py grade_sizes