1
0
Fork 0

chore(simon) Removed circumference suffix from measurements

This commit is contained in:
Joost De Cock 2020-06-28 13:01:22 +02:00
parent 901811dc54
commit a1ed717f5f
5 changed files with 26 additions and 31 deletions

View file

@ -102,17 +102,17 @@ export default {
]
},
measurements: [
'bicepsCircumference',
'chestCircumference',
'biceps',
'chest',
'hpsToWaistBack',
'waistCircumference',
'waist',
'waistToHips',
'neckCircumference',
'neck',
'shoulderSlope',
'shoulderToShoulder',
'hipsCircumference',
'hips',
'shoulderToWrist',
'wristCircumference'
'wrist'
],
dependencies: {
sleeveBase: ['frontBase', 'backBase'],

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let {
measurements,
utils,
@ -14,8 +14,7 @@ export default part => {
} = part.shorthand()
const draft = function (tweak = 1) {
let length =
measurements.neckCircumference * (1 + options.collarEase - options.collarGap) * tweak
let length = measurements.neck * (1 + options.collarEase - options.collarGap) * tweak
let width = options.collarStandWidth * (1 + options.collarRoll)
// Draft right side
@ -46,7 +45,7 @@ export default part => {
._curve(points.bottomMidCp2, points.bottomMid)
.length()
return len * 2 - measurements.neckCircumference * (1 + options.collarEase - options.collarGap)
return len * 2 - measurements.neck * (1 + options.collarEase - options.collarGap)
}
let delta, tweak, run
@ -90,10 +89,7 @@ export default part => {
.attr('data-text-class', 'center')
// Helplines
paths.help = new Path()
.move(points.topMid)
.line(points.bottomMid)
.attr('class', 'dotted')
paths.help = new Path().move(points.topMid).line(points.bottomMid).attr('class', 'dotted')
// Grainline
macro('grainline', {

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
let {
measurements,
sa,
@ -15,7 +15,7 @@ export default part => {
} = part.shorthand()
const draft = function (tweak = 1) {
let length = measurements.neckCircumference * (1 + options.collarEase) * tweak
let length = measurements.neck * (1 + options.collarEase) * tweak
let width = options.collarStandWidth
let half = length / 2
let bend = options.collarStandBend * -1
@ -73,7 +73,7 @@ export default part => {
.curve(points.leftBottomHingeCp2, points.bottomMidCp1, points.bottomMid)
.length()
return len * 2 - measurements.neckCircumference * (1 + options.collarEase)
return len * 2 - measurements.neck * (1 + options.collarEase)
}
let delta, tweak, run

View file

@ -1,8 +1,8 @@
export const calculateReduction = function (part) {
let { store, measurements, options } = part.shorthand()
let chest = measurements.chestCircumference * (1 + options.chestEase)
let waist = measurements.waistCircumference * (1 + options.waistEase)
let hips = measurements.hipsCircumference * (1 + options.hipsEase)
let chest = measurements.chest * (1 + options.chestEase)
let waist = measurements.waist * (1 + options.waistEase)
let hips = measurements.hips * (1 + options.hipsEase)
let waistReduction = chest - waist
let hipsReduction = chest - hips
@ -44,7 +44,7 @@ export const addButtonHoles = (part, origin) => addButtons(part, origin, 'button
export const draftBarrelCuff = (part) => {
let { store, points, measurements, options, Point } = part.shorthand()
let height = measurements.shoulderToWrist * options.cuffLength
let width = measurements.wristCircumference * (1 + options.cuffEase + options.cuffOverlap)
let width = measurements.wrist * (1 + options.cuffEase + options.cuffOverlap)
store.set('cuffHeight', height)
points.topLeft = new Point(0, 0)
points.topRight = new Point(width, 0)
@ -66,7 +66,7 @@ export const decorateBarrelCuff = (part) => {
})
// Button and buttonhole
let margin = measurements.wristCircumference * options.cuffOverlap
let margin = measurements.wrist * options.cuffOverlap
points.buttonLineTop = points.topRight.shift(180, margin / 2)
points.buttonLineBottom = points.bottomRight.shift(180, margin / 2)
points.buttonholeLineTop = points.topLeft.shift(0, margin / 2)
@ -94,11 +94,10 @@ export const decorateBarrelCuff = (part) => {
export const draftFrenchCuff = (part) => {
let { store, points, measurements, options, Point } = part.shorthand()
let margin = measurements.wristCircumference * options.cuffOverlap
let margin = measurements.wrist * options.cuffOverlap
let height = measurements.shoulderToWrist * options.cuffLength
let width =
measurements.wristCircumference *
(1 + options.cuffEase + options.cuffOverlap + options.cuffDrape) +
measurements.wrist * (1 + options.cuffEase + options.cuffOverlap + options.cuffDrape) +
margin / 2
store.set('cuffHeight', height)
points.topLeft = new Point(0, 0)
@ -123,7 +122,7 @@ export const decorateFrenchCuff = (part) => {
})
// Buttonholes
let margin = measurements.wristCircumference * options.cuffOverlap
let margin = measurements.wrist * options.cuffOverlap
points.buttonLineTop = points.topRight.shift(180, margin * 0.75)
points.buttonLineBottom = points.bottomRight.shift(180, margin * 0.75)
points.buttonholeLineTop = points.topLeft.shift(0, margin * 0.75)

View file

@ -1,4 +1,4 @@
export default part => {
export default (part) => {
part.paths = {} // This removed paperless dimensions from brian block
for (let pid of [
'__scaleboxLead',
@ -23,13 +23,13 @@ export default part => {
} = part.shorthand()
// Sleeve width depends on cuff style
let width = measurements.wristCircumference * (1 + options.cuffEase + options.cuffOverlap)
let width = measurements.wrist * (1 + options.cuffEase + options.cuffOverlap)
if (
options.cuffStyle === 'straightFrenchCuff' ||
options.cuffStyle === 'roundedFrenchCuff' ||
options.cuffStyle === 'angledFrenchCuff'
)
width = measurements.wristCircumference * (1 + options.cuffEase + options.cuffOverlap * 1.5)
width = measurements.wrist * (1 + options.cuffEase + options.cuffOverlap * 1.5)
points.wristRight.x = width / 2
points.wristLeft.x = width / -2
let cuffLength = measurements.shoulderToWrist * options.cuffLength