feat(aaron): Better handling of armholeDrop option
This commit is contained in:
parent
489afae1d0
commit
5eb9eaec07
3 changed files with 21 additions and 4 deletions
|
@ -53,7 +53,7 @@ export default {
|
||||||
shoulderSlopeReduction: 0,
|
shoulderSlopeReduction: 0,
|
||||||
|
|
||||||
// Percentages
|
// Percentages
|
||||||
armholeDrop: { pct: 10, min: 1, max: 75 },
|
armholeDrop: { pct: 10, min: 0, max: 75 },
|
||||||
backlineBend: { pct: 50, min: 25, max: 100 },
|
backlineBend: { pct: 50, min: 25, max: 100 },
|
||||||
chestEase: { pct: 8, min: 0, max: 20 },
|
chestEase: { pct: 8, min: 0, max: 20 },
|
||||||
hipsEase: { pct: 8, min: 0, max: 20 },
|
hipsEase: { pct: 8, min: 0, max: 20 },
|
||||||
|
|
|
@ -13,9 +13,13 @@ export default function (part) {
|
||||||
paperless,
|
paperless,
|
||||||
macro,
|
macro,
|
||||||
utils,
|
utils,
|
||||||
units
|
units,
|
||||||
|
measurements
|
||||||
} = part.shorthand()
|
} = part.shorthand()
|
||||||
|
|
||||||
|
// Lower back neck a bit
|
||||||
|
points.cbNeck.y = measurements.neckCircumference / 10
|
||||||
|
|
||||||
points.strapLeftCp2 = utils.beamsIntersect(
|
points.strapLeftCp2 = utils.beamsIntersect(
|
||||||
points.strapLeft,
|
points.strapLeft,
|
||||||
points.strapCenter.rotate(90, points.strapLeft),
|
points.strapCenter.rotate(90, points.strapLeft),
|
||||||
|
@ -37,7 +41,7 @@ export default function (part) {
|
||||||
.move(points.cbNeck)
|
.move(points.cbNeck)
|
||||||
.line(points.cbHem)
|
.line(points.cbHem)
|
||||||
.line(points.hem)
|
.line(points.hem)
|
||||||
.curve_(points.waist, points.armhole)
|
.curve_(points.hipsCp2, points.armhole)
|
||||||
.curve(points.armholeCp2, points.strapRightCp1, points.strapRight)
|
.curve(points.armholeCp2, points.strapRightCp1, points.strapRight)
|
||||||
.line(points.strapLeft)
|
.line(points.strapLeft)
|
||||||
.line(points.strapLeft)
|
.line(points.strapLeft)
|
||||||
|
|
|
@ -55,16 +55,29 @@ export default function (part) {
|
||||||
)
|
)
|
||||||
points.cfNeckCp1 = points.cfNeck.shiftFractionTowards(points.necklineCorner, options.necklineBend)
|
points.cfNeckCp1 = points.cfNeck.shiftFractionTowards(points.necklineCorner, options.necklineBend)
|
||||||
|
|
||||||
|
// This will come in handy
|
||||||
|
store.set('armholeY', points.armhole.y * (1 + options.armholeDrop))
|
||||||
|
|
||||||
// Hips
|
// Hips
|
||||||
points.hips.x =
|
points.hips.x =
|
||||||
((measurements.hipsCircumference + options.hipsEase * measurements.hipsCircumference) / 4) *
|
((measurements.hipsCircumference + options.hipsEase * measurements.hipsCircumference) / 4) *
|
||||||
(1 - options.stretchFactor)
|
(1 - options.stretchFactor)
|
||||||
points.waist.x = points.hips.x // Because stretch
|
points.waist.x = points.hips.x // Because stretch
|
||||||
|
|
||||||
|
points.hipsCp2 = new Point(
|
||||||
|
points.hips.x,
|
||||||
|
store.get('armholeY') + (points.hips.y - store.get('armholeY')) / 2
|
||||||
|
)
|
||||||
|
|
||||||
// Hem
|
// Hem
|
||||||
points.hem.x = points.hips.x
|
points.hem.x = points.hips.x
|
||||||
|
|
||||||
// Armhole
|
// Armhole
|
||||||
|
points.armhole = utils.beamIntersectsY(
|
||||||
|
points.armhole,
|
||||||
|
points.hips,
|
||||||
|
points.armhole.y * (1 + options.armholeDrop)
|
||||||
|
)
|
||||||
points.armholeCorner = utils.beamsIntersect(
|
points.armholeCorner = utils.beamsIntersect(
|
||||||
points.armhole,
|
points.armhole,
|
||||||
points.armhole.shift(180, 10),
|
points.armhole.shift(180, 10),
|
||||||
|
@ -79,7 +92,7 @@ export default function (part) {
|
||||||
.move(points.cfNeck)
|
.move(points.cfNeck)
|
||||||
.line(points.cfHem)
|
.line(points.cfHem)
|
||||||
.line(points.hem)
|
.line(points.hem)
|
||||||
.curve_(points.waist, points.armhole)
|
.curve_(points.hipsCp2, points.armhole)
|
||||||
.curve(points.armholeCp2, points.strapRightCp1, points.strapRight)
|
.curve(points.armholeCp2, points.strapRightCp1, points.strapRight)
|
||||||
.line(points.strapLeft)
|
.line(points.strapLeft)
|
||||||
.curve(points.strapLeftCp2, points.cfNeckCp1, points.cfNeck)
|
.curve(points.strapLeftCp2, points.cfNeckCp1, points.cfNeck)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue