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

59 lines
1.2 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, context) {
let {
measurements,
options,
points,
paths,
snippets,
macro,
final,
paperless
} = F.utils.shorthand(part, context);
base.draft(part, context);
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?
2018-07-24 10:16:31 +00:00
var decorate = function(part, context) {
macro("cutonfold", {
from: points.cbNeck,
to: points.cbHips,
grainline: true
});
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) {
2018-07-19 14:43:27 +00:00
decorate(part, context);
}
// Paperless?
2018-07-24 10:16:31 +00:00
var gauge = function(part, context) {};
2018-07-19 14:43:27 +00:00
2018-07-24 10:16:31 +00:00
if (paperless) {
2018-07-19 14:43:27 +00:00
gauge(part, context);
}
}
2018-07-24 10:16:31 +00:00
};
export default back;