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
product.get→productpattern.get→referencepattern.grade→gradedpattern.preflightbody.select→bodymaterial.get→materialgarment.drape→rungarment.measure→measure
Sample inputs
| Key | Value |
|---|---|
product_id | aop-hoodie |
sizes | ["XS","S","M","L","XL","2XL"] |
prove_size | S |
material_id | fleece_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