1
0
Fork 0

chore(brian) Removed circumference suffix from measurements

This commit is contained in:
Joost De Cock 2020-06-30 15:13:28 +02:00
parent 4b918d7c75
commit a0da79a1e0
5 changed files with 16 additions and 26 deletions

View file

@ -52,15 +52,15 @@ export default {
]
},
measurements: [
'bicepsCircumference',
'chestCircumference',
'biceps',
'chest',
'hpsToWaistBack',
'waistToHips',
'neckCircumference',
'neck',
'shoulderSlope',
'shoulderToShoulder',
'shoulderToWrist',
'wristCircumference'
'wrist'
],
dependencies: {
back: 'base',

View file

@ -21,15 +21,12 @@ export default (part) => {
// Center back (cb) vertical axis
points.cbHps = new Point(0, 0)
points.cbNeck = new Point(0, options.backNeckCutout * measurements.neckCircumference)
points.cbNeck = new Point(0, options.backNeckCutout * measurements.neck)
points.cbWaist = new Point(0, measurements.hpsToWaistBack)
points.cbHips = new Point(0, points.cbWaist.y + measurements.waistToHips)
// Shoulder line
points.neck = new Point(
(measurements.neckCircumference * (1 + options.collarEase)) / options.collarFactor,
0
)
points.neck = new Point((measurements.neck * (1 + options.collarEase)) / options.collarFactor, 0)
points.hps = points.neck.clone() // We started using HPS in many measurements
// Shoulder point using shoulderSlope degree measurement
points.shoulder = utils.beamsIntersect(
@ -42,8 +39,7 @@ export default (part) => {
points.cbShoulder = new Point(0, points.shoulder.y)
points.cbArmhole = new Point(
0,
points.shoulder.y +
measurements.bicepsCircumference * (1 + options.bicepsEase) * options.armholeDepthFactor
points.shoulder.y + measurements.biceps * (1 + options.bicepsEase) * options.armholeDepthFactor
)
// Now take shoulder slope reduction into account
@ -54,10 +50,7 @@ export default (part) => {
points.cbHem = new Point(0, points.cbHips.y * (1 + options.lengthBonus))
// Side back (cb) vertical axis
points.armhole = new Point(
(measurements.chestCircumference * (1 + options.chestEase)) / 4,
points.cbArmhole.y
)
points.armhole = new Point((measurements.chest * (1 + options.chestEase)) / 4, points.cbArmhole.y)
points.waist = new Point(points.armhole.x, points.cbWaist.y)
points.hips = new Point(points.armhole.x, points.cbHips.y)
points.hem = new Point(points.armhole.x, points.cbHem.y)
@ -104,7 +97,7 @@ export default (part) => {
// Fit collar
points.cfNeck = points.neck.rotate(-90, new Point(0, 0))
let target = measurements.neckCircumference * (1 + options.collarEase)
let target = measurements.neck * (1 + options.collarEase)
let delta = 0
let run = 0
do {

View file

@ -18,7 +18,7 @@ export default (part) => {
} = part.shorthand()
// Cut arm a bit deeper at the front
let deeper = measurements.chestCircumference * options.frontArmholeDeeper
let deeper = measurements.chest * options.frontArmholeDeeper
points.armholePitchCp1.x -= deeper
points.armholePitch.x -= deeper
points.armholePitchCp2.x -= deeper

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let {
debug,
store,
@ -33,10 +33,7 @@ export default part => {
0,
top + measurements.shoulderToWrist * (1 + options.sleeveLengthBonus)
)
points.wristRight = points.centerWrist.shift(
0,
(measurements.wristCircumference * (1 + options.cuffEase)) / 2
)
points.wristRight = points.centerWrist.shift(0, (measurements.wrist * (1 + options.cuffEase)) / 2)
points.wristLeft = points.wristRight.rotate(180, points.centerWrist)
points.sleeveTip = paths.sleevecap.shiftFractionAlong(0.5)

View file

@ -20,14 +20,14 @@ function draftSleevecap(part, run) {
points.centerCap = points.centerBiceps.shift(
90,
options.sleevecapTopFactorY *
(measurements.bicepsCircumference *
(measurements.biceps *
(1 + options.bicepsEase) *
options.armholeDepthFactor *
store.get('sleeveFactor'))
)
// Left and right biceps points, limit impact of sleeveFactor to 25%
let halfWidth = (measurements.bicepsCircumference * (1 + options.bicepsEase)) / 2
let halfWidth = (measurements.biceps * (1 + options.bicepsEase)) / 2
points.bicepsLeft = points.centerBiceps.shift(
180,
halfWidth * options.sleeveWidthGuarantee +
@ -62,7 +62,7 @@ function draftSleevecap(part, run) {
points.capQ3Base = points.backPitch.shiftFractionTowards(points.centerCap, 0.5)
points.capQ4Base = points.backPitch.shiftFractionTowards(points.bicepsLeft, 0.5)
// Offset points
let baseOffset = measurements.bicepsCircumference * (1 + options.bicepsEase)
let baseOffset = measurements.biceps * (1 + options.bicepsEase)
points.capQ1 = points.capQ1Base.shift(
points.bicepsRight.angle(points.frontPitch) + 90,
baseOffset * options.sleevecapQ1Offset
@ -140,7 +140,7 @@ function draftSleevecap(part, run) {
}
}
export default part => {
export default (part) => {
let { debug, store, units, options, Point, points, paths } = part.shorthand()
store.set('sleeveFactor', 1)