chore(simon): Ported simon to new measurements. See #416
This commit is contained in:
parent
6170b8cf40
commit
ae5bd9d843
4 changed files with 20 additions and 29 deletions
|
@ -104,9 +104,9 @@ export default {
|
|||
measurements: [
|
||||
'bicepsCircumference',
|
||||
'chestCircumference',
|
||||
'hpsToHipsBack',
|
||||
'naturalWaist',
|
||||
'naturalWaistToHip',
|
||||
'hpsToWaistBack',
|
||||
'waistCircumference',
|
||||
'waistToHips',
|
||||
'neckCircumference',
|
||||
'shoulderSlope',
|
||||
'shoulderToShoulder',
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { calculateReduction } from './shared'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
part.paths = {} // Removes paperless dimensions from brian
|
||||
let {
|
||||
store,
|
||||
|
@ -43,7 +43,7 @@ export default part => {
|
|||
points.waist = points.waist.shift(180, nonDarts)
|
||||
points.dartCenter = points.cbWaist.shiftFractionTowards(points.waist, 0.6)
|
||||
points.dartTop = points.dartCenter.shift(90, points.armhole.dy(points.waist) * 0.75)
|
||||
points.dartBottom = points.dartCenter.shift(-90, measurements.naturalWaistToHip * 0.75)
|
||||
points.dartBottom = points.dartCenter.shift(-90, measurements.waistToHips * 0.75)
|
||||
points.dartCenterIn = points.dartCenter.shift(180, darts)
|
||||
points.dartCenterOut = points.dartCenter.shift(0, darts)
|
||||
points.dartCenterInCp1 = points.dartCenterIn.shift(
|
||||
|
@ -74,7 +74,7 @@ export default part => {
|
|||
// No darts in the back
|
||||
points.waist = points.waist.shift(180, reduce / 4)
|
||||
}
|
||||
points.waistCp1 = points.waist.shift(-90, measurements.naturalWaistToHip * 0.5)
|
||||
points.waistCp1 = points.waist.shift(-90, measurements.waistToHips * 0.5)
|
||||
points.waistCp2 = points.waist.shift(90, points.armhole.dy(points.waist) / 2)
|
||||
points.hipsCp2 = points.hips.shift(90, points.waist.dy(points.hips) / 4)
|
||||
|
||||
|
@ -192,10 +192,7 @@ export default part => {
|
|||
// Paths
|
||||
paths.saBase.render = false
|
||||
paths.hemBase.render = false
|
||||
paths.seam = paths.hemBase
|
||||
.join(paths.saBase)
|
||||
.close()
|
||||
.attr('class', 'fabric')
|
||||
paths.seam = paths.hemBase.join(paths.saBase).close().attr('class', 'fabric')
|
||||
|
||||
// Complete pattern?
|
||||
if (complete) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
import { calculateReduction } from './shared'
|
||||
|
||||
export default part => {
|
||||
export default (part) => {
|
||||
part.paths = {}
|
||||
let {
|
||||
store,
|
||||
|
@ -36,7 +36,7 @@ export default part => {
|
|||
if (store.get('backDarts')) reduce = (reduce * (1 - options.backDartShaping)) / 4
|
||||
else reduce = reduce / 4
|
||||
points.waist = points.waist.shift(180, reduce)
|
||||
points.waistCp1 = points.waist.shift(-90, measurements.naturalWaistToHip * 0.5)
|
||||
points.waistCp1 = points.waist.shift(-90, measurements.waistToHips * 0.5)
|
||||
points.waistCp2 = points.waist.shift(90, points.armhole.dy(points.waist) / 2)
|
||||
points.hipsCp2 = points.hips.shift(90, points.waist.dy(points.hips) / 4)
|
||||
|
||||
|
@ -65,10 +65,7 @@ export default part => {
|
|||
points.bballEnd = points.hem.shiftFractionTowards(points.hips, options.hemCurve)
|
||||
points.bballCp1 = points.bballStart.shiftFractionTowards(points.hem, 0.5)
|
||||
points.bballCp2 = new Point(points.bballCp1.x, points.bballEnd.y)
|
||||
paths.saBase = new Path()
|
||||
.move(points.bballEnd)
|
||||
.line(points.hips)
|
||||
.join(paths.saBaseFromHips)
|
||||
paths.saBase = new Path().move(points.bballEnd).line(points.hips).join(paths.saBaseFromHips)
|
||||
paths.hemBase = new Path()
|
||||
.move(points.cfHem)
|
||||
.line(points.bballStart)
|
||||
|
@ -89,10 +86,7 @@ export default part => {
|
|||
.curve(points.slashCp2, points.slashCp1, points.slashStart)
|
||||
break
|
||||
default:
|
||||
paths.saBase = new Path()
|
||||
.move(points.hem)
|
||||
.line(points.hips)
|
||||
.join(paths.saBaseFromHips)
|
||||
paths.saBase = new Path().move(points.hem).line(points.hips).join(paths.saBaseFromHips)
|
||||
paths.hemBase = new Path().move(points.cfHem).line(points.hem)
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
export const calculateReduction = function(part) {
|
||||
export const calculateReduction = function (part) {
|
||||
let { store, measurements, options } = part.shorthand()
|
||||
let chest = measurements.chestCircumference * (1 + options.chestEase)
|
||||
let waist = measurements.naturalWaist * (1 + options.waistEase)
|
||||
let waist = measurements.waistCircumference * (1 + options.waistEase)
|
||||
let hips = measurements.hipsCircumference * (1 + options.hipsEase)
|
||||
let waistReduction = chest - waist
|
||||
let hipsReduction = chest - hips
|
||||
|
@ -25,7 +25,7 @@ export const calculateReduction = function(part) {
|
|||
else store.set('backDarts', true)
|
||||
}
|
||||
|
||||
export const addButtons = function(part, origin = 'cfNeck', snippet = 'button') {
|
||||
export const addButtons = function (part, origin = 'cfNeck', snippet = 'button') {
|
||||
let { points, options, snippets, Snippet } = part.shorthand()
|
||||
let len = points.cfNeck.dist(points.cfHips) * (1 - options.buttonFreeLength)
|
||||
for (let i = 1; i <= options.buttons; i++) {
|
||||
|
@ -41,7 +41,7 @@ export const addButtons = function(part, origin = 'cfNeck', snippet = 'button')
|
|||
|
||||
export const addButtonHoles = (part, origin) => addButtons(part, origin, 'buttonhole')
|
||||
|
||||
export const draftBarrelCuff = part => {
|
||||
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)
|
||||
|
@ -54,7 +54,7 @@ export const draftBarrelCuff = part => {
|
|||
return part
|
||||
}
|
||||
|
||||
export const decorateBarrelCuff = part => {
|
||||
export const decorateBarrelCuff = (part) => {
|
||||
let { macro, snippets, Snippet, points, measurements, options, Point } = part.shorthand()
|
||||
// Title
|
||||
points.title = new Point(points.bottomRight.x / 2, points.bottomRight.y / 2)
|
||||
|
@ -92,7 +92,7 @@ export const decorateBarrelCuff = part => {
|
|||
return part
|
||||
}
|
||||
|
||||
export const draftFrenchCuff = part => {
|
||||
export const draftFrenchCuff = (part) => {
|
||||
let { store, points, measurements, options, Point } = part.shorthand()
|
||||
let margin = measurements.wristCircumference * options.cuffOverlap
|
||||
let height = measurements.shoulderToWrist * options.cuffLength
|
||||
|
@ -111,7 +111,7 @@ export const draftFrenchCuff = part => {
|
|||
return part
|
||||
}
|
||||
|
||||
export const decorateFrenchCuff = part => {
|
||||
export const decorateFrenchCuff = (part) => {
|
||||
let { macro, snippets, Snippet, points, measurements, options, Point } = part.shorthand()
|
||||
// Title
|
||||
points.title = new Point(points.bottomRight.x / 2, points.bottomRight.y / 2)
|
||||
|
@ -141,7 +141,7 @@ export const decorateFrenchCuff = part => {
|
|||
return part
|
||||
}
|
||||
|
||||
export const paperlessBarrelCuff = part => {
|
||||
export const paperlessBarrelCuff = (part) => {
|
||||
let { sa, macro, points, options } = part.shorthand()
|
||||
macro('hd', {
|
||||
from: points.buttonhole1,
|
||||
|
@ -176,7 +176,7 @@ export const paperlessBarrelCuff = part => {
|
|||
return part
|
||||
}
|
||||
|
||||
export const paperlessFrenchCuff = part => {
|
||||
export const paperlessFrenchCuff = (part) => {
|
||||
let { sa, macro, points } = part.shorthand()
|
||||
macro('hd', {
|
||||
from: points.button4,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue