FreeSewingAn open source Javascript library for parametric sewing patterns
Custom-Fit Fashion
FreeSewing is the leading open source library for on-demand garment manufacturing.
Loved by home sewers and fashion entrepreneurs alike, we provide the tech stack for your creative endeavours.
Patterns as Code
FreeSewing designs are implemented as code giving you unmatched power and flexibility.
You can mix and match parts from different designs, extend them, or add options that turn one base design into many.
Documentation
Guides
Howtos
Common code challenges
- Accessing measurements
- Accessing options
- Adding paths
- Adding pattern parts
- Adding points
- Adding snippets
- Adding text
- Creating a new design
- Creating a new snippet to be used in your design
- Drawing circles
- Handling whitespace in text
- Hide or remove paths from an inherited part
- Hide paths but still show text
- Part dependencies
- Part inheritance
- Share dimensions between pattern parts
- Sharing data between parts
- Storing the seam length to use in another part
- Using attributes
- Using macros
- Where to get help
Reference
- CSS Classes
Core API
- Design
Path
- Path._curve()
- Path.addClass()
- Path.addText()
- Path.angleAt()
- Path.asPathString()
- Path.asRenderProps()
- Path.attr()
- Path.bbox()
- Path.clean()
- Path.clone()
- Path.close()
- Path.combine()
- Path.curve()
- Path.curve_()
- Path.divide()
- Path.edge()
- Path.end()
- Path.hide()
- Path.insop()
- Path.intersects()
- Path.intersectsX()
- Path.intersectsY()
- Path.join()
- Path.length()
- Path.line()
- Path.move()
- Path.noop()
- Path.offset()
- Path.reverse()
- Path.rotate()
- Path.roughLength()
- Path.setClass()
- Path.setHidden()
- Path.setText()
- Path.shiftAlong()
- Path.shiftFractionAlong()
- Path.smurve()
- Path.smurve_()
- Path.split()
- Path.start()
- Path.translate()
- Path.trim()
- Path.unhide()
Point
- Point.addCircle()
- Point.addText()
- Point.angle()
- Point.asRenderProps()
- Point.attr()
- Point.clone()
- Point.copy()
- Point.dist()
- Point.dx()
- Point.dy()
- Point.flipX()
- Point.flipY()
- Point.rotate()
- Point.setCircle()
- Point.setText()
- Point.shift()
- Point.shiftFractionTowards()
- Point.shiftOutwards()
- Point.shiftTowards()
- Point.sitsOn()
- Point.sitsRoughlyOn()
- Point.slope()
- Point.translate()
utils
- utils.applyTransformToPoint()
- utils.beamIntersectsCircle()
- utils.beamIntersectsCurve()
- utils.beamIntersectsX()
- utils.beamIntersectsY()
- utils.beamsIntersect()
- utils.capitalize()
- utils.circlesIntersect()
- utils.combineTransform()
- utils.curveEdge()
- utils.curveIntersectsX()
- utils.curveIntersectsY()
- utils.curveParameterFromPoint()
- utils.curvesIntersect()
- utils.deg2rad()
- utils.generateStackTransform()
- utils.getTransformedBounds()
- utils.lineIntersectsCircle()
- utils.lineIntersectsCurve()
- utils.linesIntersect()
- utils.mergeI18n()
- utils.mergeOptions()
- utils.pctBasedOn()
- utils.pointOnBeam()
- utils.pointOnCurve()
- utils.pointOnLine()
- utils.rad2deg()
- utils.round()
- utils.splitCurve()
- utils.stretchToScale()
- utils.units()
Macros
- banner
- bannerBox
- bartack
- bartackAlong
- bartackFractionAlong
- crossBox
- cutOnFold
- flip
- gore
- grainline
- hd
- ld
- miniScale
- mirror
- pd
- pleat
- ringSector
- rmBanner
- rmBannerBox
- rmBartack
- rmBartackAlong
- rmBartackFractionAlong
- rmCrossBox
- rmCutOnFold
- rmGrainline
- rmHd
- rmLd
- rmMiniScale
- rmPd
- rmPleat
- rmRingSector
- rmScaleBox
- rmSewTogether
- rmTitle
- rmVd
- rmaD
- rmaHd
- rmaLd
- rmaPd
- rmaVd
- round
- scalebox
- sewTogether
- sprinkle
- title
- vd
- Measurements
Store Methods
- cutlist.addCut()
- cutlist.removeCut()
- cutlist.setCutOnFold()
- cutlist.setGrain()
- flag.error()
- flag.fixme()
- flag.info()
- flag.note()
- flag.preset()
- flag.tip()
- flag.warn()
- generateMacroIds()
- getMacroIds()
- log.debug()
- log.error()
- log.info()
- log.warn()
- pack()
- removeMacroNodes()
- storeMacroIds()
- unflag.error()
- unflag.fixme()
- unflag.info()
- unflag.note()
- unflag.preset()
- unflag.tip()
- unflag.warn()
- Web of Trust
Tutorials
- Getting started with Gitpod
- Getting started with Codespaces
- Getting started with Vercel
- Getting started on Windows
Pattern design tutorial
Part 2: Parametric design
- Creating a new design
- Creating a part
- Adding measurements
- Adding options
- A part's draft method
- Constructing the neck opening
- Fitting the neck opening
- Completing the neck opening
- Drawing the bib outline
- Shaping the straps
- Creating the closure
- Avoiding overlap
- Drawing the straps
- Rounding the corners
- Conclusion (of part 2)
Training
Using FreeSewing: TL;DR
To go fast, go alone 🚀
All you need is NodeJS; Then run:
shell
npx @freesewing/new-design
This command will setup the stand-alone FreeSewing development environment for you. Learn more.
To go far, go together 🧑🤝🧑
First, fork our monorepo on GitHub, then run:
shell
git clone <url to your fork>
cd freesewing
yarn kickstart
These commands will clone your fork of the freesewing/freesewing repository on GitHub and set it up for development. Learn more.