chore(carlton): Ported carlton to new measurements. See #416
This commit is contained in:
parent
a7f4522753
commit
cb5b5da33b
5 changed files with 14 additions and 12 deletions
|
@ -54,17 +54,17 @@ export default {
|
||||||
'bicepsCircumference',
|
'bicepsCircumference',
|
||||||
'chestCircumference',
|
'chestCircumference',
|
||||||
'hipsCircumference',
|
'hipsCircumference',
|
||||||
'hpsToHipsBack',
|
'hpsToWaistBack',
|
||||||
'naturalWaist',
|
'waistCircumference',
|
||||||
'naturalWaistToHip',
|
'waistToHips',
|
||||||
'neckCircumference',
|
'neckCircumference',
|
||||||
'shoulderSlope',
|
'shoulderSlope',
|
||||||
'shoulderToElbow',
|
'shoulderToElbow',
|
||||||
'shoulderToShoulder',
|
'shoulderToShoulder',
|
||||||
'shoulderToWrist',
|
'shoulderToWrist',
|
||||||
'wristCircumference',
|
'wristCircumference',
|
||||||
'naturalWaistToFloor',
|
'waistToFloor',
|
||||||
'naturalWaistToSeat',
|
'waistToSeat',
|
||||||
'seatCircumference'
|
'seatCircumference'
|
||||||
],
|
],
|
||||||
dependencies: {
|
dependencies: {
|
||||||
|
|
|
@ -19,7 +19,7 @@ export default function (part) {
|
||||||
|
|
||||||
calculateRatios(part)
|
calculateRatios(part)
|
||||||
// Belt width
|
// Belt width
|
||||||
let bw = (measurements.hpsToHipsBack - measurements.naturalWaistToHip) * options.beltWidth
|
let bw = measurements.hpsToWaistBack * options.beltWidth
|
||||||
store.set('beltWidth', bw)
|
store.set('beltWidth', bw)
|
||||||
|
|
||||||
// Box pleat (bp)
|
// Box pleat (bp)
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
export default function(part) {
|
export default function (part) {
|
||||||
let {
|
let {
|
||||||
paperless,
|
paperless,
|
||||||
sa,
|
sa,
|
||||||
|
@ -32,6 +32,8 @@ export default function(part) {
|
||||||
points[i + 'Left'] = points[i].flipX()
|
points[i + 'Left'] = points[i].flipX()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
points.anchor = points.standTop.clone()
|
||||||
|
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
.move(points.bottomLeft)
|
.move(points.bottomLeft)
|
||||||
.curve(points.bottomLeftCp, points.standTipCp, points.standTip)
|
.curve(points.bottomLeftCp, points.standTipCp, points.standTip)
|
||||||
|
|
|
@ -26,12 +26,12 @@ export default function (part) {
|
||||||
points.waistCp2 = points.waist.shift(90, points.armhole.dy(points.waist) / 2)
|
points.waistCp2 = points.waist.shift(90, points.armhole.dy(points.waist) / 2)
|
||||||
|
|
||||||
// Seat shaping
|
// Seat shaping
|
||||||
points.cfSeat = points.cfWaist.shift(-90, measurements.naturalWaistToSeat)
|
points.cfSeat = points.cfWaist.shift(-90, measurements.waistToSeat)
|
||||||
points.seat = points.cfSeat.shift(0, store.get('seat') / 4)
|
points.seat = points.cfSeat.shift(0, store.get('seat') / 4)
|
||||||
points.seatCp2 = points.seat.shift(90, points.waist.dy(points.seat) / 3)
|
points.seatCp2 = points.seat.shift(90, points.waist.dy(points.seat) / 3)
|
||||||
|
|
||||||
// Hem length
|
// Hem length
|
||||||
points.cfHem = points.cfWaist.shift(-90, measurements.naturalWaistToFloor * options.length)
|
points.cfHem = points.cfWaist.shift(-90, measurements.waistToFloor * options.length)
|
||||||
points.hem = new Point(points.seat.x, points.cfHem.y)
|
points.hem = new Point(points.seat.x, points.cfHem.y)
|
||||||
store.set('waistToHem', points.cfHem.y - points.waist.y)
|
store.set('waistToHem', points.cfHem.y - points.waist.y)
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ export default function (part) {
|
||||||
|
|
||||||
// Front closure edge
|
// Front closure edge
|
||||||
points.collarEdge = new Point(
|
points.collarEdge = new Point(
|
||||||
points.button1Left.x - measurements.naturalWaist * options.frontOverlap,
|
points.button1Left.x - measurements.waistCircumference * options.frontOverlap,
|
||||||
points.cfNeck.y
|
points.cfNeck.y
|
||||||
)
|
)
|
||||||
points.hemEdge = new Point(points.collarEdge.x, points.hem.y)
|
points.hemEdge = new Point(points.collarEdge.x, points.hem.y)
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
/**
|
/**
|
||||||
* This calculates a bunch of helper variables and stores them
|
* This calculates a bunch of helper variables and stores them
|
||||||
*/
|
*/
|
||||||
export const calculateRatios = part => {
|
export const calculateRatios = (part) => {
|
||||||
let { store, measurements, options } = part.shorthand()
|
let { store, measurements, options } = part.shorthand()
|
||||||
|
|
||||||
// Calculate different values for reducing from chest to hips via waist
|
// Calculate different values for reducing from chest to hips via waist
|
||||||
store.set('chest', measurements.chestCircumference * (1 + options.chestEase))
|
store.set('chest', measurements.chestCircumference * (1 + options.chestEase))
|
||||||
store.set('waist', measurements.naturalWaist * (1 + options.waistEase))
|
store.set('waist', measurements.waistCircumference * (1 + options.waistEase))
|
||||||
store.set('hips', measurements.hipsCircumference * (1 + options.hipsEase))
|
store.set('hips', measurements.hipsCircumference * (1 + options.hipsEase))
|
||||||
store.set('seat', measurements.seatCircumference * (1 + options.seatEase))
|
store.set('seat', measurements.seatCircumference * (1 + options.seatEase))
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue