feat(simon): Ported Brian's s3 options
This commit is contained in:
parent
045e41d293
commit
b0d901fe68
12 changed files with 59 additions and 66 deletions
|
@ -26,10 +26,9 @@ export default (part) => {
|
||||||
.move(points.armhole)
|
.move(points.armhole)
|
||||||
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
||||||
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
|
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
|
||||||
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
.join(paths.backArmhole)
|
||||||
.length()
|
.length()
|
||||||
)
|
)
|
||||||
|
|
||||||
// Hip shaping
|
// Hip shaping
|
||||||
points.hips = points.hips.shift(180, store.get('hipsReduction') / 4)
|
points.hips = points.hips.shift(180, store.get('hipsReduction') / 4)
|
||||||
points.hem = points.hem.shift(180, store.get('hipsReduction') / 4)
|
points.hem = points.hem.shift(180, store.get('hipsReduction') / 4)
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
import { calculateReduction } from './shared'
|
import { calculateReduction } from './shared'
|
||||||
|
|
||||||
export default (part) => {
|
export default (part) => {
|
||||||
part.paths = {}
|
|
||||||
let {
|
let {
|
||||||
store,
|
store,
|
||||||
measurements,
|
measurements,
|
||||||
|
@ -12,9 +11,18 @@ export default (part) => {
|
||||||
paths,
|
paths,
|
||||||
complete,
|
complete,
|
||||||
macro,
|
macro,
|
||||||
|
snippets,
|
||||||
options,
|
options,
|
||||||
} = part.shorthand()
|
} = part.shorthand()
|
||||||
|
|
||||||
|
// Clean up
|
||||||
|
for (let i in paths) {
|
||||||
|
if (['frontArmhole', 'frontCollar'].indexOf(i) === -1) delete paths[i]
|
||||||
|
}
|
||||||
|
for (let i in snippets) {
|
||||||
|
if (i.indexOf('otch')) delete snippets[i]
|
||||||
|
}
|
||||||
|
|
||||||
// Populare store with data we need
|
// Populare store with data we need
|
||||||
calculateReduction(part)
|
calculateReduction(part)
|
||||||
store.set(
|
store.set(
|
||||||
|
@ -23,7 +31,7 @@ export default (part) => {
|
||||||
.move(points.armhole)
|
.move(points.armhole)
|
||||||
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
||||||
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
|
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
|
||||||
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
.join(paths.frontArmhole)
|
||||||
.length()
|
.length()
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -56,9 +64,9 @@ export default (part) => {
|
||||||
.move(points.armhole)
|
.move(points.armhole)
|
||||||
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
||||||
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
|
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
|
||||||
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
.join(paths.frontArmhole)
|
||||||
.line(points.neck)
|
.line(points.s3CollarSplit)
|
||||||
.curve(points.neckCp2Front, points.cfNeckCp1, points.cfNeck)
|
.join(paths.frontCollar)
|
||||||
switch (options.hemStyle) {
|
switch (options.hemStyle) {
|
||||||
case 'baseball':
|
case 'baseball':
|
||||||
points.bballStart = points.cfHem.shiftFractionTowards(points.hem, 0.5)
|
points.bballStart = points.cfHem.shiftFractionTowards(points.hem, 0.5)
|
||||||
|
|
|
@ -145,12 +145,12 @@ export default (part) => {
|
||||||
}
|
}
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.placketTopEdge,
|
from: points.placketTopEdge,
|
||||||
to: points.neck,
|
to: points.s3CollarSplit,
|
||||||
y: points.placketTopEdge.y - offset - sa - 15,
|
y: points.placketTopEdge.y - offset - sa - 15,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.placketTopEdge,
|
from: points.placketTopEdge,
|
||||||
to: points.shoulder,
|
to: points.s3ArmholeSplit,
|
||||||
y: points.placketTopEdge.y - offset - sa - 30,
|
y: points.placketTopEdge.y - offset - sa - 30,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
|
|
|
@ -57,27 +57,27 @@ export default (part) => {
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.neckEdge,
|
from: points.neckEdge,
|
||||||
to: points.neck,
|
to: points.s3CollarSplit,
|
||||||
y: points.neck.y - sa - 15,
|
y: points.s3CollarSplit.y - sa - 15,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.neckEdge,
|
from: points.neckEdge,
|
||||||
to: points.shoulder,
|
to: points.s3ArmholeSplit,
|
||||||
y: points.neck.y - sa - 30,
|
y: points.s3CollarSplit.y - sa - 30,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.neckEdge,
|
from: points.neckEdge,
|
||||||
to: points.armhole,
|
to: points.armhole,
|
||||||
y: points.neck.y - sa - 45,
|
y: points.s3CollarSplit.y - sa - 45,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.neckEdge,
|
from: points.neckEdge,
|
||||||
to: points.neck,
|
to: points.s3CollarSplit,
|
||||||
x: points.neckEdge.x - sa - 15,
|
x: points.neckEdge.x - sa - 15,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.hemEdge,
|
from: points.hemEdge,
|
||||||
to: points.neck,
|
to: points.s3CollarSplit,
|
||||||
x: points.neckEdge.x - sa - 30,
|
x: points.neckEdge.x - sa - 30,
|
||||||
})
|
})
|
||||||
for (let pid of ['Armhole', 'Waist', 'Hips']) {
|
for (let pid of ['Armhole', 'Waist', 'Hips']) {
|
||||||
|
|
|
@ -68,18 +68,18 @@ export default (part) => {
|
||||||
}
|
}
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.placketTopEdge,
|
from: points.placketTopEdge,
|
||||||
to: points.neck,
|
to: points.s3CollarSplit,
|
||||||
y: points.neck.y - 15 - sa,
|
y: points.s3CollarSplit.y - 15 - sa,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.placketTopEdge,
|
from: points.placketTopEdge,
|
||||||
to: points.shoulder,
|
to: points.s3ArmholeSplit,
|
||||||
y: points.neck.y - 30 - sa,
|
y: points.s3CollarSplit.y - 30 - sa,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.placketTopEdge,
|
from: points.placketTopEdge,
|
||||||
to: points.armhole,
|
to: points.armhole,
|
||||||
y: points.neck.y - 45 - sa,
|
y: points.s3CollarSplit.y - 45 - sa,
|
||||||
})
|
})
|
||||||
points.button0 = points.placketTopEdge
|
points.button0 = points.placketTopEdge
|
||||||
let j
|
let j
|
||||||
|
|
|
@ -9,8 +9,8 @@ export default (part) => {
|
||||||
if (complete && paperless) {
|
if (complete && paperless) {
|
||||||
frontDimensions(part, 'left')
|
frontDimensions(part, 'left')
|
||||||
macro('ld', {
|
macro('ld', {
|
||||||
from: points.neck,
|
from: points.s3CollarSplit,
|
||||||
to: points.shoulder,
|
to: points.s3ArmholeSplit,
|
||||||
d: 15 + sa,
|
d: 15 + sa,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,19 +89,19 @@ export default (part) => {
|
||||||
y: points.placketTopEdge.y - 45 - sa,
|
y: points.placketTopEdge.y - 45 - sa,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.neck,
|
from: points.s3CollarSplit,
|
||||||
to: points.placketTopEdge,
|
to: points.placketTopEdge,
|
||||||
y: points.neck.y - 15 - sa,
|
y: points.s3CollarSplit.y - 15 - sa,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.shoulder,
|
from: points.s3ArmholeSplit,
|
||||||
to: points.placketTopEdge,
|
to: points.placketTopEdge,
|
||||||
y: points.neck.y - 30 - sa,
|
y: points.s3CollarSplit.y - 30 - sa,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.armhole,
|
from: points.armhole,
|
||||||
to: points.placketTopEdge,
|
to: points.placketTopEdge,
|
||||||
y: points.neck.y - 45 - sa,
|
y: points.s3CollarSplit.y - 45 - sa,
|
||||||
})
|
})
|
||||||
points.button0 = points.placketTopEdge
|
points.button0 = points.placketTopEdge
|
||||||
let j
|
let j
|
||||||
|
|
|
@ -43,23 +43,23 @@ export default (part) => {
|
||||||
// Paperless?
|
// Paperless?
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.neck,
|
from: points.s3CollarSplit,
|
||||||
to: points.placketTopIn,
|
to: points.placketTopIn,
|
||||||
y: points.neck.y - sa - 15,
|
y: points.s3CollarSplit.y - sa - 15,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.shoulder,
|
from: points.s3ArmholeSplit,
|
||||||
to: points.placketTopIn,
|
to: points.placketTopIn,
|
||||||
y: points.neck.y - sa - 30,
|
y: points.s3CollarSplit.y - sa - 30,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.armhole,
|
from: points.armhole,
|
||||||
to: points.placketTopIn,
|
to: points.placketTopIn,
|
||||||
y: points.neck.y - sa - 45,
|
y: points.s3CollarSplit.y - sa - 45,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.placketTopIn,
|
from: points.placketTopIn,
|
||||||
to: points.neck,
|
to: points.s3CollarSplit,
|
||||||
x: points.placketTopIn.x + sa + 15,
|
x: points.placketTopIn.x + sa + 15,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
|
|
@ -68,7 +68,7 @@ export default (part) => {
|
||||||
y: points.hps.y - sa - 15,
|
y: points.hps.y - sa - 15,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.shoulder,
|
from: points.s3ArmholeSplit,
|
||||||
to: points.placketTopEdge,
|
to: points.placketTopEdge,
|
||||||
y: points.hps.y - sa - 30,
|
y: points.hps.y - sa - 30,
|
||||||
})
|
})
|
||||||
|
@ -79,7 +79,7 @@ export default (part) => {
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.placketTopEdge,
|
from: points.placketTopEdge,
|
||||||
to: points.neck,
|
to: points.s3CollarSplit,
|
||||||
x: points.placketTopEdge.x + sa + 15,
|
x: points.placketTopEdge.x + sa + 15,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
|
|
@ -12,8 +12,8 @@ export default (part) => {
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
frontDimensions(part, 'right')
|
frontDimensions(part, 'right')
|
||||||
macro('ld', {
|
macro('ld', {
|
||||||
from: points.shoulder,
|
from: points.s3ArmholeSplit,
|
||||||
to: points.neck,
|
to: points.s3CollarSplit,
|
||||||
d: 15 + sa,
|
d: 15 + sa,
|
||||||
})
|
})
|
||||||
if (sa) {
|
if (sa) {
|
||||||
|
|
|
@ -213,12 +213,6 @@ export const frontDimensions = (part, side = 'left') => {
|
||||||
text: ['frenchSeam', ': 2x', 'seamAllowance'],
|
text: ['frenchSeam', ': 2x', 'seamAllowance'],
|
||||||
})
|
})
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
macro('pd', {
|
|
||||||
path: new Path()
|
|
||||||
.move(points.armholePitch)
|
|
||||||
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder),
|
|
||||||
d: -15 * factor,
|
|
||||||
})
|
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.armhole,
|
from: points.armhole,
|
||||||
to: points.armholePitch,
|
to: points.armholePitch,
|
||||||
|
@ -226,12 +220,12 @@ export const frontDimensions = (part, side = 'left') => {
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.armhole,
|
from: points.armhole,
|
||||||
to: points.shoulder,
|
to: points.s3ArmholeSplit,
|
||||||
x: points.armhole.x + (30 + sa * 2) * factor,
|
x: points.armhole.x + (30 + sa * 2) * factor,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.armhole,
|
from: points.armhole,
|
||||||
to: points.neck,
|
to: points.s3CollarSplit,
|
||||||
x: points.armhole.x + (45 + sa * 2) * factor,
|
x: points.armhole.x + (45 + sa * 2) * factor,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
@ -266,7 +260,7 @@ export const frontDimensions = (part, side = 'left') => {
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.bballStart,
|
from: points.bballStart,
|
||||||
to: points.neck,
|
to: points.s3CollarSplit,
|
||||||
x: points.hips.x + (60 + 2 * sa) * factor,
|
x: points.hips.x + (60 + 2 * sa) * factor,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
|
@ -292,7 +286,7 @@ export const frontDimensions = (part, side = 'left') => {
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.slashEnd,
|
from: points.slashEnd,
|
||||||
to: points.neck,
|
to: points.s3CollarSplit,
|
||||||
x: points.hips.x + (60 + 3 * sa) * factor,
|
x: points.hips.x + (60 + 3 * sa) * factor,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
|
@ -303,7 +297,7 @@ export const frontDimensions = (part, side = 'left') => {
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.hem,
|
from: points.hem,
|
||||||
to: points.neck,
|
to: points.s3CollarSplit,
|
||||||
x: points.armhole.x + (60 + 2 * sa) * factor,
|
x: points.armhole.x + (60 + 2 * sa) * factor,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -44,6 +44,8 @@ export default (part) => {
|
||||||
// Complete pattern?
|
// Complete pattern?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
delete snippets.armholePitchNotch
|
delete snippets.armholePitchNotch
|
||||||
|
delete snippets.collarNotch
|
||||||
|
delete snippets.shoulderNotch
|
||||||
points.title = new Point(points.neck.x, points.cbYoke.y / 3)
|
points.title = new Point(points.neck.x, points.cbYoke.y / 3)
|
||||||
macro('title', { at: points.title, nr: 4, title: 'yoke', scale: 0.8 })
|
macro('title', { at: points.title, nr: 4, title: 'yoke', scale: 0.8 })
|
||||||
points.logo = points.title.shift(-90, 50)
|
points.logo = points.title.shift(-90, 50)
|
||||||
|
@ -75,18 +77,14 @@ export default (part) => {
|
||||||
|
|
||||||
// Paperless?
|
// Paperless?
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
macro('pd', {
|
|
||||||
path: new Path().move(points.cbNeck)._curve(points.neckCp2, points.neck),
|
|
||||||
d: 15,
|
|
||||||
})
|
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.cbNeck,
|
from: points.cbNeck,
|
||||||
to: points.neck,
|
to: points.s3CollarSplit,
|
||||||
y: points.neck.y - 15 - sa,
|
y: points.s3CollarSplit.y - 15 - sa,
|
||||||
})
|
})
|
||||||
macro('ld', {
|
macro('ld', {
|
||||||
from: points.neck,
|
from: points.s3CollarSplit,
|
||||||
to: points.shoulder,
|
to: points.s3ArmholeSplit,
|
||||||
d: 15 + sa,
|
d: 15 + sa,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
|
@ -96,7 +94,7 @@ export default (part) => {
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
from: points.cbYoke,
|
from: points.cbYoke,
|
||||||
to: points.shoulder,
|
to: points.s3ArmholeSplit,
|
||||||
y: points.cbYoke.y + 30 + sa,
|
y: points.cbYoke.y + 30 + sa,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
@ -104,16 +102,10 @@ export default (part) => {
|
||||||
to: points.cbNeck,
|
to: points.cbNeck,
|
||||||
x: points.cbYoke.x - 15 - sa,
|
x: points.cbYoke.x - 15 - sa,
|
||||||
})
|
})
|
||||||
macro('pd', {
|
|
||||||
path: new Path()
|
|
||||||
.move(points.armholePitch)
|
|
||||||
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder),
|
|
||||||
d: 15 + sa,
|
|
||||||
})
|
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.armholePitch,
|
from: points.armholePitch,
|
||||||
to: points.shoulder,
|
to: points.s3ArmholeSplit,
|
||||||
x: points.shoulder.x + 30 + sa,
|
x: points.s3ArmholeSplit.x + 30 + sa,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue