2018-08-06 16:19:12 +02:00
|
|
|
import * as shared from "./shared";
|
2018-07-24 10:16:31 +00:00
|
|
|
|
2018-12-17 14:42:28 +01:00
|
|
|
export default part => {
|
2019-05-10 13:14:31 +02:00
|
|
|
let {
|
|
|
|
store,
|
|
|
|
sa,
|
|
|
|
points,
|
|
|
|
Path,
|
|
|
|
paths,
|
|
|
|
Snippet,
|
|
|
|
snippets,
|
|
|
|
complete,
|
|
|
|
paperless,
|
|
|
|
macro
|
|
|
|
} = part.shorthand();
|
2018-08-03 17:44:55 +02:00
|
|
|
|
2018-12-17 14:42:28 +01:00
|
|
|
// Seamline
|
|
|
|
paths.saBase = shared.saBase("back", points, Path);
|
|
|
|
paths.seam = new Path()
|
|
|
|
.move(points.cbNeck)
|
|
|
|
.line(points.cbHips)
|
|
|
|
.join(paths.saBase)
|
|
|
|
.attr("class", "fabric");
|
2018-08-06 16:19:12 +02:00
|
|
|
|
2018-12-17 14:42:28 +01:00
|
|
|
// Store lengths to fit sleeve
|
|
|
|
store.set("backArmholeLength", shared.armholeLength(points, Path));
|
|
|
|
store.set(
|
|
|
|
"backShoulderToArmholePitch",
|
|
|
|
shared.shoulderToArmholePitch(points, Path)
|
|
|
|
);
|
2018-07-19 14:43:27 +00:00
|
|
|
|
2018-12-17 14:42:28 +01:00
|
|
|
// Complete pattern?
|
|
|
|
if (complete) {
|
|
|
|
macro("cutonfold", {
|
|
|
|
from: points.cbNeck,
|
|
|
|
to: points.cbHips,
|
|
|
|
grainline: true
|
|
|
|
});
|
2018-08-06 16:19:12 +02:00
|
|
|
|
2018-12-17 14:42:28 +01:00
|
|
|
macro("title", { at: points.title, nr: 2, title: "back" });
|
|
|
|
snippets.armholePitchNotch = new Snippet("bnotch", points.armholePitch);
|
|
|
|
if (sa) {
|
|
|
|
paths.sa = paths.saBase
|
|
|
|
.offset(sa)
|
|
|
|
.attr("class", "fabric sa")
|
|
|
|
.line(points.cbNeck)
|
|
|
|
.move(points.cbHips);
|
|
|
|
paths.sa.line(paths.sa.start());
|
2018-07-19 14:43:27 +00:00
|
|
|
}
|
2018-12-17 14:42:28 +01:00
|
|
|
}
|
2018-08-03 17:44:55 +02:00
|
|
|
|
2018-12-17 14:42:28 +01:00
|
|
|
// Paperless?
|
|
|
|
if (paperless) {
|
|
|
|
shared.dimensions(macro, points, Path, sa);
|
|
|
|
macro("hd", {
|
|
|
|
from: points.cbHips,
|
|
|
|
to: points.hips,
|
|
|
|
y: points.hips.y + sa + 15
|
|
|
|
});
|
|
|
|
macro("vd", {
|
|
|
|
from: points.cbHips,
|
|
|
|
to: points.cbNeck,
|
|
|
|
x: points.cbHips.x - sa - 15
|
|
|
|
});
|
|
|
|
macro("hd", {
|
|
|
|
from: points.cbNeck,
|
|
|
|
to: points.neck,
|
|
|
|
y: points.neck.y - sa - 15
|
|
|
|
});
|
|
|
|
macro("hd", {
|
|
|
|
from: points.cbNeck,
|
|
|
|
to: points.shoulder,
|
|
|
|
y: points.neck.y - sa - 30
|
|
|
|
});
|
2018-07-19 13:14:50 +00:00
|
|
|
}
|
|
|
|
|
2018-12-17 14:42:28 +01:00
|
|
|
return part;
|
|
|
|
};
|