2022-06-19 23:23:10 +00:00
|
|
|
export default function (part) {
|
|
|
|
let {
|
|
|
|
utils,
|
|
|
|
store,
|
|
|
|
sa,
|
|
|
|
Point,
|
|
|
|
points,
|
|
|
|
Path,
|
|
|
|
paths,
|
|
|
|
Snippet,
|
|
|
|
snippets,
|
|
|
|
options,
|
|
|
|
measurements,
|
|
|
|
complete,
|
|
|
|
paperless,
|
|
|
|
macro,
|
|
|
|
} = part.shorthand()
|
|
|
|
|
|
|
|
delete points.waistDartHem
|
|
|
|
delete points.waistDartRight
|
|
|
|
delete points.waistDartRightCp
|
|
|
|
delete points.waistDartCpBottom
|
|
|
|
delete points.bustDartBottom
|
|
|
|
delete points.bustDartCpBottom
|
|
|
|
delete points.bustDartTip
|
|
|
|
delete points.bustDartTop
|
|
|
|
delete points.shoulderDartTipCpDownOutside
|
|
|
|
delete points.ex
|
|
|
|
delete points.bustB
|
|
|
|
delete points.shoulder
|
|
|
|
delete points.shoulderDartShoulder
|
|
|
|
delete points.shoulderDartOutside
|
|
|
|
delete points.pitchMax
|
|
|
|
delete points.armholeCpTarget
|
|
|
|
delete points.armholePitch
|
|
|
|
delete points.armholePitchCp1
|
|
|
|
delete points.armholePitchCp2
|
|
|
|
delete points.armhole
|
|
|
|
delete points.armholeCp2
|
|
|
|
delete points.bustDartCpTop
|
|
|
|
delete points.bustSide
|
|
|
|
delete points.bustDartMiddle
|
|
|
|
delete points.bustDartEdge
|
|
|
|
|
|
|
|
if( options.dartPosition == 'shoulder' ) {
|
|
|
|
paths.insideSeam = new Path()
|
|
|
|
.move(points.cfHem)
|
|
|
|
.line(points.waistDartLeft)
|
|
|
|
.curve(points.waistDartLeftCp, points.shoulderDartTipCpDownInside, points.shoulderDartTip)
|
|
|
|
.line(points.shoulderDartInside)
|
|
|
|
.line(points.hps)
|
|
|
|
.curve(points.hpsCp2, points.cfNeckCp1, points.cfNeck)
|
|
|
|
|
|
|
|
paths.seam = paths.insideSeam.join( new Path().move(points.cfNeck).line(points.cfHem))
|
|
|
|
.close()
|
|
|
|
.attr('class', 'fabric')
|
2022-06-20 19:40:41 +00:00
|
|
|
|
|
|
|
store.set( 'shoulderDartTipNotch', (new Path()
|
|
|
|
.move(points.waistDartLeft)
|
|
|
|
.curve(points.waistDartLeftCp, points.shoulderDartTipCpDownInside, points.shoulderDartTip)).length())
|
|
|
|
|
2022-06-19 23:23:10 +00:00
|
|
|
} else {
|
|
|
|
paths.insideSeam = new Path()
|
|
|
|
.move(points.cfHem)
|
|
|
|
.line(points.waistDartLeft)
|
|
|
|
.curve(points.waistDartLeftCp, points.armholeDartTipCpDownInside, points.armholeDartTipInside)
|
|
|
|
.curve(points.waistCircleInsideCp1, points.armholeCircleInsideCp1, points.armholeDartInside)
|
|
|
|
.join(paths.armholeInside)
|
|
|
|
.line(points.hps)
|
|
|
|
.curve(points.hpsCp2, points.cfNeckCp1, points.cfNeck)
|
|
|
|
|
|
|
|
paths.seam = paths.insideSeam.join( new Path().move(points.cfNeck).line(points.cfHem))
|
|
|
|
.close()
|
|
|
|
.attr('class', 'fabric')
|
|
|
|
|
2022-06-20 19:40:41 +00:00
|
|
|
store.set( 'shoulderDartTipNotch', (new Path()
|
|
|
|
.move(points.waistDartLeft)
|
|
|
|
.curve(points.waistDartLeftCp, points.armholeDartTipCpDownInside, points.armholeDartTipInside)).length())
|
2022-06-19 23:23:10 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (complete) {
|
2022-06-20 19:40:41 +00:00
|
|
|
if( options.dartPosition == 'shoulder' ) {
|
|
|
|
snippets.shoulderDartTip = new Snippet('notch', points.shoulderDartTip)
|
|
|
|
} else {
|
|
|
|
snippets.shoulderDartTip = new Snippet('notch', points.armholeDartTipInside)
|
|
|
|
}
|
2022-06-19 23:23:10 +00:00
|
|
|
points.titleAnchor = new Point(points.hpsCp2.x *.75, points.cfNeckCp1.y *1.5)
|
|
|
|
macro('title', {
|
|
|
|
at: points.titleAnchor,
|
|
|
|
nr: 1,
|
|
|
|
title: 'Inside Front',
|
|
|
|
})
|
|
|
|
points.scaleboxAnchor = points.titleAnchor.shift(-90, 90).shift(0,10)
|
|
|
|
macro('scalebox', { at: points.scaleboxAnchor, rotate: 270 })
|
|
|
|
|
|
|
|
macro('cutonfold', {
|
|
|
|
from: points.cfNeck,
|
|
|
|
to: points.cfHem,
|
|
|
|
grainline: true,
|
|
|
|
})
|
2022-06-20 19:40:41 +00:00
|
|
|
|
2022-06-19 23:23:10 +00:00
|
|
|
if (sa) {
|
|
|
|
paths.sa = paths.insideSeam.offset(sa).line(points.cfNeck).attr('class', 'fabric sa')
|
|
|
|
paths.sa = paths.sa.move(points.cfHem).line(paths.sa.start())
|
|
|
|
}
|
2022-06-20 19:40:41 +00:00
|
|
|
|
2022-06-19 23:23:10 +00:00
|
|
|
if (paperless) {
|
2022-06-20 19:40:41 +00:00
|
|
|
let extraOffset = 0
|
|
|
|
if( options.dartPosition == 'shoulder' ) {
|
|
|
|
macro('hd', {
|
|
|
|
from: points.cfNeck,
|
|
|
|
to: points.shoulderDartInside,
|
|
|
|
y: points.hps.y - 25,
|
|
|
|
})
|
|
|
|
macro('vd', {
|
|
|
|
from: points.cfHem,
|
|
|
|
to: points.shoulderDartInside,
|
|
|
|
x: 0 -30,
|
|
|
|
})
|
|
|
|
} else {
|
|
|
|
extraOffset = 10
|
|
|
|
macro('hd', {
|
|
|
|
from: points.cfNeck,
|
|
|
|
to: points.shoulderCp1,
|
|
|
|
y: points.hps.y - 35,
|
|
|
|
})
|
|
|
|
macro('hd', {
|
|
|
|
from: points.cfNeck,
|
|
|
|
to: points.armholeDartInsideCp2,
|
|
|
|
y: points.hps.y - 25,
|
|
|
|
})
|
|
|
|
macro('vd', {
|
|
|
|
from: points.cfHem,
|
|
|
|
to: points.armholeDartInsideCp2,
|
|
|
|
x: 0 -20,
|
|
|
|
})
|
|
|
|
macro('vd', {
|
|
|
|
from: points.cfHem,
|
|
|
|
to: points.shoulderCp1,
|
|
|
|
x: 0 -40,
|
|
|
|
})
|
|
|
|
}
|
|
|
|
|
2022-06-19 23:23:10 +00:00
|
|
|
macro('vd', {
|
|
|
|
from: points.cfHem,
|
2022-06-20 19:40:41 +00:00
|
|
|
to: points.armholeDartTipInside,
|
|
|
|
x: 0 - 10,
|
2022-06-19 23:23:10 +00:00
|
|
|
})
|
|
|
|
macro('vd', {
|
|
|
|
from: points.cfHem,
|
|
|
|
to: points.cfNeck,
|
2022-06-20 19:40:41 +00:00
|
|
|
x: 0 - 20 -extraOffset,
|
2022-06-19 23:23:10 +00:00
|
|
|
})
|
|
|
|
macro('vd', {
|
|
|
|
from: points.cfHem,
|
|
|
|
to: points.hps,
|
2022-06-20 19:40:41 +00:00
|
|
|
x: 0 - 40 -extraOffset,
|
2022-06-19 23:23:10 +00:00
|
|
|
})
|
|
|
|
macro('hd', {
|
|
|
|
from: points.cfBust,
|
2022-06-20 19:40:41 +00:00
|
|
|
to: points.armholeDartTipInside,
|
|
|
|
y: points.cfHem.y + sa + 25,
|
2022-06-19 23:23:10 +00:00
|
|
|
})
|
|
|
|
macro('hd', {
|
|
|
|
from: points.cfHem,
|
|
|
|
to: points.waistDartLeft,
|
|
|
|
y: points.cfHem.y + sa + 15,
|
|
|
|
})
|
|
|
|
macro('hd', {
|
|
|
|
from: points.cfNeck,
|
|
|
|
to: points.hps,
|
|
|
|
y: points.hps.y - sa - 15,
|
|
|
|
})
|
2022-06-20 19:40:41 +00:00
|
|
|
}
|
|
|
|
}
|
2022-06-20 21:25:06 +00:00
|
|
|
|
2022-06-19 23:23:10 +00:00
|
|
|
return part
|
|
|
|
}
|