diff --git a/packages/theo/config/index.js b/packages/theo/config/index.js index 140f9c419e6..fa07d9c4cf7 100644 --- a/packages/theo/config/index.js +++ b/packages/theo/config/index.js @@ -13,14 +13,7 @@ export default { fit: ['backRise', 'wedge'], style: ['waistbandWidth', 'lengthBonus', 'legWidth'] }, - measurements: [ - 'crotchDepth', - 'hipsCircumference', - 'inseam', - 'kneeCircumference', - 'seatCircumference', - 'waistToHips' - ], + measurements: ['crotchDepth', 'hips', 'inseam', 'knee', 'seat', 'waistToHips'], dependencies: {}, inject: { front: 'back', diff --git a/packages/theo/src/back-inner-pocket-bag.js b/packages/theo/src/back-inner-pocket-bag.js index 2a8d7343814..d98118f41f4 100644 --- a/packages/theo/src/back-inner-pocket-bag.js +++ b/packages/theo/src/back-inner-pocket-bag.js @@ -1,4 +1,4 @@ -export default function(part) { +export default function (part) { let { macro, measurements, @@ -11,7 +11,7 @@ export default function(part) { paperless } = part.shorthand() - let width = measurements.hipsCircumference * 0.16 + let width = measurements.hips * 0.16 let height = width * 1.43 points.topRight = new Point(width / 2, 0) diff --git a/packages/theo/src/back-pocket-facing.js b/packages/theo/src/back-pocket-facing.js index a38ddf94825..8b88864b4a0 100644 --- a/packages/theo/src/back-pocket-facing.js +++ b/packages/theo/src/back-pocket-facing.js @@ -1,7 +1,7 @@ -export default function(part) { +export default function (part) { let { macro, measurements, Point, points, Path, paths, complete, paperless } = part.shorthand() - let width = measurements.hipsCircumference * 0.16 + let width = measurements.hips * 0.16 let height = width / 2 points.topRight = new Point(width / 2, 0) diff --git a/packages/theo/src/back.js b/packages/theo/src/back.js index aca3f628d64..ce967256b30 100644 --- a/packages/theo/src/back.js +++ b/packages/theo/src/back.js @@ -31,9 +31,9 @@ export default function (part) { // Store store.set('lengthBonus', measurements.inseam * options.lengthBonus) - store.set('backReduction', (measurements.hipsCircumference / -4) * options.wedge) - store.set('legWidth', (measurements.kneeCircumference * (1 + options.legWidth)) / 2) - store.set('backRise', measurements.hipsCircumference * options.backRise) + store.set('backReduction', (measurements.hips / -4) * options.wedge) + store.set('legWidth', (measurements.knee * (1 + options.legWidth)) / 2) + store.set('backRise', measurements.hips * options.backRise) // Points points[0] = new Point(0, 0) @@ -47,9 +47,9 @@ export default function (part) { points[203] = points[202].flipX() points[3] = new Point(0, points[1].y + measurements.inseam / 2 + 50) points[4] = new Point(0, points[1].y - (measurements.crotchDepth - measurements.waistToHips) / 4) - points[5] = new Point(10 - measurements.seatCircumference / 8, points[1].y) + points[5] = new Point(10 - measurements.seat / 8, points[1].y) points[9] = new Point( - points[5].x - measurements.seatCircumference / 16 - 5 + store.get('backReduction'), + points[5].x - measurements.seat / 16 - 5 + store.get('backReduction'), points[5].y ) points[16] = new Point(points[5].x - points[1].dx(points[5]) / 4, points[5].y) @@ -67,13 +67,13 @@ export default function (part) { points[9].y ) points[23] = new Point(points[22].x, points[22].y + 5) - points[24] = new Point(points[20].x + measurements.hipsCircumference / 4 + 45, points[20].y) + points[24] = new Point(points[20].x + measurements.hips / 4 + 45, points[20].y) points[25] = points[21].shiftFractionTowards(points[24], 0.5) points[2501] = points[25].shiftTowards(points[24], 120) points[2502] = points[2501].rotate(-90, points[25]) points[2503] = points[25].shiftTowards(points[24], 12.5) points[2504] = points[25].shiftTowards(points[21], 12.5) - points[26] = new Point(points[17].x + measurements.seatCircumference / 4 + 30, points[17].y) + points[26] = new Point(points[17].x + measurements.seat / 4 + 30, points[17].y) points[2601] = points[24].shiftFractionTowards(points[26], 1, 4) points[27] = new Point(points[2].x + store.get('legWidth') / 2 + 20, points[2].y) points[2701] = new Point(points[27].x, points[27].y - 50) diff --git a/packages/theo/src/front.js b/packages/theo/src/front.js index 82fb9060115..e268f017364 100644 --- a/packages/theo/src/front.js +++ b/packages/theo/src/front.js @@ -26,13 +26,13 @@ export default function (part) { points[0].x, points[1].y - (measurements.crotchDepth - measurements.waistToHips) / 4 ) - points[5] = new Point(points[0].x - measurements.seatCircumference / 8 + 10, points[1].y) + points[5] = new Point(points[0].x - measurements.seat / 8 + 10, points[1].y) points[501] = points[5].shift(135, 30) points[502] = points[501].shift(45, 30) points[503] = points[501].shift(-135, 30) points[6] = new Point(points[5].x, points[4].y) points[7] = new Point(points[5].x, points[0].y) - points[8] = new Point(points[6].x + measurements.seatCircumference / 4 + 20, points[6].y) + points[8] = new Point(points[6].x + measurements.seat / 4 + 20, points[6].y) points[801] = new Point( points[8].x, points[8].y - (measurements.crotchDepth - measurements.waistToHips) / 4 @@ -42,13 +42,13 @@ export default function (part) { points[8].y + (measurements.crotchDepth - measurements.waistToHips) / 4 ) points[9] = new Point( - points[5].x - measurements.seatCircumference / 16 - 5 + store.get('backReduction'), + points[5].x - measurements.seat / 16 - 5 + store.get('backReduction'), points[5].y ) points[10] = new Point(points[7].x + 10, points[7].y) points[1001] = points[10].shiftTowards(points[6], 10) points[1002] = new Point(points[0].x, points[1001].y) - points[11] = new Point(points[10].x + measurements.hipsCircumference / 4 + 25, points[10].y) + points[11] = new Point(points[10].x + measurements.hips / 4 + 25, points[10].y) points[12] = new Point(points[2].x + store.get('legWidth') / 2, points[2].y) points[1201] = new Point(points[12].x, points[12].y - 50) points[13] = points[12].flipX() diff --git a/packages/theo/src/waistband-interfacing-left.js b/packages/theo/src/waistband-interfacing-left.js index ac538a2205f..ac5a8a2b61d 100644 --- a/packages/theo/src/waistband-interfacing-left.js +++ b/packages/theo/src/waistband-interfacing-left.js @@ -1,4 +1,4 @@ -export default function(part) { +export default function (part) { let { Point, points, @@ -14,7 +14,7 @@ export default function(part) { } = part.shorthand() points[0] = new Point(0, 0) - points[2] = new Point(options.waistbandWidth, measurements.hipsCircumference / 2 + 60) + points[2] = new Point(options.waistbandWidth, measurements.hips / 2 + 60) points[1] = new Point(points[2].x, points[0].y) points[3] = new Point(points[0].x, points[2].y) diff --git a/packages/theo/src/waistband-interfacing-right.js b/packages/theo/src/waistband-interfacing-right.js index 2a47551c8ea..93641dbf9c7 100644 --- a/packages/theo/src/waistband-interfacing-right.js +++ b/packages/theo/src/waistband-interfacing-right.js @@ -1,4 +1,4 @@ -export default function(part) { +export default function (part) { let { Point, points, @@ -14,7 +14,7 @@ export default function(part) { } = part.shorthand() points[0] = new Point(0, 0) - points[2] = new Point(options.waistbandWidth, measurements.hipsCircumference / 2 + 40) + points[2] = new Point(options.waistbandWidth, measurements.hips / 2 + 40) points[1] = new Point(points[2].x, points[0].y) points[3] = new Point(points[0].x, points[2].y)