FAILURE MAP
← Case archive

FA-97583 / Knitting and sewing pattern grading / Member archive

Cutting layout fabric length: row overflow test · case 03

Pieces that exactly fill the width are pushed to a new row.

Member previewVariant 3 · 3 implementations · 8 checks per implementation

Case contract

Pieces [w, h, qty] (cm; w across the fabric). A piece wider than the fabric is rotated if the fabric is not directional and its height fits, else "error: piece too wide". Expand qty, sort by (height, width) descending, then shelf-pack: start a new row when the row width plus the piece would exceed the fabric width; each row is as tall as its tallest piece. Return [length_cm, eighths_of_a_yard] with eighths = ceiling(length/91.44*8).

Why this case matters

Pattern envelopes and cutting planners estimate yardage from piece layouts and nap direction.

One recorded failure

Sample boundary fixture

This sample comes from the broken implementation of a controlled reproducer.

Boundary fixtureActualExpectedOutcome
exact fit row[125, 11][80, 7]Failed

MEMBER ARCHIVE

The complete case is available to members.

This record includes three runnable implementations, regression fixtures, execution results, and source hashes.

Member access is invitation-based. Sign in with your invited account to inspect the sources.

Sign in to the archive ↗