Merge branch 'Fix-Waralee' of github.com:woutervdub/freesewing into wouter-waralee-fixes
This commit is contained in:
commit
cf3e1f5e0b
16 changed files with 918 additions and 367 deletions
|
@ -1,14 +1,5 @@
|
|||
import { backPocketDepth, backPocketSize, backPocketVerticalOffset } from './options.mjs'
|
||||
import { pantsProto } from './pantsproto.mjs'
|
||||
|
||||
/*
|
||||
* We don't move this draft method under the part object
|
||||
* because doing so changes the indentation which causes
|
||||
* us to lose all history of changes to this method.
|
||||
*
|
||||
* So to maintain the history of contributions over the
|
||||
* years, keeps this method here, and resist the urge to
|
||||
* move it into the named export at the bottom of this file.
|
||||
*/
|
||||
function waraleeBackPocket(part) {
|
||||
const {
|
||||
options,
|
||||
|
@ -22,25 +13,30 @@ function waraleeBackPocket(part) {
|
|||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
sa,
|
||||
} = part.shorthand()
|
||||
|
||||
const pocketDepth = options.backPocketDepth
|
||||
if (false == options.backPocket) {
|
||||
return part
|
||||
}
|
||||
|
||||
let pocketDepth = options.backPocketDepth
|
||||
|
||||
points.topLeft = new Point(0, 0)
|
||||
points.bottomLeft = points.topLeft.shift(
|
||||
270,
|
||||
(pocketDepth + 30) * 2 +
|
||||
options.backPocketVerticalOffset * (measurements.crotchDepth - measurements.waistToHips)
|
||||
pocketDepth /*+ 30*/ * 2 +
|
||||
options.backPocketVerticalOffset * measurements.crotchDepth /*- measurements.waistToHips*/
|
||||
)
|
||||
|
||||
points.topRight = points.topLeft.shift(
|
||||
0,
|
||||
options.backPocketSize * (measurements.crotchDepth - measurements.waistToHips) + 24
|
||||
options.backPocketSize * measurements.crotchDepth /*- measurements.waistToHips*/ /*+ 24*/
|
||||
)
|
||||
points.bottomRight = points.topRight.shift(
|
||||
270,
|
||||
(pocketDepth + 30) * 2 +
|
||||
options.backPocketVerticalOffset * (measurements.crotchDepth - measurements.waistToHips)
|
||||
pocketDepth /*+ 30*/ * 2 +
|
||||
options.backPocketVerticalOffset * measurements.crotchDepth /*- measurements.waistToHips*/
|
||||
)
|
||||
|
||||
paths.seam = new Path()
|
||||
|
@ -67,6 +63,8 @@ function waraleeBackPocket(part) {
|
|||
.shift(-90, 25)
|
||||
.attr('data-text', 'Waralee')
|
||||
.attr('data-text-class', 'center')
|
||||
|
||||
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
||||
}
|
||||
|
||||
// Paperless?
|
||||
|
@ -88,11 +86,6 @@ function waraleeBackPocket(part) {
|
|||
|
||||
export const backPocket = {
|
||||
name: 'waralee.backPocket',
|
||||
measurements: ['crotchDepth', 'waistToHips'],
|
||||
options: {
|
||||
backPocketDepth,
|
||||
backPocketSize,
|
||||
backPocketVerticalOffset,
|
||||
},
|
||||
after: pantsProto,
|
||||
draft: waraleeBackPocket,
|
||||
}
|
||||
|
|
|
@ -1,67 +1,47 @@
|
|||
import { CreateCrotchPoints } from './util.mjs'
|
||||
import { waistRaise } from './options.mjs'
|
||||
import { pantsProto } from './pantsproto.mjs'
|
||||
|
||||
/*
|
||||
* We don't move this draft method under the part object
|
||||
* because doing so changes the indentation which causes
|
||||
* us to lose all history of changes to this method.
|
||||
*
|
||||
* So to maintain the history of contributions over the
|
||||
* years, keeps this method here, and resist the urge to
|
||||
* move it into the named export at the bottom of this file.
|
||||
*/
|
||||
function waraleeCutout(part) {
|
||||
const {
|
||||
options,
|
||||
measurements,
|
||||
Point,
|
||||
Path,
|
||||
points,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
sa,
|
||||
paperless,
|
||||
macro,
|
||||
} = part.shorthand()
|
||||
const { options, Path, points, paths, Snippet, snippets, complete, sa, paperless, macro } =
|
||||
part.shorthand()
|
||||
|
||||
const seatDepth = (measurements.crotchDepth - measurements.waistToHips) * (1 + options.waistRaise)
|
||||
|
||||
points.mWaist = new Point(0, 0)
|
||||
points.mHip = points.mWaist.shift(270, seatDepth)
|
||||
|
||||
CreateCrotchPoints(part)
|
||||
|
||||
points.mWaist1 = new Point(points.mWaist.x, points.fWaistSide.y)
|
||||
points.mWaist2 = new Point(points.mWaist.x, points.bWaistSide.y)
|
||||
let separateWaistband = options.separateWaistband
|
||||
if ('waistband' == options.frontPocketStyle) {
|
||||
separateWaistband = true
|
||||
}
|
||||
|
||||
paths.seam = new Path()
|
||||
.move(points.mWaist1)
|
||||
.line(points.fWaistSide)
|
||||
.curve(points.fWaistCrotchCP, points.fHipCrotchCP, points.mHip)
|
||||
.curve(points.bHipCrotchCP, points.bWaistCrotchCP, points.bWaistSide)
|
||||
.line(points.mWaist2)
|
||||
.line(points.mWaist1)
|
||||
.line(separateWaistband ? points.bWaistSideSeam : points.bWaistSide)
|
||||
.join(paths.backTopCutOut)
|
||||
.join(paths.backBottomCutOut)
|
||||
.join(paths.frontBottomCutOut)
|
||||
.join(paths.frontTopCutOut)
|
||||
.close()
|
||||
.attr('class', 'fabric')
|
||||
|
||||
paths.cutout.setRender(false)
|
||||
|
||||
// Complete?
|
||||
if (complete) {
|
||||
points.logo = points.mWaist.shift(270, 75)
|
||||
snippets.logo = new Snippet('logo', points.logo)
|
||||
points.title = points.logo.shift(-90, 55)
|
||||
points.title = points.mWaist.shift(270, 75)
|
||||
macro('title', {
|
||||
nr: 2,
|
||||
at: points.title,
|
||||
title: 'cutout',
|
||||
title: 'cutOut',
|
||||
})
|
||||
|
||||
points.logo = points.title.shift(270, 75)
|
||||
|
||||
snippets.logo = new Snippet('logo', points.logo)
|
||||
|
||||
if (sa) {
|
||||
paths.seamAlternate = new Path()
|
||||
.move(points.bWaistSide)
|
||||
.curve(points.bWaistCrotchCP, points.bHipCrotchCP, points.mHip)
|
||||
.curve(points.fHipCrotchCP, points.fWaistCrotchCP, points.fWaistSide)
|
||||
.move(separateWaistband ? points.bWaistSideSeam : points.bWaistSide)
|
||||
.join(paths.backTopCutOut)
|
||||
.join(paths.backBottomCutOut)
|
||||
.join(paths.frontBottomCutOut)
|
||||
.join(paths.frontTopCutOut)
|
||||
|
||||
paths.sa = paths.seamAlternate.offset(sa).attr('class', 'fabric sa')
|
||||
}
|
||||
|
@ -72,12 +52,12 @@ function waraleeCutout(part) {
|
|||
macro('hd', {
|
||||
from: points.fWaistSide,
|
||||
to: points.mWaist,
|
||||
y: points.mWaist.y,
|
||||
y: (separateWaistband ? points.fWaistSideCp2 : points.mWaist).y,
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.mWaist,
|
||||
to: points.bWaistSide,
|
||||
y: points.mWaist.y,
|
||||
y: (separateWaistband ? points.fWaistSideCp2 : points.mWaist).y,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.mWaist1,
|
||||
|
@ -90,12 +70,13 @@ function waraleeCutout(part) {
|
|||
x: points.mWaist.x + 15,
|
||||
})
|
||||
}
|
||||
part.render = options.showMini
|
||||
|
||||
return part
|
||||
}
|
||||
|
||||
export const cutout = {
|
||||
name: 'waralee.cutout',
|
||||
measurements: ['crotchDepth', 'waistToHips'],
|
||||
from: pantsProto,
|
||||
draft: waraleeCutout,
|
||||
}
|
||||
|
|
|
@ -1,14 +1,7 @@
|
|||
/*
|
||||
* We don't move this draft method under the part object
|
||||
* because doing so changes the indentation which causes
|
||||
* us to lose all history of changes to this method.
|
||||
*
|
||||
* So to maintain the history of contributions over the
|
||||
* years, keeps this method here, and resist the urge to
|
||||
* move it into the named export at the bottom of this file.
|
||||
*/
|
||||
import { pantsProto } from './pantsproto.mjs'
|
||||
|
||||
function waraleeFacings(part) {
|
||||
let {
|
||||
const {
|
||||
options,
|
||||
measurements,
|
||||
Point,
|
||||
|
@ -20,20 +13,21 @@ function waraleeFacings(part) {
|
|||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
sa,
|
||||
} = part.shorthand()
|
||||
|
||||
let frontPocketSize =
|
||||
options.frontPocketSize * (measurements.crotchDepth - measurements.waistToHips)
|
||||
options.frontPocketSize * measurements.crotchDepth /*- measurements.waistToHips*/
|
||||
let backPocketSize =
|
||||
options.backPocketSize * (measurements.crotchDepth - measurements.waistToHips)
|
||||
options.backPocketSize * measurements.crotchDepth /*- measurements.waistToHips*/
|
||||
|
||||
points.frontTL = new Point(0, 0)
|
||||
points.frontTR = points.frontTL.shift(0, frontPocketSize + 24)
|
||||
points.frontTR = points.frontTL.shift(0, frontPocketSize + sa + sa)
|
||||
points.frontBL = points.frontTL.shift(270, frontPocketSize / 2)
|
||||
points.frontBR = points.frontTR.shift(270, frontPocketSize / 2)
|
||||
|
||||
points.backTL = points.frontBL.shift(270, 50)
|
||||
points.backTR = points.backTL.shift(0, backPocketSize + 24)
|
||||
points.backTR = points.backTL.shift(0, backPocketSize + sa + sa)
|
||||
points.backBL = points.backTL.shift(270, backPocketSize / 2)
|
||||
points.backBR = points.backTR.shift(270, backPocketSize / 2)
|
||||
|
||||
|
@ -45,6 +39,8 @@ function waraleeFacings(part) {
|
|||
.line(points.frontTL)
|
||||
.close()
|
||||
.attr('class', 'fabric')
|
||||
.setRender(options.frontPocket && 'welt' == options.frontPocketStyle)
|
||||
|
||||
paths.backSeam = new Path()
|
||||
.move(points.backTL)
|
||||
.line(points.backBL)
|
||||
|
@ -53,60 +49,70 @@ function waraleeFacings(part) {
|
|||
.line(points.backTL)
|
||||
.close()
|
||||
.attr('class', 'fabric')
|
||||
.setRender(options.backPocket)
|
||||
|
||||
// Complete?
|
||||
if (complete) {
|
||||
points.frontTitle = points.frontTL.shift(270, 50).shift(0, 50)
|
||||
macro('title', {
|
||||
nr: 5,
|
||||
at: points.frontTitle.shift(0, 30),
|
||||
title: 'frontFacing',
|
||||
prefix: 'front',
|
||||
})
|
||||
points.frontLogo = points.frontTitle.shift(270, 0)
|
||||
snippets.frontLogo = new Snippet('logo', points.frontLogo).attr('data-scale', 0.4)
|
||||
points.frontText = points.frontLogo
|
||||
.shift(-90, 25)
|
||||
.attr('data-text', 'Waralee')
|
||||
.attr('data-text-class', 'center')
|
||||
if (options.frontPocket && 'welt' == options.frontPocketStyle) {
|
||||
points.frontTitle = points.frontTL.shift(270, 30).shift(0, 40)
|
||||
macro('title', {
|
||||
nr: 5,
|
||||
at: points.frontTitle.shift(0, 30),
|
||||
title: 'frontFacing',
|
||||
prefix: 'front',
|
||||
scale: 0.6,
|
||||
})
|
||||
|
||||
points.backTitle = points.backTL.shift(270, 50).shift(0, 50)
|
||||
macro('title', {
|
||||
nr: 6,
|
||||
at: points.backTitle.shift(0, 30),
|
||||
title: 'backFacing',
|
||||
prefix: 'back',
|
||||
})
|
||||
points.backLogo = points.backTitle.shift(270, 0)
|
||||
snippets.backLogo = new Snippet('logo', points.backLogo).attr('data-scale', 0.4)
|
||||
points.backText = points.backLogo
|
||||
.shift(-90, 25)
|
||||
.attr('data-text', 'Waralee')
|
||||
.attr('data-text-class', 'center')
|
||||
points.frontLogo = points.frontTitle.shift(270, 0)
|
||||
snippets.frontLogo = new Snippet('logo', points.frontLogo).attr('data-scale', 0.3)
|
||||
points.frontText = points.frontLogo
|
||||
.shift(-90, 15)
|
||||
.attr('data-text', 'Waralee')
|
||||
.attr('data-text-class', 'center')
|
||||
}
|
||||
if (options.backPocket) {
|
||||
points.backTitle = points.backTL.shift(270, 30).shift(0, 40)
|
||||
macro('title', {
|
||||
nr: 6,
|
||||
at: points.backTitle.shift(0, 30),
|
||||
title: 'backFacing',
|
||||
prefix: 'back',
|
||||
scale: 0.6,
|
||||
})
|
||||
points.backLogo = points.backTitle.shift(270, 0)
|
||||
snippets.backLogo = new Snippet('logo', points.backLogo).attr('data-scale', 0.3)
|
||||
points.backText = points.backLogo
|
||||
.shift(-90, 15)
|
||||
.attr('data-text', 'Waralee')
|
||||
.attr('data-text-class', 'center')
|
||||
}
|
||||
}
|
||||
|
||||
// Paperless?
|
||||
if (paperless) {
|
||||
macro('hd', {
|
||||
from: points.frontTL,
|
||||
to: points.frontTR,
|
||||
y: points.frontTL.y + 15,
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.backTL,
|
||||
to: points.backTR,
|
||||
y: points.backTL.y + 15,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.frontTL,
|
||||
to: points.frontBL,
|
||||
x: points.frontTL.x + 15,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.backTL,
|
||||
to: points.backBL,
|
||||
x: points.backTL.x + 15,
|
||||
})
|
||||
if (options.frontPocket && 'welt' == options.frontPocketStyle) {
|
||||
macro('hd', {
|
||||
from: points.frontTL,
|
||||
to: points.frontTR,
|
||||
y: points.frontTL.y + 15,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.frontTL,
|
||||
to: points.frontBL,
|
||||
x: points.frontTL.x + 15,
|
||||
})
|
||||
}
|
||||
if (options.backPocket) {
|
||||
macro('hd', {
|
||||
from: points.backTL,
|
||||
to: points.backTR,
|
||||
y: points.backTL.y + 15,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.backTL,
|
||||
to: points.backBL,
|
||||
x: points.backTL.x + 15,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return part
|
||||
|
@ -114,6 +120,6 @@ function waraleeFacings(part) {
|
|||
|
||||
export const facings = {
|
||||
name: 'waralee.facings',
|
||||
measurements: ['crotchDepth', 'waistToHips'],
|
||||
after: pantsProto,
|
||||
draft: waraleeFacings,
|
||||
}
|
||||
|
|
|
@ -6,14 +6,38 @@ import { pocket } from './pocket.mjs'
|
|||
import { backPocket } from './backpocket.mjs'
|
||||
import { facings } from './facings.mjs'
|
||||
import { mini } from './mini.mjs'
|
||||
import { waistbandFront, waistbandBack, strapFront, strapBack } from './waistband.mjs'
|
||||
// Re-export skeleton parts so peope can re-use them
|
||||
import { pantsProto } from './pantsproto.mjs'
|
||||
|
||||
// Setup our new design
|
||||
const Waralee = new Design({
|
||||
data,
|
||||
parts: [pants, cutout, pocket, backPocket, facings, mini],
|
||||
parts: [
|
||||
pants,
|
||||
cutout,
|
||||
pocket,
|
||||
backPocket,
|
||||
facings,
|
||||
mini,
|
||||
waistbandFront,
|
||||
waistbandBack,
|
||||
strapFront,
|
||||
strapBack,
|
||||
],
|
||||
})
|
||||
|
||||
// Named exports
|
||||
export { pants, cutout, pocket, backPocket, facings, pantsProto, Waralee }
|
||||
export {
|
||||
pants,
|
||||
cutout,
|
||||
pocket,
|
||||
backPocket,
|
||||
facings,
|
||||
mini,
|
||||
waistbandFront,
|
||||
waistbandBack,
|
||||
strapFront,
|
||||
strapBack,
|
||||
Waralee,
|
||||
}
|
||||
|
|
|
@ -1,22 +1,17 @@
|
|||
import { pantsProto } from './pantsproto.mjs'
|
||||
|
||||
/*
|
||||
* We don't move this draft method under the part object
|
||||
* because doing so changes the indentation which causes
|
||||
* us to lose all history of changes to this method.
|
||||
*
|
||||
* So to maintain the history of contributions over the
|
||||
* years, keeps this method here, and resist the urge to
|
||||
* move it into the named export at the bottom of this file.
|
||||
*/
|
||||
// This is an idea to keep the printing to a minimum. The whole patterns is rather large.
|
||||
// To keep you from printing it completely, you could print this part in paperless mode
|
||||
// and only have a single sheet with all the dimensions on it.
|
||||
function waraleeMini(part) {
|
||||
const { options, points, paths, Snippet, snippets, complete, sa, paperless, macro, store } =
|
||||
part.shorthand()
|
||||
|
||||
const mini = options.minimizer
|
||||
function waraleeMini(part) {
|
||||
const { options, Path, points, paths, complete, sa, macro, store } = part.shorthand()
|
||||
|
||||
let mini = options.minimizer
|
||||
let separateWaistband = options.separateWaistband
|
||||
if ('waistband' == options.frontPocketStyle) {
|
||||
separateWaistband = true
|
||||
}
|
||||
|
||||
for (var p in points) {
|
||||
points[p].x = points[p].x / mini
|
||||
|
@ -38,32 +33,127 @@ function waraleeMini(part) {
|
|||
.offset((-1 * store.get('hem')) / mini)
|
||||
.attr('class', 'fabric stroke-sm')
|
||||
|
||||
paths.cutOut = new Path()
|
||||
.move(separateWaistband ? points.bWaistSideSeam : points.bWaistSide)
|
||||
.line(points.mWaist2)
|
||||
.line(points.mWaist1)
|
||||
.line(separateWaistband ? points.fWaistSideSeam : points.fWaistSide)
|
||||
.attr('class', 'help')
|
||||
|
||||
paths.seam.setRender(true)
|
||||
|
||||
// Complete?
|
||||
if (complete) {
|
||||
points.logo = points.fWaistFront.shift(270, 400)
|
||||
snippets.logo = new Snippet('logo', points.logo)
|
||||
points.text = points.logo
|
||||
.shift(-90, 50)
|
||||
.attr('data-text', 'hello')
|
||||
.attr('data-text-class', 'center')
|
||||
macro('scalebox', { at: points.mLeg.shift(-90, 35) })
|
||||
|
||||
if (options.frontPocket && 'welt' == options.frontPocketStyle) {
|
||||
paths.frontPocket.setRender(true)
|
||||
}
|
||||
if (options.backPocket) {
|
||||
paths.backPocket.setRender(true)
|
||||
}
|
||||
|
||||
if (sa) {
|
||||
paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
||||
paths.sa = paths.seam.offset(sa / mini).attr('class', 'fabric sa')
|
||||
}
|
||||
|
||||
points.pText1 = points.mHip
|
||||
.shiftFractionTowards(points.mLeg, 0.5)
|
||||
.attr('data-text', 'thisIsNotAPart')
|
||||
.attr('data-text-class', 'center')
|
||||
points.pText2 = points.mHip
|
||||
.shiftFractionTowards(points.mLeg, 0.6)
|
||||
.attr('data-text', 'doNotCutFromFabric')
|
||||
.attr('data-text-class', 'center')
|
||||
points.pText3 = points.mHip
|
||||
.shiftFractionTowards(points.mLeg, 0.7)
|
||||
.attr('data-text', 'useMeasurementsToCutFromFabric')
|
||||
.attr('data-text-class', 'center')
|
||||
|
||||
let fWaistSide = separateWaistband ? points.fWaistSideSeam : points.fWaistSide
|
||||
let fWaistFrontOverlap = separateWaistband
|
||||
? points.fWaistFrontOverlapSeam
|
||||
: points.fWaistFrontOverlap
|
||||
let bWaistSide = separateWaistband ? points.bWaistSideSeam : points.bWaistSide
|
||||
let bWaistBackOverlap = separateWaistband
|
||||
? points.bWaistBackOverlapSeam
|
||||
: points.bWaistBackOverlap
|
||||
|
||||
macro('hd', {
|
||||
from: points.fWaistFrontOverlap,
|
||||
to: fWaistSide,
|
||||
y: fWaistSide.y + 10,
|
||||
text: part.units(fWaistSide.dist(points.fWaistFrontOverlap) * mini),
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.fLegFrontOverlap,
|
||||
to: points.bLegBackOverlap,
|
||||
y: points.bLegBackOverlap.y - 10,
|
||||
text: part.units(points.fLegFrontOverlap.dist(points.bLegBackOverlap) * mini),
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.bWaistBack,
|
||||
to: points.bWaistBackOverlap,
|
||||
y: points.bWaistBackOverlap.y + 20,
|
||||
text: part.units(points.bWaistBackOverlap.dist(points.bWaistBack) * mini),
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.fWaistFrontOverlap,
|
||||
to: points.mHip,
|
||||
y: points.mHip.y + 10,
|
||||
text: part.units((points.mHip.x - points.fWaistFrontOverlap.x) * mini),
|
||||
})
|
||||
macro('vd', {
|
||||
from: fWaistFrontOverlap,
|
||||
to: points.fLegFrontOverlap,
|
||||
x: points.fLegFrontOverlap.x + 10,
|
||||
text: part.units(fWaistFrontOverlap.dist(points.fLegFrontOverlap) * mini),
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.bLegBackOverlap,
|
||||
to: bWaistBackOverlap,
|
||||
x: points.bLegBackOverlap.x - 10,
|
||||
text: part.units(bWaistBackOverlap.dist(points.bLegBackOverlap) * mini),
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.bLegBackOverlap,
|
||||
to: bWaistSide,
|
||||
x: bWaistSide.x + 10,
|
||||
text: part.units((points.bLegBackOverlap.y - bWaistSide.y) * mini),
|
||||
})
|
||||
|
||||
if (options.frontPocket && 'welt' == options.frontPocketStyle) {
|
||||
macro('hd', {
|
||||
from: fWaistFrontOverlap,
|
||||
to: points.frontPocketBottom2,
|
||||
y: points.frontPocketBottom2.y + 20,
|
||||
text: part.units((points.frontPocketBottom2.x - fWaistFrontOverlap.x) * mini),
|
||||
})
|
||||
macro('vd', {
|
||||
from: fWaistFrontOverlap,
|
||||
to: points.frontPocketBottom2,
|
||||
x: points.frontPocketBottom2.x + 20,
|
||||
text: part.units((points.frontPocketBottom2.y - fWaistFrontOverlap.y) * mini),
|
||||
})
|
||||
}
|
||||
|
||||
if (options.backPocket) {
|
||||
macro('hd', {
|
||||
from: points.backPocketRight,
|
||||
to: bWaistBackOverlap,
|
||||
y: bWaistBackOverlap.y + 40,
|
||||
text: part.units((bWaistBackOverlap.x - points.backPocketRight.x) * mini),
|
||||
})
|
||||
macro('vd', {
|
||||
from: bWaistBackOverlap,
|
||||
to: points.backPocketRight,
|
||||
x: points.backPocketRight.x,
|
||||
text: part.units((points.backPocketRight.y - bWaistBackOverlap.y) * mini),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
// Paperless?
|
||||
if (paperless) {
|
||||
macro('hd', {
|
||||
from: points.fWaistSide,
|
||||
to: points.mWaist,
|
||||
y: points.fWaistSide.y,
|
||||
text: part.units(points.fWaistSide.dist(points.mWaist) * mini),
|
||||
})
|
||||
}
|
||||
|
||||
// keep this secret for now:
|
||||
part.render = false
|
||||
part.render = options.showMini
|
||||
|
||||
return part
|
||||
}
|
||||
|
@ -71,6 +161,5 @@ function waraleeMini(part) {
|
|||
export const mini = {
|
||||
name: 'waralee.mini',
|
||||
from: pantsProto,
|
||||
hide: true,
|
||||
draft: waraleeMini,
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
// Fit
|
||||
export const backRaise = { pct: 10, min: 0, max: 25, menu: 'fit' }
|
||||
export const waistRaise = { pct: 20, min: 0, max: 40, menu: 'fit' }
|
||||
export const waistRaise = { pct: 0, min: -20, max: 40, menu: 'fit' }
|
||||
// Style
|
||||
export const hemWidth = { pct: 1.75, min: 1, max: 2.5, menu: 'style' }
|
||||
export const legShortening = { pct: 25, min: -10, max: 50, menu: 'style' }
|
||||
|
@ -11,17 +11,26 @@ export const waistbandWidth = { pct: 3.5, min: 2, max: 5, menu: 'style' }
|
|||
// Advanced
|
||||
export const crotchFront = { pct: 30, min: 10, max: 70, menu: 'advanced' }
|
||||
export const crotchBack = { pct: 45, min: 10, max: 70, menu: 'advanced' }
|
||||
export const crotchFactorFrontHor = { pct: 85, min: 10, max: 100, menu: 'advanced' }
|
||||
export const crotchFactorFrontVer = { pct: 25, min: 10, max: 70, menu: 'advanced' }
|
||||
export const crotchFactorFrontHor = { pct: 90, min: 10, max: 100, menu: 'advanced' }
|
||||
export const crotchFactorFrontVer = { pct: 30, min: 10, max: 70, menu: 'advanced' }
|
||||
export const crotchFactorBackHor = { pct: 90, min: 10, max: 100, menu: 'advanced' }
|
||||
export const crotchFactorBackVer = { pct: 60, min: 20, max: 90, menu: 'advanced' }
|
||||
// Static values
|
||||
export const minimizer = 5
|
||||
export const minimizer = 4
|
||||
export const frontPocketVerticalOffset = 0.07
|
||||
export const frontPocketHorizontalOffset = 0.18
|
||||
export const frontPocketSize = 0.65
|
||||
export const frontPocketSize = 0.45
|
||||
export const frontPocketDepthFactor = 1.6
|
||||
export const backPocketDepth = 140
|
||||
export const backPocketVerticalOffset = 0.15
|
||||
export const backPocketVerticalOffset = 0.2
|
||||
export const backPocketHorizontalOffset = 0.045
|
||||
export const backPocketSize = 0.65
|
||||
export const backPocketSize = 0.45
|
||||
// Added later
|
||||
export const frontWaistAdjustment = 0.163
|
||||
export const backWaistAdjustment = 0.3
|
||||
export const crotchEase = 1.08
|
||||
export const frontPocketStyle = { dflt: 'welt', list: ['welt', 'waistband'], menu: 'style' }
|
||||
export const showMini = { bool: true, menu: 'options' }
|
||||
export const fitWaist = { bool: true, menu: 'fit' }
|
||||
export const separateWaistband = { bool: false, menu: 'style' }
|
||||
export const knotInFront = { bool: true, menu: 'style' }
|
||||
|
|
|
@ -1,133 +1,158 @@
|
|||
import { pantsProto } from './pantsproto.mjs'
|
||||
|
||||
/*
|
||||
* We don't move this draft method under the part object
|
||||
* because doing so changes the indentation which causes
|
||||
* us to lose all history of changes to this method.
|
||||
*
|
||||
* So to maintain the history of contributions over the
|
||||
* years, keeps this method here, and resist the urge to
|
||||
* move it into the named export at the bottom of this file.
|
||||
*/
|
||||
function waraleePants(part) {
|
||||
const { options, points, paths, Snippet, snippets, complete, sa, paperless, macro, store } =
|
||||
const { options, points, Path, paths, Snippet, snippets, complete, sa, paperless, macro, store } =
|
||||
part.shorthand()
|
||||
|
||||
paths.waistFoldBack = paths.waistBack
|
||||
.offset(-1 * store.get('waistBand'))
|
||||
.attr('class', 'fabric stroke-sm')
|
||||
paths.waistFoldFront = paths.waistFront
|
||||
.offset(-1 * store.get('waistBand'))
|
||||
.attr('class', 'fabric stroke-sm')
|
||||
let separateWaistband = options.separateWaistband
|
||||
if ('waistband' == options.frontPocketStyle) {
|
||||
separateWaistband = true
|
||||
}
|
||||
|
||||
if (false == separateWaistband) {
|
||||
paths.waistFoldBack = new Path()
|
||||
.move(points.bWaistSideHem)
|
||||
.line(separateWaistband ? points.bWaistBackSeam : points.bWaistBackHem)
|
||||
.line(separateWaistband ? points.bWaistBackSeam : points.bWaistBackOverlapHem)
|
||||
.attr('class', 'fabric stroke-sm')
|
||||
paths.waistFoldFront = new Path()
|
||||
.move(points.fWaistSideHem)
|
||||
.line(points.fWaistFrontOverlapHem)
|
||||
.attr('class', 'fabric stroke-sm')
|
||||
}
|
||||
|
||||
paths.frontFold = paths.front.offset(-1 * store.get('hem')).attr('class', 'fabric stroke-sm')
|
||||
paths.legFold = paths.leg.offset(-1 * store.get('hem')).attr('class', 'fabric stroke-sm')
|
||||
paths.backFold = paths.back.offset(-1 * store.get('hem')).attr('class', 'fabric stroke-sm')
|
||||
|
||||
paths.seam.setRender(true)
|
||||
|
||||
// Complete?
|
||||
if (complete) {
|
||||
points.logo = points.fWaistFront.shift(270, 400)
|
||||
snippets.logo = new Snippet('logo', points.logo)
|
||||
points.title = points.logo.shift(-90, 50)
|
||||
points.title = points.fWaistFront.shift(270, 400)
|
||||
macro('title', {
|
||||
nr: 1,
|
||||
at: points.title,
|
||||
title: 'pants',
|
||||
})
|
||||
|
||||
points.logo = points.title.shift(270, 75)
|
||||
|
||||
snippets.logo = new Snippet('logo', points.logo)
|
||||
|
||||
macro('scalebox', { at: points.mHip.shift(-90, 70) })
|
||||
|
||||
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
||||
}
|
||||
|
||||
if (options.frontPocket && 'welt' == options.frontPocketStyle) {
|
||||
paths.frontPocket.setRender(true)
|
||||
}
|
||||
if (options.backPocket) {
|
||||
paths.backPocket.setRender(true)
|
||||
}
|
||||
|
||||
// Paperless?
|
||||
if (paperless) {
|
||||
let fWaistSide = separateWaistband ? points.fWaistSideSeam : points.fWaistSide
|
||||
let bWaistSide = separateWaistband ? points.bWaistSideSeam : points.bWaistSide
|
||||
macro('hd', {
|
||||
from: points.fWaistSide,
|
||||
to: points.mWaist,
|
||||
y: points.fWaistSide.y,
|
||||
from: fWaistSide,
|
||||
to: points.mWaist1,
|
||||
y: fWaistSide.y,
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.fWaistFrontOverlap,
|
||||
to: points.mWaist,
|
||||
y: points.fWaistSide.y - sa - 15,
|
||||
to: points.mWaist1,
|
||||
y: fWaistSide.y - sa - 15,
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.mWaist,
|
||||
to: points.bWaistSide,
|
||||
y: points.bWaistSide.y,
|
||||
to: bWaistSide,
|
||||
y: bWaistSide.y,
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.mWaist,
|
||||
to: points.bWaistBack,
|
||||
y: points.bWaistSide.y - sa - 15,
|
||||
from: points.mWaist1,
|
||||
to: separateWaistband ? points.bWaistBackSeam : points.bWaistBack,
|
||||
y: bWaistSide.y - sa - 15,
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.mWaist,
|
||||
to: points.bWaistBackOverlap,
|
||||
y: points.bWaistSide.y - sa - 30,
|
||||
from: points.mWaist1,
|
||||
to: separateWaistband ? points.bWaistBackSeam : points.bWaistBackOverlap,
|
||||
y: bWaistSide.y - sa - 30,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.mWaist,
|
||||
from: points.mWaist1,
|
||||
to: points.mHip,
|
||||
x: points.mWaist.x,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.bWaistSide,
|
||||
to: points.bWaistBack,
|
||||
x: points.bWaistSide.x + 15,
|
||||
from: bWaistSide,
|
||||
to: separateWaistband ? points.bWaistBackSeam : points.bWaistBack,
|
||||
x: bWaistSide.x + 15,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.bWaistBackOverlap,
|
||||
from: separateWaistband ? points.bWaistBackSeam : points.bWaistBackOverlap,
|
||||
to: points.bLegBackOverlap,
|
||||
x: points.bLegBackOverlap.x - 30,
|
||||
})
|
||||
|
||||
if (options.frontPocket) {
|
||||
if (false == separateWaistband) {
|
||||
macro('vd', {
|
||||
from: points.fWaistSide,
|
||||
to: points.fWaistSideHem,
|
||||
x: points.fWaistSide.x + 10,
|
||||
})
|
||||
}
|
||||
|
||||
if (options.frontPocket && 'welt' == options.frontPocketStyle) {
|
||||
macro('vd', {
|
||||
from: fWaistSide,
|
||||
to: points.frontPocketTop,
|
||||
x: points.frontPocketTop.x,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.fWaistSide,
|
||||
from: fWaistSide,
|
||||
to: points.frontPocketBottom,
|
||||
x: points.frontPocketBottom.x,
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.frontPocketTop,
|
||||
to: points.fWaistSide,
|
||||
to: fWaistSide,
|
||||
y: points.frontPocketTop.y,
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.frontPocketBottom,
|
||||
to: points.fWaistSide,
|
||||
to: fWaistSide,
|
||||
y: points.frontPocketBottom.y,
|
||||
})
|
||||
}
|
||||
|
||||
if (options.backPocket) {
|
||||
macro('vd', {
|
||||
from: points.bWaistSide,
|
||||
from: bWaistSide,
|
||||
to: points.backPocketLeft,
|
||||
x: points.backPocketLeft.x,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.bWaistSide,
|
||||
from: bWaistSide,
|
||||
to: points.backPocketRight,
|
||||
x: points.backPocketRight.x,
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.bWaistSide,
|
||||
from: bWaistSide,
|
||||
to: points.backPocketLeft,
|
||||
y: points.backPocketLeft.y,
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.bWaistSide,
|
||||
from: bWaistSide,
|
||||
to: points.backPocketRight,
|
||||
y: points.backPocketRight.y,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
part.render = options.showMini == false
|
||||
|
||||
return part
|
||||
}
|
||||
|
||||
|
|
|
@ -1,29 +1,88 @@
|
|||
import { pluginBundle } from '@freesewing/plugin-bundle'
|
||||
import { CreateCrotchPoints } from './util.mjs'
|
||||
import * as options from './options.mjs'
|
||||
|
||||
/*
|
||||
* We don't move this draft method under the part object
|
||||
* because doing so changes the indentation which causes
|
||||
* us to lose all history of changes to this method.
|
||||
*
|
||||
* So to maintain the history of contributions over the
|
||||
* years, keeps this method here, and resist the urge to
|
||||
* move it into the named export at the bottom of this file.
|
||||
*/
|
||||
function waraleePantsProto(part) {
|
||||
const { options, measurements, Point, Path, points, paths, store } = part.shorthand()
|
||||
|
||||
const seatDepth = (measurements.crotchDepth - measurements.waistToHips) * (1 + options.waistRaise)
|
||||
const circumference = measurements.seat
|
||||
const circumference4 = circumference / 4
|
||||
store.set('waistBand', measurements.inseam * options.waistbandWidth)
|
||||
store.set('hem', measurements.inseam * options.hemWidth)
|
||||
const waistBand = store.get('waistBand')
|
||||
let seatDepth =
|
||||
measurements.crotchDepth /* - measurements.waistToHips */ *
|
||||
(1 + options.waistRaise) *
|
||||
options.crotchEase
|
||||
let circumference = measurements.seat
|
||||
let waist =
|
||||
typeof measurements.waist == 'undefined' || false == options.fitWaist
|
||||
? measurements.seat
|
||||
: measurements.waist
|
||||
let waistBack =
|
||||
typeof measurements.waistBack == 'undefined' || false == options.fitWaist
|
||||
? waist / 2
|
||||
: measurements.waistBack
|
||||
|
||||
let separateWaistband = options.separateWaistband
|
||||
if ('waistband' == options.frontPocketStyle) {
|
||||
separateWaistband = true
|
||||
}
|
||||
|
||||
if (circumference < waist) {
|
||||
circumference = waist
|
||||
}
|
||||
|
||||
let circumference4 = circumference / 4
|
||||
let hem = measurements.inseam * options.hemWidth
|
||||
let waistBand = measurements.inseam * options.waistbandWidth
|
||||
store.set('waistBand', waistBand)
|
||||
store.set('hem', hem)
|
||||
|
||||
points.mWaist = new Point(0, 0)
|
||||
|
||||
CreateCrotchPoints(part)
|
||||
points.mHip = points.mWaist.shift(270, seatDepth)
|
||||
|
||||
points.fWaistSide = points.mWaist
|
||||
.shift(180, options.crotchFront * circumference4)
|
||||
.shift(90, waistBand)
|
||||
points.fWaistCrotchCP = points.fWaistSide.shift(
|
||||
270,
|
||||
seatDepth * options.crotchFactorFrontVer + waistBand
|
||||
)
|
||||
points.fHipCrotchCP = points.mHip.shift(
|
||||
180,
|
||||
options.crotchFront * circumference4 * options.crotchFactorFrontHor
|
||||
)
|
||||
|
||||
points.fHipSide = points.mHip.shift(180, options.crotchFront * circumference4)
|
||||
|
||||
points.bWaistSide = points.mWaist
|
||||
.shift(0, options.crotchBack * circumference4)
|
||||
.shift(90, waistBand)
|
||||
.shift(90, options.backRaise * seatDepth)
|
||||
points.bWaistCrotchCP = points.bWaistSide.shift(270, seatDepth * options.crotchFactorBackVer)
|
||||
points.bHipCrotchCP = points.mHip.shift(
|
||||
0,
|
||||
options.crotchBack * circumference4 * options.crotchFactorBackHor
|
||||
)
|
||||
|
||||
points.bHipSide = points.mHip.shift(0, options.crotchBack * circumference4)
|
||||
|
||||
points.fCutOutHip = new Path()
|
||||
.move(points.fWaistSide)
|
||||
.curve(points.fWaistCrotchCP, points.fHipCrotchCP, points.mHip)
|
||||
.shiftAlong(measurements.waistToHips + waistBand)
|
||||
points.bCutOutHip = new Path()
|
||||
.move(points.bWaistSide)
|
||||
.curve(points.bWaistCrotchCP, points.bHipCrotchCP, points.mHip)
|
||||
.shiftAlong(measurements.waistToHips + waistBand + options.backRaise * seatDepth)
|
||||
|
||||
let waistSeatDifferenceBack = measurements.seat / 2 - waistBack
|
||||
let waistSeatDifferenceFront = measurements.seat / 2 - (waist - waistBack)
|
||||
|
||||
points.bWaistAdjusted = points.bWaistSide.shift(
|
||||
0,
|
||||
waistSeatDifferenceBack * options.backWaistAdjustment
|
||||
)
|
||||
points.fWaistAdjusted = points.fWaistSide.shift(
|
||||
180,
|
||||
waistSeatDifferenceFront * options.frontWaistAdjustment
|
||||
)
|
||||
|
||||
points.mLeg = points.mHip.shift(270, measurements.inseam * (1 - options.legShortening))
|
||||
points.fLegSide = points.mLeg.shift(180, options.crotchFront * circumference4)
|
||||
|
@ -54,33 +113,126 @@ function waraleePantsProto(part) {
|
|||
points.bLegBackOverlap = points.bLegBack.shift(0, options.waistOverlap * circumference4)
|
||||
|
||||
points.bWaistSideTemp = points.bWaistSide.shift(0, 2) // This is a trick to make the offset() call work. Without it, the offset is crossing the cutout line.
|
||||
|
||||
let fPaths = new Path()
|
||||
.move(points.fWaistSide)
|
||||
.curve(points.fWaistCrotchCP, points.fHipCrotchCP, points.mHip)
|
||||
.split(points.fCutOutHip)
|
||||
|
||||
let bPaths = new Path()
|
||||
.move(points.bWaistSide)
|
||||
.curve(points.bWaistCrotchCP, points.bHipCrotchCP, points.mHip)
|
||||
.split(points.bCutOutHip)
|
||||
|
||||
fPaths[0].setRender(false)
|
||||
fPaths[1].setRender(false)
|
||||
bPaths[0].setRender(false)
|
||||
bPaths[1].setRender(false)
|
||||
|
||||
points.fCutOutHipCp1 = fPaths[1].ops[1].cp1.shiftFractionTowards(points.fCutOutHip, 1.25)
|
||||
points.fCutOutHipCp2 = fPaths[1].ops[1].cp1.clone()
|
||||
points.mHipCp1 = fPaths[1].ops[1].cp2.clone()
|
||||
points.mHipCp2 = bPaths[1].ops[1].cp2.clone()
|
||||
points.bCutOutHipCp1 = bPaths[1].ops[1].cp1.clone()
|
||||
points.bCutOutHipCp2 = bPaths[1].ops[1].cp1.shiftFractionTowards(points.bCutOutHip, 1.25)
|
||||
|
||||
paths.frontBottomCutOut = new Path()
|
||||
.move(points.mHip)
|
||||
.curve(points.mHipCp1, points.fCutOutHipCp2, points.fCutOutHip)
|
||||
.setRender(false)
|
||||
paths.backBottomCutOut = new Path()
|
||||
.move(points.bCutOutHip)
|
||||
.curve(points.bCutOutHipCp1, points.mHipCp2, points.mHip)
|
||||
.setRender(false)
|
||||
|
||||
paths.frontTopCutOut = new Path()
|
||||
.move(points.fCutOutHip)
|
||||
.curve(points.fCutOutHipCp1, points.fWaistAdjusted, points.fWaistAdjusted)
|
||||
.setRender(false)
|
||||
paths.backTopCutOut = new Path()
|
||||
.move(points.bWaistAdjusted)
|
||||
.curve(points.bWaistAdjusted, points.bCutOutHipCp2, points.bCutOutHip)
|
||||
.setRender(false)
|
||||
|
||||
points.fWaistSideHem = paths.frontTopCutOut.reverse().shiftAlong(waistBand)
|
||||
points.fWaistSideSeam = paths.frontTopCutOut.reverse().shiftAlong(waistBand * 2)
|
||||
points.fWaistSide = points.fWaistSideSeam.flipY(points.fWaistSideHem)
|
||||
points.bWaistSideHem = paths.backTopCutOut.shiftAlong(waistBand)
|
||||
points.bWaistSideSeam = paths.backTopCutOut.shiftAlong(waistBand * 2)
|
||||
points.bWaistSide = points.bWaistSideSeam.flipY(points.bWaistSideHem)
|
||||
|
||||
points.fWaistFrontOverlapHem = points.fWaistFrontOverlap.shift(270, waistBand)
|
||||
points.bWaistBackHem = points.bWaistBack.shift(270, waistBand)
|
||||
points.bWaistBackOverlapHem = points.bWaistBackOverlap.shift(270, waistBand)
|
||||
points.fWaistFrontOverlapSeam = points.fWaistFrontOverlap.shift(270, waistBand * 2)
|
||||
points.bWaistBackSeam = points.bWaistBack.shift(270, waistBand * 2)
|
||||
points.bWaistBackOverlapSeam = points.bWaistBackOverlap.shift(270, waistBand * 2)
|
||||
points.fWaistSideCp2 = paths.frontTopCutOut.split(points.fWaistSideSeam)[0].ops[1].cp2.clone()
|
||||
|
||||
points.fWaistSideCp2 = paths.frontTopCutOut.split(points.fWaistSideSeam)[0].ops[1].cp2.clone()
|
||||
points.fWaistHipCp1 = paths.frontTopCutOut.split(points.fWaistSideSeam)[0].ops[1].cp1.clone()
|
||||
points.bWaistSideCp1 = paths.backTopCutOut.split(points.bWaistSideSeam)[1].ops[1].cp1.clone()
|
||||
points.bWaistHipCp2 = paths.backTopCutOut.split(points.bWaistSideSeam)[1].ops[1].cp2.clone()
|
||||
|
||||
if (separateWaistband) {
|
||||
points.mWaist1 = new Point(points.mWaist.x, points.fWaistSideSeam.y)
|
||||
// points.mWaist = new Point(points.mWaist.x, points.fWaistSideSeam.y)
|
||||
} else {
|
||||
points.mWaist1 = new Point(points.mWaist.x, points.fWaistSide.y)
|
||||
}
|
||||
if (separateWaistband) {
|
||||
points.mWaist2 = new Point(points.mWaist.x, points.bWaistSideSeam.y)
|
||||
} else {
|
||||
points.mWaist2 = new Point(points.mWaist.x, points.bWaistSide.y)
|
||||
}
|
||||
|
||||
paths.frontTopCutOut = new Path()
|
||||
.move(points.fCutOutHip)
|
||||
.curve(points.fCutOutHipCp1, points.fWaistSideCp2, points.fWaistSideSeam)
|
||||
.setRender(false)
|
||||
if (false == separateWaistband) {
|
||||
paths.frontTopCutOut.line(points.fWaistSideHem)
|
||||
paths.frontTopCutOut.line(points.fWaistSide)
|
||||
}
|
||||
if (false == separateWaistband) {
|
||||
paths.backTopCutOut = new Path()
|
||||
.move(points.bWaistSide)
|
||||
.line(points.bWaistSideHem)
|
||||
.line(points.bWaistSideSeam)
|
||||
} else {
|
||||
paths.backTopCutOut = new Path().move(points.bWaistSideSeam)
|
||||
}
|
||||
paths.backTopCutOut
|
||||
.curve(points.bWaistSideCp1, points.bCutOutHipCp2, points.bCutOutHip)
|
||||
.setRender(false)
|
||||
|
||||
paths.cutout = paths.backTopCutOut
|
||||
.join(paths.backBottomCutOut)
|
||||
.join(paths.frontBottomCutOut)
|
||||
.join(paths.frontTopCutOut)
|
||||
.setRender(false)
|
||||
|
||||
paths.waistBack = new Path()
|
||||
.move(points.bWaistBackOverlap)
|
||||
.line(points.bWaistBack)
|
||||
.line(points.bWaistSideTemp) // This is a trick to make the offset() call work. Without it, the offset is crossing the cutout line.
|
||||
.line(points.bWaistSide)
|
||||
.move(separateWaistband ? points.bWaistBackOverlapSeam : points.bWaistBackOverlap)
|
||||
.line(separateWaistband ? points.bWaistBackSeam : points.bWaistBack)
|
||||
// .line(points.bWaistSideTemp) // This is a trick to make the offset() call work. Without it, the offset is crossing the cutout line.
|
||||
.line(separateWaistband ? points.bWaistSideSeam : points.bWaistSide)
|
||||
.setRender(false)
|
||||
paths.waistFront = new Path()
|
||||
.move(points.fWaistSide)
|
||||
.line(points.fWaistFront)
|
||||
.line(points.fWaistFrontOverlap)
|
||||
.move(separateWaistband ? points.fWaistSideSeam : points.fWaistSide)
|
||||
.line(separateWaistband ? points.fWaistFrontOverlapSeam : points.fWaistFrontOverlap)
|
||||
.setRender(false)
|
||||
paths.front = new Path()
|
||||
.move(points.fWaistFrontOverlap)
|
||||
.move(separateWaistband ? points.fWaistFrontOverlapSeam : points.fWaistFrontOverlap)
|
||||
.line(points.fHipFrontOverlap)
|
||||
.line(points.fLegFrontOverlap)
|
||||
.setRender(false)
|
||||
paths.back = new Path()
|
||||
.move(points.bLegBackOverlap)
|
||||
.line(points.bHipBackOverlap)
|
||||
.line(points.bWaistBackOverlap)
|
||||
.line(separateWaistband ? points.bWaistBackOverlapSeam : points.bWaistBackOverlap)
|
||||
.setRender(false)
|
||||
paths.leg = new Path().move(points.fLegFrontOverlap).line(points.bLegBackOverlap).setRender(false)
|
||||
paths.cutout = new Path()
|
||||
.move(points.bWaistSide)
|
||||
.curve(points.bWaistCrotchCP, points.bHipCrotchCP, points.mHip)
|
||||
.curve(points.fHipCrotchCP, points.fWaistCrotchCP, points.fWaistSide)
|
||||
.setRender(false)
|
||||
|
||||
paths.seam = paths.waistFront
|
||||
.join(paths.front)
|
||||
|
@ -90,19 +242,22 @@ function waraleePantsProto(part) {
|
|||
.join(paths.cutout)
|
||||
.close()
|
||||
.attr('class', 'fabric')
|
||||
.setRender(false)
|
||||
|
||||
if (options.frontPocket) {
|
||||
points.frontPocketTop = points.fWaistSide
|
||||
points.frontPocketTop = points.fWaistSideSeam
|
||||
.shift(
|
||||
270,
|
||||
options.frontPocketVerticalOffset * (measurements.crotchDepth - measurements.waistToHips) +
|
||||
waistBand * 2
|
||||
options.frontPocketVerticalOffset *
|
||||
measurements.crotchDepth /*- measurements.waistToHips*/ +
|
||||
waistBand * (separateWaistband ? 1 : 2)
|
||||
)
|
||||
.shift(180, options.frontPocketHorizontalOffset * measurements.seat)
|
||||
|
||||
points.frontPocketTop2 = points.frontPocketTop.shift(340, 12)
|
||||
points.frontPocketBottom = points.frontPocketTop.shift(
|
||||
250,
|
||||
options.frontPocketSize * (measurements.crotchDepth - measurements.waistToHips)
|
||||
options.frontPocketSize * measurements.crotchDepth /*- measurements.waistToHips*/
|
||||
)
|
||||
points.frontPocketBottom2 = points.frontPocketBottom.shift(340, 12)
|
||||
|
||||
|
@ -113,6 +268,7 @@ function waraleePantsProto(part) {
|
|||
.line(points.frontPocketTop2)
|
||||
.close()
|
||||
.attr('class', 'fabric')
|
||||
.setRender(false)
|
||||
}
|
||||
|
||||
if (options.backPocket) {
|
||||
|
@ -120,19 +276,19 @@ function waraleePantsProto(part) {
|
|||
.shiftTowards(points.bWaistSide, options.backPocketHorizontalOffset * measurements.seat)
|
||||
.shift(
|
||||
270,
|
||||
options.backPocketVerticalOffset * (measurements.crotchDepth - measurements.waistToHips) +
|
||||
waistBand * 2
|
||||
options.backPocketVerticalOffset * measurements.crotchDepth /*- measurements.waistToHips*/ +
|
||||
waistBand * (separateWaistband ? 1 : 2)
|
||||
)
|
||||
points.backPocketLeft = points.bWaistBack
|
||||
.shiftTowards(
|
||||
points.bWaistSide,
|
||||
options.backPocketHorizontalOffset * measurements.seat +
|
||||
options.backPocketSize * (measurements.crotchDepth - measurements.waistToHips)
|
||||
options.backPocketSize * measurements.crotchDepth /*- measurements.waistToHips*/
|
||||
)
|
||||
.shift(
|
||||
270,
|
||||
options.backPocketVerticalOffset * (measurements.crotchDepth - measurements.waistToHips) +
|
||||
waistBand * 2
|
||||
options.backPocketVerticalOffset * measurements.crotchDepth /*- measurements.waistToHips*/ +
|
||||
waistBand * (separateWaistband ? 1 : 2)
|
||||
)
|
||||
points.backPocketRight2 = points.backPocketRight.shift(
|
||||
points.backPocketRight.angle(points.backPocketLeft) + 90,
|
||||
|
@ -150,6 +306,7 @@ function waraleePantsProto(part) {
|
|||
.line(points.backPocketRight)
|
||||
.close()
|
||||
.attr('class', 'fabric')
|
||||
.setRender(false)
|
||||
}
|
||||
|
||||
part.render = false
|
||||
|
@ -160,8 +317,9 @@ function waraleePantsProto(part) {
|
|||
export const pantsProto = {
|
||||
name: 'waralee.pantsProto',
|
||||
hide: true,
|
||||
measurements: ['crotchDepth', 'waistToHips', 'seat', 'inseam'],
|
||||
measurements: ['seat', 'inseam', 'crotchDepth', 'waistToHips'],
|
||||
optionalMeasurements: ['waist', 'waistBack'],
|
||||
options,
|
||||
plugins: [ pluginBundle ],
|
||||
plugins: [pluginBundle],
|
||||
draft: waraleePantsProto,
|
||||
}
|
||||
|
|
|
@ -1,12 +1,5 @@
|
|||
/*
|
||||
* We don't move this draft method under the part object
|
||||
* because doing so changes the indentation which causes
|
||||
* us to lose all history of changes to this method.
|
||||
*
|
||||
* So to maintain the history of contributions over the
|
||||
* years, keeps this method here, and resist the urge to
|
||||
* move it into the named export at the bottom of this file.
|
||||
*/
|
||||
import { pantsProto } from './pantsproto.mjs'
|
||||
|
||||
function waraleePocket(part) {
|
||||
const {
|
||||
options,
|
||||
|
@ -23,35 +16,77 @@ function waraleePocket(part) {
|
|||
macro,
|
||||
} = part.shorthand()
|
||||
|
||||
const pocketDepth =
|
||||
if (false == options.frontPocket) {
|
||||
return part
|
||||
}
|
||||
|
||||
const c = 0.55191502449351
|
||||
|
||||
let pocketDepth =
|
||||
(measurements.crotchDepth - measurements.waistToHips) * options.frontPocketDepthFactor
|
||||
let frontPocketSize =
|
||||
options.frontPocketSize * measurements.crotchDepth /*- measurements.waistToHips*/
|
||||
|
||||
points.topLeft = new Point(0, 0)
|
||||
points.bottomLeft = points.topLeft.shift(270, pocketDepth)
|
||||
if ('welt' == options.frontPocketStyle) {
|
||||
points.topLeft = new Point(0, 0)
|
||||
points.bottomLeft = points.topLeft.shift(270, pocketDepth)
|
||||
|
||||
points.topRight = points.topLeft.shift(0, pocketDepth * (1 / 3))
|
||||
points.bottomRight = points.topRight.shift(290, pocketDepth * (5 / 6))
|
||||
points.topRight = points.topLeft.shift(0, pocketDepth * (1 / 3))
|
||||
points.bottomRight = points.topRight.shift(290, pocketDepth * (5 / 6))
|
||||
|
||||
points.bottomLeftCP = points.bottomLeft.shift(0, pocketDepth * (1 / 6))
|
||||
points.bottomRightCP = points.bottomRight.shift(225, pocketDepth * (1 / 4))
|
||||
points.bottomLeftCP = points.bottomLeft.shift(0, pocketDepth * (1 / 6))
|
||||
points.bottomRightCP = points.bottomRight.shift(225, pocketDepth * (1 / 4))
|
||||
|
||||
paths.seam = new Path()
|
||||
.move(points.topLeft)
|
||||
.line(points.bottomLeft)
|
||||
.curve(points.bottomLeftCP, points.bottomRightCP, points.bottomRight)
|
||||
.line(points.topRight)
|
||||
.line(points.topLeft)
|
||||
.close()
|
||||
.attr('class', 'fabric')
|
||||
paths.seam = new Path()
|
||||
.move(points.topLeft)
|
||||
.line(points.bottomLeft)
|
||||
.curve(points.bottomLeftCP, points.bottomRightCP, points.bottomRight)
|
||||
.line(points.topRight)
|
||||
.line(points.topLeft)
|
||||
.close()
|
||||
.attr('class', 'fabric')
|
||||
} else {
|
||||
points.topLeft = new Point(0, 0)
|
||||
points.topRight = points.topLeft.shift(0, frontPocketSize)
|
||||
points.bottomLeft = points.topLeft.shift(270, frontPocketSize * 1.5)
|
||||
points.bottomRight = points.topRight.shift(270, frontPocketSize * 1.5)
|
||||
points.bottomLeftCornerUp = points.bottomLeft.shift(90, frontPocketSize / 4)
|
||||
points.bottomLeftCornerUpCp1 = points.bottomLeftCornerUp.shift(270, (frontPocketSize / 4) * c)
|
||||
points.bottomLeftCornerOver = points.bottomLeft.shift(0, frontPocketSize / 4)
|
||||
points.bottomLeftCornerOverCp2 = points.bottomLeftCornerOver.shift(
|
||||
180,
|
||||
(frontPocketSize / 4) * c
|
||||
)
|
||||
points.bottomRightCornerUp = points.bottomRight.shift(90, frontPocketSize / 4)
|
||||
points.bottomRightCornerUpCp2 = points.bottomRightCornerUp.shift(270, (frontPocketSize / 4) * c)
|
||||
points.bottomRightCornerOver = points.bottomRight.shift(180, frontPocketSize / 4)
|
||||
points.bottomRightCornerOverCp1 = points.bottomRightCornerOver.shift(
|
||||
0,
|
||||
(frontPocketSize / 4) * c
|
||||
)
|
||||
|
||||
paths.seam = new Path()
|
||||
.move(points.topLeft)
|
||||
.line(points.bottomLeftCornerUp)
|
||||
.curve(
|
||||
points.bottomLeftCornerUpCp1,
|
||||
points.bottomLeftCornerOverCp2,
|
||||
points.bottomLeftCornerOver
|
||||
)
|
||||
.line(points.bottomRightCornerOver)
|
||||
.curve(
|
||||
points.bottomRightCornerOverCp1,
|
||||
points.bottomRightCornerUpCp2,
|
||||
points.bottomRightCornerUp
|
||||
)
|
||||
.line(points.topRight)
|
||||
.line(points.topLeft)
|
||||
.close()
|
||||
.attr('class', 'fabric')
|
||||
}
|
||||
|
||||
// Complete?
|
||||
if (complete) {
|
||||
macro('cutonfold', {
|
||||
from: points.topLeft,
|
||||
to: points.bottomLeft,
|
||||
margin: 5,
|
||||
offset: 10,
|
||||
})
|
||||
points.title = points.topLeft.shift(270, 75).shift(0, 50)
|
||||
macro('title', {
|
||||
nr: 3,
|
||||
|
@ -66,49 +101,74 @@ function waraleePocket(part) {
|
|||
.attr('data-text', 'Waralee')
|
||||
.attr('data-text-class', 'center')
|
||||
|
||||
if ('welt' == options.frontPocketStyle) {
|
||||
macro('cutonfold', {
|
||||
from: points.topLeft,
|
||||
to: points.bottomLeft,
|
||||
margin: 5,
|
||||
offset: 10,
|
||||
})
|
||||
}
|
||||
if (sa) {
|
||||
paths.sa = new Path()
|
||||
.move(points.bottomLeft)
|
||||
.join(
|
||||
new Path()
|
||||
.move(points.bottomLeft)
|
||||
.curve(points.bottomLeftCP, points.bottomRightCP, points.bottomRight)
|
||||
.line(points.topRight)
|
||||
.line(points.topLeft)
|
||||
.offset(sa)
|
||||
)
|
||||
.line(points.topLeft)
|
||||
.attr('class', 'fabric sa')
|
||||
if ('welt' == options.frontPocketStyle) {
|
||||
paths.sa = new Path()
|
||||
.move(points.bottomLeft)
|
||||
.join(
|
||||
new Path()
|
||||
.move(points.bottomLeft)
|
||||
.curve(points.bottomLeftCP, points.bottomRightCP, points.bottomRight)
|
||||
.line(points.topRight)
|
||||
.line(points.topLeft)
|
||||
.offset(sa)
|
||||
)
|
||||
.line(points.topLeft)
|
||||
.attr('class', 'fabric sa')
|
||||
} else {
|
||||
paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Paperless?
|
||||
if (paperless) {
|
||||
macro('hd', {
|
||||
from: points.topLeft,
|
||||
to: points.topRight,
|
||||
y: points.topLeft.y + 15,
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.bottomLeft,
|
||||
to: points.bottomRight,
|
||||
y: points.bottomRight.y,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.topLeft,
|
||||
to: points.bottomLeft,
|
||||
x: points.topLeft.x + 15,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.topRight,
|
||||
to: points.bottomRight,
|
||||
x: points.bottomRight.x,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.bottomRight,
|
||||
to: points.bottomLeft,
|
||||
x: points.bottomRight.x,
|
||||
})
|
||||
if ('welt' == options.frontPocketStyle) {
|
||||
macro('hd', {
|
||||
from: points.topLeft,
|
||||
to: points.topRight,
|
||||
y: points.topLeft.y + 15,
|
||||
})
|
||||
macro('hd', {
|
||||
from: points.bottomLeft,
|
||||
to: points.bottomRight,
|
||||
y: points.bottomRight.y,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.topLeft,
|
||||
to: points.bottomLeft,
|
||||
x: points.topLeft.x + 15,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.topRight,
|
||||
to: points.bottomRight,
|
||||
x: points.bottomRight.x,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.bottomRight,
|
||||
to: points.bottomLeft,
|
||||
x: points.bottomRight.x,
|
||||
})
|
||||
} else {
|
||||
macro('hd', {
|
||||
from: points.topLeft,
|
||||
to: points.topRight,
|
||||
y: points.topLeft.y + 15,
|
||||
})
|
||||
macro('vd', {
|
||||
from: points.topLeft,
|
||||
to: points.bottomLeftCornerOver,
|
||||
x: points.bottomLeftCornerOver.x,
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
return part
|
||||
|
@ -116,6 +176,6 @@ function waraleePocket(part) {
|
|||
|
||||
export const pocket = {
|
||||
name: 'waralee.pocket',
|
||||
measurements: ['crotchDepth', 'waistToHips'],
|
||||
after: pantsProto,
|
||||
draft: waraleePocket,
|
||||
}
|
||||
|
|
|
@ -1,37 +0,0 @@
|
|||
function CreateCrotchPoints(part) {
|
||||
let { options, measurements, points, store } = part.shorthand()
|
||||
|
||||
let seatDepth = (measurements.crotchDepth - measurements.waistToHips) * (1 + options.waistRaise)
|
||||
let circumference = measurements.seat
|
||||
let circumference4 = circumference / 4
|
||||
|
||||
points.mHip = points.mWaist.shift(270, seatDepth)
|
||||
|
||||
points.fWaistSide = points.mWaist
|
||||
.shift(180, options.crotchFront * circumference4)
|
||||
.shift(90, store.get('waistBand'))
|
||||
points.fWaistCrotchCP = points.fWaistSide.shift(
|
||||
270,
|
||||
seatDepth * options.crotchFactorFrontVer + store.get('waistBand')
|
||||
)
|
||||
points.fHipCrotchCP = points.mHip.shift(
|
||||
180,
|
||||
options.crotchFront * circumference4 * options.crotchFactorFrontHor
|
||||
)
|
||||
|
||||
points.fHipSide = points.mHip.shift(180, options.crotchFront * circumference4)
|
||||
|
||||
points.bWaistSide = points.mWaist
|
||||
.shift(0, options.crotchBack * circumference4)
|
||||
.shift(90, store.get('waistBand'))
|
||||
.shift(90, options.backRaise * seatDepth)
|
||||
points.bWaistCrotchCP = points.bWaistSide.shift(270, seatDepth * options.crotchFactorBackVer)
|
||||
points.bHipCrotchCP = points.mHip.shift(
|
||||
0,
|
||||
options.crotchBack * circumference4 * options.crotchFactorBackHor
|
||||
)
|
||||
|
||||
points.bHipSide = points.mHip.shift(0, options.crotchBack * circumference4)
|
||||
}
|
||||
|
||||
export { CreateCrotchPoints }
|
211
designs/waralee/src/waistband.mjs
Normal file
211
designs/waralee/src/waistband.mjs
Normal file
|
@ -0,0 +1,211 @@
|
|||
import { pantsProto } from './pantsproto.mjs'
|
||||
|
||||
function waraleeWaistband(type, part) {
|
||||
const {
|
||||
options,
|
||||
measurements,
|
||||
Point,
|
||||
Path,
|
||||
points,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
sa,
|
||||
store,
|
||||
} = part.shorthand()
|
||||
|
||||
const WidthReduction = 6
|
||||
let waistBand = store.get('waistBand')
|
||||
let waistBandLengthFront = points.fWaistSideHem.dist(points.fWaistFrontOverlapHem)
|
||||
let waistBandLengthBack =
|
||||
points.bWaistSideHem.dist(points.bWaistBackHem) +
|
||||
points.bWaistBackHem.dist(points.bWaistBackOverlapHem)
|
||||
|
||||
let strapLength = measurements.waist + measurements.crotchDepth * 1.75
|
||||
let partNr = 0
|
||||
let partN = 0
|
||||
|
||||
switch (type) {
|
||||
case 'waistBandFront':
|
||||
if (false == options.separateWaistband && 'welt' == options.frontPocketStyle) {
|
||||
return part
|
||||
}
|
||||
partNr = 9
|
||||
points.tr = points.fWaistSide
|
||||
points.mr = points.fWaistSideHem
|
||||
points.br = points.fWaistSideSeam
|
||||
points.ml = points.fWaistSideHem.shift(180, (waistBandLengthFront / WidthReduction) * 2)
|
||||
points.tl = points.ml.shift(90, waistBand)
|
||||
points.bl = points.ml.shift(270, waistBand)
|
||||
|
||||
macro('hd', {
|
||||
from: points.ml,
|
||||
to: points.mr,
|
||||
y: points.mr.y,
|
||||
text: part.units(waistBandLengthFront),
|
||||
})
|
||||
|
||||
break
|
||||
|
||||
case 'waistBandBack':
|
||||
if (false == options.separateWaistband && 'welt' == options.frontPocketStyle) {
|
||||
return part
|
||||
}
|
||||
partNr = 10
|
||||
points.tl = points.bWaistSide
|
||||
points.ml = points.bWaistSideHem
|
||||
points.bl = points.bWaistSideSeam
|
||||
points.mr = points.bWaistSideHem.shift(0, (waistBandLengthBack / WidthReduction) * 2)
|
||||
points.tr = points.mr.shift(90, waistBand)
|
||||
points.br = points.mr.shift(270, waistBand)
|
||||
|
||||
macro('hd', {
|
||||
from: points.ml,
|
||||
to: points.mr,
|
||||
y: points.mr.y,
|
||||
text: part.units(waistBandLengthBack),
|
||||
})
|
||||
|
||||
break
|
||||
|
||||
case 'strapFront':
|
||||
partNr = 7
|
||||
strapLength -= waistBandLengthFront * 2
|
||||
strapLength += options.knotInFront ? measurements.waist / 2 : 0
|
||||
|
||||
points.mr = new Point(0, 0)
|
||||
points.tr = points.mr.shift(90, waistBand)
|
||||
points.br = points.mr.shift(270, waistBand)
|
||||
points.ml = points.mr.shift(180, (waistBandLengthFront / WidthReduction) * 2)
|
||||
points.tl = points.ml.shift(90, waistBand)
|
||||
points.bl = points.ml.shift(270, waistBand)
|
||||
|
||||
macro('hd', {
|
||||
from: points.ml,
|
||||
to: points.mr,
|
||||
y: points.mr.y,
|
||||
text: part.units(strapLength),
|
||||
})
|
||||
|
||||
break
|
||||
|
||||
case 'strapBack':
|
||||
partNr = 8
|
||||
strapLength -= waistBandLengthBack * 2
|
||||
strapLength += options.knotInFront ? 0 : measurements.waist / 2
|
||||
|
||||
points.mr = new Point(0, 0)
|
||||
points.tr = points.mr.shift(90, waistBand)
|
||||
points.br = points.mr.shift(270, waistBand)
|
||||
points.ml = points.mr.shift(180, (waistBandLengthFront / WidthReduction) * 2)
|
||||
points.tl = points.ml.shift(90, waistBand)
|
||||
points.bl = points.ml.shift(270, waistBand)
|
||||
|
||||
macro('hd', {
|
||||
from: points.ml,
|
||||
to: points.mr,
|
||||
y: points.mr.y,
|
||||
text: part.units(strapLength),
|
||||
})
|
||||
|
||||
break
|
||||
}
|
||||
|
||||
points.zigzagTop = points.tr.shift(180, waistBandLengthFront / WidthReduction)
|
||||
points.zigzagTopR = points.zigzagTop.shift(0, waistBand / 8)
|
||||
points.zigzagTopT = points.zigzagTop.shift(90, waistBand / 4)
|
||||
points.zigzagTopL = points.zigzagTop.shift(180, waistBand / 8)
|
||||
points.zigzagTopB = points.zigzagTop.shift(270, waistBand / 4)
|
||||
points.zigzagBottom = points.br.shift(180, waistBandLengthFront / WidthReduction)
|
||||
points.zigzagBottomR = points.zigzagBottom.shift(0, waistBand / 8)
|
||||
points.zigzagBottomT = points.zigzagBottom.shift(90, waistBand / 4)
|
||||
points.zigzagBottomL = points.zigzagBottom.shift(180, waistBand / 8)
|
||||
points.zigzagBottomB = points.zigzagBottom.shift(270, waistBand / 4)
|
||||
|
||||
paths.ZZtop = new Path()
|
||||
.move(points.zigzagTopR)
|
||||
.line(points.zigzagTopT)
|
||||
.line(points.zigzagTopB)
|
||||
.line(points.zigzagTopL)
|
||||
.attr('class', 'dotted')
|
||||
paths.ZZbottom = new Path()
|
||||
.move(points.zigzagBottomR)
|
||||
.line(points.zigzagBottomT)
|
||||
.line(points.zigzagBottomB)
|
||||
.line(points.zigzagBottomL)
|
||||
.attr('class', 'dotted')
|
||||
paths.right = new Path()
|
||||
.move(points.zigzagBottomR)
|
||||
.line(points.br)
|
||||
.line(points.mr)
|
||||
.line(points.tr)
|
||||
.line(points.zigzagTopR)
|
||||
paths.left = new Path()
|
||||
.move(points.zigzagBottomL)
|
||||
.line(points.bl)
|
||||
.line(points.ml)
|
||||
.line(points.tl)
|
||||
.line(points.zigzagTopL)
|
||||
|
||||
paths.seam = new Path()
|
||||
.move(points.br)
|
||||
.line(points.mr)
|
||||
.line(points.tr)
|
||||
.line(points.tl)
|
||||
.line(points.ml)
|
||||
.line(points.bl)
|
||||
.line(points.br)
|
||||
.close()
|
||||
.setRender(false)
|
||||
|
||||
// Complete?
|
||||
if (complete) {
|
||||
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
||||
|
||||
points.title = points.tl.shiftFractionTowards(points.br, 0.2).shift(270, 20)
|
||||
macro('title', {
|
||||
nr: partNr,
|
||||
at: points.title,
|
||||
title: type,
|
||||
prefix: 'front',
|
||||
scale: 0.4,
|
||||
})
|
||||
|
||||
points.logo = points.tl.shiftFractionTowards(points.br, 0.8)
|
||||
snippets.logo = new Snippet('logo', points.logo).attr('data-scale', 0.3)
|
||||
}
|
||||
// Paperless?
|
||||
if (paperless) {
|
||||
macro('vd', {
|
||||
from: points.tr,
|
||||
to: points.br,
|
||||
x: points.br.x + sa + 10,
|
||||
})
|
||||
}
|
||||
|
||||
return part
|
||||
}
|
||||
|
||||
export const waistbandFront = {
|
||||
name: 'waralee.waistbandFront',
|
||||
from: pantsProto,
|
||||
draft: (part) => waraleeWaistband('waistBandFront', part),
|
||||
}
|
||||
export const waistbandBack = {
|
||||
name: 'waralee.waistbandBack',
|
||||
from: pantsProto,
|
||||
draft: (part) => waraleeWaistband('waistBandBack', part),
|
||||
}
|
||||
export const strapFront = {
|
||||
name: 'waralee.strapFront',
|
||||
from: pantsProto,
|
||||
draft: (part) => waraleeWaistband('strapFront', part),
|
||||
}
|
||||
export const strapBack = {
|
||||
name: 'waralee.strapBack',
|
||||
from: pantsProto,
|
||||
draft: (part) => waraleeWaistband('strapBack', part),
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: "Fit waist"
|
||||
---
|
||||
|
||||
This setting uses the waist measurement to adjust the shaping of the front and back. It will draw in the
|
||||
waist above the hips if your measurements indicate that the pattern should for a better fit.
|
|
@ -0,0 +1,5 @@
|
|||
---
|
||||
title: "Front pocket style"
|
||||
---
|
||||
|
||||
Change the front pocket from welt pocket to one that is hidden in the front seam.
|
|
@ -0,0 +1,6 @@
|
|||
---
|
||||
title: "Knot in Front"
|
||||
---
|
||||
|
||||
Normally the Waralee is closed with the tie in the front. This allows you to change
|
||||
that to a bow tie in the back.
|
|
@ -0,0 +1,8 @@
|
|||
---
|
||||
title: "Separate waist band"
|
||||
---
|
||||
|
||||
This setting changes the way the waistband is constructed. Normally the waistband is just
|
||||
folded over, like a hem. Turning this option on will generate a separate waistband.
|
||||
|
||||
Mainly used for hiding the pockets in the waistband seam.
|
|
@ -0,0 +1,7 @@
|
|||
---
|
||||
title: "Show mini"
|
||||
---
|
||||
|
||||
Show the mini form of the main pants. This reduces the amount of pages that need to be printed dramatically.
|
||||
Just use the measurements in the mini part to cut out the main pants part.
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue