1
0
Fork 0

Added keystone cuff and fixed paperless

This commit is contained in:
woutervdub 2021-02-20 13:59:20 -08:00
parent f4689a6f13
commit b305f2d019
10 changed files with 161 additions and 161 deletions

View file

@ -11,10 +11,10 @@ export default {
tags: ['pants'],
optionGroups: {
fit: ['fullness','waistReduction'],
style: ['waistbandBelowWaist','cuffStyle','cuffWidth'],
style: ['waistbandBelowWaist','cuffStyle','cuffWidth','ventLength'],
advanced: ['bandBelowKnee', 'kneeToBelow']
},
parts: ['frontpoints','back','front','waistband','legband','pocket','pocketfacing'],
parts: ['frontpoints','back','front','waistband','legband','legbandkeystone','pocket','pocketfacing'],
inject: {
front: 'frontpoints',
back: 'frontpoints',
@ -24,8 +24,9 @@ export default {
measurements: ['waist', 'hips', 'inseam', 'seat', 'waistToKnee', 'waistToHips', 'waistToFloor', 'knee'],
dependencies: {
back: 'front',
legband: 'front',
waistband: ['back', 'front']
legband: ['back','front'],
legbandkeystone: ['back','front'],
waistband: ['back','front']
},
hide: ['frontpoints'],
options: {
@ -42,12 +43,13 @@ export default {
pctKtoRup: 0.25,
pctKtoH: 0.70,
pctSeatAdjustment: 0.50,
kneeToBelow: { pct: 92, min: 85, max: 110 },
kneeToBelow: { pct: 94, min: 85, max: 110 },
ventLength: { pct: 70, min: 50, max: 110 },
fullness: { pct: 0, min: 0, max: 55 },
waistbandBelowWaist: { pct: 5, min: 0, max: 15 },
waistReduction: { pct: 1, min: -2, max: 10 },
cuffWidth: { pct: 0, min: -50, max: 150 },
cuffStyle: { dflt: 'traditional', list: [ 'traditional', 'elegant' ]},
cuffStyle: { dflt: 'traditional', list: [ 'traditional', 'elegant', 'keystone' ]},
bandBelowKnee: {pct: 25, min: 15, max: 50 },
}
}

View file

@ -262,6 +262,8 @@ export default function (part) {
.move(points.p10)
.curve(points.p10cpH,points.p11cpH, points.p11)
store.set( 'backLegSeam', paths.legSeam.length() );
paths.waistSeam = new Path()
.move(points.p4)
.line(points.p2)

View file

@ -20,6 +20,7 @@ export default function (part) {
let halfInch = store.get( 'halfInch' );
let ventLength = store.get( 'ventLength' );
let waist = store.get( 'waist' );
let keystone = (options.cuffStyle == 'keystone');
let flyWidth = 3.5
@ -56,6 +57,8 @@ export default function (part) {
.line(points.pZ)
.attr('class', 'fabric dashed')
store.set( 'frontWaistLength', paths.waistSeam.line( points.flyTop ).length() );
paths.crotchSeam = new Path()
.move(points.pZ)
.curve(points.pZcpR,points.pRcpZ, points.pR)
@ -81,20 +84,24 @@ export default function (part) {
.curve(points.pKcpH,points.pJcpH, points.pJ)
.setRender( false )
store.set( 'frontLegSeam', paths.legSeam.length() );
// Keystone original:
// The keystone design has the slit in the cuff to the front. I deviated from
// this for comfort and ease of construction preferences. The 'slit' is now
// part of the side seam.
// points.pSlitBottom = paths.legSeam.shiftAlong( paths.legSeam.length() - (halfInch *4));
// points.pSlitTop = points.pSlitBottom.shift( 90, halfInch *4 );
// store.set( 'slitDistance', paths.legSeam.length() - (halfInch *4) );
if( keystone ) {
points.pSlitBottom = paths.legSeam.shiftAlong( paths.legSeam.length() - (halfInch *4));
points.pSlitTop = points.pSlitBottom.shift( 90, halfInch *5 *options.ventLength );
store.set( 'slitDistance', paths.legSeam.length() - (halfInch *4) );
}
// paths.waistSeam = new Path()
// .move(points.pU)
// .line(points.pD)
// .line(points.pW)
store.set( 'frontWaistLength', paths.waistSeam.length() );
// store.set( 'frontWaistLength', paths.waistSeam.length() );
points.pocketWaist = paths.waistSeam.shiftAlong( waist /2 /4.5 );
points.pocketSide = paths.sideSeam.shiftAlong( paths.sideSeam.length() -(waist /2 /4.5 *3.5) );
@ -120,27 +127,28 @@ export default function (part) {
if( complete ) {
// Keystone original (see above):
// paths.slit = new Path()
// .move( points.pSlitBottom )
// .line( points.pSlitTop )
// .attr('class', 'fabric')
// .attr("data-text", "slit")
// .attr("data-text-class", "text-xs center");
// snippets.n1 = new Snippet( 'notch', points.pSlitBottom );
tempP = paths.sideSeam.shiftAlong( ventLength );
snippets.n1 = new Snippet( 'notch', points.pK );
snippets.n2 = new Snippet( 'notch', points.pJ );
snippets.n3 = new Snippet( 'notch', tempP );
snippets.n4 = new Snippet( 'notch', points.pocketWaist );
snippets.n5 = new Snippet( 'notch', points.pocketSide );
snippets.n3 = new Snippet( 'notch', points.pocketWaist );
snippets.n4 = new Snippet( 'notch', points.pocketSide );
paths.vent = paths.sideSeam.split( tempP )[0];
paths.vent.attr("data-text", "Vent").attr("data-text-class", "center").attr('class', 'fabric sa');
//snippets.n3 = new Snippet( 'notch', points.pB );
// snippets.n4 = new Snippet( 'notch', points.pL );
// Keystone original (see above):
if( keystone ) {
paths.slit = new Path()
.move( points.pSlitBottom )
.line( points.pSlitTop )
.attr('class', 'fabric')
.attr("data-text", "vent")
.attr("data-text-class", "text-xs center");
snippets.n6 = new Snippet( 'notch', points.pSlitBottom );
tempP = points.pSlitTop;
} else {
tempP = paths.sideSeam.shiftAlong( ventLength );
paths.vent = paths.sideSeam.split( tempP )[0]
.attr("data-text", "vent")
.attr("data-text-class", "text-xs center");
}
snippets.n5 = new Snippet( 'notch', tempP );
points.logo = points.pE.clone();
snippets.logo = new Snippet('logo', points.logo)
@ -179,16 +187,18 @@ export default function (part) {
y: points.pJ.y -15
})
// Keystone original (see above):
// macro('hd', {
// from: points.pSlitBottom,
// to: points.pJ,
// y: points.pJ.y -30
// })
// macro('vd', {
// from: points.pSlitTop,
// to: points.pSlitBottom,
// x: points.pSlitTop.x +15
// })
if( keystone ) {
macro('hd', {
from: points.pSlitBottom,
to: points.pJ,
y: points.pJ.y -30
})
macro('vd', {
from: points.pSlitTop,
to: points.pSlitBottom,
x: points.pSlitTop.x +15
})
}
macro('vd', {
from: points.pW,
to: points.pR,

View file

@ -24,7 +24,7 @@ export default function (part) {
store.set( 'waist', waist );
store.set( 'seat', seat );
store.set( 'halfInch', halfInch );
store.set( 'ventLength', waistToKnee *options.bandBelowKnee );
store.set( 'ventLength', waistToKnee *options.bandBelowKnee *options.ventLength );
let waistAdjustment = 0;
if( measurements.waist > measurements.seat ) {

View file

@ -5,6 +5,7 @@ import draftFrontpoints from './frontpoints'
import draftFront from './front'
import draftBack from './back'
import draftLegband from './legband'
import draftLegbandkeystone from './legbandkeystone'
import draftWaistband from './waistband'
import draftPocketfacing from './pocketfacing'
import draftPocket from './pocket'
@ -19,6 +20,7 @@ Pattern.prototype.draftFrontpoints = draftFrontpoints
Pattern.prototype.draftFront = draftFront
Pattern.prototype.draftBack = draftBack
Pattern.prototype.draftLegband = draftLegband
Pattern.prototype.draftLegbandkeystone = draftLegbandkeystone
Pattern.prototype.draftWaistband = draftWaistband
Pattern.prototype.draftPocketfacing = draftPocketfacing
Pattern.prototype.draftPocket = draftPocket

View file

@ -34,27 +34,36 @@ export default function (part) {
macro
} = part.shorthand()
if( options.cuffStyle == 'keystone') {
return( part );
}
const cc = 0.551915024494; // circle constant
let halfInch = store.get( 'halfInch' );
let backLeg = store.get( 'backLegSeam' );
let frontLeg = store.get( 'frontLegSeam' );
let cuffWidth = halfInch * 4 * (1+options.cuffWidth)
let flapLength = halfInch *3
let traditional = (options.cuffStyle == 'traditional');
let belowKnee = measurements.knee *(traditional ? options.kneeToBelow : 1)
let flapRatio = (flapLength) / (belowKnee/2)
// let belowKnee = measurements.knee *(traditional ? options.kneeToBelow : 1)
backLeg = backLeg *(traditional ? options.kneeToBelow : 1)
frontLeg = frontLeg *(traditional ? options.kneeToBelow : 1)
let flapRatio = (flapLength) / (backLeg)
console.log( 'knee: ' +measurements.knee )
console.log( 'belowKnee: ' +belowKnee )
//console.log( 'belowKnee: ' +belowKnee )
let angle = findR( halfInch /4 *5, belowKnee /2)
let angle = findR( halfInch /4 *5, backLeg /*belowKnee /2*/)
let angleR = angle /(180 / Math.PI)
let radius = ( belowKnee /2) / angleR
let radius = ( backLeg /*belowKnee /2*/ ) / angleR
console.log('angle: ' +angle );
console.log('radius: ' +radius );
points.pA = new Point( 0, 0 );
points.pB = points.pA.shift( 270, belowKnee /2 );
points.pB = points.pA.shift( 270, frontLeg /* belowKnee /2 */ );
points.pE = points.pB.shift( 0, cuffWidth );
points.pF = points.pA.shift( 0, cuffWidth );
@ -72,13 +81,13 @@ export default function (part) {
points.pFoutcpF = points.pFout.shift( 270 +(angle *flapRatio), (radius +cuffWidth) *cc /2 *flapRatio);
points.pFcpFout = points.pF.shift( 90, (radius +cuffWidth) *cc /2 *flapRatio);
} else {
points.pC = points.pB.shift( 270, belowKnee /2 );
points.pC = points.pB.shift( 270, backLeg );
points.pBcpC = points.pB.shift( 270, 10 );
points.pCcpB = points.pC.shift( 90, 10 );
points.pD = points.pC.shift( 0, cuffWidth )
points.pDcpE = points.pD.shift( 90, 10 );
points.pEcpD = points.pE.shift( 270, 10 );
points.pAout = points.pA.shift( 90, belowKnee /2 *flapRatio );
points.pAout = points.pA.shift( 90, backLeg *flapRatio );
points.pAcpAout = points.pA.shift( 90, 1);
points.pAoutcpA = points.pAout.shift( 270, 1 );
points.pFout = points.pAout.shift( 0, cuffWidth )
@ -110,7 +119,7 @@ export default function (part) {
points.buttonHole = points.pAout.shiftFractionTowards( points.pFout, .50 );
points.button = points.pC
.shiftFractionTowards( points.pD, .50 )
.shift( points.pC.angle( points.pD ) +90, belowKnee /2 *flapRatio )
.shift( points.pC.angle( points.pD ) +90, backLeg *flapRatio )
snippets.bh = new Snippet( 'buttonhole', points.buttonHole );
snippets.b = new Snippet( 'button', points.button );
@ -144,11 +153,13 @@ export default function (part) {
to: points.pF,
y: points.pA.y
})
macro('hd', {
from: points.pB,
to: points.pC,
y: points.pB.y
})
if( traditional ) {
macro('hd', {
from: points.pB,
to: points.pC,
y: points.pB.y
})
}
macro('ld', {
from: points.pD,
to: points.pC,
@ -167,7 +178,7 @@ export default function (part) {
macro('vd', {
from: points.pC,
to: points.pB,
x: points.pC.x
x: points.pC.x - (traditional ? 0 : sa + 15)
})
}

View file

@ -15,8 +15,12 @@ export default function (part) {
macro
} = part.shorthand()
if( options.cuffStyle != 'keystone') {
return( part );
}
let halfInch = store.get( 'halfInch' );
let slitDistance = 5//store.get( 'slitDistance' );
let slitDistance = store.get( 'slitDistance' );
points.pA = new Point( 0, 0 );
points.pD = points.pA.shift( 270, halfInch *8 );

View file

@ -1,8 +1,5 @@
export default function (part) {
let {
options,
measurements,
Point,
Path,
points,
paths,
@ -15,12 +12,7 @@ export default function (part) {
macro
} = part.shorthand()
const cc = 0.551915024494; // circle constant
let halfInch = store.get( 'halfInch' );
let waist = store.get( 'waist' );
let tempP;
paths.waistSeam = paths.waistSeam.split( points.pocketFacingTL )[0]
.setRender( false )
@ -28,12 +20,6 @@ export default function (part) {
paths.sideSeam = paths.sideSeam.split( points.pocketFacingBR )[1]
.setRender( false )
console.log('=============');
paths.sideSeam.ops.forEach(op => {
console.log( op );
});
console.log('=============');
points.brCPtl = points.pocketFacingBR.shift( points.pocketFacingBR.angle( points.pocketSide ) +90, halfInch *3 )
points.tlCPbr = points.pocketFacingTL.shift( points.pocketFacingTL.angle( points.pocketWaist ) -90, halfInch *6 )
@ -67,14 +53,11 @@ export default function (part) {
.line( points.mpocketWaist )
.line( points.mpocketSide )
.join( paths.pocketBottom )
//.join( paths.facingInside )
.join( paths.sideSeam )
.close()
.setRender( true )
.attr('class', 'fabric')
if( complete ) {
snippets.n1 = new Snippet( 'notch', points.pocketWaist );
snippets.n2 = new Snippet( 'notch', points.pocketSide );
@ -101,49 +84,64 @@ export default function (part) {
// Paperless?
if (paperless) {
macro('hd', {
from: points.pW,
to: points.pU,
y: points.pU.y +15
from: points.mpocketFacingBR,
to: points.mpocketWaist,
y: points.pU.y -sa -15
})
macro('hd', {
from: points.pAextra,
to: points.pR
from: points.mpocketWaist,
to: points.pocketTL,
y: points.pU.y -sa -15
})
macro('hd', {
from: points.pK,
to: points.pJ,
y: points.pJ.y -15
from: points.pocketTL,
to: points.pocketWaist,
y: points.pU.y -sa -15
})
// Keystone original (see above):
// macro('hd', {
// from: points.pSlitBottom,
// to: points.pJ,
// y: points.pJ.y -30
// })
// macro('vd', {
// from: points.pSlitTop,
// to: points.pSlitBottom,
// x: points.pSlitTop.x +15
// })
macro('vd', {
from: points.pW,
to: points.pR,
x: points.pR.x
})
macro('vd', {
from: points.pR,
to: points.pK,
x: points.pR.x
})
macro('vd', {
from: points.pW,
to: points.pZ,
x: points.pW.x +15
})
macro('vd', {
from: points.pJ,
macro('hd', {
from: points.pocketWaist,
to: points.pU,
x: points.pU.x -15
y: points.pU.y -sa -15
})
macro('hd', {
from: points.pU,
to: points.pocketFacingBR,
y: points.pU.y -sa -15
})
macro('hd', {
from: points.pocketWaist,
to: points.pocketFacingTL,
y: points.pU.y -sa -15
})
macro('vd', {
from: points.pU,
to: points.pocketSide,
x: points.pocketSide.x +sa +15
})
macro('vd', {
from: points.pocketTL,
to: points.pocketBL,
x: points.pocketTL.x +15
})
macro('vd', {
from: points.pocketSide,
to: points.mpocketWaist,
x: points.pocketSide.x +sa +15
})
macro('vd', {
from: points.pocketSide,
to: points.pocketFacingBR,
x: points.pocketSide.x +sa +15
})
macro('vd', {
from: points.mpocketWaist,
to: points.mpocketSide,
x: points.mpocketSide.x -sa -15
})
macro('vd', {
from: points.mpocketSide,
to: points.mpocketFacingBR,
x: points.mpocketSide.x -sa -15
})
}

View file

@ -1,8 +1,5 @@
export default function (part) {
let {
options,
measurements,
Point,
Path,
points,
paths,
@ -15,20 +12,17 @@ export default function (part) {
macro
} = part.shorthand()
const cc = 0.551915024494; // circle constant
let halfInch = store.get( 'halfInch' );
let waist = store.get( 'waist' );
let tempP;
paths.waistSeam = paths.waistSeam.split( points.pocketFacingTL )[0]
.setRender( false )
// Adding sa to this point so it allows for the pocket seam to be finished without the facing being included
points.pocketFacingBR = paths.sideSeam.shiftAlong( paths.sideSeam.length() -(waist /2 /4.5 *3.5) -(halfInch *3) +sa);
paths.sideSeam = paths.sideSeam.split( points.pocketFacingBR )[1]
.setRender( false )
points.brCPtl = points.pocketFacingBR.shift( points.pocketFacingBR.angle( points.pocketSide ) +90, halfInch *3 )
points.tlCPbr = points.pocketFacingTL.shift( points.pocketFacingTL.angle( points.pocketWaist ) -90, halfInch *6 )
@ -44,8 +38,6 @@ export default function (part) {
.setRender( true )
.attr('class', 'fabric')
if( complete ) {
snippets.n1 = new Snippet( 'notch', points.pocketWaist );
snippets.n2 = new Snippet( 'notch', points.pocketSide );
@ -58,9 +50,9 @@ export default function (part) {
at: points.title,
title: 'PocketFacing'
})
// points.__titleNr.attr('data-text-class', 'center')
// points.__titleName.attr('data-text-class', 'center')
// points.__titlePattern.attr('data-text-class', 'center')
// points.__titleNr.attr('data-text-class', 'center')
// points.__titleName.attr('data-text-class', 'center')
// points.__titlePattern.attr('data-text-class', 'center')
if( sa ) {
paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
@ -70,49 +62,29 @@ export default function (part) {
// Paperless?
if (paperless) {
macro('hd', {
from: points.pW,
to: points.pU,
y: points.pU.y +15
from: points.pU,
to: points.pocketSide,
y: points.pU.y -sa -15
})
macro('hd', {
from: points.pAextra,
to: points.pR
from: points.pU,
to: points.pocketWaist,
y: points.pU.y -sa -15
})
macro('hd', {
from: points.pK,
to: points.pJ,
y: points.pJ.y -15
})
// Keystone original (see above):
// macro('hd', {
// from: points.pSlitBottom,
// to: points.pJ,
// y: points.pJ.y -30
// })
// macro('vd', {
// from: points.pSlitTop,
// to: points.pSlitBottom,
// x: points.pSlitTop.x +15
// })
macro('vd', {
from: points.pW,
to: points.pR,
x: points.pR.x
from: points.pocketWaist,
to: points.pocketFacingTL,
y: points.pU.y -sa -15
})
macro('vd', {
from: points.pR,
to: points.pK,
x: points.pR.x
from: points.pU,
to: points.pocketSide,
x: points.pocketSide.x +sa +15
})
macro('vd', {
from: points.pW,
to: points.pZ,
x: points.pW.x +15
})
macro('vd', {
from: points.pJ,
to: points.pU,
x: points.pU.x -15
from: points.pocketSide,
to: points.pocketFacingBR,
x: points.pocketSide.x +sa +15
})
}

View file

@ -73,7 +73,6 @@ export default function (part) {
.join( paths.seam.offset(sa) )
.line( points.pB )
.attr('class', 'fabric sa')
}
}