1
0
Fork 0

chore: Linter changes

This commit is contained in:
Joost De Cock 2021-04-24 10:16:31 +02:00
parent dfdfc46ded
commit f191151ee4
354 changed files with 2467 additions and 2472 deletions

View file

@ -1,13 +1,19 @@
2.15.1:
date: 2021-04-20
date: 2021-04-24
Added:
charlie:
- Added a curved waistband option
simon:
- Added some dimensions to clarify the X value of shoulder/armhole points
Fixed:
charlie:
- Keep `frontPocketSlantRound` and `frontPocketSlantBend` options
from being zero
core:
- Fixed bug in the dependency resolved when dependecies are passed as a string
See [#971](https://github.com/freesewing/freesewing/issues/971)
2.15.0:
date: 2021-04-15

View file

@ -14,12 +14,9 @@
"homepage": "https://freesewing.org/",
"license": "MIT",
"scripts": {
"lint": "eslint --fix 'src/*.js'",
"kickstart": "npx lerna bootstrap && npx lerna run build --no-bail && npx lerna run build",
"clean": "rimraf dist",
"test": "lerna run test",
"jsonlint": "yarn --silent jsonlint:files | xargs -n1 jsonlint -q -c && echo \"jsonlint: no lint errors\"",
"jsonlint:files": "find . -name \"*.json\" | grep -v -f .eslintignore",
"prettier": "npx prettier --write 'packages/**/src/*.js' 'packages/**/config/*.js' 'packages/**/example/src/*' 'packages/i18n/src/locales/**/*.*'",
"reconfigure": "npx babel-node scripts/reconfigure.js",
"dxf": "npx babel-node scripts/export-dxf.js",
@ -71,22 +68,11 @@
"codecov": "^3.7.2",
"cross-env": "^7.0.2",
"deep-freeze": "^0.0.1",
"eslint": "^7.6.0",
"eslint-config-prettier": "^7.2.0",
"eslint-config-standard": "^15.0.1",
"eslint-config-standard-react": "^10.0.0",
"eslint-plugin-import": "^2.22.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-prettier": "^3.1.4",
"eslint-plugin-promise": "^4.0.0",
"eslint-plugin-react": "^7.20.5",
"eslint-plugin-standard": "^5.0.0",
"esm": "^3.2.25",
"file-saver": "^2.0.2",
"fs-extra": "^9.1.0",
"husky": "^4.2.5",
"js-yaml": "^4.0.0",
"jsonlint": "^1.6.3",
"lerna": "^3.22.1",
"mocha": "^8.1.0",
"mustache": "^4.0.1",

View file

@ -18,8 +18,8 @@ export default {
'necklineDrop',
'shoulderStrapWidth',
'shoulderStrapPlacement',
'lengthBonus'
]
'lengthBonus',
],
},
measurements: [
'biceps',
@ -29,15 +29,15 @@ export default {
'neck',
'shoulderSlope',
'shoulderToShoulder',
'hips'
'hips',
],
dependencies: {
front: 'base',
back: 'front'
back: 'front',
},
inject: {
front: 'base',
back: 'front'
back: 'front',
},
hide: ['base'],
options: {
@ -63,6 +63,6 @@ export default {
necklineDrop: { pct: 20, min: 10, max: 35 },
stretchFactor: { pct: 5, min: 0, max: 15 },
shoulderStrapWidth: { pct: 15, min: 10, max: 40 },
shoulderStrapPlacement: { pct: 40, min: 20, max: 80 }
}
shoulderStrapPlacement: { pct: 40, min: 20, max: 80 },
},
}

View file

@ -14,7 +14,7 @@ export default function (part) {
macro,
utils,
units,
measurements
measurements,
} = part.shorthand()
// Lower back neck a bit
@ -88,7 +88,7 @@ export default function (part) {
macro('cutonfold', {
from: points.cfNeck,
to: points.cfHem,
grainline: true
grainline: true,
})
macro('title', { at: points.title, nr: 2, title: 'back' })
@ -102,7 +102,7 @@ export default function (part) {
macro('vd', {
from: points.cbHem,
to: points.cbNeck,
x: points.cbHem.x - sa - 15
x: points.cbHem.x - sa - 15,
})
}

View file

@ -15,7 +15,7 @@ export default function (part) {
measurements,
complete,
paperless,
macro
macro,
} = part.shorthand()
// Hide Brian paths
@ -120,7 +120,7 @@ export default function (part) {
macro('cutonfold', {
from: points.cfNeck,
to: points.cfHem,
grainline: true
grainline: true,
})
points.title = new Point(points.waist.x / 2, points.waist.y)
macro('title', { at: points.title, nr: 1, title: 'front' })
@ -161,7 +161,7 @@ export default function (part) {
macro('vd', {
from: points.cfHem,
to: points.cfNeck,
x: points.cfHem.x - sa - 15
x: points.cfHem.x - sa - 15,
})
}

View file

@ -2,36 +2,36 @@ export function dimensions(macro, points, sa) {
macro('hd', {
from: points.cfHem,
to: points.hem,
y: points.hem.y + sa * 2.5 + 15
y: points.hem.y + sa * 2.5 + 15,
})
macro('hd', {
from: points.cfNeck,
to: points.strapLeft,
y: points.neck.y - sa - 15
y: points.neck.y - sa - 15,
})
macro('hd', {
from: points.cfNeck,
to: points.strapRight,
y: points.neck.y - sa - 30
y: points.neck.y - sa - 30,
})
macro('vd', {
from: points.hem,
to: points.armhole,
x: points.armhole.x + sa + 15
x: points.armhole.x + sa + 15,
})
macro('vd', {
from: points.hem,
to: points.strapRight,
x: points.armhole.x + sa + 30
x: points.armhole.x + sa + 30,
})
macro('vd', {
from: points.hem,
to: points.strapLeft,
x: points.armhole.x + sa + 45
x: points.armhole.x + sa + 45,
})
macro('hd', {
from: points.cfNeck,
to: points.armhole,
y: points.neck.y - sa - 45
y: points.neck.y - sa - 45,
})
}

View file

@ -11,7 +11,7 @@ export default {
tags: ['accessories'],
optionGroups: {
fit: ['backOpening', 'chestDepth'],
style: ['lengthBonus', 'bibLength', 'bibWidth', 'strapWidth']
style: ['lengthBonus', 'bibLength', 'bibWidth', 'strapWidth'],
},
measurements: ['chest', 'waist', 'hips', 'hpsToWaistBack', 'waistToKnee'],
dependencies: {},
@ -24,6 +24,6 @@ export default {
chestDepth: { pct: 22, min: 15, max: 90 },
bibLength: { pct: 75, min: 0, max: 90 },
bibWidth: { pct: 100, min: 50, max: 125 },
strapWidth: { pct: 60, min: 20, max: 100 }
}
strapWidth: { pct: 60, min: 20, max: 100 },
},
}

View file

@ -11,7 +11,7 @@ export default function (part) {
complete,
sa,
paperless,
macro
macro,
} = part.shorthand()
let chestWidth = measurements.chest / 4
@ -111,7 +111,7 @@ export default function (part) {
macro('title', {
nr: 1,
at: points.title,
title: 'Front'
title: 'Front',
})
points.scaleboxAnchor = points.pocketLeftBottom.shiftFractionTowards(points.bottomRight, 0.5)
@ -119,12 +119,12 @@ export default function (part) {
macro('crossBox', {
from: points.topRightHem,
to: points.crossBoxTo1
to: points.crossBoxTo1,
})
macro('crossBox', {
from: points.topRightBack,
to: points.crossBoxTo2,
text: 'attachment'
text: 'attachment',
})
if (sa) {
@ -133,7 +133,7 @@ export default function (part) {
macro('cutonfold', {
from: points.topCOF,
to: points.bottomCOF
to: points.bottomCOF,
})
}
@ -142,42 +142,42 @@ export default function (part) {
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + sa + 15
y: points.bottomLeft.y + sa + 15,
})
macro('hd', {
from: points.topLeft,
to: points.topRight,
y: points.topLeft.y - sa - 15
y: points.topLeft.y - sa - 15,
})
macro('vd', {
from: points.bottomLeft,
to: points.topLeft,
x: points.topLeft.x - sa - 15
x: points.topLeft.x - sa - 15,
})
macro('vd', {
from: points.bottomRight,
to: points.topRightBack,
x: points.topRightBack.x + sa + 15
x: points.topRightBack.x + sa + 15,
})
macro('vd', {
from: points.topRightBack,
to: points.topRight,
x: points.topRightBack.x + sa + 15
x: points.topRightBack.x + sa + 15,
})
macro('vd', {
from: points.topLeft,
to: points.topLeftHem,
x: points.topLeftHem.x + sa + 15
x: points.topLeftHem.x + sa + 15,
})
macro('vd', {
from: points.topLeftHem,
to: points.bottomLeftHem,
x: points.topLeftHem.x + sa + 15
x: points.topLeftHem.x + sa + 15,
})
macro('vd', {
from: points.bottomLeftHem,
to: points.bottomLeft,
x: points.bottomLeftHem.x + sa + 15
x: points.bottomLeftHem.x + sa + 15,
})
}

View file

@ -58,8 +58,8 @@ const crossBox = {
.attr('data-text', so.text)
.attr('data-text-class', 'center')
}
}
}
},
},
}
// Create new design

View file

@ -11,7 +11,7 @@ export default function (part) {
complete,
sa,
paperless,
macro
macro,
} = part.shorthand()
let apronLength =
@ -49,7 +49,7 @@ export default function (part) {
macro('cutonfold', {
from: points.topCOF,
to: points.bottomCOF
to: points.bottomCOF,
})
// Complete?
@ -60,7 +60,7 @@ export default function (part) {
macro('title', {
nr: 3,
at: points.title,
title: 'Pocket'
title: 'Pocket',
})
if (sa) {
paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
@ -72,12 +72,12 @@ export default function (part) {
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + sa + 15
y: points.bottomLeft.y + sa + 15,
})
macro('vd', {
from: points.bottomLeft,
to: points.topLeft,
x: points.topLeft.x - sa - 15
x: points.topLeft.x - sa - 15,
})
}

View file

@ -11,7 +11,7 @@ export default function (part) {
complete,
sa,
paperless,
macro
macro,
} = part.shorthand()
let chestWidth = measurements.chest / 4
@ -89,7 +89,7 @@ export default function (part) {
macro('title', {
nr: 2,
at: points.title,
title: 'Strap'
title: 'Strap',
})
macro('crossBox', { from: points.topLeft, to: points.topMiddleHem })
macro('crossBox', { from: points.bottomLeftHem, to: points.bottomMiddle })
@ -103,27 +103,27 @@ export default function (part) {
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + sa + 15
y: points.bottomLeft.y + sa + 15,
})
macro('vd', {
from: points.bottomLeft,
to: points.topLeft,
x: points.topLeft.x - sa - 15
x: points.topLeft.x - sa - 15,
})
macro('vd', {
from: points.topMiddle,
to: points.topMiddleHem,
x: points.topMiddleHem.x + sa + 15
x: points.topMiddleHem.x + sa + 15,
})
macro('vd', {
from: points.topMiddleHem,
to: points.bottomMiddleHem,
x: points.topMiddleHem.x + sa + 15
x: points.topMiddleHem.x + sa + 15,
})
macro('vd', {
from: points.bottomMiddleHem,
to: points.bottomMiddle,
x: points.bottomMiddleHem.x + sa + 15
x: points.bottomMiddleHem.x + sa + 15,
})
}

View file

@ -17,9 +17,9 @@ export default {
'backArmholeSlant',
'backArmholeCurvature',
'frontArmholePitchDepth',
'backArmholePitchDepth'
'backArmholePitchDepth',
],
advanced: ['backNeckCutout', 'backHemSlope', 'frontShoulderWidth', 'highBustWidth']
advanced: ['backNeckCutout', 'backHemSlope', 'frontShoulderWidth', 'highBustWidth'],
},
measurements: [
'highBust',
@ -33,17 +33,17 @@ export default {
'hpsToWaistFront',
'hpsToWaistBack',
'shoulderToShoulder',
'shoulderSlope'
'shoulderSlope',
// FIXME: Measurement from waist up to armhole (for sleeveless)
],
dependencies: {
back: 'frontSideDart'
back: 'frontSideDart',
},
inject: {},
hide: [],
parts: [
'back',
'frontSideDart'
'frontSideDart',
// 'frontShoulderDart'
],
options: {
@ -75,6 +75,6 @@ export default {
highBustWidth: { pct: 86, max: 92, min: 80 },
bustDartLength: { pct: 90, min: 75, max: 100 },
waistDartLength: { pct: 90, min: 75, max: 95 },
bustDartCurve: { pct: 100, min: 0, max: 100 }
}
bustDartCurve: { pct: 100, min: 0, max: 100 },
},
}

View file

@ -12,7 +12,7 @@ export default function (part) {
macro,
utils,
measurements,
raise
raise,
} = part.shorthand()
// Get to work
@ -186,15 +186,15 @@ export default function (part) {
macro('title', {
nr: 2,
title: 'back',
at: points.titleAnchor
at: points.titleAnchor,
})
macro('grainline', {
from: new Point(points.hps.x / 2, points.shoulder.y),
to: new Point(points.hps.x / 2, points.waistSide.y)
to: new Point(points.hps.x / 2, points.waistSide.y),
})
macro('sprinkle', {
snippet: 'bnotch',
on: ['armholePitch', 'bustCenter']
on: ['armholePitch', 'bustCenter'],
})
if (sa) paths.sa = paths.saBase.offset(sa).attr('class', 'fabric sa')
@ -203,92 +203,92 @@ export default function (part) {
macro('vd', {
from: points.waistCenter,
to: points.dartTip,
x: points.cbNeck.x - sa - 15
x: points.cbNeck.x - sa - 15,
})
macro('vd', {
from: points.waistCenter,
to: points.cbNeck,
x: points.cbNeck.x - sa - 30
x: points.cbNeck.x - sa - 30,
})
macro('vd', {
from: points.waistCenter,
to: points.hps,
x: points.cbNeck.x - sa - 45
x: points.cbNeck.x - sa - 45,
})
macro('hd', {
from: points.cbNeck,
to: points.waistCenter,
y: points.waistCenter.y + sa + 15
y: points.waistCenter.y + sa + 15,
})
macro('hd', {
from: points.cbNeck,
to: points.dartBottomLeft,
y: points.waistCenter.y + sa + 30
y: points.waistCenter.y + sa + 30,
})
macro('hd', {
from: points.cbNeck,
to: points.dartBottomRight,
y: points.waistCenter.y + sa + 45
y: points.waistCenter.y + sa + 45,
})
macro('hd', {
from: points.dartBottomLeft,
to: points.dartBottomRight,
y: points.waistCenter.y + sa + 15
y: points.waistCenter.y + sa + 15,
})
macro('hd', {
from: points.cbNeck,
to: points.waistSide,
y: points.waistCenter.y + sa + 60
y: points.waistCenter.y + sa + 60,
})
macro('hd', {
from: points.cbNeck,
to: points.armhole,
y: points.waistCenter.y + sa + 75
y: points.waistCenter.y + sa + 75,
})
macro('vd', {
from: points.waistSide,
to: points.armhole,
x: points.armhole.x + sa + 15
x: points.armhole.x + sa + 15,
})
macro('vd', {
from: points.waistSide,
to: points.armholePitch,
x: points.armhole.x + sa + 30
x: points.armhole.x + sa + 30,
})
macro('vd', {
from: points.waistSide,
to: points.shoulder,
x: points.armhole.x + sa + 45
x: points.armhole.x + sa + 45,
})
macro('vd', {
from: points.waistSide,
to: points.hps,
x: points.armhole.x + sa + 60
x: points.armhole.x + sa + 60,
})
macro('vd', {
from: points.waistCenter,
to: points.waistSide,
x: points.waistSide.x + sa + 15
x: points.waistSide.x + sa + 15,
})
macro('hd', {
from: points.cbNeck,
to: points.hps,
y: points.hps.y - sa - 15
y: points.hps.y - sa - 15,
})
macro('hd', {
from: points.cbNeck,
to: points.armholePitch,
y: points.hps.y - sa - 30
y: points.hps.y - sa - 30,
})
macro('hd', {
from: points.cbNeck,
to: points.shoulder,
y: points.hps.y - sa - 45
y: points.hps.y - sa - 45,
})
macro('hd', {
from: points.cbNeck,
to: points.armhole,
y: points.hps.y - sa - 60
y: points.hps.y - sa - 60,
})
}
}

View file

