Skip to content

drmcoder/garment-fabric-consumption

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

garment-fabric-consumption

Powered by Scan ERP License: MIT

Fabric consumption calculator for garment manufacturing.

Supports both knit (GSM-based weight method) and woven (marker-length method) garments. Includes wastage allowance and GSM ↔ oz/yd² conversion. Built and used in production by Scan ERP — the garment manufacturing ERP that tracks fabric consumption from cutting batch to dispatch.

Two languages, same logic

Language Install Source
Node.js / TypeScript npm install garment-fabric-consumption npm/
Python 3.7+ pip install garment-fabric-consumption python/

Methods

Knit (weight method)

Total area (m²) = (body L × W × 2) + (sleeve L × W × 2 × 2)   ← in cm²/10000
Weight (g)      = Area × GSM

Woven (length method)

Per garment (m) = Marker length / Pieces per marker

Both methods accept an optional wastage % (5–10% typical).

API

  • calculateKnitConsumption / calculate_knit_consumption
  • calculateWovenConsumption / calculate_woven_consumption
  • gsmToOzPerYd2 / gsm_to_oz_per_yd2
  • ozPerYd2ToGsm / oz_per_yd2_to_gsm
  • addWastageAllowance / add_wastage_allowance

Typical wastage allowances

Garment type Wastage %
Basic T-shirt 5–8%
Polo / fashion knit 8–10%
Shirt (woven) 5–7%
Trouser 5–8%
Heavy outerwear 8–12%

Try Scan ERP

This calculator is free. The full ERP that uses it every cutting batch — with size-aware consumption from Optitex marker data and GSM analysis — is at scanerp.pro.

License

MIT © Santosh Rijal / Scan ERP

Related

Related Packages — Scan ERP Garment Toolkit

Part of the Scan ERP open-source garment toolkit — production-tested utilities for CMT factory operations, all MIT licensed:

See the curated awesome-garment-erp list for the full Scan ERP ecosystem, or visit scanerp.pro for the production garment manufacturing ERP this toolkit powers.

About

Fabric consumption calculator — knit (GSM × area) and woven (marker length) methods with wastage (npm + PyPI).

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors