2022-08-13 19:23:41 +00:00
|
|
|
export default (part) => {
|
2022-08-13 21:09:23 +00:00
|
|
|
let { points, Point, paths, Path, options, macro, snippets, Snippet, complete, sa } =
|
|
|
|
part.shorthand()
|
2019-02-17 21:39:39 +01:00
|
|
|
// Cleanup from Brian
|
2019-08-03 15:03:33 +02:00
|
|
|
for (let i of Object.keys(paths)) delete paths[i]
|
|
|
|
for (let i of Object.keys(snippets)) delete snippets[i]
|
2019-02-17 21:39:39 +01:00
|
|
|
// Seam line
|
|
|
|
paths.seam = new Path()
|
|
|
|
.move(points.hem)
|
|
|
|
.line(points.hips)
|
|
|
|
.curve(points.hipsCp2, points.waistCp1, points.waist)
|
|
|
|
.curve_(points.waistCp2, points.armhole)
|
|
|
|
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
|
|
|
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
|
|
|
|
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
|
|
|
.line(points.flbTop)
|
2022-07-09 16:49:30 +02:00
|
|
|
.curve(points.flbCpTop, points.flbCp, points.dartTop)
|
2019-02-17 21:39:39 +01:00
|
|
|
._curve(points.dartWaistRightCpTop, points.dartWaistRight)
|
2019-08-03 15:03:33 +02:00
|
|
|
.curve(points.dartWaistRightCpBottom, points.dartHipRightCpTop, points.dartHipRight)
|
|
|
|
.line(points.dartEnd)
|
|
|
|
if (options.hemStyle === 'classic') {
|
|
|
|
paths.seam.curve(points.splitDartHemRightCp2, points.splitHemCp1, points.hem)
|
|
|
|
} else paths.seam.line(points.hem)
|
2021-09-03 16:34:24 +02:00
|
|
|
paths.seam.close()
|
2020-04-18 17:35:25 +02:00
|
|
|
if (complete) {
|
2022-08-13 21:09:23 +00:00
|
|
|
//Grainline
|
2022-08-14 08:44:50 +00:00
|
|
|
let grainlineVariableLength = points.armhole.dist(points.hem)
|
|
|
|
let grainlineVariableShift = points.dartHipRightCpTop.dist(points.hipsCp2) * 0.1
|
2022-08-13 21:09:23 +00:00
|
|
|
points.grainlineFromLining = new Point(points.dartEnd.x, points.dartEnd.y)
|
2022-08-14 08:44:50 +00:00
|
|
|
.shift(90, grainlineVariableLength)
|
|
|
|
.shift(0, grainlineVariableShift)
|
|
|
|
points.grainlineToLining = new Point(points.dartEnd.x, points.dartEnd.y).shift(
|
|
|
|
0,
|
|
|
|
grainlineVariableShift
|
|
|
|
)
|
2022-08-13 19:23:41 +00:00
|
|
|
macro('grainline', {
|
2022-08-13 21:09:23 +00:00
|
|
|
from: points.grainlineFromLining,
|
|
|
|
to: points.grainlineToLining,
|
|
|
|
})
|
2020-04-18 17:35:25 +02:00
|
|
|
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
|
|
|
points.title = points.armhole.shiftFractionTowards(points.dartTop, 0.5)
|
|
|
|
macro('title', {
|
|
|
|
nr: 4,
|
|
|
|
at: points.title,
|
2021-04-24 10:16:31 +02:00
|
|
|
title: 'frontLining',
|
2020-04-18 17:35:25 +02:00
|
|
|
})
|
|
|
|
points.logo = points.dartWaistRight.shiftFractionTowards(points.waist, 0.5)
|
|
|
|
snippets.logo = new Snippet('logo', points.logo)
|
|
|
|
}
|
2019-08-03 15:03:33 +02:00
|
|
|
return part
|
|
|
|
}
|