2020-01-12 19:19:10 +01:00
|
|
|
import { applyBustDarts, getDartPaths, getSaDartPaths, getDartInsertionPoint } from './dart-utils'
|
2020-01-12 17:56:32 +01:00
|
|
|
|
|
|
|
export default part => {
|
|
|
|
let {
|
|
|
|
sa,
|
|
|
|
points,
|
|
|
|
Path,
|
|
|
|
paths,
|
|
|
|
Snippet,
|
|
|
|
snippets,
|
|
|
|
complete,
|
|
|
|
paperless,
|
|
|
|
macro,
|
|
|
|
Point,
|
|
|
|
measurements,
|
|
|
|
options,
|
|
|
|
utils,
|
|
|
|
store
|
|
|
|
} = part.shorthand()
|
|
|
|
|
|
|
|
// Make bust darts practical
|
|
|
|
applyBustDarts(points, options, utils)
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Paths
|
|
|
|
*
|
|
|
|
* We are using the 'noop' method of a path here, which is pretty low-level freesewing stuff
|
|
|
|
* By passing the noop method with an ID, we are merely marking this among the different path
|
|
|
|
* (drawing operations). This allows us to easily inject operations at this point later,
|
|
|
|
* which is exactly what the insertDraft() method does.
|
|
|
|
* Doing this allows us to use the same base path for both the seam line and SA outline
|
|
|
|
*/
|
|
|
|
let template = new Path()
|
|
|
|
let [primary, secondary] = getDartPaths(Path, points)
|
|
|
|
let [saPrimary, saSecondary] = getSaDartPaths(Path, points)
|
|
|
|
|
|
|
|
switch (store.get('secondaryBustDartLocation')) {
|
|
|
|
case 1130:
|
|
|
|
template
|
|
|
|
.move(points.primaryBustDart1)
|
|
|
|
.noop('primary')
|
|
|
|
.line(points.cfWaist)
|
|
|
|
.line(points.waist)
|
|
|
|
.line(points.armhole)
|
|
|
|
.curve(points.armholeCp2, points.armholePitchCp1, points.armholePitch)
|
|
|
|
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
|
|
|
.line(points.hps)
|
|
|
|
.noop('secondary')
|
|
|
|
.curve_(points.hpsCp2, points.primaryBustDart1)
|
|
|
|
break
|
|
|
|
case 1200:
|
|
|
|
template
|
|
|
|
.move(points.primaryBustDart1)
|
|
|
|
.noop('primary')
|
|
|
|
.line(points.cfWaist)
|
|
|
|
.line(points.waist)
|
|
|
|
.line(points.armhole)
|
|
|
|
.curve(points.armholeCp2, points.armholePitchCp1, points.armholePitch)
|
|
|
|
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
|
|
|
.line(points.secondaryBustDart1)
|
|
|
|
.noop('secondary')
|
|
|
|
.line(points.hps)
|
|
|
|
.curve_(points.hpsCp2, points.primaryBustDart1)
|
|
|
|
break
|
|
|
|
case 1230:
|
|
|
|
template
|
|
|
|
.move(points.primaryBustDart1)
|
|
|
|
.noop('primary')
|
|
|
|
.line(points.cfWaist)
|
|
|
|
.line(points.waist)
|
|
|
|
.line(points.armhole)
|
|
|
|
.curve(points.armholeCp2, points.armholePitchCp1, points.armholePitch)
|
|
|
|
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
|
|
|
.noop('secondary')
|
|
|
|
.line(points.hps)
|
|
|
|
.curve_(points.hpsCp2, points.primaryBustDart1)
|
|
|
|
break
|
|
|
|
case 1300:
|
|
|
|
template
|
|
|
|
.move(points.primaryBustDart1)
|
|
|
|
.noop('primary')
|
|
|
|
.line(points.cfWaist)
|
|
|
|
.line(points.waist)
|
|
|
|
.line(points.armhole)
|
|
|
|
.curve(points.armholeCp2, points.armholePitchCp1, points.armholePitch)
|
|
|
|
.noop('secondary')
|
|
|
|
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
|
|
|
.line(points.hps)
|
|
|
|
.curve_(points.hpsCp2, points.primaryBustDart1)
|
|
|
|
break
|
|
|
|
case 1330:
|
|
|
|
template
|
|
|
|
.move(points.primaryBustDart1)
|
|
|
|
.noop('primary')
|
|
|
|
.line(points.cfWaist)
|
|
|
|
.line(points.waist)
|
|
|
|
.line(points.armhole)
|
|
|
|
.noop('secondary')
|
|
|
|
.curve(points.armholeCp2, points.armholePitchCp1, points.armholePitch)
|
|
|
|
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
|
|
|
.line(points.hps)
|
|
|
|
.curve_(points.hpsCp2, points.primaryBustDart1)
|
|
|
|
break
|
|
|
|
case 1400:
|
|
|
|
case 1500:
|
|
|
|
case 1600:
|
|
|
|
template
|
|
|
|
.move(points.primaryBustDart1)
|
|
|
|
.noop('primary')
|
|
|
|
.line(points.cfWaist)
|
|
|
|
.line(points.waist)
|
|
|
|
.line(points.secondaryBustDart1)
|
|
|
|
.noop('secondary')
|
|
|
|
.line(points.armhole)
|
|
|
|
.curve(points.armholeCp2, points.armholePitchCp1, points.armholePitch)
|
|
|
|
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
|
|
|
.line(points.hps)
|
|
|
|
.curve_(points.hpsCp2, points.primaryBustDart1)
|
|
|
|
break
|
|
|
|
case 1700:
|
|
|
|
template
|
|
|
|
.move(points.primaryBustDart1)
|
|
|
|
.noop('primary')
|
|
|
|
.line(points.cfWaist)
|
|
|
|
.line(points.waist)
|
|
|
|
.noop('secondary')
|
|
|
|
.line(points.armhole)
|
|
|
|
.curve(points.armholeCp2, points.armholePitchCp1, points.armholePitch)
|
|
|
|
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
|
|
|
.line(points.hps)
|
|
|
|
.curve_(points.hpsCp2, points.primaryBustDart1)
|
|
|
|
break
|
|
|
|
}
|
|
|
|
|
2020-01-12 19:19:10 +01:00
|
|
|
paths.seam = template
|
|
|
|
.insop('primary', primary)
|
|
|
|
.insop('secondary', secondary)
|
2020-01-12 17:56:32 +01:00
|
|
|
.close()
|
|
|
|
.attr('class', 'fabric stroke-xl')
|
2020-01-12 19:19:10 +01:00
|
|
|
paths.saBase = template
|
|
|
|
.insop('primary', saPrimary)
|
|
|
|
.insop('secondary', saSecondary)
|
2020-01-12 17:56:32 +01:00
|
|
|
.close()
|
|
|
|
.attr('class', 'lining lashed')
|
|
|
|
|
|
|
|
return part
|
|
|
|
}
|