1
0
Fork 0

feat(carlton): Port brian's s3 options

This commit is contained in:
Joost De Cock 2021-06-13 14:31:15 +02:00
parent fb908276b5
commit a5556dc32e
4 changed files with 35 additions and 27 deletions

View file

@ -46,7 +46,7 @@ export default {
'innerPocketDepth', 'innerPocketDepth',
'innerPocketWeltHeight', 'innerPocketWeltHeight',
], ],
style: ['beltWidth', 'buttonSpacingHorizontal', 'cuffLength', 'length'], style: ['beltWidth', 'buttonSpacingHorizontal', 'cuffLength', 'length', 's3Collar', 's3Armhole'],
collar: ['collarHeight', 'collarSpread', 'collarFlare'], collar: ['collarHeight', 'collarSpread', 'collarFlare'],
}, },
measurements: [ measurements: [
@ -155,5 +155,8 @@ export default {
collarHeight: { pct: 9.6, min: 8, max: 11 }, collarHeight: { pct: 9.6, min: 8, max: 11 },
collarSpread: { deg: 4, min: 2, max: 6 }, collarSpread: { deg: 4, min: 2, max: 6 },
collarFlare: { pct: 20, min: 0, max: 40 }, collarFlare: { pct: 20, min: 0, max: 40 },
// s3 is short for Shoulder Seam Shift
s3Collar: { pct: 0, min: -100, max: 100 },
s3Armhole: { pct: 0, min: -100, max: 100 },
}, },
} }

View file

@ -59,7 +59,9 @@ export default function (part) {
) )
// Clean up // Clean up
for (let i in paths) delete paths[i] for (let i in paths) {
if (['backArmhole','backCollar'].indexOf(i) === -1) delete paths[i]
}
for (let i in snippets) delete snippets[i] for (let i in snippets) delete snippets[i]
// Paths // Paths
@ -77,9 +79,9 @@ export default function (part) {
.curve_(points.waistCp2, points.armhole) .curve_(points.waistCp2, 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)
.line(points.neck) .line(points.s3CollarSplit)
.curve_(points.neckCp2, points.cbNeck) .join(paths.backCollar)
paths.seam = paths.seam1.join(paths.dart).join(paths.seam2).close().attr('class', 'fabric') paths.seam = paths.seam1.join(paths.dart).join(paths.seam2).close().attr('class', 'fabric')
paths.backStay = new Path() paths.backStay = new Path()
@ -161,12 +163,12 @@ export default function (part) {
}) })
macro('vd', { macro('vd', {
from: points.armhole, from: points.armhole,
to: points.shoulder, to: points.s3ArmholeSplit,
x: points.armhole.x + 30 + sa, x: points.armhole.x + 30 + sa,
}) })
macro('vd', { macro('vd', {
from: points.waist, from: points.waist,
to: points.shoulder, to: points.s3ArmholeSplit,
x: points.armhole.x + 45 + sa, x: points.armhole.x + 45 + sa,
}) })
macro('vd', { macro('vd', {
@ -186,7 +188,7 @@ export default function (part) {
}) })
macro('vd', { macro('vd', {
from: points.bpBottom, from: points.bpBottom,
to: points.neck, to: points.s3CollarSplit,
x: points.bpTop.x - 30 - sa, x: points.bpTop.x - 30 - sa,
}) })
macro('vd', { macro('vd', {
@ -201,23 +203,23 @@ export default function (part) {
}) })
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('hd', { macro('hd', {
from: points.cbNeck, from: points.cbNeck,
to: points.armholePitch, to: points.armholePitch,
y: points.neck.y - 30 - sa, y: points.s3CollarSplit.y - 30 - sa,
}) })
macro('hd', { macro('hd', {
from: points.cbNeck, from: points.cbNeck,
to: points.shoulder, to: points.shoulder,
y: points.neck.y - 45 - sa, y: points.s3CollarSplit.y - 45 - sa,
}) })
macro('hd', { macro('hd', {
from: points.cbNeck, from: points.cbNeck,
to: points.armhole, to: points.armhole,
y: points.neck.y - 60 - sa, y: points.s3CollarSplit.y - 60 - sa,
}) })
} }
} }

