1
0
Fork 0

chore(cathrin): Ported cathrin to new measurements. See #416

Also added anchor points for sampling.
This commit is contained in:
Joost De Cock 2020-06-07 12:19:31 +02:00
parent 5d3b213a1c
commit 2da92ddf81
10 changed files with 36 additions and 19 deletions

View file

@ -15,10 +15,10 @@ export default {
}, },
measurements: [ measurements: [
'underbust', 'underbust',
'naturalWaist', 'waistCircumference',
'hipsCircumference', 'hipsCircumference',
'naturalWaistToUnderbust', 'waistToUnderbust',
'naturalWaistToHip' 'waistToHips'
], ],
dependencies: { dependencies: {
panel1: 'panels', panel1: 'panels',

View file

@ -6,7 +6,7 @@ export default function (part) {
else store.set('gaps', [0.2, 0.35, 0.5, 0.65, 0.8]) else store.set('gaps', [0.2, 0.35, 0.5, 0.65, 0.8])
// Absolute values for some options // Absolute values for some options
store.set('waistReduction', measurements.naturalWaist * options.waistReduction) store.set('waistReduction', measurements.waistCircumference * options.waistReduction)
debug({ debug({
type: 'info', type: 'info',
label: '✅ Waist reduction', label: '✅ Waist reduction',
@ -18,7 +18,7 @@ export default function (part) {
label: '✅ Back opening', label: '✅ Back opening',
msg: utils.units(store.get('backOpening')) msg: utils.units(store.get('backOpening'))
}) })
let len = measurements.naturalWaistToUnderbust + measurements.naturalWaistToHip let len = measurements.waistToUnderbust + measurements.waistToHips
for (let option of ['backRise', 'backDrop', 'frontRise', 'frontDrop', 'hipRise']) for (let option of ['backRise', 'backDrop', 'frontRise', 'frontDrop', 'hipRise'])
store.set(option, len * options[option]) store.set(option, len * options[option])
store.set('length', len) store.set('length', len)
@ -33,7 +33,10 @@ export default function (part) {
store.set('width', 0.5 * (measurements.hipsCircumference - store.get('backOpening'))) store.set('width', 0.5 * (measurements.hipsCircumference - store.get('backOpening')))
store.set( store.set(
'waistIntake', 'waistIntake',
0.5 * (measurements.hipsCircumference - measurements.naturalWaist + store.get('waistReduction')) 0.5 *
(measurements.hipsCircumference -
measurements.waistCircumference +
store.get('waistReduction'))
) )
store.set('bustIntake', 0.5 * (measurements.hipsCircumference - measurements.underbust)) store.set('bustIntake', 0.5 * (measurements.hipsCircumference - measurements.underbust))
@ -45,7 +48,7 @@ export default function (part) {
points.underbustCB = new Point(wid, 0) points.underbustCB = new Point(wid, 0)
points.topSide = points.underbustCF.shiftFractionTowards(points.underbustCB, 0.5) points.topSide = points.underbustCF.shiftFractionTowards(points.underbustCB, 0.5)
points.bottomSide = points.hipsCF.shiftFractionTowards(points.hipsCB, 0.5) points.bottomSide = points.hipsCF.shiftFractionTowards(points.hipsCB, 0.5)
points.waistCF = points.underbustCF.shift(-90, measurements.naturalWaistToUnderbust) points.waistCF = points.underbustCF.shift(-90, measurements.waistToUnderbust)
points.waistCB = new Point(points.hipsCB.x, points.waistCF.y) points.waistCB = new Point(points.hipsCB.x, points.waistCF.y)
// frontRise // frontRise

View file

@ -3,6 +3,8 @@ import draftPanel1ab from './panel1ab'
export default function (part) { export default function (part) {
let { macro, sa, paths, points, options, complete, paperless } = part.shorthand() let { macro, sa, paths, points, options, complete, paperless } = part.shorthand()
points.anchor = points.topCF.clone()
delete paths.outline delete paths.outline
delete paths.panel2 delete paths.panel2
delete paths.panel3 delete paths.panel3

View file

@ -1,6 +1,8 @@
export default function(part) { export default function (part) {
let { macro, utils, sa, points, paths, Point, Path, complete, paperless } = part.shorthand() let { macro, utils, sa, points, paths, Point, Path, complete, paperless } = part.shorthand()
points.anchor = points.topCF.clone()
let top = new Path() let top = new Path()
.move(points.underbustGap1Left) .move(points.underbustGap1Left)
.curve(points.frontRiseStartCp2, points.topCFCp1, points.topCF) .curve(points.frontRiseStartCp2, points.topCFCp1, points.topCF)

View file

@ -1,6 +1,8 @@
export default function(part) { export default function (part) {
let { macro, sa, points, paths, Point, complete, paperless } = part.shorthand() let { macro, sa, points, paths, Point, complete, paperless } = part.shorthand()
points.anchor = points.underbustGap1Right.clone()
delete paths.outline delete paths.outline
delete paths.panel1 delete paths.panel1
delete paths.panel3 delete paths.panel3

View file

@ -1,6 +1,8 @@
export default function(part) { export default function (part) {
let { macro, sa, points, paths, Point, complete, paperless } = part.shorthand() let { macro, sa, points, paths, Point, complete, paperless } = part.shorthand()
points.anchor = points.underbustGap2Right.clone()
delete paths.outline delete paths.outline
delete paths.panel1 delete paths.panel1
delete paths.panel2 delete paths.panel2

View file

@ -1,6 +1,8 @@
export default function(part) { export default function (part) {
let { macro, sa, snippets, Snippet, points, paths, Point, complete, paperless } = part.shorthand() let { macro, sa, snippets, Snippet, points, paths, Point, complete, paperless } = part.shorthand()
points.anchor = points.underbustGap3Right.clone()
delete paths.outline delete paths.outline
delete paths.panel1 delete paths.panel1
delete paths.panel2 delete paths.panel2

View file

@ -1,6 +1,8 @@
export default function(part) { export default function (part) {
let { macro, sa, points, paths, Point, complete, paperless } = part.shorthand() let { macro, sa, points, paths, Point, complete, paperless } = part.shorthand()
points.anchor = points.underbustGap4Right.clone()
delete paths.outline delete paths.outline
delete paths.panel1 delete paths.panel1
delete paths.panel2 delete paths.panel2

View file

@ -1,6 +1,8 @@
export default function(part) { export default function (part) {
let { macro, sa, points, paths, Point, complete, paperless } = part.shorthand() let { macro, sa, points, paths, Point, complete, paperless } = part.shorthand()
points.anchor = points.backRise.clone()
delete paths.outline delete paths.outline
delete paths.panel1 delete paths.panel1
delete paths.panel2 delete paths.panel2

View file

@ -19,11 +19,11 @@ export default function (part) {
) )
points[`underbustGap${count}RightCp`] = points[`underbustGap${count}Right`].shift( points[`underbustGap${count}RightCp`] = points[`underbustGap${count}Right`].shift(
-90, -90,
measurements.naturalWaistToUnderbust * 0.15 measurements.waistToUnderbust * 0.15
) )
points[`underbustGap${count}LeftCp`] = points[`underbustGap${count}Left`].shift( points[`underbustGap${count}LeftCp`] = points[`underbustGap${count}Left`].shift(
-90, -90,
measurements.naturalWaistToUnderbust * 0.15 measurements.waistToUnderbust * 0.15
) )
// Waist // Waist
@ -38,19 +38,19 @@ export default function (part) {
) )
points[`waistGap${count}RightCp1`] = points[`waistGap${count}Right`].shift( points[`waistGap${count}RightCp1`] = points[`waistGap${count}Right`].shift(
90, 90,
measurements.naturalWaistToUnderbust * 0.2 measurements.waistToUnderbust * 0.2
) )
points[`waistGap${count}LeftCp2`] = points[`waistGap${count}Left`].shift( points[`waistGap${count}LeftCp2`] = points[`waistGap${count}Left`].shift(
90, 90,
measurements.naturalWaistToUnderbust * 0.2 measurements.waistToUnderbust * 0.2
) )
points[`waistGap${count}RightCp2`] = points[`waistGap${count}Right`].shift( points[`waistGap${count}RightCp2`] = points[`waistGap${count}Right`].shift(
-90, -90,
measurements.naturalWaistToHip * 0.2 measurements.waistToHips * 0.2
) )
points[`waistGap${count}LeftCp1`] = points[`waistGap${count}Left`].shift( points[`waistGap${count}LeftCp1`] = points[`waistGap${count}Left`].shift(
-90, -90,
measurements.naturalWaistToHip * 0.2 measurements.waistToHips * 0.2
) )
// Hips // Hips