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

68 lines
1.3 KiB
JavaScript
Raw Normal View History

2018-07-24 10:16:31 +00:00
import * as F from "freesewing";
import base from "./base";
var back = {
draft: function(part) {
2018-07-24 10:16:31 +00:00
let {
measurements,
options,
points,
paths,
snippets,
macro,
final,
paperless
} = F.utils.shorthand(part);
base.draft(part);
paths.seam = new F.path()
.move(points.cbNeck)
.line(points.cbHips)
.line(points.hips)
.line(points.armhole)
.curve(points.armholeCp1, points.armholeCp2, points.armholeHollow)
2018-07-24 10:16:31 +00:00
.curve(
points.armholeHollowCp1,
points.armholeHollowCp2,
points.armholePitch
)
.curve(points.armholePitchCp1, points.armholePitchCp2, points.shoulder)
.line(points.neck)
.curve(points.neckCp1, points.cbNeck, points.cbNeck)
2018-07-24 10:16:31 +00:00
.close();
2018-07-19 14:43:27 +00:00
// Final?
var decorate = function(part) {
2018-07-24 10:16:31 +00:00
macro("cutonfold", {
from: points.cbNeck,
to: points.cbHips,
grainline: true
});
points.title = new F.point(
points.armholePitch.x / 2,
points.armholePitch.y
);
macro("title", {
at: points.title,
nr: 2
});
2018-07-24 10:16:31 +00:00
};
2018-07-19 14:43:27 +00:00
2018-07-24 10:16:31 +00:00
if (final) {
decorate(part);
2018-07-19 14:43:27 +00:00
}
// Paperless?
var gauge = function(part) {};
2018-07-19 14:43:27 +00:00
2018-07-24 10:16:31 +00:00
if (paperless) {
gauge(part);
2018-07-19 14:43:27 +00:00
}
}
2018-07-24 10:16:31 +00:00
};
export default back;