1
0
Fork 0
freesewing/packages/brian/src/back.js

64 lines
1.6 KiB
JavaScript
Raw Normal View History

import freesewing from "freesewing";
2018-08-06 16:19:12 +02:00
import * as shared from "./shared";
2018-07-24 10:16:31 +00:00
var back = {
draft: function(pattern) {
let part = new pattern.Part().copy(pattern.parts.base);
2018-08-03 17:44:55 +02:00
// prettier-ignore
2018-08-08 14:38:19 +02:00
let {store, sa, Point, points, Path, paths, Snippet, snippets, final, paperless, macro} = part.shorthand();
2018-08-03 17:44:55 +02:00
2018-08-06 16:19:12 +02:00
// Seamline
paths.seam = shared.seamLine("back", points, Path);
// 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
// Final?
if (final) {
2018-08-06 16:19:12 +02:00
macro("cutonfold", {
from: points.cbNeck,
to: points.cbHips,
grainline: true
});
macro("title", { at: points.title, nr: 2, title: "back" });
snippets.armholePitchNotch = new Snippet("bnotch", points.armholePitch);
if (sa) paths.sa = paths.seam.offset(sa).attr("class", "fabric sa");
2018-07-19 14:43:27 +00:00
}
// Paperless?
2018-07-24 10:16:31 +00:00
if (paperless) {
2018-08-06 16:19:12 +02:00
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
});
2018-08-06 16:19:12 +02:00
macro("hd", {
from: points.cbNeck,
to: points.shoulder,
y: points.neck.y - sa - 30
2018-08-03 17:44:55 +02:00
});
2018-07-19 14:43:27 +00:00
}
2018-08-03 17:44:55 +02:00
return part;
}
2018-07-24 10:16:31 +00:00
};
export default back;