View file

@ -201,7 +201,9 @@ export default function (part) {
) )
// Clean up // Clean up
for (let i in paths) delete paths[i] for (let i in paths) {
if (['frontArmhole','frontCollar'].indexOf(i) === -1) delete paths[i]
}
for (let i in snippets) delete snippets[i] for (let i in snippets) delete snippets[i]
// Paths // Paths
@ -212,9 +214,9 @@ export default function (part) {
.curve_(points.waistCp2, points.armhole) .curve_(points.waistCp2, 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)
.line(points.collarTip) .line(points.collarTip)
._curve(points.lapelStraightEndCp1, points.lapelStraightEnd) ._curve(points.lapelStraightEndCp1, points.lapelStraightEnd)
.line(points.hemEdge) .line(points.hemEdge)
@ -398,12 +400,12 @@ export default function (part) {
}) })
macro('vd', { macro('vd', {
from: points.armhole, from: points.armhole,
to: points.shoulder, to: points.s3ArmholeSplit,
x: points.armhole.x + sa + 30, x: points.armhole.x + sa + 30,
}) })
macro('vd', { macro('vd', {
from: points.armhole, from: points.armhole,
to: points.neck, to: points.s3CollarSplit,
x: points.armhole.x + sa + 45, x: points.armhole.x + sa + 45,
}) })
macro('vd', { macro('vd', {
@ -428,7 +430,7 @@ export default function (part) {
}) })
macro('vd', { macro('vd', {
from: points.hemEdge, from: points.hemEdge,
to: points.neck, to: points.s3CollarSplit,
x: points.rollLineStart.x - sa - 45, x: points.rollLineStart.x - sa - 45,
}) })
macro('hd', { macro('hd', {
@ -449,22 +451,22 @@ export default function (part) {
macro('hd', { macro('hd', {
from: points.lapelStraightEnd, from: points.lapelStraightEnd,
to: points.neck, to: points.neck,
y: points.neck.y - sa - 15, y: points.s3CollarSplit.y - sa - 15,
}) })
macro('hd', { macro('hd', {
from: points.lapelStraightEnd, from: points.lapelStraightEnd,
to: points.armholePitch, to: points.armholePitch,
y: points.neck.y - sa - 30, y: points.s3CollarSplit.y - sa - 30,
}) })
macro('hd', { macro('hd', {
from: points.lapelStraightEnd, from: points.lapelStraightEnd,
to: points.shoulder, to: points.s3ArmholeSplit,
y: points.neck.y - sa - 45, y: points.s3CollarSplit.y - sa - 45,
}) })
macro('hd', { macro('hd', {
from: points.lapelStraightEnd, from: points.lapelStraightEnd,
to: points.armhole, to: points.armhole,
y: points.neck.y - sa - 60, y: points.s3CollarSplit.y - sa - 60,
}) })
} }
} }

View file

@ -1,6 +1,7 @@
import freesewing from '@freesewing/core' import freesewing from '@freesewing/core'
import plugins from '@freesewing/plugin-bundle' import plugins from '@freesewing/plugin-bundle'
import buttons from '@freesewing/plugin-buttons' import mirrorPlugin from '@freesewing/plugin-mirror'
import buttonsPlugin from '@freesewing/plugin-buttons'
import Bent from '@freesewing/bent' import Bent from '@freesewing/bent'
import config from '../config' import config from '../config'
// Parts // Parts
@ -23,7 +24,7 @@ import draftInnerPocketBag from './innerpocketbag'
import draftInnerPocketTab from './innerpockettab' import draftInnerPocketTab from './innerpockettab'
// Create new design // Create new design
const Pattern = new freesewing.Design(config, [plugins, buttons]) const Pattern = new freesewing.Design(config, [plugins, mirrorPlugin, buttonsPlugin])
// Attach draft methods from Bent to prototype // Attach draft methods from Bent to prototype
Pattern.prototype.draftBentBase = function (part) { Pattern.prototype.draftBentBase = function (part) {