2019-03-16 11:39:06 +01:00
|
|
|
/*
|
|
|
|
* FIXME
|
|
|
|
*
|
2019-03-16 17:41:53 +01:00
|
|
|
* This collar would benefit from a redesign
|
2019-03-16 11:39:06 +01:00
|
|
|
* but I find collar design to be rather tricky business and
|
|
|
|
* would love the input from someone with more pattern design
|
|
|
|
* experience, or more tailoring exprience.
|
|
|
|
*/
|
|
|
|
|
|
|
|
export default function(part) {
|
|
|
|
let { sa, snippets, Snippet, utils, store, complete, points, measurements, options, macro, Point, paths, Path } = part.shorthand();
|
|
|
|
|
2019-03-16 17:41:53 +01:00
|
|
|
// Clean up
|
|
|
|
for (let i of Object.keys(paths)) delete paths[i];
|
|
|
|
for (let i of Object.keys(snippets)) delete snippets[i];
|
|
|
|
|
2019-03-16 11:39:06 +01:00
|
|
|
paths.seam = new Path()
|
|
|
|
.move(points.collarCbTop)
|
|
|
|
.curve_(points.collarCbTopCp, points.notchTip)
|
|
|
|
.line(points.notch)
|
|
|
|
.line(points.collarstandTip)
|
|
|
|
._curve(points.collarstandCbTopCp, points.collarstandCbTop)
|
2019-03-16 17:41:53 +01:00
|
|
|
.line(points.collarCbTop)
|
2019-03-16 11:39:06 +01:00
|
|
|
.close()
|
2019-03-16 17:41:53 +01:00
|
|
|
.attr("class", "various");
|
|
|
|
|
|
|
|
if (complete) {
|
|
|
|
// Title
|
|
|
|
points.title = points.collarCbTopCp.shiftFractionTowards(points.collarstandCbTopCp, 0.5);
|
|
|
|
macro("title", {
|
|
|
|
at: points.title,
|
|
|
|
nr: 6,
|
|
|
|
title: "underCollar"
|
|
|
|
});
|
2019-03-16 11:39:06 +01:00
|
|
|
|
2019-03-16 17:41:53 +01:00
|
|
|
if (sa) paths.sa = paths.seam.offset(sa).attr("class", "various sa");
|
|
|
|
}
|
2019-03-16 11:39:06 +01:00
|
|
|
return part;
|
|
|
|
}
|