How it works, and how it's tested

Bolt & Grain is a static web page. All calculations and file generation happen in your browser.

Formulas

Orientation rules

Every piece's grainline runs along its length. Lengthwise pieces are placed at 0° or 180°, crosswise at 90° or 270°, and "no grain needed" pieces at any quarter turn. With nap or a one-way print, 180° and 270° aren't allowed and no-grain pieces stay at 0°. "Allow rotation" off keeps a piece in its first orientation.

Packing

Auto-arrange uses the MaxRects rectangle-packing heuristic on a strip of usable width. It tries 12 combinations of sort order (length, area, longest side, width) and placement rule (bottom-left, best short-side fit, best area fit), and keeps the one that places the most pieces in the shortest length. It is not optimal and does not do garment nesting: pieces are rectangles, and curved pattern pieces would need their real outlines. See the limits of automatic layout.

Manual moves are checked by an independent conflict checker, which tests every pair of pieces for overlap and gap and checks bounds, orientation and repeat alignment. Conflicts are outlined in red and listed. If a piece is too wide for the usable width in every allowed orientation, or the layout is longer than the fabric you have, you get a warning with the numbers.

Exports

Tests

Who runs this

Bolt & Grain is operated by SPAZ Power LLC. It's free, with no account. Feedback: 55paz.power@gmail.com. Estimates depend on your measurements, so always check against the real fabric before cutting. We can't be responsible for fabric or materials.