@ -11,7 +11,7 @@ export default function (part) {
paperless,
macro,
utils,
measurements
measurements,
} = part.shorthand()
// Get to work
@ -200,7 +200,7 @@ export default function (part) {
macro('title', {
at: points.titleAnchor,
nr: 1,
title: 'front'
title: 'front',
})
points.scaleboxAnchor = points.titleAnchor.shift(-90, 70)
macro('scalebox', { at: points.scaleboxAnchor })
@ -212,11 +212,11 @@ export default function (part) {
macro('cutonfold', {
from: points.cfNeck,
to: points.cfHem,
grainline: true
grainline: true,
})
macro('sprinkle', {
snippet: 'notch',
on: ['bust', 'armholePitch', 'cfBust']
on: ['bust', 'armholePitch', 'cfBust'],
})
if (sa) {
@ -227,102 +227,102 @@ export default function (part) {
macro('vd', {
from: points.cfHem,
to: points.waistDartTip,
x: 0 - 15
x: 0 - 15,
})
macro('vd', {
from: points.cfHem,
to: points.bust,
x: 0 - 30
x: 0 - 30,
})
macro('vd', {
from: points.cfHem,
to: points.cfNeck,
x: 0 - 45
x: 0 - 45,
})
macro('vd', {
from: points.cfHem,
to: points.hps,
x: 0 - 60
x: 0 - 60,
})
macro('hd', {
from: points.cfBust,
to: points.bust,
y: points.bust.y - 15
y: points.bust.y - 15,
})
macro('hd', {
from: points.cfBust,
to: points.bustDartTip,
y: points.bust.y - 30
y: points.bust.y - 30,
})
macro('hd', {
from: points.cfHem,
to: points.waistDartLeft,
y: points.cfHem.y + sa + 15
y: points.cfHem.y + sa + 15,
})
macro('hd', {
from: points.cfHem,
to: points.waistDartRight,
y: points.cfHem.y + sa + 30
y: points.cfHem.y + sa + 30,
})
macro('hd', {
from: points.cfHem,
to: points.sideHem,
y: points.cfHem.y + sa + 45
y: points.cfHem.y + sa + 45,
})
macro('hd', {
from: points.cfHem,
to: points.bustDartBottom,
y: points.cfHem.y + sa + 60
y: points.cfHem.y + sa + 60,
})
macro('hd', {
from: points.cfHem,
to: points.bustDartTop,
y: points.cfHem.y + sa + 75
y: points.cfHem.y + sa + 75,
})
macro('vd', {
from: points.sideHem,
to: points.bustDartBottom,
x: points.bustDartTop.x + sa + 15
x: points.bustDartTop.x + sa + 15,
})
macro('vd', {
from: points.sideHem,
to: points.bustDartTop,
x: points.bustDartTop.x + sa + 30
x: points.bustDartTop.x + sa + 30,
})
macro('vd', {
from: points.sideHem,
to: points.armhole,
x: points.bustDartTop.x + sa + 45
x: points.bustDartTop.x + sa + 45,
})
macro('vd', {
from: points.sideHem,
to: points.armholePitch,
x: points.bustDartTop.x + sa + 60
x: points.bustDartTop.x + sa + 60,
})
macro('vd', {
from: points.sideHem,
to: points.shoulder,
x: points.bustDartTop.x + sa + 75
x: points.bustDartTop.x + sa + 75,
})
macro('hd', {
from: points.cfNeck,
to: points.hps,
y: points.hps.y - sa - 15
y: points.hps.y - sa - 15,
})
macro('hd', {
from: points.cfNeck,
to: points.armholePitch,
y: points.hps.y - sa - 30
y: points.hps.y - sa - 30,
})
macro('hd', {
from: points.cfNeck,
to: points.shoulder,
y: points.hps.y - sa - 45
y: points.hps.y - sa - 45,
})
macro('hd', {
from: points.cfNeck,
to: points.armhole,
y: points.hps.y - sa - 60
y: points.hps.y - sa - 60,
})
}
}

View file

@ -11,14 +11,14 @@ export default {
tags: ['top', 'basics'],
optionGroups: {
fit: ['collarEase', 'adjustmentRibbon'],
style: ['tipWidth', 'knotWidth', 'bowLength', 'bowStyle', 'endStyle']
style: ['tipWidth', 'knotWidth', 'bowLength', 'bowStyle', 'endStyle'],
},
measurements: ['neck'],
dependencies: {},
inject: {
bow1: 'base',
bow2: 'base',
bow3: 'base'
bow3: 'base',
},
hide: ['base'],
parts: ['ribbon'],
@ -28,39 +28,39 @@ export default {
ribbonWidth: {
pct: 6,
min: 5,
max: 8
max: 8,
},
tipWidth: {
pct: 15,
min: 0,
max: 20
max: 20,
},
knotWidth: {
pct: 7,
min: 5,
max: 10
max: 10,
},
bowLength: {
pct: 28,
min: 23,
max: 33
max: 33,
},
collarEase: {
pct: 3,
min: 0,
max: 6
max: 6,
},
bowStyle: {
dflt: 'butterfly',
list: ['diamond', 'butterfly', 'square', 'widesquare']
list: ['diamond', 'butterfly', 'square', 'widesquare'],
},
endStyle: {
dflt: 'straight',
list: ['straight', 'pointed', 'rounded']
list: ['straight', 'pointed', 'rounded'],
},
adjustmentRibbon: {
bool: false
bool: false,
},
adjustmentRibbonWidth: 20
}
adjustmentRibbonWidth: 20,
},
}

View file

@ -12,7 +12,7 @@ export default function (part) {
measurements,
complete,
paperless,
macro
macro,
} = part.shorthand()
if (options.bowStyle === 'square') options.tipWidth = options.knotWidth
@ -23,7 +23,7 @@ export default function (part) {
'tipWidth',
'knotWidth',
'bowLength',
'collarEase'
'collarEase',
])
store.set(option, measurements.neck * options[option])
@ -76,13 +76,13 @@ export default function (part) {
from: points.tip2Bottom,
to: points.tip,
via: points.roundBottom,
prefix: 'bottom'
prefix: 'bottom',
})
macro('round', {
from: points.tip,
to: points.tip2Top,
via: points.roundTop,
prefix: 'top'
prefix: 'top',
})
paths.cap = paths.bottomRounded.join(paths.topRounded)
}
@ -146,53 +146,53 @@ export default function (part) {
macro('hd', {
from: points.knotBottom,
to: points.tip2Bottom,
y: baseY
y: baseY,
})
baseY += 15
if (options.bowStyle === 'butterfly' || options.bowStyle === 'diamond') {
macro('hd', {
from: points.tip1Bottom,
to: points.tip2Bottom,
y: baseY
y: baseY,
})
baseY += 15
macro('vd', {
from: points.tip1Bottom,
to: points.tip1Top
to: points.tip1Top,
})
}
macro('hd', {
from: points.transitionBottomRight,
to: points.tip2Bottom,
y: baseY
y: baseY,
})
baseY += 15
macro('hd', {
from: points.bandBottomRight,
to: points.tip2Bottom,
y: baseY
y: baseY,
})
baseY += 15
store.set('baseY', baseY)
macro('vd', {
from: points.bandBottomRight,
to: points.bandTopRight
to: points.bandTopRight,
})
macro('vd', {
from: points.transitionBottomRight,
to: points.transitionTopRight
to: points.transitionTopRight,
})
macro('vd', {
from: points.tip2Bottom,
to: points.tip2Top,
x: points.tip.x + 15 + sa
x: points.tip.x + 15 + sa,
})
if (options.endStyle !== 'straight') {
macro('hd', {
from: points.tip2Bottom,
to: points.tip,
y: points.tip2Bottom.y + 15 + sa
y: points.tip2Bottom.y + 15 + sa,
})
}
}

View file

@ -8,7 +8,7 @@ export default function (part) {
macro('grainline', {
from: points.grainlineStart,
to: points.tip.shift(180, 20)
to: points.tip.shift(180, 20),
})
paths.seam = new Path()
@ -26,7 +26,7 @@ export default function (part) {
macro('hd', {
from: points.bandBottomLeft,
to: points.tip2Bottom,
y: store.get('baseY')
y: store.get('baseY'),
})
}
if (sa) {
@ -36,7 +36,7 @@ export default function (part) {
at: points.titleAnchor,
nr: 1,
title: 'bowTie',
scale: store.get('tipWidth') / 75
scale: store.get('tipWidth') / 75,
})
points.scaleboxAnchor = points.bandTopLeft.shift(30, 80)
macro('scalebox', { at: points.scaleboxAnchor })

View file

@ -9,7 +9,7 @@ export default function (part) {
macro,
sa,
store,
paperless
paperless,
} = part.shorthand()
if (!options.adjustmentRibbon) {
@ -24,7 +24,7 @@ export default function (part) {
macro('grainline', {
from: points.grainlineStart,
to: points.tip.shift(180, 20)
to: points.tip.shift(180, 20),
})
paths.seam = new Path()
@ -42,7 +42,7 @@ export default function (part) {
macro('hd', {
from: points.bandBottomLeft,
to: points.tip2Bottom,
y: store.get('baseY')
y: store.get('baseY'),
})
}
if (sa) {
@ -52,7 +52,7 @@ export default function (part) {
at: points.titleAnchor,
nr: 2,
title: 'bowTie',
scale: store.get('tipWidth') / 75
scale: store.get('tipWidth') / 75,
})
}

View file

@ -9,7 +9,7 @@ export default function (part) {
macro,
sa,
store,
paperless
paperless,
} = part.shorthand()
if (!options.adjustmentRibbon) {
@ -24,7 +24,7 @@ export default function (part) {
macro('grainline', {
from: points.grainlineStart,
to: points.tip.shift(180, 20)
to: points.tip.shift(180, 20),
})
paths.seam = new Path()
@ -42,7 +42,7 @@ export default function (part) {
macro('hd', {
from: points.bandBottomLeft,
to: points.tip2Bottom,
y: store.get('baseY')
y: store.get('baseY'),
})
}
if (sa) {
@ -52,7 +52,7 @@ export default function (part) {
at: points.titleAnchor,
nr: 3,
title: 'bowTie',
scale: store.get('tipWidth') / 75
scale: store.get('tipWidth') / 75,
})
}

View file

@ -10,7 +10,7 @@ export default function (part) {
points,
paths,
sa,
paperless
paperless,
} = part.shorthand()
if (options.adjustmentRibbon) {
@ -44,19 +44,19 @@ export default function (part) {
at: points.titleAnchor,
nr: 2,
title: 'ribbon',
scale: 0.3
scale: 0.3,
})
if (paperless) {
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + 15 + sa
y: points.bottomLeft.y + 15 + sa,
})
macro('vd', {
from: points.bottomRight,
to: points.topRight,
x: points.topRight.x + 15 + sa
x: points.topRight.x + 15 + sa,
})
}
}

View file

@ -18,7 +18,7 @@ export default {
'shoulderEase',
'lengthBonus',
'sleeveLengthBonus',
'sleeveBend'
'sleeveBend',
],
advanced: [
'acrossBackFactor',
@ -27,8 +27,8 @@ export default {
'frontArmholeDeeper',
'shoulderSlopeReduction',
'sleevecapHeight',
'sleevecapEase'
]
'sleevecapEase',
],
},
measurements: [
'biceps',
@ -40,19 +40,19 @@ export default {
'shoulderToElbow',
'shoulderToShoulder',
'shoulderToWrist',
'wrist'
'wrist',
],
dependencies: {
back: 'base',
front: 'back',
topSleeve: 'sleeve',
underSleeve: 'sleeve'
underSleeve: 'sleeve',
},
inject: {
back: 'base',
front: 'back',
topSleeve: 'sleeve',
underSleeve: 'sleeve'
underSleeve: 'sleeve',
},
hide: ['base', 'sleeve'],
options: {
@ -77,6 +77,6 @@ export default {
sleeveBend: { deg: 10, min: 0, max: 20 },
sleevecapHeight: { pct: 45, min: 40, max: 60 },
sleevecapEase: { pct: 1, min: 0, max: 10 },
sleeveLengthBonus: { pct: 0, min: -20, max: 15 }
}
sleeveLengthBonus: { pct: 0, min: -20, max: 15 },
},
}

View file

@ -4,49 +4,49 @@ export default function (part, s) {
macro('ld', {
from: points[s + 'WristLeft'],
to: points[s + 'WristRight'],
d: 15
d: 15,
})
macro('ld', {
from: points[s + 'ElbowLeft'],
to: points.elbowRight
to: points.elbowRight,
})
macro('ld', {
from: points[s + 'LeftEdge'],
to: points[s + 'RightEdge']
to: points[s + 'RightEdge'],
})
macro('hd', {
from: points[s + 'LeftEdge'],
to: points[s + 'ElbowLeft'],
y: points[s + 'WristRight'].y + 3 * sa + 15
y: points[s + 'WristRight'].y + 3 * sa + 15,
})
macro('hd', {
from: points[s + 'LeftEdge'],
to: points[s + 'WristLeft'],
y: points[s + 'WristRight'].y + 3 * sa + 30
y: points[s + 'WristRight'].y + 3 * sa + 30,
})
macro('hd', {
from: points[s + 'LeftEdge'],
to: points[s + 'WristRight'],
y: points[s + 'WristRight'].y + 3 * sa + 45
y: points[s + 'WristRight'].y + 3 * sa + 45,
})
macro('hd', {
from: points[s + 'LeftEdge'],
to: points.elbowRight,
y: points[s + 'WristRight'].y + 3 * sa + 60
y: points[s + 'WristRight'].y + 3 * sa + 60,
})
macro('vd', {
from: points[s + 'ElbowLeft'],
to: points[s + 'LeftEdge'],
x: points[s + 'LeftEdge'].x - sa - 15
x: points[s + 'LeftEdge'].x - sa - 15,
})
macro('vd', {
from: points[s + 'WristLeft'],
to: points[s + 'LeftEdge'],
x: points[s + 'LeftEdge'].x - sa - 30
x: points[s + 'LeftEdge'].x - sa - 30,
})
macro('vd', {
from: points[s + 'WristRight'],
to: points[s + 'LeftEdge'],
x: points[s + 'LeftEdge'].x - sa - 45
x: points[s + 'LeftEdge'].x - sa - 45,
})
}

View file

@ -15,7 +15,7 @@ export default function (part) {
macro('title', {
at: points.armCenter,
nr: 3,
title: 'topsleeve'
title: 'topsleeve',
})
if (sa) {
@ -41,27 +41,27 @@ export default function (part) {
macro('vd', {
from: points.tsLeftEdge,
to: points.top,
x: points.tsLeftEdge.x - sa - 15
x: points.tsLeftEdge.x - sa - 15,
})
macro('hd', {
from: points.tsLeftEdge,
to: points.top,
y: points.top.x - sa - 15
y: points.top.x - sa - 15,
})
macro('hd', {
from: points.tsLeftEdge,
to: points.backPitchPoint,
y: points.top.x - sa - 30
y: points.top.x - sa - 30,
})
macro('hd', {
from: points.tsLeftEdge,
to: points.tsRightEdge,
y: points.top.x - sa - 45
y: points.top.x - sa - 45,
})
macro('vd', {
from: points.tsRightEdge,
to: points.backPitchPoint,
x: points.tsRightEdge.x + sa + 15
x: points.tsRightEdge.x + sa + 15,
})
}

View file

@ -16,7 +16,7 @@ export default function (part) {
macro('title', {
at: points.armCenter,
nr: 4,
title: 'undersleeve'
title: 'undersleeve',
})
if (sa) {
@ -42,12 +42,12 @@ export default function (part) {
macro('hd', {
from: points.usLeftEdge,
to: points.usTip,
y: points.usTip.y - sa - 15
y: points.usTip.y - sa - 15,
})
macro('vd', {
from: points.tsRightEdge,
to: points.usTip,
x: points.tsRightEdge.x + sa + 15
x: points.tsRightEdge.x + sa + 15,
})
}

View file

@ -24,7 +24,7 @@ export default {
'bicepsEase',
'cuffEase',
'shoulderEase',
'waistEase'
'waistEase',
],
style: [
'primaryBustDart',
@ -32,7 +32,7 @@ export default {
'secondaryBustDart',
'secondaryBustDartLength',
'primaryBustDartShaping',
'sleeveLengthBonus'
'sleeveLengthBonus',
],
advanced: [
'acrossBackFactor',
@ -60,10 +60,10 @@ export default {
'sleevecapQ3Spread1',
'sleevecapQ3Spread2',
'sleevecapQ4Spread1',
'sleevecapQ4Spread2'
]
}
]
'sleevecapQ4Spread2',
],
},
],
},
measurements: [
'biceps',
@ -80,19 +80,19 @@ export default {
'shoulderToShoulder',
'shoulderToWrist',
'shoulderSlope',
'wrist'
'wrist',
],
dependencies: {
frontBase: 'back',
front: ['back', 'frontBase'],
sleevecap: ['front', 'frontBase', 'back'],
sleeve: ['sleevecap', 'front', 'frontBase', 'back']
sleeve: ['sleevecap', 'front', 'frontBase', 'back'],
},
inject: {
back: 'base',
frontBase: 'base',
front: 'frontBase',
sleeve: 'sleevecap'
sleeve: 'sleevecap',
},
hide: ['frontBase', 'sleevecap'],
options: {
@ -125,9 +125,9 @@ export default {
'14:00',
'15:00',
'16:00',
'17:00'
'17:00',
],
dflt: '06:00'
dflt: '06:00',
},
secondaryBustDart: {
list: [
@ -146,9 +146,9 @@ export default {
'14:00',
'15:00',
'16:00',
'17:00'
'17:00',
],
dflt: '13:30'
dflt: '13:30',
},
// Percentages
@ -191,6 +191,6 @@ export default {
sleevecapQ4Spread1: { pct: 7, min: 4, max: 20 },
sleevecapQ4Spread2: { pct: 7, min: 4, max: 20 },
sleeveLengthBonus: { pct: 0, min: -40, max: 10 },
frontScyeDart: { pct: 25, min: 0, max: 45 }
}
frontScyeDart: { pct: 25, min: 0, max: 45 },
},
}

View file

@ -12,7 +12,7 @@ export default (part) => {
Point,
options,
utils,
store
store,
} = part.shorthand()
// Shoulder dart
@ -189,88 +189,88 @@ export default (part) => {
macro('vd', {
from: points.cbWaist,
to: points.cbNeck,
x: -15 - sa
x: -15 - sa,
})
if (options.waistDart) {
let y = points.waist.y + 15 + sa
macro('hd', {
from: points.cbWaist,
to: points.waistDart1,
y
y,
})
macro('hd', {
from: points.cbWaist,
to: points.waistDartEdge,
y: y + 15
y: y + 15,
})
macro('hd', {
from: points.cbWaist,
to: points.waistDart2,
y: y + 30
y: y + 30,
})
macro('hd', {
from: points.cbWaist,
to: points.waist,
y: y + 45
y: y + 45,
})
macro('hd', {
from: points.cbWaist,
to: points.armhole,
y: y + 60
y: y + 60,
})
macro('vd', {
from: points.waistDart2,
to: points.waistDartTip,
x: points.waistDart2.x + 15
x: points.waistDart2.x + 15,
})
} else {
let y = points.waist.y + 15 + sa
macro('hd', {
from: points.cbWaist,
to: points.waist,
y: points.waist.y + 15 + sa
y: points.waist.y + 15 + sa,
})
macro('hd', {
from: points.cbWaist,
to: points.armhole,
y: y + 30
y: y + 30,
})
}
let x = points.armhole.x + 15 + sa
macro('vd', {
from: points.waist,
to: points.armhole,
x
x,
})
macro('vd', {
from: points.waist,
to: points.armholePitch,
x: x + 15
x: x + 15,
})
macro('vd', {
from: points.waist,
to: points.shoulder,
x: x + 30
x: x + 30,
})
macro('vd', {
from: points.waist,
to: points.hps,
x: x + 45
x: x + 45,
})
macro('hd', {
from: points.cbNeck,
to: points.armholePitch,
y: points.armholePitch.y + 25
y: points.armholePitch.y + 25,
})
macro('hd', {
from: points.cbNeck,
to: points.hps,
y: points.hps.y - sa - 15
y: points.hps.y - sa - 15,
})
macro('hd', {
from: points.cbNeck,
to: points.shoulder,
y: points.hps.y - sa - 30
y: points.hps.y - sa - 30,
})
}

View file

