Industry-standard algorithms for precise fabric calculations.
Calculation Philosophy:
All calculations originate from a centralized engine (calculationFormulas.ts) ensuring 100% consistency across quotes, work orders, and invoices.
Single Source of Truth:
- Calculate once in the engine
- Pass results to all display components
- Never recalculate in display logic
- Prevents '2+2=5' errors
Fabric Orientation:
Vertical (Standard):
Fabric runs top-to-bottom (normal orientation)
- Widths calculated from rail width × fullness
- Pieces needed = widths ÷ fabric width
- Total meterage = pieces × drop length
Horizontal (Railroaded):
Fabric runs side-to-side (rotated 90°)
- Pieces calculated from drop ÷ fabric width
- Each piece spans full width
- Total meterage = pieces × total width
Included in Calculations:
- Window dimensions
- Fullness ratios (from heading/template)
- Header and bottom hems
- Side hem allowances
- Return dimensions (left/right)
- Seam allowances (critical!)
- Pattern repeat matching
- Wastage percentage
Display Format:
- Vertical: 'X.XXm × $XX.XX/m'
- Horizontal: 'X.XXm × Y pieces = Z.ZZm × $XX.XX/m'
Comments
0 comments
Please sign in to leave a comment.