diff --git a/packages/hugo/config/index.js b/packages/hugo/config/index.js index 96c77ce3902..81db51cddba 100644 --- a/packages/hugo/config/index.js +++ b/packages/hugo/config/index.js @@ -1,57 +1,57 @@ -import { version } from "../package.json"; +import { version } from '../package.json' export default { - name: "hugo", + name: 'hugo', version, - design: "Joost De Cock", - code: "Joost De Cock", - department: "menswear", - type: "pattern", + design: 'Joost De Cock', + code: 'Joost De Cock', + department: 'menswear', + type: 'pattern', difficulty: 3, - tags: ["top", "basics"], + tags: ['top', 'basics'], optionGroups: { - fit: ["bicepsEase", "chestEase", "cuffEase", "ribbingStretch"], - style: ["lengthBonus", "sleeveLengthBonus", "ribbingHeight"], - advanced: ["acrossBackFactor", "backNeckCutout"] + fit: ['bicepsEase', 'chestEase', 'cuffEase', 'ribbingStretch'], + style: ['lengthBonus', 'sleeveLengthBonus', 'ribbingHeight'], + advanced: ['acrossBackFactor', 'backNeckCutout'] }, measurements: [ - "bicepsCircumference", - "centerBackNeckToWaist", - "chestCircumference", - "naturalWaistToHip", - "neckCircumference", - "shoulderSlope", - "shoulderToShoulder", - "hipsCircumference", - "shoulderToWrist", - "wristCircumference", - "headCircumference" + 'bicepsCircumference', + 'chestCircumference', + 'headCircumference', + 'hipsCircumference', + 'hpsToHipsBack', + 'naturalWaistToHip', + 'neckCircumference', + 'shoulderSlope', + 'shoulderToShoulder', + 'shoulderToWrist', + 'wristCircumference' ], - parts: ["waistband", "cuff"], + parts: ['waistband', 'cuff'], dependencies: { - frontBase: "base", - front: "frontBase", - backBase: "base", - back: "backBase", - sleevecap: "front", - sleeveBase: "sleevecap", - sleeve: "sleeveBase", - pocket: "front", - pocketFacing: "pocket", - hoodCenter: "hoodSide", - hoodSide: ["front", "back"] + frontBase: 'base', + front: 'frontBase', + backBase: 'base', + back: 'backBase', + sleevecap: 'front', + sleeveBase: 'sleevecap', + sleeve: 'sleeveBase', + pocket: 'front', + pocketFacing: 'pocket', + hoodCenter: 'hoodSide', + hoodSide: ['front', 'back'] }, inject: { - frontBase: "base", - front: "frontBase", - backBase: "base", - back: "backBase", - sleeveBase: "sleevecap", - sleeve: "sleeveBase", - pocket: "front", - pocketFacing: "pocket" + frontBase: 'base', + front: 'frontBase', + backBase: 'base', + back: 'backBase', + sleeveBase: 'sleevecap', + sleeve: 'sleeveBase', + pocket: 'front', + pocketFacing: 'pocket' }, - hide: ["base", "frontBase", "backBase", "sleeveBase", "sleevecap"], + hide: ['base', 'frontBase', 'backBase', 'sleeveBase', 'sleevecap'], options: { // Constants brianFitSleeve: false, @@ -93,4 +93,4 @@ export default { ribbingStretch: { pct: 5, min: 0, max: 10 }, ribbingHeight: { pct: 10, min: 4, max: 20 } } -}; +} diff --git a/packages/hugo/src/cuff.js b/packages/hugo/src/cuff.js index 1ca6560162b..9429072f32f 100644 --- a/packages/hugo/src/cuff.js +++ b/packages/hugo/src/cuff.js @@ -12,10 +12,7 @@ export default function(part) { macro } = part.shorthand() - let width = - (measurements.centerBackNeckToWaist + measurements.naturalWaistToHip) * - options.ribbingHeight * - 2 + let width = measurements.hpsToHipsBack * options.ribbingHeight * 2 let length = measurements.wristCircumference * (1 + options.cuffEase) * (1 - options.ribbingStretch) diff --git a/packages/hugo/src/front.js b/packages/hugo/src/front.js index 9744d12e742..36a37a2f0d5 100644 --- a/packages/hugo/src/front.js +++ b/packages/hugo/src/front.js @@ -23,14 +23,8 @@ export default function(part) { } = part.shorthand() // Absolute values for percentages - store.set( - 'lengthBonus', - options.lengthBonus * (measurements.centerBackNeckToWaist + measurements.naturalWaistToHip) - ) - store.set( - 'ribbing', - (measurements.centerBackNeckToWaist + measurements.naturalWaistToHip) * options.ribbingHeight - ) + store.set('lengthBonus', options.lengthBonus * measurements.hpsToHipsBack) + store.set('ribbing', measurements.hpsToHipsBack * options.ribbingHeight) // Hem is more descripting than hips in this case //points.cfHem = points.cfHips; @@ -49,7 +43,7 @@ export default function(part) { points.pocketHem = points.cfRibbing.shiftFractionTowards(points.ribbing, 0.6) points.pocketCf = points.cfHem.shift( 90, - measurements.centerBackNeckToWaist * 0.33 + store.get('ribbing') + (measurements.hpsToHipsBack - measurements.naturalWaistToHip) * 0.33 + store.get('ribbing') ) points.pocketTop = new Point(points.pocketHem.x, points.pocketCf.y) points.pocketTip = points.pocketHem diff --git a/packages/hugo/src/waistband.js b/packages/hugo/src/waistband.js index 7dbdf3c9499..04b0e2fbe82 100644 --- a/packages/hugo/src/waistband.js +++ b/packages/hugo/src/waistband.js @@ -13,10 +13,7 @@ export default function(part) { units } = part.shorthand() - let width = - (measurements.centerBackNeckToWaist + measurements.naturalWaistToHip) * - options.ribbingHeight * - 2 + let width = measurements.hpsToHipsBack * options.ribbingHeight * 2 points.topLeft = new Point(0, 0) points.bottomLeft = new Point(0, width)