@ -92,7 +92,7 @@ export const getDartPaths = (Path, points) => [
new Path()
.line(points.secondaryBustDart1)
.line(points.secondaryBustDartTip)
.line(points.secondaryBustDart2)
.line(points.secondaryBustDart2),
]
export const getSaDartPaths = (Path, points) => [
@ -103,7 +103,7 @@ export const getSaDartPaths = (Path, points) => [
new Path()
.line(points.secondaryBustDart1)
.line(points.secondaryBustDartEdge)
.line(points.secondaryBustDart2)
.line(points.secondaryBustDart2),
]
/*

View file

@ -15,7 +15,7 @@ import {
getDartInsertionPoint,
getDartLocationsAsNumbers,
getDartPaths,
getSaDartPaths
getSaDartPaths,
} from './dart-utils'
export default (part) => {
@ -31,7 +31,7 @@ export default (part) => {
paperless,
macro,
snippets,
Snippet
Snippet,
} = part.shorthand()
/*
@ -167,83 +167,83 @@ export default (part) => {
macro('vd', {
from: points.cfWaist,
to: points.bustPoint,
x: tl.x - 15 - sa
x: tl.x - 15 - sa,
})
macro('vd', {
from: points.cfWaist,
to: points.cfNeck,
x: tl.x - 30 - sa
x: tl.x - 30 - sa,
})
macro('vd', {
from: points.cfWaist,
to: points.hps,
x: tl.x - 45 - sa
x: tl.x - 45 - sa,
})
macro('vd', {
from: points.waist,
to: points.armhole,
x: br.x + 15 + sa
x: br.x + 15 + sa,
})
macro('vd', {
from: points.waist,
to: points.armholePitch,
x: br.x + 30 + sa
x: br.x + 30 + sa,
})
macro('vd', {
from: points.waist,
to: points.shoulder,
x: br.x + 45 + sa
x: br.x + 45 + sa,
})
macro('vd', {
from: points.waist,
to: points.hps,
x: br.x + 60 + sa
x: br.x + 60 + sa,
})
macro('hd', {
from: points.cfNeck,
to: points.hps,
y: tl.y - 15 - sa
y: tl.y - 15 - sa,
})
macro('hd', {
from: points.cfNeck,
to: points.shoulder,
y: tl.y - 30 - sa
y: tl.y - 30 - sa,
})
macro('hd', {
from: points.cfNeck,
to: points.armhole,
y: tl.y - 30 - sa
y: tl.y - 30 - sa,
})
macro('hd', {
from: points.cfWaist,
to: points.bustPoint,
y: br.y + 15 + sa
y: br.y + 15 + sa,
})
macro('hd', {
from: points.cfWaist,
to: points.waist,
y: br.y + 30 + sa
y: br.y + 30 + sa,
})
macro('ld', {
from: points.primaryBustDart1,
to: points.primaryBustDart2,
d: 15
d: 15,
})
macro('ld', {
from: points.primaryBustDart2,
to: points.primaryBustDartTip,
d: 15
d: 15,
})
macro('ld', {
from: points.primaryBustDart2,
to: points.primaryBustDartTip,
d: 15
d: 15,
})
if (loc2 !== 0 && loc1 !== loc2) {
macro('ld', {
from: points.secondaryBustDart2,
to: points.secondaryBustDartTip,
d: 15
d: 15,
})
}
}

View file

@ -12,7 +12,7 @@ export default (part) => {
snippets,
complete,
paperless,
macro
macro,
} = part.shorthand()
// Wrist
@ -88,26 +88,26 @@ export default (part) => {
macro('vd', {
from: points.wristLeft,
to: points.bicepsLeft,
x: points.bicepsLeft.x - sa - 15
x: points.bicepsLeft.x - sa - 15,
})
macro('vd', {
from: points.wristLeft,
to: points.sleeveTip,
x: points.bicepsLeft.x - sa - 30
x: points.bicepsLeft.x - sa - 30,
})
macro('hd', {
from: points.bicepsLeft,
to: points.bicepsRight,
y: points.sleeveTip.y - sa - 30
y: points.sleeveTip.y - sa - 30,
})
macro('hd', {
from: points.wristLeft,
to: points.wristRight,
y: points.wristLeft.y + sa + 30
y: points.wristLeft.y + sa + 30,
})
macro('pd', {
path: paths.sleevecap.reverse(),
d: -1 * sa - 15
d: -1 * sa - 15,
})
}
return part

View file

@ -162,7 +162,7 @@ function redrawSleevecapFront(part, delta) {
'capQ2Cp1',
'capQ2',
'capQ2Base',
'capQ2Cp2'
'capQ2Cp2',
]) {
points[p].x += (points[p].x / factor) * delta * -1
}

View file

@ -17,7 +17,7 @@ export default {
'cuffEase',
'shoulderEase',
'lengthBonus',
'sleeveLengthBonus'
'sleeveLengthBonus',
],
advanced: [
'acrossBackFactor',
@ -46,10 +46,10 @@ export default {
'sleevecapQ3Spread1',
'sleevecapQ3Spread2',
'sleevecapQ4Spread1',
'sleevecapQ4Spread2'
]
}
]
'sleevecapQ4Spread2',
],
},
],
},
measurements: [
'biceps',
@ -60,18 +60,18 @@ export default {
'shoulderSlope',
'shoulderToShoulder',
'shoulderToWrist',
'wrist'
'wrist',
],
dependencies: {
back: 'base',
front: 'back',
sleevecap: 'front',
sleeve: 'sleevecap'
sleeve: 'sleevecap',
},
inject: {
back: 'base',
front: 'back',
sleeve: 'sleevecap'
sleeve: 'sleevecap',
},
hide: ['base', 'sleevecap'],
options: {
@ -112,6 +112,6 @@ export default {
sleevecapQ4Spread1: { pct: 7, min: 4, max: 20 },
sleevecapQ4Spread2: { pct: 7, min: 4, max: 20 },
sleeveWidthGuarantee: { pct: 90, min: 25, max: 100 },
sleeveLengthBonus: { pct: 0, min: -40, max: 10 }
}
sleeveLengthBonus: { pct: 0, min: -40, max: 10 },
},
}

View file

@ -11,7 +11,7 @@ export default (part) => {
snippets,
complete,
paperless,
macro
macro,
} = part.shorthand()
points.anchor = points.hps.clone()
@ -34,7 +34,7 @@ export default (part) => {
macro('cutonfold', {
from: points.cbNeck,
to: points.cbHips,
grainline: true
grainline: true,
})
macro('title', { at: points.title, nr: 2, title: 'back' })
@ -56,27 +56,27 @@ export default (part) => {
macro('hd', {
from: points.cbHips,
to: points.hips,
y: points.hips.y + sa + 15
y: points.hips.y + sa + 15,
})
macro('vd', {
from: points.cbHips,
to: points.cbWaist,
x: points.cbHips.x - sa - 15
x: points.cbHips.x - sa - 15,
})
macro('vd', {
from: points.cbHips,
to: points.cbNeck,
x: points.cbHips.x - sa - 30
x: points.cbHips.x - sa - 30,
})
macro('hd', {
from: points.cbNeck,
to: points.neck,
y: points.neck.y - sa - 15
y: points.neck.y - sa - 15,
})
macro('hd', {
from: points.cbNeck,
to: points.shoulder,
y: points.neck.y - sa - 30
y: points.neck.y - sa - 30,
})
}

View file

@ -12,7 +12,7 @@ export default (part) => {
Path,
paths,
utils,
complete
complete,
} = part.shorthand()
store.set('shoulderEase', (measurements.shoulderToShoulder * options.shoulderEase) / 2)

View file

@ -14,7 +14,7 @@ export default (part) => {
measurements,
complete,
paperless,
macro
macro,
} = part.shorthand()
// Cut arm a bit deeper at the front
@ -49,7 +49,7 @@ export default (part) => {
macro('cutonfold', {
from: points.cfNeck,
to: points.cfHips,
grainline: true
grainline: true,
})
macro('title', { at: points.title, nr: 1, title: 'front' })
snippets.armholePitchNotch = new Snippet('notch', points.armholePitch)
@ -70,27 +70,27 @@ export default (part) => {
macro('hd', {
from: points.cfHips,
to: points.hips,
y: points.hips.y + sa + 15
y: points.hips.y + sa + 15,
})
macro('vd', {
from: points.cfHips,
to: points.cfWaist,
x: points.cfHips.x - sa - 15
x: points.cfHips.x - sa - 15,
})
macro('vd', {
from: points.cfHips,
to: points.cfNeck,
x: points.cfHips.x - sa - 30
x: points.cfHips.x - sa - 30,
})
macro('hd', {
from: points.cfNeck,
to: points.neck,
y: points.neck.y - sa - 15
y: points.neck.y - sa - 15,
})
macro('hd', {
from: points.cfNeck,
to: points.shoulder,
y: points.neck.y - sa - 30
y: points.neck.y - sa - 30,
})
}

View file

@ -41,33 +41,33 @@ export function dimensions(macro, points, Path, sa) {
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder),
d: sa + 15
d: sa + 15,
})
macro('pd', {
path: new Path()
.move(points.armholePitch)
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder),
d: -15
d: -15,
})
macro('vd', {
from: points.hips,
to: points.armhole,
x: points.hips.x + sa + 15
x: points.hips.x + sa + 15,
})
macro('vd', {
from: points.hips,
to: points.armholePitch,
x: points.hips.x + sa + 30
x: points.hips.x + sa + 30,
})
macro('vd', {
from: points.hips,
to: points.shoulder,
x: points.hips.x + sa + 45
x: points.hips.x + sa + 45,
})
macro('vd', {
from: points.hips,
to: points.neck,
x: points.hips.x + sa + 60
x: points.hips.x + sa + 60,
})
macro('ld', { from: points.neck, to: points.shoulder, d: sa + 15 })
}

View file

@ -12,7 +12,7 @@ export default (part) => {
snippets,
complete,
paperless,
macro
macro,
} = part.shorthand()
// Wrist
@ -71,26 +71,26 @@ export default (part) => {
macro('vd', {
from: points.wristLeft,
to: points.bicepsLeft,
x: points.bicepsLeft.x - sa - 15
x: points.bicepsLeft.x - sa - 15,
})
macro('vd', {
from: points.wristLeft,
to: points.sleeveTip,
x: points.bicepsLeft.x - sa - 30
x: points.bicepsLeft.x - sa - 30,
})
macro('hd', {
from: points.bicepsLeft,
to: points.bicepsRight,
y: points.sleeveTip.y - sa - 30
y: points.sleeveTip.y - sa - 30,
})
macro('hd', {
from: points.wristLeft,
to: points.wristRight,
y: points.wristLeft.y + sa + 30
y: points.wristLeft.y + sa + 30,
})
macro('pd', {
path: paths.sleevecap.reverse(),
d: -1 * sa - 15
d: -1 * sa - 15,
})
}
return part

View file

@ -11,13 +11,13 @@ export default {
tags: ['underwear', 'bottom', 'basics'],
optionGroups: {
fit: ['bulge', 'stretch', 'legStretch', 'backRise'],
style: ['rise', 'legBonus']
style: ['rise', 'legBonus'],
},
measurements: ['hips', 'upperLeg', 'waistToHips', 'waistToUpperLeg'],
dependencies: {
side: ['back', 'front'],
front: 'inset',
inset: 'back'
inset: 'back',
},
options: {
// Constants
@ -48,6 +48,6 @@ export default {
rise: { pct: 10, min: 0, max: 25 },
stretch: { pct: 15, min: 5, max: 25 },
legStretch: { pct: 40, min: 25, max: 45 },
backRise: { pct: 5, min: 0, max: 10 }
}
backRise: { pct: 5, min: 0, max: 10 },
},
}

View file

@ -13,7 +13,7 @@ export default function (part) {
complete,
paperless,
macro,
utils
utils,
} = part.shorthand()
// Initialize
@ -97,12 +97,12 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 1,
title: 'back'
title: 'back',
})
macro('cutonfold', {
from: points.center,
to: points.gussetTop,
grainline: true
grainline: true,
})
snippets.logo = new Snippet('logo', points.title.shift(90, 50))
snippets.backNotch = new Snippet(
@ -116,42 +116,42 @@ export default function (part) {
macro('vd', {
from: points.gussetTop,
to: points.center,
x: points.center.x - 15
x: points.center.x - 15,
})
macro('vd', {
from: points.gussetRight,
to: points.center,
x: points.center.x - 30
x: points.center.x - 30,
})
macro('vd', {
from: points.legRight,
to: points.sideRight,
x: points.legRight.x + 15 + sa
x: points.legRight.x + 15 + sa,
})
macro('vd', {
from: points.legRight,
to: points.center,
x: points.legRight.x + 30 + sa
x: points.legRight.x + 30 + sa,
})
macro('hd', {
from: points.center,
to: points.sideRight,
y: points.center.y - 15 - sa
y: points.center.y - 15 - sa,
})
macro('hd', {
from: points.gussetTop,
to: points.gussetRight,
y: points.gussetRight.y + 15 + sa * 2
y: points.gussetRight.y + 15 + sa * 2,
})
macro('hd', {
from: points.gussetTop,
to: points.legRight,
y: points.gussetRight.y + 30 + sa * 2
y: points.gussetRight.y + 30 + sa * 2,
})
macro('ld', {
from: points.gussetRight,
to: points.legRight,
d: -15 - sa * 2
d: -15 - sa * 2,
})
}

View file

@ -35,7 +35,7 @@ export default function (part) {
paperless,
macro,
snippets,
Snippet
Snippet,
} = part.shorthand()
// Initialize
@ -169,11 +169,11 @@ export default function (part) {
macro('title', {
at: points.midMid,
nr: 2,
title: 'front'
title: 'front',
})
macro('grainline', {
from: points.dartJoin,
to: points.topMid
to: points.topMid,
})
snippets.sideNotch = new Snippet('notch', points.midRight)
points.curveNotch = new Path()
@ -189,44 +189,44 @@ export default function (part) {
macro('hd', {
from: points.topLeft,
to: points.topRight,
y: points.topLeft.y - 15 - sa
y: points.topLeft.y - 15 - sa,
})
macro('hd', {
from: points.midLeft,
to: points.midRight,
y: points.topLeft.y - 30 - sa
y: points.topLeft.y - 30 - sa,
})
macro('vd', {
from: points.midLeft,
to: points.topMid,
x: points.midLeft.x - 15 - sa
x: points.midLeft.x - 15 - sa,
})
macro('vd', {
from: points.midLeft,
to: points.topLeft,
x: points.midLeft.x - 30 - sa
x: points.midLeft.x - 30 - sa,
})
if (options.bulge === 0) {
macro('hd', {
from: points.leftTuskLeft,
to: points.rightTuskRight,
y: points.leftTuskLeft.y + 15 + sa
y: points.leftTuskLeft.y + 15 + sa,
})
macro('vd', {
from: points.leftTuskLeft,
to: points.topLeft,
x: points.midLeft.x - 45 - sa
x: points.midLeft.x - 45 - sa,
})
} else {
macro('vd', {
from: points.leftTuskLeft,
to: points.topLeft,
x: points.midLeft.x - 45 - sa
x: points.midLeft.x - 45 - sa,
})
macro('vd', {
from: points.leftTuskRight,
to: points.topLeft,
x: points.midLeft.x - 60 - sa
x: points.midLeft.x - 60 - sa,
})
points.narrowRight = new Path()
.move(points.midRight)
@ -240,32 +240,32 @@ export default function (part) {
macro('hd', {
from: points.narrowLeft,
to: points.narrowRight,
y: points.narrowLeft.y
y: points.narrowLeft.y,
})
macro('hd', {
from: points.leftTuskRight,
to: points.rightTuskLeft,
y: points.rightTuskLeft.y + 15 + sa
y: points.rightTuskLeft.y + 15 + sa,
})
macro('hd', {
from: points.leftTuskLeft,
to: points.rightTuskRight,
y: points.rightTuskLeft.y + 30 + sa
y: points.rightTuskLeft.y + 30 + sa,
})
macro('ld', {
from: points.rightTuskLeft,
to: points.rightTuskRight,
d: -15 - sa
d: -15 - sa,
})
macro('vd', {
from: points.narrowRight,
to: points.topRight,
x: points.topRight.x + 15 + sa
x: points.topRight.x + 15 + sa,
})
macro('vd', {
from: points.dartJoin,
to: points.topRight,
x: points.topRight.x + 30 + sa
x: points.topRight.x + 30 + sa,
})
}
}

View file

@ -12,7 +12,7 @@ export default function (part) {
paperless,
macro,
Snippet,
snippets
snippets,
} = part.shorthand()
// Initialize
@ -62,11 +62,11 @@ export default function (part) {
macro('title', {
at: points.title.shift(-90, 15),
nr: 4,
title: 'inset'
title: 'inset',
})
macro('grainline', {
from: points.bottomLeft.shift(0, 15),
to: points.topLeft.shift(0, 15)
to: points.topLeft.shift(0, 15),
})
snippets.notch = new Snippet(
'notch',
@ -82,22 +82,22 @@ export default function (part) {
macro('vd', {
from: points.bottomLeft,
to: points.topLeft,
x: points.topLeft.x - 15 - sa
x: points.topLeft.x - 15 - sa,
})
macro('vd', {
from: points.bottomRight,
to: points.tip,
x: points.tip.x + 15 + sa
x: points.tip.x + 15 + sa,
})
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomRight.y + 15 + sa
y: points.bottomRight.y + 15 + sa,
})
macro('hd', {
from: points.bottomLeft,
to: points.tip,
y: points.bottomRight.y + 30 + sa
y: points.bottomRight.y + 30 + sa,
})
}

View file

@ -13,7 +13,7 @@ export default function (part) {
macro,
utils,
snippets,
Snippet
Snippet,
} = part.shorthand()
// Initialize
@ -65,7 +65,7 @@ export default function (part) {
macro('title', {
at: points.title.shift(90, 30),
nr: 3,
title: 'side'
title: 'side',
})
macro('scalebox', { at: points.title.shift(-90, 40) })
if (sa) {
@ -77,7 +77,7 @@ export default function (part) {
}
macro('grainline', {
from: new Point(points.bottomRight.x / 2, points.bottomRight.y),
to: new Point(points.bottomRight.x / 2, points.topRight.y)
to: new Point(points.bottomRight.x / 2, points.topRight.y),
})
snippets.frontNotch = new Snippet(
'notch',
@ -94,22 +94,22 @@ export default function (part) {
macro('vd', {
from: points.bottomLeft,
to: points.topLeft,
x: points.topLeft.x - 15 - sa
x: points.topLeft.x - 15 - sa,
})
macro('vd', {
from: points.bottomRight,
to: points.topRight,
x: points.topRight.x + 15 + sa
x: points.topRight.x + 15 + sa,
})
macro('hd', {
from: points.topLeft,
to: points.topRight,
y: points.topLeft.y - 15 - sa
y: points.topLeft.y - 15 - sa,
})
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + 15 + sa
y: points.bottomLeft.y + 15 + sa,
})
}

View file

@ -20,7 +20,7 @@ export default {
'sleeveBend',
'sleeveLengthBonus',
'waistEase',
'seatEase'
'seatEase',
],
advanced: [
'backNeckCutout',
@ -30,7 +30,7 @@ export default {
'shoulderSlopeReduction',
'sleevecapHeight',
'sleevecapEase',
'contour'
'contour',
],
pockets: [
'pocketPlacementHorizontal',
@ -46,10 +46,10 @@ export default {
'innerPocketPlacement',
'innerPocketWidth',
'innerPocketDepth',
'innerPocketWeltHeight'
'innerPocketWeltHeight',
],
style: ['beltWidth', 'buttonSpacingHorizontal', 'cuffLength', 'length'],
collar: ['collarHeight', 'collarSpread', 'collarFlare']
collar: ['collarHeight', 'collarSpread', 'collarFlare'],
},
measurements: [
'biceps',
@ -70,7 +70,7 @@ export default {
// For breasts
'highBust',
'bustSpan',
'hpsToBust'
'hpsToBust',
],
dependencies: {
bentBack: 'bentBase',
@ -95,7 +95,7 @@ export default {
innerPocketBag: 'carltonFront',
innerPocketTab: 'carltonFront',
front: 'carltonFront',
side: 'front'
side: 'front',
},
inject: {
bentBack: 'bentBase',
@ -109,7 +109,7 @@ export default {
collar: 'collarStand',
pocketLining: 'pocket',
front: 'carltonFront',
side: 'front'
side: 'front',
},
hide: [
'bentBase',
@ -118,7 +118,7 @@ export default {
'bentSleeve',
'bentTopSleeve',
'bentUnderSleeve',
'carltonFront'
'carltonFront',
],
parts: [
'back',
@ -136,7 +136,7 @@ export default {
'chestPocketBag',
'innerPocketWelt',
'innerPocketBag',
'innerPocketTab'
'innerPocketTab',
],
options: {
// Constants
@ -193,6 +193,6 @@ export default {
collarFlare: { pct: 20, min: 0, max: 40 },
// Carlita-specific options
contour: { pct: 50, min: 25, max: 75 }
}
contour: { pct: 50, min: 25, max: 75 },
},
}

View file

@ -13,7 +13,7 @@ export default function (part) {
macro,
Point,
paths,
Path
Path,
} = part.shorthand()
/**
@ -82,7 +82,7 @@ export default function (part) {
'armholeHollow',
'armholeHollowCp2',
'armholePitchCp1',
'armholePitch'
'armholePitch',
]
// Store these, we'll use them in the side part
store.set('side', side)
@ -176,7 +176,7 @@ export default function (part) {
'chestPocketTopLeft',
'chestPocketTopRight',
'chestPocketBottomLeft',
'chestPocketBottomRight'
'chestPocketBottomRight',
]
for (let i of belowBust) {
// Round points depend on options, so add a check
@ -349,7 +349,7 @@ export default function (part) {
snippets.button3Right = new Snippet('button', points.button3Right).attr('data-scale', 2)
macro('sprinkle', {
snippet: 'notch',
on: ['cfNeck', 'rollLineStart', 'bustPoint', 'chestPocketTopLeft', 'chestPocketBottomLeft']
on: ['cfNeck', 'rollLineStart', 'bustPoint', 'chestPocketTopLeft', 'chestPocketBottomLeft'],
})
points.logo = points.cfSeat.shiftFractionTowards(points.cfHem, 0.5)
snippets.logo = new Snippet('logo', points.logo)
@ -369,122 +369,122 @@ export default function (part) {
macro('ld', {
from: points.hemEdge,
to: points.flbHem,
d: 15
d: 15,
})
macro('hd', {
from: points.hemEdge,
to: points.psHem,
y: points.psHem.y + 15 + 3 * sa
y: points.psHem.y + 15 + 3 * sa,
})
macro('hd', {
from: points.rollLineStart,
to: points.pocketTopLeft,
y: points.pocketFlapBottomLeft.y
y: points.pocketFlapBottomLeft.y,
})
macro('vd', {
from: points.pocketFlapTopLeft,
to: points.button3Right,
x: points.bustPoint.x + sa + 15
x: points.bustPoint.x + sa + 15,
})
macro('vd', {
from: points.pocketTopLeft,
to: points.button3Right,
x: points.bustPoint.x + sa + 30
x: points.bustPoint.x + sa + 30,
})
macro('vd', {
from: points.chestPocketBottomLeft,
to: points.button3Right,
x: points.bustPoint.x - 15
x: points.bustPoint.x - 15,
})
macro('hd', {
from: points.rollLineStart,
to: points.chestPocketBottomLeft,
y: points.chestPocketBottomLeft.y + 15
y: points.chestPocketBottomLeft.y + 15,
})
macro('hd', {
from: points.rollLineStart,
to: points.button3Left,
y: points.button3Left.y + 15
y: points.button3Left.y + 15,
})
macro('hd', {
from: points.button3Left,
to: points.button3Right,
y: points.button3Left.y + 15
y: points.button3Left.y + 15,
})
macro('vd', {
from: points.psHem,
to: points.bustPoint,
x: points.bustPoint.x + sa + 45
x: points.bustPoint.x + sa + 45,
})
macro('vd', {
from: points.psHem,
to: points.armholePitch,
x: points.armholePitch.x + sa + 15
x: points.armholePitch.x + sa + 15,
})
macro('vd', {
from: points.armholePitch,
to: points.shoulder,
x: points.shoulder.x + sa + 15
x: points.shoulder.x + sa + 15,
})
macro('vd', {
from: points.armholePitch,
to: points.neck,
x: points.shoulder.x + sa + 30
x: points.shoulder.x + sa + 30,
})
macro('vd', {
from: points.rollLineStart,
to: points.collarTip,
x: points.rollLineStart.x - sa - 15
x: points.rollLineStart.x - sa - 15,
})
macro('vd', {
from: points.button2Left,
to: points.rollLineStart,
x: points.rollLineStart.x - sa - 15
x: points.rollLineStart.x - sa - 15,
})
macro('vd', {
from: points.button1Left,
to: points.button2Left,
x: points.rollLineStart.x - sa - 15
x: points.rollLineStart.x - sa - 15,
})
macro('vd', {
from: points.hemEdge,
to: points.collarTip,
x: points.rollLineStart.x - sa - 30
x: points.rollLineStart.x - sa - 30,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.collarTip,
y: points.collarTip.y - sa - 15
y: points.collarTip.y - sa - 15,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.cfNeck,
y: points.collarTip.y - sa - 30
y: points.collarTip.y - sa - 30,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.rollLineEnd,
y: points.collarTip.y - sa - 45
y: points.collarTip.y - sa - 45,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.neck,
y: points.neck.y - sa - 15
y: points.neck.y - sa - 15,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.armholePitch,
y: points.neck.y - sa - 30
y: points.neck.y - sa - 30,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.shoulder,
y: points.neck.y - sa - 45
y: points.neck.y - sa - 45,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.armhole,
y: points.neck.y - sa - 60
y: points.neck.y - sa - 60,
})
}
}

View file

@ -38,7 +38,7 @@ for (let m of [
'draftChestPocketBag',
'draftInnerPocketWelt',
'draftInnerPocketBag',
'draftInnerPocketTab'
'draftInnerPocketTab',
]) {
Pattern.prototype[m] = function (part) {
return new Carlton(this.settings)[m](part)

View file

@ -10,7 +10,7 @@ export default function (part) {
macro,
Point,
paths,
Path
Path,
} = part.shorthand()
// Give points their original names
@ -39,7 +39,7 @@ export default function (part) {
macro('title', {
at: points.title,
nr: '1b',
title: 'side'
title: 'side',
})
points.logo = points.psHem.shiftFractionTowards(points.seat, 0.5)
@ -49,7 +49,7 @@ export default function (part) {
points.grainlineTo = new Point(points.grainlineFrom.x, points.armholePitchCp1.y)
macro('grainline', {
from: points.grainlineFrom,
to: points.grainlineTo
to: points.grainlineTo,
})
snippets.bust = new Snippet('notch', points.bustPoint)
@ -66,56 +66,56 @@ export default function (part) {
macro('vd', {
from: points.psHem,
to: points.psWaist,
x: points.psWaist.x - sa - 15
x: points.psWaist.x - sa - 15,
})
macro('vd', {
from: points.psHem,
to: points.bustPoint,
x: points.bustPoint.x - sa - 15
x: points.bustPoint.x - sa - 15,
})
macro('vd', {
from: points.hem,
to: points.seat,
x: points.hem.x + sa + 15
x: points.hem.x + sa + 15,
})
macro('vd', {
from: points.hem,
to: points.waist,
x: points.hem.x + sa + 30
x: points.hem.x + sa + 30,
})
macro('vd', {
from: points.hem,
to: points.armhole,
x: points.hem.x + sa + 45
x: points.hem.x + sa + 45,
})
macro('vd', {
from: points.hem,
to: points.armholePitch,
x: points.hem.x + sa + 60
x: points.hem.x + sa + 60,
})
macro('hd', {
from: points.psWaist,
to: points.waist
to: points.waist,
})
macro('hd', {
from: points.bustPoint,
to: points.waist,
y: points.bustPoint.y
y: points.bustPoint.y,
})
macro('hd', {
from: points.bustPoint,
to: points.armholePitch,
y: points.armholePitch.y - sa - 15
y: points.armholePitch.y - sa - 15,
})
macro('hd', {
from: points.bustPoint,
to: points.armhole,
y: points.armholePitch.y - sa - 30
y: points.armholePitch.y - sa - 30,
})
macro('hd', {
from: points.psHem,
to: points.hem,
y: points.hem.y + 3 * sa + 15
y: points.hem.y + 3 * sa + 15,
})
}
}

View file

@ -20,7 +20,7 @@ export default {
'sleeveBend',
'sleeveLengthBonus',
'waistEase',
'seatEase'
'seatEase',
],
advanced: [
'backNeckCutout',
@ -29,7 +29,7 @@ export default {
'lapelReduction',
'shoulderSlopeReduction',
'sleevecapHeight',
'sleevecapEase'
'sleevecapEase',
],
pockets: [
'pocketPlacementHorizontal',
@ -45,10 +45,10 @@ export default {
'innerPocketPlacement',
'innerPocketWidth',
'innerPocketDepth',
'innerPocketWeltHeight'
'innerPocketWeltHeight',
],
style: ['beltWidth', 'buttonSpacingHorizontal', 'cuffLength', 'length'],
collar: ['collarHeight', 'collarSpread', 'collarFlare']
collar: ['collarHeight', 'collarSpread', 'collarFlare'],
},
measurements: [
'biceps',
@ -65,7 +65,7 @@ export default {
'wrist',
'waistToFloor',
'waistToSeat',
'seat'
'seat',
],
dependencies: {
bentBack: 'bentBase',
@ -88,7 +88,7 @@ export default {
chestPocketBag: 'front',
innerPocketWelt: 'front',
innerPocketBag: 'front',
innerPocketTab: 'front'
innerPocketTab: 'front',
},
inject: {
bentBack: 'bentBase',
@ -100,7 +100,7 @@ export default {
topSleeve: 'bentTopSleeve',
underSleeve: 'bentUnderSleeve',
collar: 'collarStand',
pocketLining: 'pocket'
pocketLining: 'pocket',
},
hide: ['bentBase', 'bentBack', 'bentFront', 'bentSleeve', 'bentTopSleeve', 'bentUnderSleeve'],
options: {
@ -155,6 +155,6 @@ export default {
cuffLength: { pct: 15, min: 10, max: 20 },
collarHeight: { pct: 9.6, min: 8, max: 11 },
collarSpread: { deg: 4, min: 2, max: 6 },
collarFlare: { pct: 20, min: 0, max: 40 }
}
collarFlare: { pct: 20, min: 0, max: 40 },
},
}

View file

@ -14,7 +14,7 @@ export default function (part) {
macro,
Point,
paths,
Path
Path,
} = part.shorthand()
calculateRatios(part)
@ -96,12 +96,12 @@ export default function (part) {
if (complete) {
macro('sprinkle', {
snippet: 'bnotch',
on: ['shoulder', 'bpTriangleTip']
on: ['shoulder', 'bpTriangleTip'],
})
macro('grainline', {
from: points.cbWaist,
to: points.bpStart
to: points.bpStart,
})
points.logo = new Point(points.armhole.x * 0.7, points.dartTip.y)
@ -122,102 +122,102 @@ export default function (part) {
macro('hd', {
from: points.bpBottom,
to: points.cbWaist,
y: points.cbWaist.y + 15 + sa
y: points.cbWaist.y + 15 + sa,
})
macro('hd', {
from: points.cbWaist,
to: points.dartLeft,
y: points.cbWaist.y + 15 + sa
y: points.cbWaist.y + 15 + sa,
})
macro('hd', {
from: points.dartLeft,
to: points.dartRight,
y: points.cbWaist.y + 15 + sa
y: points.cbWaist.y + 15 + sa,
})
macro('hd', {
from: points.dartRight,
to: points.waist,
y: points.cbWaist.y + 15 + sa
y: points.cbWaist.y + 15 + sa,
})
macro('hd', {
from: points.cbWaist,
to: points.waist,
y: points.cbWaist.y + 30 + sa
y: points.cbWaist.y + 30 + sa,
})
macro('hd', {
from: points.bpBottom,
to: points.waist,
y: points.cbWaist.y + 45 + sa
y: points.cbWaist.y + 45 + sa,
})
macro('vd', {
from: points.waist,
to: points.armhole,
x: points.armhole.x + 15 + sa
x: points.armhole.x + 15 + sa,
})
macro('vd', {
from: points.armhole,
to: points.armholePitch,
x: points.armhole.x + 15 + sa
x: points.armhole.x + 15 + sa,
})
macro('vd', {
from: points.armhole,
to: points.shoulder,
x: points.armhole.x + 30 + sa
x: points.armhole.x + 30 + sa,
})
macro('vd', {
from: points.waist,
to: points.shoulder,
x: points.armhole.x + 45 + sa
x: points.armhole.x + 45 + sa,
})
macro('vd', {
from: points.dartRight,
to: points.dartTip,
x: points.dartRight.x + 15
x: points.dartRight.x + 15,
})
macro('vd', {
from: points.bpBottom,
to: points.bpTop,
x: points.bpTop.x - 15 - sa
x: points.bpTop.x - 15 - sa,
})
macro('vd', {
from: points.bpTop,
to: points.cbNeck,
x: points.bpTop.x - 15 - sa
x: points.bpTop.x - 15 - sa,
})
macro('vd', {
from: points.bpBottom,
to: points.neck,
x: points.bpTop.x - 30 - sa
x: points.bpTop.x - 30 - sa,
})
macro('vd', {
from: points.bpStart,
to: points.bpTriangleTip,
x: points.bpTriangleEdge.x + 15
x: points.bpTriangleEdge.x + 15,
})
macro('hd', {
from: points.bpStart,
to: points.bpTriangleEdge,
y: points.bpTriangleEdge.y + 15
y: points.bpTriangleEdge.y + 15,
})
macro('hd', {
from: points.cbNeck,
to: points.neck,
y: points.neck.y - 15 - sa
y: points.neck.y - 15 - sa,
})
macro('hd', {
from: points.cbNeck,
to: points.armholePitch,
y: points.neck.y - 30 - sa
y: points.neck.y - 30 - sa,
})
macro('hd', {
from: points.cbNeck,
to: points.shoulder,
y: points.neck.y - 45 - sa
y: points.neck.y - 45 - sa,
})
macro('hd', {
from: points.cbNeck,
to: points.armhole,
y: points.neck.y - 60 - sa
y: points.neck.y - 60 - sa,
})
}
}

View file

@ -10,7 +10,7 @@ export default function (part) {
macro,
Point,
paths,
Path
Path,
} = part.shorthand()
let length = 1.6 * (store.get('cbToDart') + store.get('dartToSide'))
@ -27,7 +27,7 @@ export default function (part) {
via: points.topLeft,
prefix: 'roundTop',
radius: width / 4,
render: true
render: true,
})
macro('round', {
from: points.topLeft,
@ -35,7 +35,7 @@ export default function (part) {
via: points.bottomLeft,
prefix: 'roundBottom',
radius: width / 4,
render: true
render: true,
})
// Paths
@ -56,7 +56,7 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 6,
title: 'belt'
title: 'belt',
})
points.logo = new Point(points.bottomRight.x * 0.75, points.bottomRight.y * 0.65)
snippets.logo = new Snippet('logo', points.logo)
@ -71,22 +71,22 @@ export default function (part) {
macro('hd', {
from: points.roundBottomStart,
to: points.roundBottomEnd,
y: points.roundBottomEnd.y + sa + 15
y: points.roundBottomEnd.y + sa + 15,
})
macro('hd', {
from: points.roundBottomStart,
to: points.button,
y: points.roundBottomEnd.y + sa + 30
y: points.roundBottomEnd.y + sa + 30,
})
macro('hd', {
from: points.roundBottomStart,
to: points.bottomRight,
y: points.roundBottomEnd.y + sa + 45
y: points.roundBottomEnd.y + sa + 45,
})
macro('vd', {
from: points.bottomRight,
to: points.topRight,
x: points.topRight.x + sa + 15
x: points.topRight.x + sa + 15,
})
}
}

View file

@ -9,7 +9,7 @@ export default function (part) {
macro,
Point,
paths,
Path
Path,
} = part.shorthand()
points.topLeft = new Point(0, 0)
@ -47,12 +47,12 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 17,
title: 'chestPocketBag'
title: 'chestPocketBag',
})
macro('grainline', {
from: points.bottomLeft.shift(0, 10),
to: points.topLeft.shift(0, 10)
to: points.topLeft.shift(0, 10),
})
if (sa) {
@ -61,14 +61,14 @@ export default function (part) {
macro('ld', {
from: points.bottomRight.shift(180, 15),
to: points.topRight.shift(180, 15),
text: units(store.get('chestPocketBagDepth') * 2)
text: units(store.get('chestPocketBagDepth') * 2),
})
if (paperless) {
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + sa + 15
y: points.bottomLeft.y + sa + 15,
})
}
}

View file

@ -24,7 +24,7 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 12,
title: 'chestPocketWelt'
title: 'chestPocketWelt',
})
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
@ -33,12 +33,12 @@ export default function (part) {
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + sa + 15
y: points.bottomLeft.y + sa + 15,
})
macro('vd', {
from: points.bottomRight,
to: points.topRight,
x: points.topRight.x + sa + 15
x: points.topRight.x + sa + 15,
})
}
}

View file

@ -37,20 +37,20 @@ export default function (part) {
let rotate = {
1: {
pivot: 'cutBottom1',
points: ['cutBottom2', 'cutTop1', 'cutTop2', 'q2Cp1', 'q2Cp2']
points: ['cutBottom2', 'cutTop1', 'cutTop2', 'q2Cp1', 'q2Cp2'],
},
2: {
pivot: 'cutBottom2',
points: ['cutBottom3', 'cutTop2', 'cutTop3', 'q3Cp1', 'q3Cp2']
points: ['cutBottom3', 'cutTop2', 'cutTop3', 'q3Cp1', 'q3Cp2'],
},
3: {
pivot: 'cutBottom3',
points: ['standTip', 'bottomRight', 'cutTop4', 'cutTop3', 'q4Cp1']
points: ['standTip', 'bottomRight', 'cutTop4', 'cutTop3', 'q4Cp1'],
},
4: {
pivot: 'standTip',
points: ['topRight', 'bottomRight', 'cutTop4']
}
points: ['topRight', 'bottomRight', 'cutTop4'],
},
}
let angle = -1 * options.collarSpread
@ -77,7 +77,7 @@ export default function (part) {
'rot2cutTop3',
'rot2cutBottom3',
'rot2q3Cp1',
'rot2q3Cp2'
'rot2q3Cp2',
])
points[i] = points[i].shift(angle, distance)
@ -172,7 +172,7 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 8,
title: 'collar'
title: 'collar',
})
// Remove grainline from collarstand part
@ -180,7 +180,7 @@ export default function (part) {
macro('cutonfold', {
from: points.topLeft,
to: points.standTop,
grainline: true
grainline: true,
})
if (sa) {
@ -196,47 +196,47 @@ export default function (part) {
macro('hd', {
from: points.standTop,
to: points.rot3standTip,
y: points.rot4bottomRight.y + sa + 15
y: points.rot4bottomRight.y + sa + 15,
})
macro('hd', {
from: points.standTop,
to: points.rot4bottomRight,
y: points.rot4bottomRight.y + sa + 30
y: points.rot4bottomRight.y + sa + 30,
})
macro('hd', {
from: points.standTop,
to: points.rot4topRight,
y: points.rot4bottomRight.y + sa + 45
y: points.rot4bottomRight.y + sa + 45,
})
macro('vd', {
from: points.standTop,
to: points.topLeft,
x: points.topLeft.x - 15
x: points.topLeft.x - 15,
})
macro('vd', {
from: points.rot3standTip,
to: points.topLeft,
x: points.topLeft.x - 30
x: points.topLeft.x - 30,
})
macro('vd', {
from: points.rot4topRight,
to: points.topLeft,
x: points.rot4topRight.x + sa + 15
x: points.rot4topRight.x + sa + 15,
})
macro('vd', {
from: points.rot4bottomRight,
to: points.topLeft,
x: points.rot4topRight.x + sa + 30
x: points.rot4topRight.x + sa + 30,
})
macro('ld', {
from: points.rot4bottomRight,
to: points.rot4topRight,
d: -1 * sa - 15
d: -1 * sa - 15,
})
macro('ld', {
from: points.rot3standTip,
to: points.rot4bottomRight,
d: -1 * sa - 15
d: -1 * sa - 15,
})
}
}

View file

@ -10,7 +10,7 @@ export default function (part) {
macro,
Point,
paths,
Path
Path,
} = part.shorthand()
let height = measurements.chest * options.collarHeight
@ -48,12 +48,12 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 7,
title: 'collarStand'
title: 'collarStand',
})
macro('grainline', {
from: points.bottomLeft,
to: points.standTop
to: points.standTop,
})
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
@ -62,17 +62,17 @@ export default function (part) {
macro('hd', {
from: points.standTipLeft,
to: points.standTip,
y: points.standTip.y + sa + 15
y: points.standTip.y + sa + 15,
})
macro('vd', {
from: points.bottomLeft,
to: points.standTop,
x: points.standTip.x + sa + 15
x: points.standTip.x + sa + 15,
})
macro('vd', {
from: points.standTip,
to: points.standTop,
x: points.standTip.x + sa + 30
x: points.standTip.x + sa + 30,
})
}
}

View file

@ -13,14 +13,14 @@ export default function (part) {
to: points.bottomRight,
via: points.bottomLeft,
radius: store.get('cuffRadius'),
prefix: 'roundLeft'
prefix: 'roundLeft',
})
macro('round', {
from: points.bottomLeft,
to: points.topRight,
via: points.bottomRight,
radius: store.get('cuffRadius'),
prefix: 'roundRight'
prefix: 'roundRight',
})
paths.seam = new Path()
@ -39,12 +39,12 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 9,
title: 'cuffFacing'
title: 'cuffFacing',
})
macro('grainline', {
from: points.bottomLeft.shift(0, 10 + store.get('cuffRadius')),
to: points.topLeft.shift(0, 10 + store.get('cuffRadius'))
to: points.topLeft.shift(0, 10 + store.get('cuffRadius')),
})
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
@ -53,22 +53,22 @@ export default function (part) {
macro('vd', {
from: points.roundRightStart,
to: points.roundRightEnd,
x: points.topRight.x + sa + 15
x: points.topRight.x + sa + 15,
})
macro('vd', {
from: points.roundRightStart,
to: points.topRight,
x: points.topRight.x + sa + 30
x: points.topRight.x + sa + 30,
})
macro('hd', {
from: points.roundRightStart,
to: points.roundRightEnd,
y: points.bottomRight.y + sa + 15
y: points.bottomRight.y + sa + 15,
})
macro('hd', {
from: points.roundLeftStart,
to: points.roundRightEnd,
y: points.bottomRight.y + sa + 30
y: points.bottomRight.y + sa + 30,
})
}
}

View file

@ -15,7 +15,7 @@ export default function (part) {
macro,
Point,
paths,
Path
Path,
} = part.shorthand()
calculateRatios(part)
@ -75,14 +75,14 @@ export default function (part) {
to: points.pocketBottomRight,
via: points.pocketBottomLeft,
prefix: 'pocketRoundLeft',
radius
radius,
})
macro('round', {
from: points.pocketBottomLeft,
to: points.pocketTopRight,
via: points.pocketBottomRight,
prefix: 'pocketRoundRight',
radius
radius,
})
store.set('pocketRadius', radius)
}
@ -110,14 +110,14 @@ export default function (part) {
to: points.pocketFlapBottomRight,
via: points.pocketFlapBottomLeft,
prefix: 'pocketFlapRoundLeft',
radius
radius,
})
macro('round', {
from: points.pocketFlapBottomLeft,
to: points.pocketFlapTopRight,
via: points.pocketFlapBottomRight,
prefix: 'pocketFlapRoundRight',
radius
radius,
})
store.set('pocketFlapRadius', radius)
}
@ -139,7 +139,7 @@ export default function (part) {
'chestPocketTopLeft',
'chestPocketBottomLeft',
'chestPocketTopRight',
'chestPocketBottomRight'
'chestPocketBottomRight',
])
points[i] = points[i].rotate(options.chestPocketAngle, points.chestPocketAnchor)
store.set('chestPocketBagDepth', points.button3Left.dx(points.chestPocketBottomLeft))
@ -306,7 +306,7 @@ export default function (part) {
macro('sprinkle', {
snippet: 'notch',
on: ['shoulder', 'cfNeck', 'rollLineStart', 'waist', 'seat']
on: ['shoulder', 'cfNeck', 'rollLineStart', 'waist', 'seat'],
})
points.logo = new Point(points.chestPocketTopRight.x, points.armhole.y)
@ -314,7 +314,7 @@ export default function (part) {
macro('grainline', {
from: points.cfHem,
to: points.cfNeck
to: points.cfNeck,
})
if (sa) {
@ -329,142 +329,142 @@ export default function (part) {
macro('ld', {
from: points.hemEdge,
to: points.flbHem,
d: 15
d: 15,
})
macro('ld', {
from: points.flbHem,
to: points.hem,
d: 15
d: 15,
})
macro('hd', {
from: points.hemEdge,
to: points.hem,
y: points.hem.y + 15 + 3 * sa
y: points.hem.y + 15 + 3 * sa,
})
macro('hd', {
from: points.rollLineStart,
to: points.pocketTopLeft,
y: points.pocketFlapBottomLeft.y
y: points.pocketFlapBottomLeft.y,
})
macro('vd', {
from: points.pocketFlapTopRight,
to: points.waist,
x: points.pocketTopRight.x - 15
x: points.pocketTopRight.x - 15,
})
macro('vd', {
from: points.pocketTopRight,
to: points.waist,
x: points.pocketTopRight.x - 30
x: points.pocketTopRight.x - 30,
})
macro('vd', {
from: points.chestPocketBottomLeft,
to: points.waist,
x: points.chestPocketBottomLeft.x - 15
x: points.chestPocketBottomLeft.x - 15,
})
macro('hd', {
from: points.rollLineStart,
to: points.chestPocketBottomLeft,
y: points.chestPocketBottomLeft.y + 15
y: points.chestPocketBottomLeft.y + 15,
})
macro('hd', {
from: points.rollLineStart,
to: points.button3Left,
y: points.button3Left.y + 15
y: points.button3Left.y + 15,
})
macro('hd', {
from: points.button3Left,
to: points.button3Right,
y: points.button3Left.y + 15
y: points.button3Left.y + 15,
})
macro('vd', {
from: points.hem,
to: points.seat,
x: points.hem.x + sa + 15
x: points.hem.x + sa + 15,
})
macro('vd', {
from: points.hem,
to: points.waist,
x: points.hem.x + sa + 30
x: points.hem.x + sa + 30,
})
macro('vd', {
from: points.hem,
to: points.armhole,
x: points.hem.x + sa + 45
x: points.hem.x + sa + 45,
})
macro('vd', {
from: points.armhole,
to: points.armholePitch,
x: points.armhole.x + sa + 15
x: points.armhole.x + sa + 15,
})
macro('vd', {
from: points.armhole,
to: points.shoulder,
x: points.armhole.x + sa + 30
x: points.armhole.x + sa + 30,
})
macro('vd', {
from: points.armhole,
to: points.neck,
x: points.armhole.x + sa + 45
x: points.armhole.x + sa + 45,
})
macro('vd', {
from: points.rollLineStart,
to: points.collarTip,
x: points.rollLineStart.x - sa - 15
x: points.rollLineStart.x - sa - 15,
})
macro('vd', {
from: points.button2Left,
to: points.rollLineStart,
x: points.rollLineStart.x - sa - 15
x: points.rollLineStart.x - sa - 15,
})
macro('vd', {
from: points.button1Left,
to: points.button2Left,
x: points.rollLineStart.x - sa - 15
x: points.rollLineStart.x - sa - 15,
})
macro('vd', {
from: points.hemEdge,
to: points.collarTip,
x: points.rollLineStart.x - sa - 30
x: points.rollLineStart.x - sa - 30,
})
macro('vd', {
from: points.hemEdge,
to: points.neck,
x: points.rollLineStart.x - sa - 45
x: points.rollLineStart.x - sa - 45,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.collarTip,
y: points.collarTip.y - sa - 15
y: points.collarTip.y - sa - 15,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.cfNeck,
y: points.collarTip.y - sa - 30
y: points.collarTip.y - sa - 30,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.rollLineEnd,
y: points.collarTip.y - sa - 45
y: points.collarTip.y - sa - 45,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.neck,
y: points.neck.y - sa - 15
y: points.neck.y - sa - 15,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.armholePitch,
y: points.neck.y - sa - 30
y: points.neck.y - sa - 30,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.shoulder,
y: points.neck.y - sa - 45
y: points.neck.y - sa - 45,
})
macro('hd', {
from: points.lapelStraightEnd,
to: points.armhole,
y: points.neck.y - sa - 60
y: points.neck.y - sa - 60,
})
}
}

View file

@ -10,7 +10,7 @@ export default function (part) {
macro,
Point,
paths,
Path
Path,
} = part.shorthand()
points.topLeft = new Point(0, 0)
@ -48,12 +48,12 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 14,
title: 'innerPocketBag'
title: 'innerPocketBag',
})
macro('grainline', {
from: points.bottomLeft.shift(0, 10),
to: points.topLeft.shift(0, 10)
to: points.topLeft.shift(0, 10),
})
if (sa) {
@ -62,14 +62,14 @@ export default function (part) {
macro('ld', {
from: points.bottomRight.shift(180, 15),
to: points.topRight.shift(180, 15),
text: units(store.get('innerPocketWidth') * options.innerPocketDepth * 2)
text: units(store.get('innerPocketWidth') * options.innerPocketDepth * 2),
})
if (paperless) {
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + sa + 15
y: points.bottomLeft.y + sa + 15,
})
}
}

View file

@ -24,12 +24,12 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 15,
title: 'innerPocketTab'
title: 'innerPocketTab',
})
macro('grainline', {
from: points.top,
to: points.top.shift(-45, points.top.x * 0.7)
to: points.top.shift(-45, points.top.x * 0.7),
})
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'lining sa')
@ -38,17 +38,17 @@ export default function (part) {
macro('hd', {
from: points.topLeft,
to: points.top,
y: points.topLeft.y - sa - 15
y: points.topLeft.y - sa - 15,
})
macro('hd', {
from: points.topLeft,
to: points.topRight,
y: points.topLeft.y - sa - 30
y: points.topLeft.y - sa - 30,
})
macro('vd', {
from: points.bottom,
to: points.topRight,
x: points.topRight.x + sa + 15
x: points.topRight.x + sa + 15,
})
}
}

View file

@ -43,12 +43,12 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 13,
title: 'innerPocketWelt'
title: 'innerPocketWelt',
})
macro('grainline', {
from: points.bottomLeft.shift(0, 10),
to: points.topLeft.shift(0, 10)
to: points.topLeft.shift(0, 10),
})
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
@ -57,22 +57,22 @@ export default function (part) {
macro('vd', {
from: points.realBottomRight,
to: points.realTopRight,
x: points.topRight.x + sa + 15
x: points.topRight.x + sa + 15,
})
macro('vd', {
from: points.bottomRight,
to: points.topRight,
x: points.topRight.x + sa + 30
x: points.topRight.x + sa + 30,
})
macro('hd', {
from: points.realBottomLeft,
to: points.realBottomRight,
y: points.bottomLeft.y + sa + 15
y: points.bottomLeft.y + sa + 15,
})
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + sa + 30
y: points.bottomLeft.y + sa + 30,
})
}
}

View file

@ -9,7 +9,7 @@ export default function (part) {
macro,
Point,
paths,
Path
Path,
} = part.shorthand()
points.topLeft = new Point(0, 0)
@ -24,14 +24,14 @@ export default function (part) {
to: points.bottomRight,
via: points.bottomLeft,
radius: store.get('pocketRadius'),
prefix: 'roundLeft'
prefix: 'roundLeft',
})
macro('round', {
from: points.bottomLeft,
to: points.topRight,
via: points.bottomRight,
radius: store.get('pocketRadius'),
prefix: 'roundRight'
prefix: 'roundRight',
})
paths.seam = new Path()
@ -57,12 +57,12 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 10,
title: 'pocket'
title: 'pocket',
})
macro('grainline', {
from: points.bottomLeft.shift(0, 10 + (store.get('pocketRadius') || 0)),
to: points.edgeLeft.shift(0, 10 + (store.get('pocketRadius') || 0))
to: points.edgeLeft.shift(0, 10 + (store.get('pocketRadius') || 0)),
})
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
@ -71,23 +71,23 @@ export default function (part) {
macro('vd', {
from: points.bottomRight,
to: points.topRight,
x: points.topRight.x + sa + 15
x: points.topRight.x + sa + 15,
})
macro('vd', {
from: points.bottomRight,
to: points.edgeRight,
x: points.topRight.x + sa + 30
x: points.topRight.x + sa + 30,
})
macro('hd', {
from: points.edgeLeft,
to: points.edgeRight,
y: points.edgeRight.y - sa - 15
y: points.edgeRight.y - sa - 15,
})
if (options.pocketRadius > 0) {
macro('hd', {
from: points.roundRightStart,
to: points.roundRightEnd,
y: points.bottomRight.y + sa + 15
y: points.bottomRight.y + sa + 15,
})
}
}

View file

@ -9,7 +9,7 @@ export default function (part) {
macro,
Point,
paths,
Path
Path,
} = part.shorthand()
points.topLeft = new Point(0, 0)
@ -22,14 +22,14 @@ export default function (part) {
to: points.bottomRight,
via: points.bottomLeft,
radius: store.get('pocketFlapRadius'),
prefix: 'roundLeft'
prefix: 'roundLeft',
})
macro('round', {
from: points.bottomLeft,
to: points.topRight,
via: points.bottomRight,
radius: store.get('pocketFlapRadius'),
prefix: 'roundRight'
prefix: 'roundRight',
})
paths.seam = new Path()
@ -49,12 +49,12 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 11,
title: 'pocketFlap'
title: 'pocketFlap',
})
macro('grainline', {
from: points.bottomLeft.shift(0, points.topRight.x / 5),
to: points.topLeft.shift(0, points.topRight.x / 5)
to: points.topLeft.shift(0, points.topRight.x / 5),
})
if (sa) {
@ -65,24 +65,24 @@ export default function (part) {
macro('hd', {
from: points.topLeft,
to: points.topRight,
y: points.topLeft.y - sa - 15
y: points.topLeft.y - sa - 15,
})
if (options.pocketFlapRadius > 0) {
macro('vd', {
from: points.roundRightStart,
to: points.roundRightEnd,
x: points.topRight.x + sa + 15
x: points.topRight.x + sa + 15,
})
macro('vd', {
from: points.roundRightStart,
to: points.topRight,
x: points.topRight.x + sa + 30
x: points.topRight.x + sa + 30,
})
} else {
macro('vd', {
from: points.bottomRight,
to: points.topRight,
x: points.topRight.x + sa + 15
x: points.topRight.x + sa + 15,
})
}
}

View file

@ -9,7 +9,7 @@ export default function (part) {
macro,
Point,
paths,
Path
Path,
} = part.shorthand()
points.topLeft = points.bottomLeft.shiftFractionTowards(points.topLeft, 0.75)
@ -20,14 +20,14 @@ export default function (part) {
to: points.bottomRight,
via: points.bottomLeft,
radius: store.get('pocketRadius'),
prefix: 'roundLeft'
prefix: 'roundLeft',
})
macro('round', {
from: points.bottomLeft,
to: points.topRight,
via: points.bottomRight,
radius: store.get('pocketRadius'),
prefix: 'roundRight'
prefix: 'roundRight',
})
paths.seam = new Path()
@ -49,12 +49,12 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 16,
title: 'pocketLining'
title: 'pocketLining',
})
macro('grainline', {
from: points.bottomLeft.shift(0, 10 + (store.get('pocketRadius') || 0)),
to: points.topLeft.shift(0, 10 + (store.get('pocketRadius') || 0))
to: points.topLeft.shift(0, 10 + (store.get('pocketRadius') || 0)),
})
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'lining sa')
@ -63,18 +63,18 @@ export default function (part) {
macro('vd', {
from: points.bottomRight,
to: points.topRight,
x: points.topRight.x + sa + 15
x: points.topRight.x + sa + 15,
})
macro('hd', {
from: points.topLeft,
to: points.topRight,
y: points.topRight.y - sa - 15
y: points.topRight.y - sa - 15,
})
if (options.pocketRadius > 0) {
macro('hd', {
from: points.roundRightStart,
to: points.roundRightEnd,
y: points.bottomRight.y + sa + 15
y: points.bottomRight.y + sa + 15,
})
}
}

View file

@ -9,7 +9,7 @@ export default function (part) {
macro,
Point,
paths,
Path
Path,
} = part.shorthand()
let length = store.get('waistToHem') - store.get('beltWidth') / 2
@ -71,56 +71,56 @@ export default function (part) {
macro('title', {
at: points.title,
nr: 5,
title: 'tail'
title: 'tail',
})
macro('grainline', {
from: points.fold2Bottom.shift(0, 10),
to: points.fold2Top.shift(0, 10)
to: points.fold2Top.shift(0, 10),
})
if (sa) paths.sa = paths.seam.offset(sa).close().attr('class', 'fabric sa')
macro('vd', {
from: points.fold4Bottom.shift(0, 15),
to: points.fold4Top.shift(0, 15),
text: units(length)
text: units(length),
})
if (paperless) {
macro('hd', {
from: points.cbBottom,
to: points.fold1Bottom,
y: points.cbBottom.y + sa + 15
y: points.cbBottom.y + sa + 15,
})
macro('hd', {
from: points.fold1Bottom,
to: points.fold2Bottom,
y: points.cbBottom.y + sa + 15
y: points.cbBottom.y + sa + 15,
})
macro('hd', {
from: points.fold2Bottom,
to: points.fold3Bottom,
y: points.cbBottom.y + sa + 15
y: points.cbBottom.y + sa + 15,
})
macro('hd', {
from: points.fold3Bottom,
to: points.fold4Bottom,
y: points.cbBottom.y + sa + 15
y: points.cbBottom.y + sa + 15,
})
macro('hd', {
from: points.fold4Bottom,
to: points.fold5Bottom,
y: points.cbBottom.y + sa + 15
y: points.cbBottom.y + sa + 15,
})
macro('hd', {
from: points.fold5Bottom,
to: points.waistBottom,
y: points.cbBottom.y + sa + 15
y: points.cbBottom.y + sa + 15,
})
macro('hd', {
from: points.cbBottom,
to: points.waistBottom,
y: points.cbBottom.y + sa + 30
y: points.cbBottom.y + sa + 30,
})
}
}

View file

@ -11,7 +11,7 @@ export default function (part) {
paths,
Path,
Snippet,
snippets
snippets,
} = part.shorthand()
// Add cuff
@ -25,7 +25,7 @@ export default function (part) {
via: points.cuffBottomRight,
radius: length / 3,
render: true,
prefix: 'round'
prefix: 'round',
})
store.set('topCuffWidth', points.tsWristLeft.dist(points.tsWristRight))
store.set('cuffLength', length)
@ -55,7 +55,7 @@ export default function (part) {
if (complete) {
macro('grainline', {
from: points.boxBottom,
to: points.top
to: points.top,
})
macro('scalebox', { at: points.tsWristLeftHelperTop })
delete snippets.logo
@ -68,70 +68,70 @@ export default function (part) {
macro('ld', {
from: points.tsWristLeft,
to: points.tsWristRight,
d: -15
d: -15,
})
macro('vd', {
from: points.tsWristLeft,
to: points.tsElbowLeft,
x: points.tsLeftEdge.x - sa - 15
x: points.tsLeftEdge.x - sa - 15,
})
macro('vd', {
from: points.tsWristLeft,
to: points.tsLeftEdge,
x: points.tsLeftEdge.x - sa - 30
x: points.tsLeftEdge.x - sa - 30,
})
macro('ld', {
from: points.cuffBottomLeft,
to: points.tsWristLeft,
d: 15 + sa
d: 15 + sa,
})
macro('vd', {
from: points.cuffBottomRight,
to: points.usWristRight,
x: points.usWristRight.x + 15 + sa
x: points.usWristRight.x + 15 + sa,
})
macro('vd', {
from: points.usWristRight,
to: points.elbowRight,
x: points.elbowRight.x + 15 + sa
x: points.elbowRight.x + 15 + sa,
})
macro('vd', {
from: points.usWristRight,
to: points.tsRightEdge,
x: points.elbowRight.x + 30 + sa
x: points.elbowRight.x + 30 + sa,
})
macro('vd', {
from: points.usWristRight,
to: points.backPitchPoint,
x: points.elbowRight.x + 45 + sa
x: points.elbowRight.x + 45 + sa,
})
macro('vd', {
from: points.usWristRight,
to: points.top,
x: points.elbowRight.x + 60 + sa
x: points.elbowRight.x + 60 + sa,
})
macro('ld', {
from: points.tsElbowLeft,
to: points.elbowRight
to: points.elbowRight,
})
macro('ld', {
from: points.tsLeftEdge,
to: points.tsRightEdge
to: points.tsRightEdge,
})
macro('hd', {
from: points.tsLeftEdge,
to: points.top,
y: points.top.y - sa - 15
y: points.top.y - sa - 15,
})
macro('hd', {
from: points.tsLeftEdge,
to: points.backPitchPoint,
y: points.top.y - sa - 30
y: points.top.y - sa - 30,
})
macro('hd', {
from: points.tsLeftEdge,
to: points.tsRightEdge,
y: points.top.y - sa - 45
y: points.top.y - sa - 45,
})
}
}

View file

@ -10,7 +10,7 @@ export default function (part) {
macro,
Point,
paths,
Path
Path,
} = part.shorthand()
// Add cuff
@ -24,7 +24,7 @@ export default function (part) {
via: points.cuffBottomRight,
radius: length / 3,
render: true,
prefix: 'round'
prefix: 'round',
})
store.set('underCuffWidth', points.usWristLeft.dist(points.usWristRight))
@ -51,7 +51,7 @@ export default function (part) {
if (complete) {
macro('grainline', {
from: points.boxBottom,
to: new Point(points.top.x, points.usLeftEdge.y)
to: new Point(points.top.x, points.usLeftEdge.y),
})
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
@ -60,56 +60,56 @@ export default function (part) {
macro('ld', {
from: points.usWristLeft,
to: points.usWristRight,
d: -15
d: -15,
})
macro('vd', {
from: points.usWristLeft,
to: points.usElbowLeft,
x: points.usLeftEdge.x - sa - 15
x: points.usLeftEdge.x - sa - 15,
})
macro('vd', {
from: points.usWristLeft,
to: points.usLeftEdge,
x: points.usLeftEdge.x - sa - 30
x: points.usLeftEdge.x - sa - 30,
})
macro('ld', {
from: points.cuffBottomLeft,
to: points.usWristLeft,
d: 15 + sa
d: 15 + sa,
})
macro('vd', {
from: points.cuffBottomRight,
to: points.usWristRight,
x: points.usWristRight.x + 15 + sa
x: points.usWristRight.x + 15 + sa,
})
macro('vd', {
from: points.usWristRight,
to: points.elbowRight,
x: points.elbowRight.x + 15 + sa
x: points.elbowRight.x + 15 + sa,
})
macro('vd', {
from: points.usWristRight,
to: points.usTip,
x: points.elbowRight.x + 30 + sa
x: points.elbowRight.x + 30 + sa,
})
macro('ld', {
from: points.usElbowLeft,
to: points.elbowRight
to: points.elbowRight,
})
macro('ld', {
from: points.usLeftEdge,
to: points.usRightEdge,
d: -15
d: -15,
})
macro('hd', {
from: points.usLeftEdge,
to: points.usTip,
y: points.usTip.y - sa - 15
y: points.usTip.y - sa - 15,
})
macro('vd', {
from: points.usLeftEdge,
to: points.usTip,
x: points.usLeftEdge.x - sa - 15
x: points.usLeftEdge.x - sa - 15,
})
}
}

View file

@ -11,7 +11,7 @@ export default {
tags: ['underwear', 'top'],
optionGroups: {
fit: ['waistReduction', 'panels'],
style: ['backOpening', 'backRise', 'backDrop', 'frontRise', 'frontDrop', 'hipRise']
style: ['backOpening', 'backRise', 'backDrop', 'frontRise', 'frontDrop', 'hipRise'],
},
measurements: ['underbust', 'waist', 'hips', 'waistToUnderbust', 'waistToHips'],
dependencies: {
@ -21,7 +21,7 @@ export default {
panel4: 'panels',
panel5: 'panels',
panel6: 'panels',
panels: 'base'
panels: 'base',
},
inject: {
panel1: 'panels',
@ -30,14 +30,14 @@ export default {
panel4: 'panels',
panel5: 'panels',
panel6: 'panels',
panels: 'base'
panels: 'base',
},
hide: ['panels', 'base'],
options: {
// Lists
panels: {
list: ['11', '13'],
dflt: '13'
dflt: '13',
},
// Percentages
@ -47,6 +47,6 @@ export default {
backDrop: { pct: 2, min: 0, max: 5 },
frontRise: { pct: 4, min: 0.1, max: 8 },
frontDrop: { pct: 5, min: 0, max: 10 },
hipRise: { pct: 5, min: 0, max: 15 }
}
hipRise: { pct: 5, min: 0, max: 15 },
},
}

View file

@ -19,13 +19,13 @@ export default function (part) {
macro('cutonfold', {
to: points.bottomCF,
from: points.topCF,
grainline: true
grainline: true,
})
points.title = points.waistCF.shiftFractionTowards(points.underbustGap1Left, 0.5)
macro('title', {
nr: 1,
title: '',
at: points.title
at: points.title,
})
if (sa) paths.sa = paths.panel1.offset(sa).attr('class', 'fabric sa')
}
@ -35,36 +35,36 @@ export default function (part) {
macro('vd', {
from: points.bottomCF,
to: points.waistCF,
x: points.topCF.x - sa - 15
x: points.topCF.x - sa - 15,
})
macro('vd', {
from: points.waistCF,
to: points.topCF,
x: points.topCF.x - sa - 15
x: points.topCF.x - sa - 15,
})
macro('vd', {
from: points.hipsGap1,
to: points.waistGap1Left,
x: points.hipsGap1.x + sa + 15
x: points.hipsGap1.x + sa + 15,
})
macro('vd', {
from: points.waistGap1Left,
to: points.underbustGap1Left,
x: points.hipsGap1.x + sa + 15
x: points.hipsGap1.x + sa + 15,
})
macro('hd', {
from: points.bottomCF,
to: points.hipsGap1,
y: points.bottomCF.y + sa + 15
y: points.bottomCF.y + sa + 15,
})
macro('hd', {
from: points.topCF,
to: points.underbustGap1Left,
y: points.topCF.y - sa - 15
y: points.topCF.y - sa - 15,
})
macro('ld', {
from: points.waistCF,
to: points.waistGap1Left
to: points.waistGap1Left,
})
}

View file

@ -41,21 +41,21 @@ export default function (part) {
macro('cutonfold', {
to: points.bottomCF,
from: points.topCF,
grainline: true
grainline: true,
})
macro('grainline', {
to: points.topABsplit.translate(translation, 0),
from: new Point(
points.topABsplit.translate(translation, 0).x,
points.hipsGap1.translate(translation, 0).y
)
),
})
points.midwayAB = points.topABsplit.shiftFractionTowards(points.bottomABsplit, 0.5)
points.titleA = points.underbustCF.shiftFractionTowards(points.midwayAB, 0.5)
macro('title', {
nr: '1a',
prefix: 'panel1a',
at: points.titleA
at: points.titleA,
})
points.titleB = points.hipsGap1
.translate(translation, 0)
@ -63,7 +63,7 @@ export default function (part) {
macro('title', {
nr: '1b',
prefix: 'panel1b',
at: points.titleB
at: points.titleB,
})
}
@ -73,12 +73,12 @@ export default function (part) {
macro('vd', {
from: points.bottomCF,
to: points.waistCF,
x: points.topCF.x - sa - 30
x: points.topCF.x - sa - 30,
})
macro('vd', {
from: points.waistCF,
to: points.topCF,
x: points.topCF.x - sa - 30
x: points.topCF.x - sa - 30,
})
points.waistAB = utils.beamsIntersect(
points.topABsplit,
@ -89,61 +89,61 @@ export default function (part) {
macro('vd', {
from: points.bottomABsplit,
to: points.waistAB,
x: points.topCF.x - sa - 15
x: points.topCF.x - sa - 15,
})
macro('vd', {
from: points.waistAB,
to: points.topABsplit,
x: points.topCF.x - sa - 15
x: points.topCF.x - sa - 15,
})
macro('hd', {
from: points.bottomCF,
to: points.bottomABsplit,
y: points.bottomCF.y + sa + 15
y: points.bottomCF.y + sa + 15,
})
macro('ld', {
from: points.waistCF,
to: points.waistAB
to: points.waistAB,
})
macro('hd', {
from: points.topCF,
to: points.topABsplit,
y: points.topCF.y - sa - 15
y: points.topCF.y - sa - 15,
})
// 1b
macro('vd', {
from: points.hipsGap1.translate(translation, 0),
to: points.waistGap1Left.translate(translation, 0),
x: points.underbustGap1Left.translate(translation, 0).x + sa + 15
x: points.underbustGap1Left.translate(translation, 0).x + sa + 15,
})
macro('vd', {
from: points.waistGap1Left.translate(translation, 0),
to: points.underbustGap1Left.translate(translation, 0),
x: points.underbustGap1Left.translate(translation, 0).x + sa + 15
x: points.underbustGap1Left.translate(translation, 0).x + sa + 15,
})
macro('vd', {
from: points.bottomABsplit.translate(translation, 0),
to: points.waistAB.translate(translation, 0),
x: points.underbustGap1Left.translate(translation, 0).x + sa + 30
x: points.underbustGap1Left.translate(translation, 0).x + sa + 30,
})
macro('vd', {
from: points.waistAB.translate(translation, 0),
to: points.topABsplit.translate(translation, 0),
x: points.underbustGap1Left.translate(translation, 0).x + sa + 30
x: points.underbustGap1Left.translate(translation, 0).x + sa + 30,
})
macro('hd', {
from: points.bottomABsplit.translate(translation, 0),
to: points.hipsGap1.translate(translation, 0),
y: points.bottomABsplit.y + sa + 15
y: points.bottomABsplit.y + sa + 15,
})
macro('ld', {
from: points.waistAB.translate(translation, 0),
to: points.waistGap1Left.translate(translation, 0)
to: points.waistGap1Left.translate(translation, 0),
})
macro('hd', {
from: points.topABsplit.translate(translation, 0),
to: points.underbustGap1Left.translate(translation, 0),
y: points.topABsplit.y - sa - 15
y: points.topABsplit.y - sa - 15,
})
}

View file

@ -19,13 +19,13 @@ export default function (part) {
points.grainlineBottom = new Point(points.grainlineTop.x, points.hipsGap2.y)
macro('grainline', {
from: points.grainlineBottom,
to: points.grainlineTop
to: points.grainlineTop,
})
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap2Left) / 2)
macro('title', {
nr: 2,
title: '',
at: points.title
at: points.title,
})
if (sa) paths.sa = paths.panel2.offset(sa).attr('class', 'fabric sa')
}
@ -35,36 +35,36 @@ export default function (part) {
macro('hd', {
from: points.hipsGap1,
to: points.hipsGap2,
y: points.hipsGap1.y + sa + 15
y: points.hipsGap1.y + sa + 15,
})
macro('ld', {
from: points.waistGap1Right,
to: points.waistGap2Left
to: points.waistGap2Left,
})
macro('hd', {
from: points.underbustGap1Right,
to: points.underbustGap2Left,
y: points.underbustGap1Right.y - sa - 15
y: points.underbustGap1Right.y - sa - 15,
})
macro('vd', {
from: points.hipsGap1,
to: points.waistGap1Right,
x: points.hipsGap1.x - sa - 15
x: points.hipsGap1.x - sa - 15,
})
macro('vd', {
from: points.waistGap1Right,
to: points.underbustGap1Right,
x: points.hipsGap1.x - sa - 15
x: points.hipsGap1.x - sa - 15,
})
macro('vd', {
from: points.hipsGap2,
to: points.waistGap1Right,
x: points.hipsGap2.x + sa + 15
x: points.hipsGap2.x + sa + 15,
})
macro('vd', {
from: points.waistGap1Right,
to: points.underbustGap2Left,
x: points.hipsGap2.x + sa + 15
x: points.hipsGap2.x + sa + 15,
})
}

View file

@ -19,13 +19,13 @@ export default function (part) {
points.grainlineBottom = new Point(points.grainlineTop.x, points.hipsGap3.y)
macro('grainline', {
from: points.grainlineBottom,
to: points.grainlineTop
to: points.grainlineTop,
})
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap3Left) / 2)
macro('title', {
nr: 3,
title: '',
at: points.title
at: points.title,
})
if (sa) paths.sa = paths.panel3.offset(sa).attr('class', 'fabric sa')
}
@ -35,36 +35,36 @@ export default function (part) {
macro('hd', {
from: points.hipsGap2,
to: points.hipsGap3,
y: points.hipsGap2.y + sa + 15
y: points.hipsGap2.y + sa + 15,
})
macro('ld', {
from: points.waistGap2Right,
to: points.waistGap3Left
to: points.waistGap3Left,
})
macro('hd', {
from: points.underbustGap2Right,
to: points.underbustGap3Left,
y: points.underbustGap2Right.y - sa - 15
y: points.underbustGap2Right.y - sa - 15,
})
macro('vd', {
from: points.hipsGap2,
to: points.waistGap2Right,
x: points.hipsGap2.x - sa - 15
x: points.hipsGap2.x - sa - 15,
})
macro('vd', {
from: points.waistGap2Right,
to: points.underbustGap2Right,
x: points.hipsGap2.x - sa - 15
x: points.hipsGap2.x - sa - 15,
})
macro('vd', {
from: points.hipsGap3,
to: points.waistGap2Right,
x: points.hipsGap3.x + sa + 15
x: points.hipsGap3.x + sa + 15,
})
macro('vd', {
from: points.waistGap2Right,
to: points.underbustGap3Left,
x: points.hipsGap3.x + sa + 15
x: points.hipsGap3.x + sa + 15,
})
}

View file

@ -19,13 +19,13 @@ export default function (part) {
points.grainlineBottom = new Point(points.grainlineTop.x, points.hipsGap4.y)
macro('grainline', {
from: points.grainlineBottom,
to: points.grainlineTop
to: points.grainlineTop,
})
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap4Left) / 2)
macro('title', {
nr: 4,
title: '',
at: points.title
at: points.title,
})
points.logo = points.grainlineTop.shiftFractionTowards(points.grainlineBottom, 0.8)
snippets.logo = new Snippet('logo', points.logo).attr('data-scale', 0.8)
@ -38,36 +38,36 @@ export default function (part) {
macro('hd', {
from: points.hipsGap3,
to: points.hipsGap4,
y: points.hipsGap3.y + sa + 15
y: points.hipsGap3.y + sa + 15,
})
macro('ld', {
from: points.waistGap3Right,
to: points.waistGap4Left
to: points.waistGap4Left,
})
macro('hd', {
from: points.underbustGap3Right,
to: points.underbustGap4Left,
y: points.underbustGap4Left.y - sa - 15
y: points.underbustGap4Left.y - sa - 15,
})
macro('vd', {
from: points.hipsGap3,
to: points.waistGap3Right,
x: points.hipsGap3.x - sa - 15
x: points.hipsGap3.x - sa - 15,
})
macro('vd', {
from: points.waistGap3Right,
to: points.underbustGap3Right,
x: points.hipsGap3.x - sa - 15
x: points.hipsGap3.x - sa - 15,
})
macro('vd', {
from: points.hipsGap4,
to: points.waistGap3Right,
x: points.hipsGap4.x + sa + 15
x: points.hipsGap4.x + sa + 15,
})
macro('vd', {
from: points.waistGap3Right,
to: points.underbustGap4Left,
x: points.hipsGap4.x + sa + 15
x: points.hipsGap4.x + sa + 15,
})
}

View file

@ -19,13 +19,13 @@ export default function (part) {
points.grainlineBottom = new Point(points.grainlineTop.x, points.hipsGap5.y)
macro('grainline', {
from: points.grainlineBottom,
to: points.grainlineTop
to: points.grainlineTop,
})
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap5Left) / 2)
macro('title', {
nr: 5,
title: '',
at: points.title
at: points.title,
})
if (sa) paths.sa = paths.panel5.offset(sa).attr('class', 'fabric sa')
}
@ -35,36 +35,36 @@ export default function (part) {
macro('hd', {
from: points.hipsGap4,
to: points.hipsGap5,
y: points.hipsGap4.y + sa + 15
y: points.hipsGap4.y + sa + 15,
})
macro('ld', {
from: points.waistGap4Right,
to: points.waistGap5Left
to: points.waistGap5Left,
})
macro('hd', {
from: points.underbustGap4Right,
to: points.underbustGap5Left,
y: points.underbustGap5Left.y - sa - 15
y: points.underbustGap5Left.y - sa - 15,
})
macro('vd', {
from: points.hipsGap4,
to: points.waistGap4Right,
x: points.hipsGap4.x - sa - 15
x: points.hipsGap4.x - sa - 15,
})
macro('vd', {
from: points.waistGap4Right,
to: points.underbustGap4Right,
x: points.hipsGap4.x - sa - 15
x: points.hipsGap4.x - sa - 15,
})
macro('vd', {
from: points.hipsGap5,
to: points.waistGap4Right,
x: points.hipsGap5.x + sa + 15
x: points.hipsGap5.x + sa + 15,
})
macro('vd', {
from: points.waistGap4Right,
to: points.underbustGap5Left,
x: points.hipsGap5.x + sa + 15
x: points.hipsGap5.x + sa + 15,
})
}

View file

@ -19,18 +19,18 @@ export default function (part) {
points.grainlineBottom = new Point(points.grainlineTop.x, points.hipsGap5.y)
macro('grainline', {
from: points.grainlineBottom,
to: points.grainlineTop
to: points.grainlineTop,
})
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap5Right) / 2)
macro('title', {
nr: 6,
title: '',
at: points.title
at: points.title,
})
points.scalebox = new Point(points.grainlineTop.x, points.hipsGap5.y - 55)
macro('scalebox', {
at: points.scalebox,
rotate: 90
rotate: 90,
})
if (sa) paths.sa = paths.panel6.offset(sa).attr('class', 'fabric sa')
}
@ -40,36 +40,36 @@ export default function (part) {
macro('hd', {
from: points.hipsGap5,
to: points.backDrop,
y: points.backDrop.y + sa + 15
y: points.backDrop.y + sa + 15,
})
macro('ld', {
from: points.waistGap5Right,
to: points.waistCB
to: points.waistCB,
})
macro('hd', {
from: points.underbustGap5Right,
to: points.backRise,
y: points.backRise.y - sa - 15
y: points.backRise.y - sa - 15,
})
macro('vd', {
from: points.hipsGap5,
to: points.waistGap5Right,
x: points.hipsGap5.x - sa - 15
x: points.hipsGap5.x - sa - 15,
})
macro('vd', {
from: points.waistGap5Right,
to: points.underbustGap5Right,
x: points.hipsGap5.x - sa - 15
x: points.hipsGap5.x - sa - 15,
})
macro('vd', {
from: points.backDrop,
to: points.waistCB,
x: points.backDrop.x + sa + 15
x: points.backDrop.x + sa + 15,
})
macro('vd', {
from: points.waistCB,
to: points.backRise,
x: points.backDrop.x + sa + 15
x: points.backDrop.x + sa + 15,
})
}

View file

@ -18,7 +18,7 @@ export default {
'backPocketHorizontalPlacement',
'backPocketVerticalPlacement',
'backPocketWidth',
'backPocketDepth'
'backPocketDepth',
],
frontPockets: [
'frontPocketSlantDepth',
@ -27,9 +27,9 @@ export default {
'frontPocketSlantBend',
'frontPocketWidth',
'frontPocketDepth',
'frontPocketFacing'
]
}
'frontPocketFacing',
],
},
],
advanced: [
'crossSeamCurveStart',
@ -43,9 +43,9 @@ export default {
'waistBalance',
'beltLoops',
{
fly: ['flyCurve', 'flyLength', 'flyWidth']
}
]
fly: ['flyCurve', 'flyLength', 'flyWidth'],
},
],
},
measurements: [
'crossSeam',
@ -59,7 +59,7 @@ export default {
'waistToKnee',
'waistToHips',
'waistToSeat',
'waistToUpperLeg'
'waistToUpperLeg',
],
hide: ['titanBack', 'titanFront'],
inject: {
@ -71,7 +71,7 @@ export default {
backPocketInterfacing: 'backPocket',
backPocketJet: 'backPocketFacing',
flyFacing: 'front',
flyExtension: 'flyFacing'
flyExtension: 'flyFacing',
},
parts: ['beltLoops'],
dependencies: {
@ -79,7 +79,7 @@ export default {
titanFront: 'titanBack',
back: ['titanBack', 'titanFront', 'front'],
waistband: ['titanBack', 'titanFront', 'front', 'back'],
waistbandCurved: ['titanBack', 'titanFront', 'front', 'back']
waistbandCurved: ['titanBack', 'titanFront', 'front', 'back'],
},
options: {
// Constants (from Titan)
@ -141,6 +141,6 @@ export default {
flyWidth: { pct: 15, min: 10, max: 20 },
// Waistband
beltLoops: { count: 8, min: 6, max: 12 }
}
beltLoops: { count: 8, min: 6, max: 12 },
},
}

View file

@ -28,13 +28,13 @@ export default (part) => {
macro('title', {
at: points.titleAnchor,
nr: 6,
title: 'backPocketBagFacing'
title: 'backPocketBagFacing',
})
points.grainlineTop = points.waistbandLeft.shiftFractionTowards(points.waistbandRight, 0.15)
points.grainlineBottom = new Point(points.grainlineTop.x, points.bottomLeft.y)
macro('grainline', {
from: points.grainlineTop,
to: points.grainlineBottom
to: points.grainlineBottom,
})
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
@ -43,22 +43,22 @@ export default (part) => {
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + 15
y: points.bottomLeft.y + 15,
})
macro('hd', {
from: points.waistbandLeft,
to: points.waistbandRight,
y: points.waistbandLeft.y - sa - 15
y: points.waistbandLeft.y - sa - 15,
})
macro('vd', {
from: points.bottomRight,
to: points.rightNotch,
x: points.bottomRight.x + sa + 15
x: points.bottomRight.x + sa + 15,
})
macro('vd', {
from: points.bottomRight,
to: points.waistbandRight,
x: points.bottomRight.x + sa + 30
x: points.bottomRight.x + sa + 30,
})
}
}

View file

@ -34,19 +34,19 @@ export default (part) => {
macro('title', {
at: points.titleAnchor,
nr: 3,
title: 'backPocketInterfacing'
title: 'backPocketInterfacing',
})
if (paperless) {
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + 15
y: points.bottomLeft.y + 15,
})
macro('vd', {
from: points.bottomRight,
to: points.topRight,
x: points.topRight.x + 15
x: points.topRight.x + 15,
})
}
}

View file

@ -32,25 +32,25 @@ export default (part) => {
at: points.titleAnchor,
nr: 4,
title: 'backPocketJet',
scale: 0.5
scale: 0.5,
})
points.grainlineTop = points.topLeft.shiftFractionTowards(points.topRight, 0.15)
points.grainlineBottom = new Point(points.grainlineTop.x, points.bottomLeft.y)
macro('grainline', {
from: points.grainlineTop,
to: points.grainlineBottom
to: points.grainlineBottom,
})
if (paperless) {
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + 15
y: points.bottomLeft.y + 15,
})
macro('vd', {
from: points.bottomRight,
to: points.topRight,
x: points.topRight.x + 15
x: points.topRight.x + 15,
})
}
}

View file

@ -11,7 +11,7 @@ export default (part) => {
macro,
snippets,
Snippet,
sa
sa,
} = part.shorthand()
points.leftNotch = new Point(store.get('backPocketWidth') / -2, 0)
@ -54,7 +54,7 @@ export default (part) => {
macro('title', {
at: points.titleAnchor,
nr: 5,
title: 'backPocketBag'
title: 'backPocketBag',
})
points.logoAnchor = points.foldLeft.shiftFractionTowards(points.bottomRight, 0.5)
snippets.logo = new Snippet('logo', points.logoAnchor)
@ -62,7 +62,7 @@ export default (part) => {
points.grainlineBottom = new Point(points.grainlineTop.x, points.bottomLeft.y)
macro('grainline', {
from: points.grainlineTop,
to: points.grainlineBottom
to: points.grainlineBottom,
})
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'lining sa')
@ -71,27 +71,27 @@ export default (part) => {
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + 15
y: points.bottomLeft.y + 15,
})
macro('vd', {
from: points.bottomRight,
to: points.foldRight,
x: points.foldRight.x + 15
x: points.foldRight.x + 15,
})
macro('vd', {
from: points.bottomRight,
to: points.rightNotch,
x: points.foldRight.x + 30
x: points.foldRight.x + 30,
})
macro('vd', {
from: points.bottomRight,
to: points.waistbandRight,
x: points.foldRight.x + 45
x: points.foldRight.x + 45,
})
macro('hd', {
from: points.waistbandLeft,
to: points.waistbandRight,
y: points.waistbandLeft.y - sa - 15
y: points.waistbandLeft.y - sa - 15,
})
}
}

View file

@ -41,7 +41,7 @@ export default (part) => {
Snippet,
sa,
raise,
units
units,
} = part.shorthand()
// Mark back pocket
@ -142,7 +142,7 @@ export default (part) => {
macro('title', {
at: points.titleAnchor,
nr: 1,
title: 'back'
title: 'back',
})
snippets.logo = new Snippet('logo', points.titleAnchor.shiftFractionTowards(points.knee, 0.5))
points.slantBottomNotch = new Path()
@ -156,20 +156,20 @@ export default (part) => {
)
macro('sprinkle', {
snippet: 'bnotch',
on: ['grainlineBottom', 'slantBottomNotch', 'slantTopNotch']
on: ['grainlineBottom', 'slantBottomNotch', 'slantTopNotch'],
})
macro('bartack', {
anchor: points.slantTopNotch,
angle: points.slantTopNotch.angle(points.slantBottomNotch) - 90,
length: sa ? sa / 2 : 5,
suffix: 'slantTop'
suffix: 'slantTop',
})
macro('bartack', {
anchor: points.slantBottomNotch,
length: sa ? sa / 2 : 5,
angle: 180,
suffix: 'slantBottom'
suffix: 'slantBottom',
})
if (sa) {
@ -198,101 +198,101 @@ export default (part) => {
macro('hd', {
from: points.floorIn,
to: points.grainlineBottom,
y: points.floorIn.y - 15
y: points.floorIn.y - 15,
})
macro('hd', {
from: points.grainlineBottom,
to: points.floorOut,
y: points.floorIn.y - 15
y: points.floorIn.y - 15,
})
macro('hd', {
from: points.floorIn,
to: points.floorOut,
y: points.floorIn.y - 30
y: points.floorIn.y - 30,
})
let y = points.floorIn.y + sa * 6
macro('hd', {
from: points.fork,
to: points.grainlineBottom,
y: y + 15
y: y + 15,
})
macro('hd', {
from: points.grainlineBottom,
to: points.slantBottomNotch,
y: y + 15
y: y + 15,
})
macro('hd', {
from: points.grainlineBottom,
to: points.slantOut,
y: y + 30
y: y + 30,
})
y = points.styleWaistIn.y - sa
macro('hd', {
from: points.styleWaistIn,
to: points.grainlineTop,
y: y - 15
y: y - 15,
})
macro('hd', {
from: points.fork,
to: points.grainlineTop,
y: y - 30
y: y - 30,
})
macro('hd', {
from: points.grainlineTop,
to: points.waistPocketCenter,
y: y - 15
y: y - 15,
})
macro('hd', {
from: points.grainlineTop,
to: points.slantOut,
y: y - 30
y: y - 30,
})
macro('ld', {
from: points.pocketLeft,
to: points.pocketRight,
d: -15
d: -15,
})
macro('ld', {
from: points.backDartLeft,
to: points.backDartRight,
d: 15
d: 15,
})
macro('ld', {
from: points.pocketCenter,
to: points.waistPocketCenter,
d: 25
d: 25,
})
let x = points.fork.x - sa
macro('vd', {
from: points.fork,
to: points.pocketCenter,
x: x - 15
x: x - 15,
})
macro('vd', {
from: points.fork,
to: points.waistPocketCenter,
x: x - 30
x: x - 30,
})
macro('vd', {
from: points.fork,
to: points.styleWaistIn,
x: x - 45
x: x - 45,
})
x = points.slantOut.x + sa
macro('vd', {
from: points.floorOut,
to: points.slantBottomNotch,
x: x + 15
x: x + 15,
})
macro('vd', {
from: points.floorOut,
to: points.slantOut,
x: x + 30
x: x + 30,
})
}
}

View file

@ -40,13 +40,13 @@ export default (part) => {
nr: 12,
title: 'beltLoops',
rotation: 90,
scale: 0.7
scale: 0.7,
})
points.grainlineTop = new Point(points.topRight.x / 2, 0)
points.grainlineBottom = new Point(points.topRight.x / 2, length)
macro('grainline', {
from: points.grainlineTop,
to: points.grainlineBottom
to: points.grainlineBottom,
})
for (let i = 1; i < count; i++) {
paths[`cut${i}`] = new Path()
@ -59,12 +59,12 @@ export default (part) => {
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + sa + 15
y: points.bottomLeft.y + sa + 15,
})
macro('vd', {
from: points.bottomRight,
to: points.topRight,
x: points.bottomRight.x + sa + 15
x: points.bottomRight.x + sa + 15,
})
}
}

View file

@ -36,13 +36,13 @@ export default (part) => {
macro('cutonfold', {
from: points.flyTop,
to: points.flyCorner,
grainline: true
grainline: true,
})
points.titleAnchor = points.flyCurveStart
macro('title', {
at: points.titleAnchor,
nr: 10,
title: 'flyExtention'
title: 'flyExtention',
})
if (sa)
paths.sa = paths.saBase

View file

@ -25,13 +25,13 @@ export default (part) => {
points.grainlineBottom = new Point(points.grainlineTop.x, points.flyCurveCp2.y)
macro('grainline', {
from: points.grainlineTop,
to: points.grainlineBottom
to: points.grainlineBottom,
})
points.titleAnchor = points.grainlineTop.shiftFractionTowards(points.grainlineBottom, 0.5)
macro('title', {
at: points.titleAnchor,
nr: 9,
title: 'flyFacing'
title: 'flyFacing',
})
if (sa)
paths.sa = paths.saBase

View file

@ -27,11 +27,11 @@ export default (part) => {
macro('title', {
at: points.titleAnchor,
nr: 8,
title: 'frontPocketBagFacing'
title: 'frontPocketBagFacing',
})
macro('grainline', {
from: points.slantTop,
to: new Point(points.slantTop.x, points.facingDirection.y)
to: new Point(points.slantTop.x, points.facingDirection.y),
})
snippets.notch = new Snippet('notch', points.facingDirection)

View file

@ -34,12 +34,12 @@ export default (part) => {
macro('title', {
at: points.titleAnchor,
nr: 7,
title: 'frontPocketBag'
title: 'frontPocketBag',
})
macro('cutonfold', {
from: points.pocketbagBottomRight,
to: points.pocketbagTopRight,
grainline: true
grainline: true,
})
snippets.notch = new Snippet('notch', points.facingDirection)
@ -55,12 +55,12 @@ export default (part) => {
macro('ld', {
from: points.pocketbagBottomRight,
to: points.topPleat,
d: -15
d: -15,
})
macro('hd', {
from: points.pocketFacingBottom,
to: points.pocketbagBottomRight,
y: points.pocketbagBottomRight.y + sa + 15
y: points.pocketbagBottomRight.y + sa + 15,
})
}
}

View file

@ -33,7 +33,7 @@ export default (part) => {
utils,
snippets,
Snippet,
sa
sa,
} = part.shorthand()
// Helper object holding the Titan side seam path
@ -156,7 +156,7 @@ export default (part) => {
macro('title', {
at: points.titleAnchor,
nr: 2,
title: 'front'
title: 'front',
})
snippets.logo = new Snippet('logo', points.titleAnchor.shiftFractionTowards(points.knee, 0.666))
points.topPleat = utils.beamsIntersect(
@ -180,8 +180,8 @@ export default (part) => {
'topPleat',
'grainlineBottom',
'flyBottom',
'flyExtensionBottom'
]
'flyExtensionBottom',
],
})
let Jseam = new Path()
.move(points.flyCurveStart)
@ -208,18 +208,18 @@ export default (part) => {
anchor: points.slantTopNotch,
angle: points.slantTopNotch.angle(points.slantCurveStart) + 90,
length: sa ? sa / 1.5 : 7.5,
suffix: 'slantTop'
suffix: 'slantTop',
})
macro('bartack', {
anchor: points.slantBottomNotch,
length: sa ? sa / 2 : 5,
suffix: 'slantBottom'
suffix: 'slantBottom',
})
macro('bartackFractionAlong', {
path: Jseam.reverse(),
start: 0,
end: 0.1,
suffix: 'stom'
suffix: 'stom',
})
if (sa) {
@ -244,87 +244,87 @@ export default (part) => {
macro('hd', {
from: points.grainlineBottom,
to: points.floorIn,
y: points.floorIn.y - 15
y: points.floorIn.y - 15,
})
macro('hd', {
from: points.floorOut,
to: points.grainlineBottom,
y: points.floorIn.y - 15
y: points.floorIn.y - 15,
})
macro('hd', {
from: points.floorOut,
to: points.floorIn,
y: points.floorIn.y - 30
y: points.floorIn.y - 30,
})
let y = points.styleWaistIn.y - sa
macro('hd', {
from: points.grainlineFrom,
to: points.flyTop,
y: y - 15
y: y - 15,
})
macro('hd', {
from: points.grainlineFrom,
to: points.styleWaistIn,
y: y - 30
y: y - 30,
})
macro('hd', {
from: points.grainlineFrom,
to: points.flyBottom,
y: y - 45
y: y - 45,
})
macro('hd', {
from: points.grainlineFrom,
to: points.flyExtensionBottom,
y: y - 60
y: y - 60,
})
macro('hd', {
from: points.grainlineFrom,
to: points.fork,
y: y - 75
y: y - 75,
})
macro('hd', {
from: points.pocketFacingTop,
to: points.grainlineFrom,
y: y - 15
y: y - 15,
})
macro('hd', {
from: points.slantTop,
to: points.grainlineFrom,
y: y - 30
y: y - 30,
})
macro('hd', {
from: points.slantBottomNotch,
to: points.grainlineFrom,
y: y - 45
y: y - 45,
})
let x = points.fork.x + sa
macro('vd', {
from: points.floorIn,
to: points.fork,
x: x + 15
x: x + 15,
})
macro('vd', {
from: points.fork,
to: points.flyExtensionBottom,
x: x + 15
x: x + 15,
})
macro('vd', {
from: points.fork,
to: points.flyBottom,
x: x + 30
x: x + 30,
})
macro('vd', {
from: points.fork,
to: points.slantTop,
x: x + 45
x: x + 45,
})
macro('vd', {
from: points.fork,
to: points.styleWaistIn,
x: x + 60
x: x + 60,
})
}
}

View file

@ -14,7 +14,7 @@ export default (part) => {
snippets,
Snippet,
sa,
units
units,
} = part.shorthand()
if (options.waistbandCurve == 0) {
@ -96,8 +96,8 @@ export default (part) => {
'ssLeftBottom',
'ssRightBottom',
'ssLeftTop',
'ssRightTop'
]
'ssRightTop',
],
})
points.titleAnchor = points.cfLeftTop.shiftFractionTowards(points.ssLeftBottom, 0.5)
@ -105,12 +105,12 @@ export default (part) => {
at: points.titleAnchor,
nr: 11,
title: 'waistband',
rotation: 90
rotation: 90,
})
macro('grainline', {
from: points.cbTop,
to: points.cbBottom
to: points.cbBottom,
})
paths.cf = new Path()
@ -152,129 +152,129 @@ export default (part) => {
macro('hd', {
from: points.edgeRightBottom,
to: points.cfLeftBottom,
y: points.edgeRightBottom.y - sa - 30
y: points.edgeRightBottom.y - sa - 30,
})
macro('vd', {
from: points.edgeRightBottom,
to: points.cfLeftBottom,
x: points.cfLeftBottom.x + sa + 30
x: points.cfLeftBottom.x + sa + 30,
})
macro('hd', {
from: points.edgeRightBottom,
to: points.ssRightBottom,
y: points.edgeRightBottom.y - sa - 15
y: points.edgeRightBottom.y - sa - 15,
})
macro('vd', {
from: points.edgeRightBottom,
to: points.ssRightBottom,
x: points.ssRightBottom.x + sa + 15
x: points.ssRightBottom.x + sa + 15,
})
macro('hd', {
from: points.ssRightBottom,
to: points.cbBottom,
y: points.ssRightBottom.y - sa - 15
y: points.ssRightBottom.y - sa - 15,
})
macro('vd', {
from: points.ssRightBottom,
to: points.cbBottom,
x: points.cbBottom.x + sa + 15
x: points.cbBottom.x + sa + 15,
})
macro('hd', {
from: points.cbBottom,
to: points.ssLeftBottom,
y: points.cbBottom.y - sa - 15
y: points.cbBottom.y - sa - 15,
})
macro('vd', {
from: points.cbBottom,
to: points.ssLeftBottom,
x: points.ssLeftBottom.x + sa + 15
x: points.ssLeftBottom.x + sa + 15,
})
macro('hd', {
from: points.ssLeftBottom,
to: points.cfLeftBottom,
y: points.ssLeftBottom.y - sa - 15
y: points.ssLeftBottom.y - sa - 15,
})
macro('vd', {
from: points.ssLeftBottom,
to: points.cfLeftBottom,
x: points.cfLeftBottom.x + sa + 15
x: points.cfLeftBottom.x + sa + 15,
})
macro('hd', {
from: points.cfLeftTop,
to: points.cfLeftBottom,
y: points.cfLeftTop.y + sa + 15
y: points.cfLeftTop.y + sa + 15,
})
macro('hd', {
from: points.edgeRightBottom,
to: points.edgeRightTop,
y: points.edgeRightBottom.y - sa - 15
y: points.edgeRightBottom.y - sa - 15,
})
macro('vd', {
from: points.edgeRightBottom,
to: points.edgeRightTop,
x: points.edgeRightTop.x - sa - 15
x: points.edgeRightTop.x - sa - 15,
})
// TOP OF WAISTBAND
macro('hd', {
from: points.edgeRightTop,
to: points.cfLeftTop,
y: points.edgeRightTop.y + sa + 30
y: points.edgeRightTop.y + sa + 30,
})
macro('vd', {
from: points.edgeRightTop,
to: points.cfLeftTop,
x: points.edgeRightTop.x - sa - 30
x: points.edgeRightTop.x - sa - 30,
})
macro('hd', {
from: points.edgeRightTop,
to: points.ssRightTop,
y: points.edgeRightTop.y + sa + 15
y: points.edgeRightTop.y + sa + 15,
})
macro('vd', {
from: points.edgeRightTop,
to: points.ssRightTop,
x: points.edgeRightTop.x - sa - 15
x: points.edgeRightTop.x - sa - 15,
})
macro('hd', {
from: points.ssRightTop,
to: points.cbTop,
y: points.ssRightTop.y + sa + 15
y: points.ssRightTop.y + sa + 15,
})
macro('vd', {
from: points.ssRightTop,
to: points.cbTop,
x: points.ssRightBottom.x - sa - 15
x: points.ssRightBottom.x - sa - 15,
})
macro('hd', {
from: points.cbTop,
to: points.ssLeftTop,
y: points.cbTop.y + sa + 15
y: points.cbTop.y + sa + 15,
})
macro('vd', {
from: points.cbTop,
to: points.ssLeftTop,
x: points.cbTop.x - sa - 15
x: points.cbTop.x - sa - 15,
})
macro('hd', {
from: points.ssLeftTop,
to: points.cfLeftTop,
y: points.ssLeftTop.y + sa + 15
y: points.ssLeftTop.y + sa + 15,
})
macro('vd', {
from: points.ssLeftTop,
to: points.cfLeftTop,
x: points.ssLeftTop.x - sa - 15
x: points.ssLeftTop.x - sa - 15,
})
}
}

View file

@ -12,7 +12,7 @@ export default (part) => {
macro,
snippets,
Snippet,
sa
sa,
} = part.shorthand()
if (options.waistbandCurve > 0) {
@ -49,7 +49,7 @@ export default (part) => {
if (complete) {
macro('sprinkle', {
snippet: 'notch',
on: ['cfRight', 'cfLeft', 'rsRight', 'rsLeft', 'cbRight', 'cbLeft', 'lsRight', 'lsLeft']
on: ['cfRight', 'cfLeft', 'rsRight', 'rsLeft', 'cbRight', 'cbLeft', 'lsRight', 'lsLeft'],
})
points.titleAnchor = points.top.shiftFractionTowards(points.bottom, 0.4)
points.logoAnchor = points.top.shiftFractionTowards(points.bottom, 0.6)
@ -57,11 +57,11 @@ export default (part) => {
at: points.titleAnchor,
nr: 11,
title: 'waistband',
rotation: 90
rotation: 90,
})
macro('grainline', {
from: points.rsLeft.shift(90, 30),
to: points.rsRight.shift(90, 30)
to: points.rsRight.shift(90, 30),
})
paths.cf = new Path()
.move(points.cfLeft)
@ -120,12 +120,12 @@ export default (part) => {
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + sa + 15
y: points.bottomLeft.y + sa + 15,
})
macro('vd', {
from: points.bottomRight,
to: points.topRight,
x: points.bottomRight.x + sa + 15
x: points.bottomRight.x + sa + 15,
})
}
}

View file

@ -13,5 +13,5 @@ export default [
'withGist',
'withLanguage',
'withStorage',
'Workbench'
'Workbench',
]

View file

@ -6,6 +6,6 @@ export default function Hooks() {
postSample: [],
preRender: [],
postRender: [],
insertText: []
insertText: [],
}
}

View file

@ -15,5 +15,5 @@ export default {
Snippet,
utils,
patterns: {},
plugins: {}
plugins: {},
}

View file

@ -189,7 +189,7 @@ Part.prototype.shorthand = function () {
complete,
paperless,
events: this.context.events,
raise: this.context.raise
raise: this.context.raise,
}
if (this.context.settings.debug) {
@ -241,7 +241,7 @@ Part.prototype.shorthand = function () {
self.context.raise.warning(`Could not set \`name\` property on \`points.${name}\``)
}
return (self.points[name] = value)
}
},
}
shorthand.points = new Proxy(this.points || {}, pointsProxy)
// Proxy the paths object
@ -261,7 +261,7 @@ Part.prototype.shorthand = function () {
self.context.raise.warning(`Could not set \`name\` property on \`paths.${name}\``)
}
return (self.paths[name] = value)
}
},
}
shorthand.paths = new Proxy(this.paths || {}, pathsProxy)
// Proxy the snippets object
@ -289,7 +289,7 @@ Part.prototype.shorthand = function () {
self.context.raise.warning(`Could not set \`name\` property on \`snippets.${name}\``)
}
return (self.snippets[name] = value)
}
},
}
shorthand.snippets = new Proxy(this.snippets || {}, snippetsProxy)
// Proxy the measurements object
@ -301,7 +301,7 @@ Part.prototype.shorthand = function () {
)
return Reflect.get(...arguments)
},
set: (measurements, name, value) => (self.context.settings.measurements[name] = value)
set: (measurements, name, value) => (self.context.settings.measurements[name] = value),
}
shorthand.measurements = new Proxy(this.context.settings.measurements || {}, measurementsProxy)
// Proxy the options object
@ -311,7 +311,7 @@ Part.prototype.shorthand = function () {
self.context.raise.warning(`Tried to access \`options.${name}\` but it is \`undefined\``)
return Reflect.get(...arguments)
},
set: (options, name, value) => (self.context.settings.options[name] = value)
set: (options, name, value) => (self.context.settings.options[name] = value),
}
shorthand.options = new Proxy(this.context.settings.options || {}, optionsProxy)
} else {

View file

@ -8,7 +8,7 @@ import {
pointOnLine,
pointOnCurve,
curveEdge,
round
round,
} from './utils'
function Path(debug = false) {
@ -514,18 +514,18 @@ function lineBoundingBox(line) {
else
return {
topLeft: new Point(from.x, to.y),
bottomRight: new Point(to.x, from.y)
bottomRight: new Point(to.x, from.y),
}
} else if (from.x > to.x) {
if (from.y < to.y)
return {
topLeft: new Point(to.x, from.y),
bottomRight: new Point(from.x, to.y)
bottomRight: new Point(from.x, to.y),
}
else
return {
topLeft: new Point(to.x, to.y),
bottomRight: new Point(from.x, from.y)
bottomRight: new Point(from.x, from.y),
}
}
}
@ -535,7 +535,7 @@ function curveBoundingBox(curve) {
return {
topLeft: new Point(bb.x.min, bb.y.min),
bottomRight: new Point(bb.x.max, bb.y.max)
bottomRight: new Point(bb.x.max, bb.y.max),
}
}

View file

@ -16,7 +16,7 @@ export default function Pattern(config = { options: {} }) {
info: [],
warning: [],
error: [],
debug: []
debug: [],
}
const events = this.events
this.raise = {
@ -31,7 +31,7 @@ export default function Pattern(config = { options: {} }) {
},
debug: function (data) {
events.debug.push(data)
}
},
}
this.raise.debug(
`New \`@freesewing/${config.name}:${config.version}\` pattern using \`@freesewing/core:${version}\``
@ -60,7 +60,7 @@ export default function Pattern(config = { options: {} }) {
margin: 2,
layout: true,
debug: true,
options: {}
options: {},
}
if (typeof this.config.dependencies === 'undefined') this.config.dependencies = {}
@ -100,7 +100,7 @@ export default function Pattern(config = { options: {} }) {
store: this.store,
macros: this.macros,
events: this.events,
raise: this.raise
raise: this.raise,
}
// Part closure
@ -130,7 +130,7 @@ Pattern.prototype.apply = function (settings) {
} else if (typeof settings[key] === 'object') {
this.settings[key] = {
...this.settings[key],
...settings[key]
...settings[key],
}
} else this.settings[key] = settings[key]
}
@ -172,7 +172,7 @@ Pattern.prototype.draft = function () {
} catch (err) {
this.raise.error([
`Could not inject part \`${this.config.inject[partName]}\` into part \`${partName}\``,
err
err,
])
}
}
@ -661,7 +661,7 @@ Pattern.prototype.getRenderProps = function () {
debug: this.events.debug,
info: this.events.info,
warning: this.events.warning,
error: this.events.error
error: this.events.error,
}
props.parts = {}
for (let p in this.parts) {
@ -674,7 +674,7 @@ Pattern.prototype.getRenderProps = function () {
height: this.parts[p].height,
width: this.parts[p].width,
bottomRight: this.parts[p].bottomRight,
topLeft: this.parts[p].topLeft
topLeft: this.parts[p].topLeft,
}
}
}

View file

@ -9,13 +9,13 @@ export default function splitCurve(start, cp1, cp2, end, split) {
start: c1.ops[0].to,
cp1: c1.ops[1].cp1,
cp2: c1.ops[1].cp2,
end: c1.ops[1].to
end: c1.ops[1].to,
},
{
start: c2.ops[0].to,
cp1: c2.ops[1].cp1,
cp2: c2.ops[1].cp2,
end: c2.ops[1].to
}
end: c2.ops[1].to,
},
]
}

View file

@ -60,7 +60,7 @@ Svg.prototype.render = function (pattern) {
let partSvg = this.renderPart(part)
this.layout[partId] = {
svg: partSvg,
transform: part.attributes.getAsArray('transform')
transform: part.attributes.getAsArray('transform'),
}
this.svg += this.openGroup(`${this.idPrefix}part-${partId}`, part.attributes)
this.svg += partSvg

View file

@ -87,13 +87,13 @@ export function pointOnCurve(start, cp1, cp2, end, check) {
)
let intersections = curve.intersects({
p1: { x: check.x - 1, y: check.y },
p2: { x: check.x + 1, y: check.y }
p2: { x: check.x + 1, y: check.y },
})
if (intersections.length === 0) {
// Handle edge case of a curve that's a perfect horizontal line
intersections = curve.intersects({
p1: { x: check.x, y: check.y - 1 },
p2: { x: check.x, y: check.y + 1 }
p2: { x: check.x, y: check.y + 1 },
})
}
@ -110,14 +110,14 @@ export function splitCurve(start, cp1, cp2, end, split) {
start: c1.ops[0].to,
cp1: c1.ops[1].cp1,
cp2: c1.ops[1].cp2,
end: c1.ops[1].to
end: c1.ops[1].to,
},
{
start: c2.ops[0].to,
cp1: c2.ops[1].cp1,
cp2: c2.ops[1].cp2,
end: c2.ops[1].to
}
end: c2.ops[1].to,
},
]
}
@ -156,7 +156,7 @@ export function lineIntersectsCurve(start, end, from, cp1, cp2, to) {
)
let line = {
p1: { x: start.x, y: start.y },
p2: { x: end.x, y: end.y }
p2: { x: end.x, y: end.y },
}
for (let t of bz.intersects(line)) {
let isect = bz.get(t)

View file

@ -12,7 +12,7 @@ export default {
optionGroups: {
fit: ['fullness', 'waistReduction'],
style: ['waistbandBelowWaist', 'cuffStyle', 'cuffWidth', 'ventLength'],
advanced: ['bandBelowKnee', 'kneeToBelow']
advanced: ['bandBelowKnee', 'kneeToBelow'],
},
parts: [
'frontpoints',
@ -22,13 +22,13 @@ export default {
'legband',
'legbandkeystone',
'pocket',
'pocketfacing'
'pocketfacing',
],
inject: {
front: 'frontpoints',
back: 'frontpoints',
pocket: 'frontpoints',
pocketfacing: 'frontpoints'
pocketfacing: 'frontpoints',
},
measurements: [
'waist',
@ -38,13 +38,13 @@ export default {
'waistToKnee',
'waistToHips',
'waistToFloor',
'knee'
'knee',
],
dependencies: {
back: 'front',
legband: ['back', 'front'],
legbandkeystone: ['back', 'front'],
waistband: ['back', 'front']
waistband: ['back', 'front'],
},
hide: ['frontpoints'],
options: {
@ -68,6 +68,6 @@ export default {
waistReduction: { pct: 1, min: -2, max: 10 },
cuffWidth: { pct: 0, min: -50, max: 150 },
cuffStyle: { dflt: 'elegant', list: ['traditional', 'elegant', 'keystone'] },
bandBelowKnee: { pct: 25, min: 15, max: 50 }
}
bandBelowKnee: { pct: 25, min: 15, max: 50 },
},
}

View file

@ -184,7 +184,7 @@ export default function (part) {
sa,
store,
paperless,
macro
macro,
} = part.shorthand()
let tempP = null
@ -270,7 +270,7 @@ export default function (part) {
macro('title', {
nr: 77,
at: points.title,
title: 'Back'
title: 'Back',
})
points.__titleNr.attr('data-text-class', 'center')
points.__titleName.attr('data-text-class', 'center')
@ -280,7 +280,7 @@ export default function (part) {
let dist = points.p11.dist(points.p4)
macro('grainline', {
from: points.pA.shift(angle, dist * 0.35),
to: points.pA.shift(angle + 180, dist * 0.35)
to: points.pA.shift(angle + 180, dist * 0.35),
})
if (sa) {
@ -292,61 +292,61 @@ export default function (part) {
if (paperless) {
macro('ld', {
from: points.topOfVent,
to: points.p11
to: points.p11,
})
macro('ld', {
from: points.p2,
to: points.p4,
d: 15
d: 15,
})
tempP = paths.sideSeam.intersectsY(points.p3.y)[0]
macro('ld', {
from: points.p5,
to: tempP
to: tempP,
})
macro('ld', {
from: points.p3,
to: tempP
to: tempP,
})
macro('hd', {
from: points.p2,
to: points.p4,
y: points.p2.y
y: points.p2.y,
})
macro('hd', {
from: points.p10,
to: points.p11,
y: points.p10.y - 15
y: points.p10.y - 15,
})
macro('vd', {
from: points.p2,
to: points.p3,
x: points.p3.x
x: points.p3.x,
})
macro('vd', {
from: points.p2,
to: points.p4,
x: points.p2.x
x: points.p2.x,
})
macro('vd', {
from: points.p3,
to: points.p10,
x: points.p3.x
x: points.p3.x,
})
macro('ld', {
from: points.p2,
to: points.p5,
d: -15
d: -15,
})
macro('ld', {
from: points.p4,
to: points.p11,
d: -15
d: -15,
})
macro('ld', {
from: tempP,
to: points.p4,
d: 0
d: 0,
})
}

View file

@ -10,7 +10,7 @@ export default function (part) {
sa,
store,
paperless,
macro
macro,
} = part.shorthand()
const cc = 0.551915024494 // circle constant
@ -147,7 +147,7 @@ export default function (part) {
macro('title', {
nr: 76,
at: points.title,
title: 'Front'
title: 'Front',
})
points.__titleNr.attr('data-text-class', 'center')
points.__titleName.attr('data-text-class', 'center')
@ -158,7 +158,7 @@ export default function (part) {
macro('grainline', {
from: points.pocketBL.shiftFractionTowards(points.pocketTL, -0.9),
to: points.pocketTL
to: points.pocketTL,
})
if (sa) {
@ -170,69 +170,69 @@ export default function (part) {
if (paperless) {
macro('ld', {
from: points.topOfVent,
to: points.pJ
to: points.pJ,
})
macro('hd', {
from: points.pocketSide,
to: points.pocketWaist,
y: points.pocketWaist.y + 15
y: points.pocketWaist.y + 15,
})
macro('hd', {
from: points.pW,
to: points.pocketWaist,
y: points.pocketWaist.y + 15
y: points.pocketWaist.y + 15,
})
macro('hd', {
from: points.pocketWaist,
to: points.flyTop,
y: points.pocketWaist.y + 15
y: points.pocketWaist.y + 15,
})
macro('hd', {
from: points.pAextra,
to: points.pR
to: points.pR,
})
macro('hd', {
from: points.pK,
to: points.pJ,
y: points.pJ.y - 15
y: points.pJ.y - 15,
})
// Keystone original (see above):
if (keystone) {
macro('hd', {
from: points.pSlitBottom,
to: points.pJ,
y: points.pJ.y - 30
y: points.pJ.y - 30,
})
macro('vd', {
from: points.pSlitTop,
to: points.pSlitBottom,
x: points.pSlitTop.x + 15
x: points.pSlitTop.x + 15,
})
}
macro('vd', {
from: points.pocketSide,
to: points.pocketWaist,
x: points.pocketSide.x
x: points.pocketSide.x,
})
macro('vd', {
from: points.pW,
to: points.pR,
x: points.pR.x
x: points.pR.x,
})
macro('vd', {
from: points.pR,
to: points.pK,
x: points.pR.x
x: points.pR.x,
})
macro('vd', {
from: points.pW,
to: points.pZ,
x: points.pW.x + 15
x: points.pW.x + 15,
})
macro('vd', {
from: points.pJ,
to: points.pocketWaist,
x: points.pocketWaist.x
x: points.pocketWaist.x,
})
}

View file

@ -35,7 +35,7 @@ export default function (part) {
sa,
store,
paperless,
macro
macro,
} = part.shorthand()
if (options.cuffStyle == 'keystone') {
@ -138,7 +138,7 @@ export default function (part) {
macro('title', {
nr: 78,
at: points.title,
title: 'LegBand'
title: 'LegBand',
})
points.__titleNr.attr('data-text-class', 'center')
points.__titleName.attr('data-text-class', 'center')
@ -154,34 +154,34 @@ export default function (part) {
macro('hd', {
from: points.pA,
to: points.pF,
y: points.pA.y
y: points.pA.y,
})
if (traditional) {
macro('hd', {
from: points.pB,
to: points.pC,
y: points.pB.y
y: points.pB.y,
})
}
macro('ld', {
from: points.pD,
to: points.pC,
d: +sa + 15
d: +sa + 15,
})
macro('ld', {
from: points.pA,
to: points.pAout,
d: +sa + 15
d: +sa + 15,
})
macro('vd', {
from: points.pB,
to: points.pA,
x: points.pA.x - sa - 15
x: points.pA.x - sa - 15,
})
macro('vd', {
from: points.pC,
to: points.pB,
x: points.pC.x - (traditional ? 0 : sa + 15)
x: points.pC.x - (traditional ? 0 : sa + 15),
})
}

View file

@ -12,7 +12,7 @@ export default function (part) {
sa,
store,
paperless,
macro
macro,
} = part.shorthand()
if (options.cuffStyle != 'keystone') {
@ -107,7 +107,7 @@ export default function (part) {
macro('title', {
nr: 78,
at: points.title,
title: 'LegBand'
title: 'LegBand',
})
if (sa) {
@ -120,57 +120,57 @@ export default function (part) {
macro('hd', {
from: points.pCout,
to: points.pF,
y: points.pA.y - sa - 15
y: points.pA.y - sa - 15,
})
macro('hd', {
from: points.pF,
to: points.pE,
y: points.pA.y - sa - 15
y: points.pA.y - sa - 15,
})
macro('hd', {
from: points.pE,
to: points.pA,
y: points.pA.y - sa - 15
y: points.pA.y - sa - 15,
})
macro('hd', {
from: points.pHout,
to: points.pG,
y: points.pG.y + sa + 15
y: points.pG.y + sa + 15,
})
macro('ld', {
from: points.pC,
to: points.pB1,
d: 15
d: 15,
})
macro('ld', {
from: points.pB1,
to: points.pB2,
d: 15
d: 15,
})
macro('ld', {
from: points.pB2,
to: points.pB3,
d: 15
d: 15,
})
macro('ld', {
from: points.pB3,
to: points.pH,
d: 15
d: 15,
})
macro('ld', {
from: points.pA,
to: points.pG,
d: 15 + sa
d: 15 + sa,
})
macro('vd', {
from: points.pE,
to: points.pJ,
x: points.pJ.x - 15
x: points.pJ.x - 15,
})
macro('vd', {
from: points.pF,
to: points.pA,
x: points.pF.x - 15
x: points.pF.x - 15,
})
}

View file

@ -9,7 +9,7 @@ export default function (part) {
sa,
store,
paperless,
macro
macro,
} = part.shorthand()
let halfInch = store.get('halfInch')
@ -77,7 +77,7 @@ export default function (part) {
macro('title', {
nr: 2,
at: points.title,
title: 'Pocket'
title: 'Pocket',
})
points.__titleNr.attr('data-text-class', 'center')
points.__titleName.attr('data-text-class', 'center')
@ -93,62 +93,62 @@ export default function (part) {
macro('hd', {
from: points.mpocketFacingBR,
to: points.mpocketWaist,
y: points.pU.y - sa - 15
y: points.pU.y - sa - 15,
})
macro('hd', {
from: points.mpocketWaist,
to: points.pocketTL,
y: points.pU.y - sa - 15
y: points.pU.y - sa - 15,
})
macro('hd', {
from: points.pocketTL,
to: points.pocketWaist,
y: points.pU.y - sa - 15
y: points.pU.y - sa - 15,
})
macro('hd', {
from: points.pocketWaist,
to: points.pU,
y: points.pU.y - sa - 15
y: points.pU.y - sa - 15,
})
macro('hd', {
from: points.pU,
to: points.pocketFacingBR,
y: points.pU.y - sa - 15
y: points.pU.y - sa - 15,
})
macro('hd', {
from: points.pocketWaist,
to: points.pocketFacingTL,
y: points.pU.y - sa - 15
y: points.pU.y - sa - 15,
})
macro('vd', {
from: points.pU,
to: points.pocketSide,
x: points.pocketSide.x + sa + 15
x: points.pocketSide.x + sa + 15,
})
macro('vd', {
from: points.pocketTL,
to: points.pocketBL,
x: points.pocketTL.x + 15
x: points.pocketTL.x + 15,
})
macro('vd', {
from: points.pocketSide,
to: points.mpocketWaist,
x: points.pocketSide.x + sa + 15
x: points.pocketSide.x + sa + 15,
})
macro('vd', {
from: points.pocketSide,
to: points.pocketFacingBR,
x: points.pocketSide.x + sa + 15
x: points.pocketSide.x + sa + 15,
})
macro('vd', {
from: points.mpocketWaist,
to: points.mpocketSide,
x: points.mpocketSide.x - sa - 15
x: points.mpocketSide.x - sa - 15,
})
macro('vd', {
from: points.mpocketSide,
to: points.mpocketFacingBR,
x: points.mpocketSide.x - sa - 15
x: points.mpocketSide.x - sa - 15,
})
}

Some files were not shown because too many files have changed in this diff Show more