1
0
Fork 0

feat(aaron): Better handling of armholeDrop option

This commit is contained in:
Joost De Cock 2020-05-24 16:21:26 +02:00
parent 489afae1d0
commit 5eb9eaec07
3 changed files with 21 additions and 4 deletions

View file

@ -53,7 +53,7 @@ export default {
shoulderSlopeReduction: 0,
// Percentages
armholeDrop: { pct: 10, min: 1, max: 75 },
armholeDrop: { pct: 10, min: 0, max: 75 },
backlineBend: { pct: 50, min: 25, max: 100 },
chestEase: { pct: 8, min: 0, max: 20 },
hipsEase: { pct: 8, min: 0, max: 20 },

View file

@ -13,9 +13,13 @@ export default function (part) {
paperless,
macro,
utils,
units
units,
measurements
} = part.shorthand()
// Lower back neck a bit
points.cbNeck.y = measurements.neckCircumference / 10
points.strapLeftCp2 = utils.beamsIntersect(
points.strapLeft,
points.strapCenter.rotate(90, points.strapLeft),
@ -37,7 +41,7 @@ export default function (part) {
.move(points.cbNeck)
.line(points.cbHem)
.line(points.hem)
.curve_(points.waist, points.armhole)
.curve_(points.hipsCp2, points.armhole)
.curve(points.armholeCp2, points.strapRightCp1, points.strapRight)
.line(points.strapLeft)
.line(points.strapLeft)

View file

@ -55,16 +55,29 @@ export default function (part) {
)
points.cfNeckCp1 = points.cfNeck.shiftFractionTowards(points.necklineCorner, options.necklineBend)
// This will come in handy
store.set('armholeY', points.armhole.y * (1 + options.armholeDrop))
// Hips
points.hips.x =
((measurements.hipsCircumference + options.hipsEase * measurements.hipsCircumference) / 4) *
(1 - options.stretchFactor)
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
points.hem.x = points.hips.x
// Armhole
points.armhole = utils.beamIntersectsY(
points.armhole,
points.hips,
points.armhole.y * (1 + options.armholeDrop)
)
points.armholeCorner = utils.beamsIntersect(
points.armhole,
points.armhole.shift(180, 10),
@ -79,7 +92,7 @@ export default function (part) {
.move(points.cfNeck)
.line(points.cfHem)
.line(points.hem)
.curve_(points.waist, points.armhole)
.curve_(points.hipsCp2, points.armhole)
.curve(points.armholeCp2, points.strapRightCp1, points.strapRight)
.line(points.strapLeft)
.curve(points.strapLeftCp2, points.cfNeckCp1, points.cfNeck)