fixes
This commit is contained in:
parent
c64a69fc84
commit
3a12615f8d
9 changed files with 56 additions and 195 deletions
|
@ -25,7 +25,7 @@ export const backPocket = {
|
||||||
const pocketDepth = options.backPocketDepth * measurements.crotchDepth
|
const pocketDepth = options.backPocketDepth * measurements.crotchDepth
|
||||||
|
|
||||||
if (!expand) {
|
if (!expand) {
|
||||||
// Expand is on, do not draw the part but flag this to the user
|
// Expand is off, do not draw the part but flag this to the user
|
||||||
store.flag.note({
|
store.flag.note({
|
||||||
msg: `waralee:cutBackPocket`,
|
msg: `waralee:cutBackPocket`,
|
||||||
replace: {
|
replace: {
|
||||||
|
@ -69,7 +69,7 @@ export const backPocket = {
|
||||||
.line(points.bottomRight)
|
.line(points.bottomRight)
|
||||||
.join(paths.seamSA)
|
.join(paths.seamSA)
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.addClass('fabric')
|
||||||
|
|
||||||
macro('cutonfold', {
|
macro('cutonfold', {
|
||||||
from: points.bottomLeft,
|
from: points.bottomLeft,
|
||||||
|
@ -87,12 +87,9 @@ export const backPocket = {
|
||||||
|
|
||||||
points.logo = points.title.shift(270, 75)
|
points.logo = points.title.shift(270, 75)
|
||||||
snippets.logo = new Snippet('logo', points.logo)
|
snippets.logo = new Snippet('logo', points.logo)
|
||||||
points.text = points.logo
|
points.text = points.logo.shift(-90, 25).addText('Waralee', 'center')
|
||||||
.shift(-90, 25)
|
|
||||||
.attr('data-text', 'Waralee')
|
|
||||||
.attr('data-text-class', 'center')
|
|
||||||
|
|
||||||
if (sa) paths.sa = paths.seamSA.close().offset(sa).attr('class', 'fabric sa')
|
if (sa) paths.sa = paths.seamSA.close().offset(sa).addClass('fabric sa')
|
||||||
|
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
id: 1,
|
id: 1,
|
||||||
|
|
|
@ -21,8 +21,6 @@ export const cutout = {
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
// paths.cutout.hide()
|
|
||||||
|
|
||||||
points.title = points.mWaist.shift(270, 75)
|
points.title = points.mWaist.shift(270, 75)
|
||||||
macro('title', {
|
macro('title', {
|
||||||
nr: 2,
|
nr: 2,
|
||||||
|
|
|
@ -19,10 +19,8 @@ function waraleeFacing(
|
||||||
part,
|
part,
|
||||||
}
|
}
|
||||||
) {
|
) {
|
||||||
const frontPocketSize =
|
const frontPocketSize = options.frontPocketSize * measurements.crotchDepth
|
||||||
options.frontPocketSize * measurements.crotchDepth /*- measurements.waistToHips*/
|
const backPocketSize = options.backPocketSize * measurements.crotchDepth
|
||||||
const backPocketSize =
|
|
||||||
options.backPocketSize * measurements.crotchDepth /*- measurements.waistToHips*/
|
|
||||||
|
|
||||||
if (type == 'front') {
|
if (type == 'front') {
|
||||||
if (!options.frontPocket || 'welt' != options.frontPocketStyle) {
|
if (!options.frontPocket || 'welt' != options.frontPocketStyle) {
|
||||||
|
@ -38,7 +36,7 @@ function waraleeFacing(
|
||||||
const height = (type == 'front' ? frontPocketSize : backPocketSize) / 2
|
const height = (type == 'front' ? frontPocketSize : backPocketSize) / 2
|
||||||
|
|
||||||
if (!expand) {
|
if (!expand) {
|
||||||
// Expand is on, do not draw the part but flag this to the user
|
// Expand is off, do not draw the part but flag this to the user
|
||||||
store.flag.note({
|
store.flag.note({
|
||||||
msg: `waralee:cutFacing` + type,
|
msg: `waralee:cutFacing` + type,
|
||||||
replace: {
|
replace: {
|
||||||
|
@ -71,7 +69,7 @@ function waraleeFacing(
|
||||||
.line(points.tr)
|
.line(points.tr)
|
||||||
.line(points.tl)
|
.line(points.tl)
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.addClass('fabric')
|
||||||
|
|
||||||
store.cutlist.addCut({ cut: type == 'front' ? 4 : 2, from: 'fabric' })
|
store.cutlist.addCut({ cut: type == 'front' ? 4 : 2, from: 'fabric' })
|
||||||
|
|
||||||
|
|
|
@ -1,107 +0,0 @@
|
||||||
import { pantsProto } from './pantsproto.mjs'
|
|
||||||
|
|
||||||
export const ghost = {
|
|
||||||
name: 'waralee.ghost',
|
|
||||||
after: pantsProto,
|
|
||||||
draft: ({
|
|
||||||
options,
|
|
||||||
measurements,
|
|
||||||
Point,
|
|
||||||
Path,
|
|
||||||
points,
|
|
||||||
paths,
|
|
||||||
Snippet,
|
|
||||||
snippets,
|
|
||||||
sa,
|
|
||||||
macro,
|
|
||||||
part,
|
|
||||||
}) => {
|
|
||||||
const c = 0.55191502449351
|
|
||||||
const eyeSize = 0.02
|
|
||||||
const size = 500
|
|
||||||
|
|
||||||
points.middle = new Point(0, 0)
|
|
||||||
points.eyeLine = points.middle.shift(270, size / 10)
|
|
||||||
points.eyeLeft = points.eyeLine.shift(180, size / 20)
|
|
||||||
points.eyeRight = points.eyeLine.shift(0, size / 20)
|
|
||||||
points.top = new Point(0, -1 * size)
|
|
||||||
points.left = new Point(-1 * size, 0)
|
|
||||||
points.right = new Point(size, 0)
|
|
||||||
points.bottom = new Point(0, size)
|
|
||||||
points.topCp1 = points.top.shift(180, size * c)
|
|
||||||
points.topCp2 = points.top.shift(0, size * c)
|
|
||||||
points.leftCp1 = points.left.shift(270, size * c)
|
|
||||||
points.leftCp2 = points.left.shift(90, size * c)
|
|
||||||
points.bottomCp1 = points.bottom.shift(0, size * c)
|
|
||||||
points.bottomCp2 = points.bottom.shift(180, size * c)
|
|
||||||
points.rightCp1 = points.right.shift(90, size * c)
|
|
||||||
points.rightCp2 = points.right.shift(270, size * c)
|
|
||||||
|
|
||||||
points.eyeLefttop = points.eyeLeft.shift(90, size * eyeSize)
|
|
||||||
points.eyeLeftleft = points.eyeLeft.shift(180, size * eyeSize)
|
|
||||||
points.eyeLeftbottom = points.eyeLeft.shift(270, size * eyeSize)
|
|
||||||
points.eyeLeftright = points.eyeLeft.shift(0, size * eyeSize)
|
|
||||||
points.eyeLefttopCp1 = points.eyeLefttop.shift(180, size * c * eyeSize)
|
|
||||||
points.eyeLefttopCp2 = points.eyeLefttop.shift(0, size * c * eyeSize)
|
|
||||||
points.eyeLeftleftCp1 = points.eyeLeftleft.shift(270, size * c * eyeSize)
|
|
||||||
points.eyeLeftleftCp2 = points.eyeLeftleft.shift(90, size * c * eyeSize)
|
|
||||||
points.eyeLeftbottomCp1 = points.eyeLeftbottom.shift(0, size * c * eyeSize)
|
|
||||||
points.eyeLeftbottomCp2 = points.eyeLeftbottom.shift(180, size * c * eyeSize)
|
|
||||||
points.eyeLeftrightCp1 = points.eyeLeftright.shift(90, size * c * eyeSize)
|
|
||||||
points.eyeLeftrightCp2 = points.eyeLeftright.shift(270, size * c * eyeSize)
|
|
||||||
|
|
||||||
points.eyeRighttop = points.eyeRight.shift(90, size * eyeSize)
|
|
||||||
points.eyeRightleft = points.eyeRight.shift(180, size * eyeSize)
|
|
||||||
points.eyeRightbottom = points.eyeRight.shift(270, size * eyeSize)
|
|
||||||
points.eyeRightright = points.eyeRight.shift(0, size * eyeSize)
|
|
||||||
points.eyeRighttopCp1 = points.eyeRighttop.shift(180, size * c * eyeSize)
|
|
||||||
points.eyeRighttopCp2 = points.eyeRighttop.shift(0, size * c * eyeSize)
|
|
||||||
points.eyeRightleftCp1 = points.eyeRightleft.shift(270, size * c * eyeSize)
|
|
||||||
points.eyeRightleftCp2 = points.eyeRightleft.shift(90, size * c * eyeSize)
|
|
||||||
points.eyeRightbottomCp1 = points.eyeRightbottom.shift(0, size * c * eyeSize)
|
|
||||||
points.eyeRightbottomCp2 = points.eyeRightbottom.shift(180, size * c * eyeSize)
|
|
||||||
points.eyeRightrightCp1 = points.eyeRightright.shift(90, size * c * eyeSize)
|
|
||||||
points.eyeRightrightCp2 = points.eyeRightright.shift(270, size * c * eyeSize)
|
|
||||||
|
|
||||||
console.log({ points: JSON.parse(JSON.stringify(points)) })
|
|
||||||
|
|
||||||
paths.seam = new Path()
|
|
||||||
.move(points.top)
|
|
||||||
.curve(points.topCp1, points.leftCp2, points.left)
|
|
||||||
.curve(points.leftCp1, points.bottomCp2, points.bottom)
|
|
||||||
.curve(points.bottomCp1, points.rightCp2, points.right)
|
|
||||||
.curve(points.rightCp1, points.topCp2, points.top)
|
|
||||||
.close()
|
|
||||||
.attr('class', 'fabric')
|
|
||||||
|
|
||||||
paths.eyeLeft = new Path()
|
|
||||||
.move(points.eyeLefttop)
|
|
||||||
.curve(points.eyeLefttopCp1, points.eyeLeftleftCp2, points.eyeLeftleft)
|
|
||||||
.curve(points.eyeLeftleftCp1, points.eyeLeftbottomCp2, points.eyeLeftbottom)
|
|
||||||
.curve(points.eyeLeftbottomCp1, points.eyeLeftrightCp2, points.eyeLeftright)
|
|
||||||
.curve(points.eyeLeftrightCp1, points.eyeLefttopCp2, points.eyeLefttop)
|
|
||||||
.close()
|
|
||||||
.attr('class', 'fabric')
|
|
||||||
|
|
||||||
paths.eyeRight = new Path()
|
|
||||||
.move(points.eyeRighttop)
|
|
||||||
.curve(points.eyeRighttopCp1, points.eyeRightleftCp2, points.eyeRightleft)
|
|
||||||
.curve(points.eyeRightleftCp1, points.eyeRightbottomCp2, points.eyeRightbottom)
|
|
||||||
.curve(points.eyeRightbottomCp1, points.eyeRightrightCp2, points.eyeRightright)
|
|
||||||
.curve(points.eyeRightrightCp1, points.eyeRighttopCp2, points.eyeRighttop)
|
|
||||||
.close()
|
|
||||||
.attr('class', 'fabric')
|
|
||||||
|
|
||||||
points.title = points.middle.shiftFractionTowards(points.bottom, 0.65)
|
|
||||||
macro('title', {
|
|
||||||
nr: 1,
|
|
||||||
at: points.title,
|
|
||||||
title: 'Gozer',
|
|
||||||
align: 'center',
|
|
||||||
})
|
|
||||||
points.logo = points.middle.shiftFractionTowards(points.bottom, 0.5)
|
|
||||||
snippets.logo = new Snippet('logo', points.logo)
|
|
||||||
|
|
||||||
return part
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -22,27 +22,23 @@ export const mini = {
|
||||||
|
|
||||||
paths.waistFoldBack = paths.waistBack
|
paths.waistFoldBack = paths.waistBack
|
||||||
.offset((-1 * store.get('waistBand')) / mini)
|
.offset((-1 * store.get('waistBand')) / mini)
|
||||||
.attr('class', 'fabric stroke-sm')
|
.addClass('fabric stroke-sm')
|
||||||
paths.waistFoldFront = paths.waistFront
|
paths.waistFoldFront = paths.waistFront
|
||||||
.offset((-1 * store.get('waistBand')) / mini)
|
.offset((-1 * store.get('waistBand')) / mini)
|
||||||
.attr('class', 'fabric stroke-sm')
|
.addClass('fabric stroke-sm')
|
||||||
|
|
||||||
paths.frontFold = paths.front
|
paths.frontFold = paths.front
|
||||||
.offset((-1 * store.get('hem')) / mini)
|
.offset((-1 * store.get('hem')) / mini)
|
||||||
.attr('class', 'fabric stroke-sm')
|
.addClass('fabric stroke-sm')
|
||||||
paths.legFold = paths.leg
|
paths.legFold = paths.leg.offset((-1 * store.get('hem')) / mini).addClass('fabric stroke-sm')
|
||||||
.offset((-1 * store.get('hem')) / mini)
|
paths.backFold = paths.back.offset((-1 * store.get('hem')) / mini).addClass('fabric stroke-sm')
|
||||||
.attr('class', 'fabric stroke-sm')
|
|
||||||
paths.backFold = paths.back
|
|
||||||
.offset((-1 * store.get('hem')) / mini)
|
|
||||||
.attr('class', 'fabric stroke-sm')
|
|
||||||
|
|
||||||
paths.cutOut = new Path()
|
paths.cutOut = new Path()
|
||||||
.move(separateWaistband ? points.bWaistSideSeam : points.bWaistSide)
|
.move(separateWaistband ? points.bWaistSideSeam : points.bWaistSide)
|
||||||
.line(points.mWaist2)
|
.line(points.mWaist2)
|
||||||
.line(points.mWaist1)
|
.line(points.mWaist1)
|
||||||
.line(separateWaistband ? points.fWaistSideSeam : points.fWaistSide)
|
.line(separateWaistband ? points.fWaistSideSeam : points.fWaistSide)
|
||||||
.attr('class', 'help')
|
.addClass('help')
|
||||||
|
|
||||||
paths.seam.unhide()
|
paths.seam.unhide()
|
||||||
|
|
||||||
|
@ -56,21 +52,18 @@ export const mini = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sa) {
|
if (sa) {
|
||||||
paths.sa = paths.seam.offset(sa / mini).attr('class', 'fabric sa')
|
paths.sa = paths.seam.offset(sa / mini).addClass('fabric sa')
|
||||||
}
|
}
|
||||||
|
|
||||||
points.pText1 = points.mHip
|
points.pText1 = points.mHip
|
||||||
.shiftFractionTowards(points.mLeg, 0.5)
|
.shiftFractionTowards(points.mLeg, 0.5)
|
||||||
.attr('data-text', 'waralee:thisIsNotAPart')
|
.addText('waralee:thisIsNotAPart', 'center')
|
||||||
.attr('data-text-class', 'center')
|
|
||||||
points.pText2 = points.mHip
|
points.pText2 = points.mHip
|
||||||
.shiftFractionTowards(points.mLeg, 0.6)
|
.shiftFractionTowards(points.mLeg, 0.6)
|
||||||
.attr('data-text', 'waralee:doNotCutFromFabric')
|
.addText('waralee:doNotCutFromFabric', 'center')
|
||||||
.attr('data-text-class', 'center')
|
|
||||||
points.pText3 = points.mHip
|
points.pText3 = points.mHip
|
||||||
.shiftFractionTowards(points.mLeg, 0.7)
|
.shiftFractionTowards(points.mLeg, 0.7)
|
||||||
.attr('data-text', 'waralee:useMeasurementsToCutFromFabric')
|
.addText('waralee:useMeasurementsToCutFromFabric', 'center')
|
||||||
.attr('data-text-class', 'center')
|
|
||||||
|
|
||||||
const fWaistSide = separateWaistband ? points.fWaistSideSeam : points.fWaistSide
|
const fWaistSide = separateWaistband ? points.fWaistSideSeam : points.fWaistSide
|
||||||
const fWaistFrontOverlap = separateWaistband
|
const fWaistFrontOverlap = separateWaistband
|
||||||
|
|
|
@ -19,7 +19,7 @@ export const pants = {
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// Expand is on, do not draw the part but flag this to the user
|
// Expand is off, do not draw the part but flag this to the user
|
||||||
store.flag.note({
|
store.flag.note({
|
||||||
msg: `waralee:hidePants`,
|
msg: `waralee:hidePants`,
|
||||||
})
|
})
|
||||||
|
@ -34,16 +34,16 @@ export const pants = {
|
||||||
.move(points.bWaistSideHem)
|
.move(points.bWaistSideHem)
|
||||||
.line(separateWaistband ? points.bWaistBackSeam : points.bWaistBackHem)
|
.line(separateWaistband ? points.bWaistBackSeam : points.bWaistBackHem)
|
||||||
.line(separateWaistband ? points.bWaistBackSeam : points.bWaistBackOverlapHem)
|
.line(separateWaistband ? points.bWaistBackSeam : points.bWaistBackOverlapHem)
|
||||||
.attr('class', 'fabric stroke-sm')
|
.addClass('fabric stroke-sm')
|
||||||
paths.waistFoldFront = new Path()
|
paths.waistFoldFront = new Path()
|
||||||
.move(points.fWaistSideHem)
|
.move(points.fWaistSideHem)
|
||||||
.line(points.fWaistFrontOverlapHem)
|
.line(points.fWaistFrontOverlapHem)
|
||||||
.attr('class', 'fabric stroke-sm')
|
.addClass('fabric stroke-sm')
|
||||||
}
|
}
|
||||||
|
|
||||||
paths.frontFold = paths.front.offset(-1 * store.get('hem')).attr('class', 'fabric stroke-sm')
|
paths.frontFold = paths.front.offset(-1 * store.get('hem')).addClass('fabric stroke-sm')
|
||||||
paths.legFold = paths.leg.offset(-1 * store.get('hem')).attr('class', 'fabric stroke-sm')
|
paths.legFold = paths.leg.offset(-1 * store.get('hem')).addClass('fabric stroke-sm')
|
||||||
paths.backFold = paths.back.offset(-1 * store.get('hem')).attr('class', 'fabric stroke-sm')
|
paths.backFold = paths.back.offset(-1 * store.get('hem')).addClass('fabric stroke-sm')
|
||||||
|
|
||||||
paths.seam.unhide()
|
paths.seam.unhide()
|
||||||
|
|
||||||
|
@ -61,7 +61,7 @@ export const pants = {
|
||||||
|
|
||||||
macro('scalebox', { at: points.mHip.shift(-90, 70) })
|
macro('scalebox', { at: points.mHip.shift(-90, 70) })
|
||||||
|
|
||||||
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
if (sa) paths.sa = paths.seam.offset(sa).addClass('fabric sa')
|
||||||
|
|
||||||
if (options.frontPocket && 'welt' == options.frontPocketStyle) {
|
if (options.frontPocket && 'welt' == options.frontPocketStyle) {
|
||||||
paths.frontPocket.unhide()
|
paths.frontPocket.unhide()
|
||||||
|
|
|
@ -74,10 +74,7 @@ export const pantsProto = {
|
||||||
optionalMeasurements: ['waist', 'waistBack'],
|
optionalMeasurements: ['waist', 'waistBack'],
|
||||||
options,
|
options,
|
||||||
draft: ({ options, measurements, Point, Path, points, paths, store, part, utils }) => {
|
draft: ({ options, measurements, Point, Path, points, paths, store, part, utils }) => {
|
||||||
const seatDepth =
|
const seatDepth = measurements.crotchDepth * (1 + options.waistRaise) * options.crotchEase
|
||||||
measurements.crotchDepth /* - measurements.waistToHips */ *
|
|
||||||
(1 + options.waistRaise) *
|
|
||||||
options.crotchEase
|
|
||||||
const waist =
|
const waist =
|
||||||
typeof measurements.waist == 'undefined' || false == options.fitWaist
|
typeof measurements.waist == 'undefined' || false == options.fitWaist
|
||||||
? measurements.seat
|
? measurements.seat
|
||||||
|
@ -94,10 +91,13 @@ export const pantsProto = {
|
||||||
const hem = measurements.inseam * options.hemWidth
|
const hem = measurements.inseam * options.hemWidth
|
||||||
const waistBand = measurements.inseam * options.waistbandWidth
|
const waistBand = measurements.inseam * options.waistbandWidth
|
||||||
|
|
||||||
|
const frontPocketSize = options.frontPocketSize * measurements.crotchDepth
|
||||||
const pocketDepth =
|
const pocketDepth =
|
||||||
(measurements.crotchDepth - measurements.waistToHips) * options.frontPocketDepthFactor
|
(measurements.crotchDepth - measurements.waistToHips) * options.frontPocketDepthFactor >
|
||||||
const frontPocketSize =
|
frontPocketSize * 1.75
|
||||||
options.frontPocketSize * measurements.crotchDepth /*- measurements.waistToHips*/
|
? (measurements.crotchDepth - measurements.waistToHips) * options.frontPocketDepthFactor
|
||||||
|
: frontPocketSize * 1.75
|
||||||
|
const frontPocketHeight = frontPocketSize * options.frontPocketWidthHeightRatio
|
||||||
|
|
||||||
store.set('waistBand', waistBand)
|
store.set('waistBand', waistBand)
|
||||||
store.set('hem', hem)
|
store.set('hem', hem)
|
||||||
|
@ -310,25 +310,23 @@ export const pantsProto = {
|
||||||
.join(paths.waistBack)
|
.join(paths.waistBack)
|
||||||
.join(paths.cutout)
|
.join(paths.cutout)
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.addClass('fabric')
|
||||||
.hide()
|
.hide()
|
||||||
|
|
||||||
if (options.frontPocket) {
|
if (options.frontPocket) {
|
||||||
points.frontPocketTop = points.fWaistSideSeam
|
points.frontPocketTop = points.fWaistSideSeam
|
||||||
.shift(
|
.shift(
|
||||||
270,
|
270,
|
||||||
options.frontPocketVerticalOffset *
|
options.frontPocketVerticalOffset * measurements.crotchDepth +
|
||||||
measurements.crotchDepth /*- measurements.waistToHips*/ +
|
|
||||||
waistBand * (separateWaistband ? 1 : 2)
|
waistBand * (separateWaistband ? 1 : 2)
|
||||||
)
|
)
|
||||||
.shift(180, options.frontPocketHorizontalOffset * measurements.seat)
|
.shift(180, options.frontPocketHorizontalOffset * measurements.seat)
|
||||||
|
|
||||||
const frontPocketHeight = frontPocketSize * options.frontPocketWidthHeightRatio
|
|
||||||
|
|
||||||
points.frontPocketTop2 = points.frontPocketTop.shift(340, frontPocketHeight)
|
points.frontPocketTop2 = points.frontPocketTop.shift(340, frontPocketHeight)
|
||||||
points.frontPocketBottom = points.frontPocketTop.shift(
|
points.frontPocketBottom = points.frontPocketTop.shift(
|
||||||
250,
|
250,
|
||||||
options.frontPocketSize * measurements.crotchDepth /*- measurements.waistToHips*/
|
frontPocketSize
|
||||||
|
// options.frontPocketSize * measurements.crotchDepth
|
||||||
)
|
)
|
||||||
points.frontPocketBottom2 = points.frontPocketBottom.shift(340, frontPocketHeight)
|
points.frontPocketBottom2 = points.frontPocketBottom.shift(340, frontPocketHeight)
|
||||||
|
|
||||||
|
@ -338,7 +336,7 @@ export const pantsProto = {
|
||||||
.line(points.frontPocketBottom2)
|
.line(points.frontPocketBottom2)
|
||||||
.line(points.frontPocketTop2)
|
.line(points.frontPocketTop2)
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.addClass('fabric')
|
||||||
.hide()
|
.hide()
|
||||||
|
|
||||||
points.frontPocketSeam = utils.beamsIntersect(
|
points.frontPocketSeam = utils.beamsIntersect(
|
||||||
|
@ -389,7 +387,7 @@ export const pantsProto = {
|
||||||
.line(points.frontPocketTopRight)
|
.line(points.frontPocketTopRight)
|
||||||
.join(paths.frontPocketSeamSA)
|
.join(paths.frontPocketSeamSA)
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'dotted mark')
|
.addClass('dotted mark')
|
||||||
.hide()
|
.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -398,20 +396,18 @@ export const pantsProto = {
|
||||||
.shiftTowards(points.bWaistSide, options.backPocketHorizontalOffset * measurements.seat)
|
.shiftTowards(points.bWaistSide, options.backPocketHorizontalOffset * measurements.seat)
|
||||||
.shift(
|
.shift(
|
||||||
270,
|
270,
|
||||||
options.backPocketVerticalOffset *
|
options.backPocketVerticalOffset * measurements.crotchDepth +
|
||||||
measurements.crotchDepth /*- measurements.waistToHips*/ +
|
|
||||||
waistBand * (separateWaistband ? 1 : 2)
|
waistBand * (separateWaistband ? 1 : 2)
|
||||||
)
|
)
|
||||||
points.backPocketLeft = points.bWaistBack
|
points.backPocketLeft = points.bWaistBack
|
||||||
.shiftTowards(
|
.shiftTowards(
|
||||||
points.bWaistSide,
|
points.bWaistSide,
|
||||||
options.backPocketHorizontalOffset * measurements.seat +
|
options.backPocketHorizontalOffset * measurements.seat +
|
||||||
options.backPocketSize * measurements.crotchDepth /*- measurements.waistToHips*/
|
options.backPocketSize * measurements.crotchDepth
|
||||||
)
|
)
|
||||||
.shift(
|
.shift(
|
||||||
270,
|
270,
|
||||||
options.backPocketVerticalOffset *
|
options.backPocketVerticalOffset * measurements.crotchDepth +
|
||||||
measurements.crotchDepth /*- measurements.waistToHips*/ +
|
|
||||||
waistBand * (separateWaistband ? 1 : 2)
|
waistBand * (separateWaistband ? 1 : 2)
|
||||||
)
|
)
|
||||||
points.backPocketRight2 = points.backPocketRight.shift(
|
points.backPocketRight2 = points.backPocketRight.shift(
|
||||||
|
@ -429,17 +425,10 @@ export const pantsProto = {
|
||||||
.line(points.backPocketRight2)
|
.line(points.backPocketRight2)
|
||||||
.line(points.backPocketRight)
|
.line(points.backPocketRight)
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.addClass('fabric')
|
||||||
.hide()
|
.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
path.temp = new Path()
|
|
||||||
.move(points.bWaistSide)
|
|
||||||
.line(points.fWaistSide)
|
|
||||||
.line(points.fLegFront)
|
|
||||||
.line(points.bLegBack)
|
|
||||||
.close()
|
|
||||||
|
|
||||||
return part.hide()
|
return part.hide()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,3 +1,4 @@
|
||||||
|
import { cbqc } from '@freesewing/core'
|
||||||
import { pantsProto } from './pantsproto.mjs'
|
import { pantsProto } from './pantsproto.mjs'
|
||||||
|
|
||||||
export const pocket = {
|
export const pocket = {
|
||||||
|
@ -8,8 +9,6 @@ export const pocket = {
|
||||||
return part.hide()
|
return part.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
const c = 0.55191502449351
|
|
||||||
|
|
||||||
const frontPocketSize = store.get('frontPocketSize')
|
const frontPocketSize = store.get('frontPocketSize')
|
||||||
|
|
||||||
if ('welt' != options.frontPocketStyle) {
|
if ('welt' != options.frontPocketStyle) {
|
||||||
|
@ -23,17 +22,17 @@ export const pocket = {
|
||||||
points.bottomLeftCornerOver = points.bottomLeft.shift(0, frontPocketSize / 4)
|
points.bottomLeftCornerOver = points.bottomLeft.shift(0, frontPocketSize / 4)
|
||||||
points.bottomLeftCornerOverCp2 = points.bottomLeftCornerOver.shift(
|
points.bottomLeftCornerOverCp2 = points.bottomLeftCornerOver.shift(
|
||||||
180,
|
180,
|
||||||
(frontPocketSize / 4) * c
|
(frontPocketSize / 4) * cbqc
|
||||||
)
|
)
|
||||||
points.bottomRightCornerUp = points.bottomRight.shift(90, frontPocketSize / 4)
|
points.bottomRightCornerUp = points.bottomRight.shift(90, frontPocketSize / 4)
|
||||||
points.bottomRightCornerUpCp2 = points.bottomRightCornerUp.shift(
|
points.bottomRightCornerUpCp2 = points.bottomRightCornerUp.shift(
|
||||||
270,
|
270,
|
||||||
(frontPocketSize / 4) * c
|
(frontPocketSize / 4) * cbqc
|
||||||
)
|
)
|
||||||
points.bottomRightCornerOver = points.bottomRight.shift(180, frontPocketSize / 4)
|
points.bottomRightCornerOver = points.bottomRight.shift(180, frontPocketSize / 4)
|
||||||
points.bottomRightCornerOverCp1 = points.bottomRightCornerOver.shift(
|
points.bottomRightCornerOverCp1 = points.bottomRightCornerOver.shift(
|
||||||
0,
|
0,
|
||||||
(frontPocketSize / 4) * c
|
(frontPocketSize / 4) * cbqc
|
||||||
)
|
)
|
||||||
|
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
|
@ -53,13 +52,15 @@ export const pocket = {
|
||||||
.line(points.topRight)
|
.line(points.topRight)
|
||||||
.line(points.topLeft)
|
.line(points.topLeft)
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.addClass('fabric')
|
||||||
|
|
||||||
paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
paths.sa = paths.seam.offset(sa).addClass('fabric sa')
|
||||||
} else {
|
} else {
|
||||||
paths.frontPocketSeam.setClass('fabric')
|
paths.frontPocketSeam.unhide().setClass('fabric')
|
||||||
|
|
||||||
paths.sa = paths.frontPocketSeamSA.offset(sa).close().attr('class', 'fabric sa')
|
if (sa) {
|
||||||
|
paths.sa = paths.frontPocketSeamSA.offset(sa).close().addClass('fabric sa')
|
||||||
|
}
|
||||||
|
|
||||||
paths.frontPocket.unhide().setClass('mark')
|
paths.frontPocket.unhide().setClass('mark')
|
||||||
|
|
||||||
|
@ -80,10 +81,7 @@ export const pocket = {
|
||||||
|
|
||||||
points.logo = points.title.shift(270, 75)
|
points.logo = points.title.shift(270, 75)
|
||||||
snippets.logo = new Snippet('logo', points.logo)
|
snippets.logo = new Snippet('logo', points.logo)
|
||||||
points.text = points.logo
|
points.text = points.logo.shift(-90, 25).addText('Waralee', 'center')
|
||||||
.shift(-90, 25)
|
|
||||||
.attr('data-text', 'Waralee')
|
|
||||||
.attr('data-text-class', 'center')
|
|
||||||
|
|
||||||
if ('welt' == options.frontPocketStyle) {
|
if ('welt' == options.frontPocketStyle) {
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
|
|
|
@ -59,7 +59,7 @@ function waraleeWaistband(
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!expand) {
|
if (!expand) {
|
||||||
// Expand is on, do not draw the part but flag this to the user
|
// Expand is off, do not draw the part but flag this to the user
|
||||||
store.flag.note({
|
store.flag.note({
|
||||||
msg: `waralee:cut` + type,
|
msg: `waralee:cut` + type,
|
||||||
replace: {
|
replace: {
|
||||||
|
@ -97,13 +97,9 @@ function waraleeWaistband(
|
||||||
.line(points.br)
|
.line(points.br)
|
||||||
.close()
|
.close()
|
||||||
|
|
||||||
paths.fold = new Path()
|
paths.fold = new Path().move(points.tm).line(points.bm).addClass('fabric dotted').setText('fold')
|
||||||
.move(points.tm)
|
|
||||||
.line(points.bm)
|
|
||||||
.attr('class', 'fabric dotted')
|
|
||||||
.setText('fold')
|
|
||||||
|
|
||||||
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
if (sa) paths.sa = paths.seam.offset(sa).addClass('fabric sa')
|
||||||
|
|
||||||
store.cutlist.addCut({ cut: 1, from: 'fabric' })
|
store.cutlist.addCut({ cut: 1, from: 'fabric' })
|
||||||
|
|
||||||
|
@ -112,7 +108,6 @@ function waraleeWaistband(
|
||||||
nr: partNr,
|
nr: partNr,
|
||||||
at: points.title,
|
at: points.title,
|
||||||
title: type,
|
title: type,
|
||||||
prefix: 'front',
|
|
||||||
scale: 0.4,
|
scale: 0.4,
|
||||||
align: 'center',
|
align: 'center',
|
||||||
})
|
})
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue