1
0
Fork 0

feat(simon): Allow configuring the yoke. Closes #642

This commit is contained in:
Joost De Cock 2021-06-20 09:01:37 +02:00
parent b0d901fe68
commit af2ee352c7
5 changed files with 61 additions and 14 deletions

View file

@ -2,12 +2,19 @@
date: Unreleased date: Unreleased
Added: Added:
bent: bent: &s3optsAdded
- The `s3collar and `s3armhole` options now allow shifting the shoulder seam - The `s3collar and `s3armhole` options now allow shifting the shoulder seam
(`s3` is short for *Shift Shoulder Seam*) (`s3` is short for *Shift Shoulder Seam*)
brian: brian: *s3optsAdded
carlita: *s3optsAdded
carlton: *s3optsAdded
huey: *s3optsAdded
simon:
- Added support for configuring the height of the Yoke.
See [#642](https://github.com/freesewing/freesewing/issues/642)
- The `s3collar and `s3armhole` options now allow shifting the shoulder seam - The `s3collar and `s3armhole` options now allow shifting the shoulder seam
(`s3` is short for *Shift Shoulder Seam*) (`s3` is short for *Shift Shoulder Seam*)
sven: *s3optsAdded
Changed: Changed:
components: components:
@ -15,8 +22,20 @@
See https://github.com/freesewing/freesewing/issues/1043 See https://github.com/freesewing/freesewing/issues/1043
- Changed antman references to antperson - Changed antman references to antperson
diana: *s3optsConst
- Set brian `s3` options as constants
hugo: *s3optsConst
jaeger: *s3optsConst
i18n: i18n:
- Changed antman references to antperson - Changed antman references to antperson
plugin-bundle:
- Include plugin-buttons
- Include plugin-mirror
plugin-buttons:
- Is now included in plugin-bundle
plugin-mirror:
- Is now included in plugin-bundle
Fixed: Fixed:
charlie: charlie:

View file

@ -161,3 +161,7 @@ waistEase:
yokeDart: yokeDart:
title: Yoke dart title: Yoke dart
description: Whether to include a dart at the sides of the yoke to fit a rounder back. description: Whether to include a dart at the sides of the yoke to fit a rounder back.
yokeHeight:
title: Yoke height
description: Controls the height of the yoke

View file

@ -22,13 +22,14 @@ export default {
'yokeDart', 'yokeDart',
], ],
style: [ style: [
'splitYoke',
's3Collar',
's3Armhole',
'hemStyle', 'hemStyle',
'hemCurve', 'hemCurve',
'boxPleat', 'boxPleat',
'backDarts', 'backDarts',
'splitYoke',
'yokeHeight',
's3Collar',
's3Armhole',
{ {
closure: [ closure: [
'extraTopButton', 'extraTopButton',
@ -128,7 +129,7 @@ export default {
frontLeft: 'front', frontLeft: 'front',
buttonPlacket: 'front', buttonPlacket: 'front',
buttonholePlacket: 'front', buttonholePlacket: 'front',
yoke: 'backBase', yoke: 'back',
sleeveBase: 'front', sleeveBase: 'front',
sleeve: 'sleeveBase', sleeve: 'sleeveBase',
}, },
@ -219,6 +220,7 @@ export default {
lengthBonus: { pct: 25, min: -4, max: 60 }, lengthBonus: { pct: 25, min: -4, max: 60 },
shoulderEase: { pct: 2, min: 0, max: 15 }, shoulderEase: { pct: 2, min: 0, max: 15 },
shoulderSlopeReduction: { pct: 0, min: 0, max: 8 }, shoulderSlopeReduction: { pct: 0, min: 0, max: 8 },
yokeHeight: { pct: 55, min: 10, max: 100 },
// s3 is short for Shoulder Seam Shift // s3 is short for Shoulder Seam Shift
s3Collar: { pct: 0, min: -100, max: 100 }, s3Collar: { pct: 0, min: -100, max: 100 },
s3Armhole: { pct: 0, min: -100, max: 100 }, s3Armhole: { pct: 0, min: -100, max: 100 },

View file

@ -77,7 +77,27 @@ export default (part) => {
points.hipsCp2 = points.hips.shift(90, points.waist.dy(points.hips) / 4) points.hipsCp2 = points.hips.shift(90, points.waist.dy(points.hips) / 4)
// Cut off at yoke // Cut off at yoke
const neverAboveCbNeck = () => (points.cbNeck.dy(points.cbYoke) < 10) ? (points.cbYoke.y = points.cbNeck.y + 10) : null
if (options.yokeHeight === 1) {
points.cbYoke = new Point(0, points.armholePitch.y) points.cbYoke = new Point(0, points.armholePitch.y)
neverAboveCbNeck()
points.armholeYokeSplit = points.armholePitch.clone()
paths.backArmholeYoke = paths.backArmhole
}
else if (options.yokeHeight === 0) {
points.cbYoke = new Point(0, points.s3ArmholeSplit.y)
neverAboveCbNeck()
points.armholeYokeSplit = points.s3ArmholeSplit.clone()
paths.backArmholeBack = paths.backArmhole
} else {
points.cbYoke = new Point(0, points.s3ArmholeSplit.y + (points.s3ArmholeSplit.dy(points.armholePitch) * options.yokeHeight))
neverAboveCbNeck()
points.armholeYokeSplit = paths.backArmhole.intersectsY(points.cbYoke.y).pop()
const [back,yoke] = paths.backArmhole.split(points.armholeYokeSplit)
paths.backArmholeYoke = yoke.setRender(false)
paths.backArmholeBack = back.setRender(false)
}
// Box pleat // Box pleat
if (options.boxPleat) { if (options.boxPleat) {
@ -104,6 +124,10 @@ 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)
if (options.yokeHeight < 1 && options.yokeHeight > 0) paths.armhole = paths.armhole.join(paths.backArmholeBack)
else if (options.yokeHeight === 0) paths.armhole = paths.armhole.join(paths.backArmhole)
/*
paths.armhole.render = false paths.armhole.render = false
if (options.yokeDart > 0) { if (options.yokeDart > 0) {
points.tmp1 = points.armholePitch.shift( points.tmp1 = points.armholePitch.shift(
@ -130,7 +154,7 @@ export default (part) => {
store.get('backArmholeLength') - points.yokeDartEdge.dist(points.armholePitch) store.get('backArmholeLength') - points.yokeDartEdge.dist(points.armholePitch)
) )
} }
*/
// Never make the hips more narrow than the waist because that looks silly // Never make the hips more narrow than the waist because that looks silly
//if (points.hem.x < points.waist.x) { //if (points.hem.x < points.waist.x) {
// points.hem.x = points.waist.x // points.hem.x = points.waist.x

View file

@ -14,17 +14,15 @@ export default (part) => {
} = part.shorthand() } = part.shorthand()
for (let id in paths) { for (let id in paths) {
if (['backCollar', 'backArmhole'].indexOf(id) === -1) delete part.paths[id] if (['backCollar', 'backArmhole', 'backArmholeYoke'].indexOf(id) === -1) delete part.paths[id]
} }
// Cut off at yoke
points.cbYoke = new Point(0, points.armholePitch.y)
// Paths // Paths
paths.saBase = new Path() paths.saBase = new Path()
.move(points.cbYoke) .move(points.cbYoke)
.line(points.armholePitch) .line(points.armholeYokeSplit)
.join(paths.backArmhole) if (options.yokeHeight > 0) paths.saBase = paths.saBase.join(paths.backArmholeYoke)
paths.saBase = paths.saBase
.line(points.s3CollarSplit) .line(points.s3CollarSplit)
.join(paths.backCollar) .join(paths.backCollar)
if (options.splitYoke) paths.saBase = paths.saBase.line(points.cbYoke).close() if (options.splitYoke) paths.saBase = paths.saBase.line(points.cbYoke).close()