chore(shin): Ported shin to new measurements. See #416
This commit is contained in:
parent
4104b03fc2
commit
6170b8cf40
3 changed files with 38 additions and 33 deletions
|
@ -1,24 +1,20 @@
|
|||
import { version } from "../package.json";
|
||||
import { version } from '../package.json'
|
||||
|
||||
export default {
|
||||
name: "shin",
|
||||
name: 'shin',
|
||||
version: version,
|
||||
design: "Joost De Cock",
|
||||
code: "Joost De Cock",
|
||||
department: "menswear",
|
||||
type: "pattern",
|
||||
design: 'Joost De Cock',
|
||||
code: 'Joost De Cock',
|
||||
department: 'menswear',
|
||||
type: 'pattern',
|
||||
difficulty: 2,
|
||||
tags: ["swimwear", "bottom"],
|
||||
tags: ['swimwear', 'bottom'],
|
||||
optionGroups: {
|
||||
fit: ["bulge", "backRise", "legReduction", "stretch"],
|
||||
style: ["lengthBonus", "rise"]
|
||||
fit: ['bulge', 'backRise', 'legReduction', 'stretch'],
|
||||
style: ['lengthBonus', 'rise']
|
||||
},
|
||||
measurements: [
|
||||
"hipsCircumference",
|
||||
"upperLegCircumference",
|
||||
"hipsToUpperLeg"
|
||||
],
|
||||
parts: ["back", "front", "waistband"],
|
||||
measurements: ['hipsCircumference', 'upperLegCircumference', 'waistToUpperLeg', 'waistToHips'],
|
||||
parts: ['back', 'front', 'waistband'],
|
||||
options: {
|
||||
// Constants
|
||||
frontFactor: 0.58,
|
||||
|
@ -37,4 +33,4 @@ export default {
|
|||
rise: { pct: 0, min: 0, max: 25 },
|
||||
backRise: { pct: 5, min: 0, max: 10 }
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
|
@ -27,17 +27,20 @@ export default function(part) {
|
|||
|
||||
points.hipSide = new Point(0, 0)
|
||||
points.hipCb = new Point(store.get('hipBack'), 0)
|
||||
points.legSide = points.hipSide.shift(-90 - options.angle, measurements.hipsToUpperLeg)
|
||||
points.legSide = points.hipSide.shift(
|
||||
-90 - options.angle,
|
||||
measurements.waistToUpperLeg - measurements.waistToHips
|
||||
)
|
||||
points.legSideCp = points.legSide.shift(options.angle * -1 + 7, store.get('legBack'))
|
||||
points.legInner = points.legSideCp.shift(options.angle * -1 - 90, store.get('gusset') / 2)
|
||||
points.legSideCp = points.legSideCp.shiftFractionTowards(points.legSide, 0.5)
|
||||
let tmp = new Path()
|
||||
.move(points.legInner)
|
||||
._curve(points.legSideCp, points.legSide)
|
||||
.shiftAlong(2)
|
||||
let tmp = new Path().move(points.legInner)._curve(points.legSideCp, points.legSide).shiftAlong(2)
|
||||
let gussetAngle = points.legInner.angle(tmp)
|
||||
points.crossSeam = points.legInner.shift(gussetAngle - 90, store.get('gusset'))
|
||||
points.seatCb = points.hipCb.shift(-86, measurements.hipsToUpperLeg * 0.62)
|
||||
points.seatCb = points.hipCb.shift(
|
||||
-86,
|
||||
(measurements.waistToUpperLeg - measurements.waistToHips) * 0.62
|
||||
)
|
||||
tmp = utils.beamsIntersect(
|
||||
points.crossSeam,
|
||||
points.crossSeam.shift(gussetAngle, 20),
|
||||
|
@ -60,7 +63,7 @@ export default function(part) {
|
|||
|
||||
// Lengthen the legs
|
||||
if (options.legBonus > 0) {
|
||||
let bonus = measurements.hipsToUpperLeg * options.legBonus
|
||||
let bonus = (measurements.waistToUpperLeg - measurements.waistToHips) * options.legBonus
|
||||
points.legSide = points.legSide.shift(-90, bonus)
|
||||
points.legSideCp = points.legSideCp.shift(-90, bonus)
|
||||
points.reducedLegInner = points.reducedLegInner.shift(-90, bonus)
|
||||
|
@ -68,14 +71,14 @@ export default function(part) {
|
|||
|
||||
// Rise
|
||||
if (options.rise > 0) {
|
||||
let rise = measurements.hipsToUpperLeg * options.rise
|
||||
let rise = (measurements.waistToUpperLeg - measurements.waistToHips) * options.rise
|
||||
points.hipSide = points.hipSide.shift(90, rise)
|
||||
points.hipCb = points.hipCb.shift(90, rise)
|
||||
}
|
||||
|
||||
// Back rise
|
||||
if (options.backRise > 0) {
|
||||
let backRise = measurements.hipsToUpperLeg * options.backRise
|
||||
let backRise = (measurements.waistToUpperLeg - measurements.waistToHips) * options.backRise
|
||||
points.hipCb = points.hipCb.shift(90, backRise)
|
||||
points.hipSide = points.hipSide.shift(90, backRise)
|
||||
points.hipCbCp = new Point(points.hipCb.x / 2, points.hipCb.y)
|
||||
|
|
|
@ -17,15 +17,21 @@ export default function(part) {
|
|||
} = part.shorthand()
|
||||
|
||||
let angle = -12
|
||||
let bulge = measurements.hipsToUpperLeg * options.bulge
|
||||
let bulge = (measurements.waistToUpperLeg - measurements.waistToHips) * options.bulge
|
||||
points.hipSide = new Point(0, 0)
|
||||
points.hipCb = new Point(store.get('hipFront'), 0)
|
||||
points.legSide = points.hipSide.shift(-90 - angle, measurements.hipsToUpperLeg)
|
||||
points.legSide = points.hipSide.shift(
|
||||
-90 - angle,
|
||||
measurements.waistToUpperLeg - measurements.waistToHips
|
||||
)
|
||||
points.legSideCp = points.legSide.shift(0, store.get('legFront'))
|
||||
points.legInner = points.legSideCp.shift(-100, store.get('gusset') / 2)
|
||||
points.crossSeam = points.legSideCp.shift(80, store.get('gusset') / 2)
|
||||
points.legSideCp = points.legSide.shiftFractionTowards(points.legSideCp, 0.4)
|
||||
points.seatCb = points.hipCb.shift(-90 - angle - 5, measurements.hipsToUpperLeg * 0.67)
|
||||
points.seatCb = points.hipCb.shift(
|
||||
-90 - angle - 5,
|
||||
(measurements.waistToUpperLeg - measurements.waistToHips) * 0.67
|
||||
)
|
||||
points._tmp2 = points.crossSeam.shift(angle, 20)
|
||||
points._tmp3 = utils.beamsIntersect(points.crossSeam, points._tmp2, points.hipCb, points.seatCb)
|
||||
points.seatCp = points.seatCb.shiftFractionTowards(points._tmp3, 0.7)
|
||||
|
@ -58,7 +64,7 @@ export default function(part) {
|
|||
|
||||
// Lengthen legs
|
||||
if (options.legBonus > 0) {
|
||||
let shift = measurements.hipsToUpperLeg * options.legBonus
|
||||
let shift = (measurements.waistToUpperLeg - measurements.waistToHips) * options.legBonus
|
||||
points.legSide = points.legSide.shift(-90, shift)
|
||||
points.legSideCp = points.legSideCp.shift(-90, shift)
|
||||
points.reducedLegInner = points.reducedLegInner(-90, shift)
|
||||
|
@ -66,14 +72,14 @@ export default function(part) {
|
|||
|
||||
// Rise
|
||||
if (options.rise > 0) {
|
||||
let shift = measurements.hipsToUpperLeg * options.rise
|
||||
let shift = (measurements.waistToUpperLeg - measurements.waistToHips) * options.rise
|
||||
points.hipSide = points.hipSide.shift(90, shift)
|
||||
points.hipCb = points.hipCb.shift(0, shift)
|
||||
}
|
||||
|
||||
// Back rise
|
||||
if (options.backRise > 0) {
|
||||
let shift = measurements.hipsToUpperLeg * options.backRise
|
||||
let shift = (measurements.waistToUpperLeg - measurements.waistToHips) * options.backRise
|
||||
points.hipSide = points.hipSide.shift(90, shift / 2)
|
||||
points.hipCbCp = new Point(points.hipCb.x / 2, points.hipCb.y)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue