2018-12-20 08:32:21 +01:00
|
|
|
export default function(part) {
|
2019-05-10 13:14:31 +02:00
|
|
|
let {
|
|
|
|
macro,
|
|
|
|
sa,
|
|
|
|
points,
|
|
|
|
paths,
|
|
|
|
Point,
|
|
|
|
complete,
|
|
|
|
paperless
|
|
|
|
} = part.shorthand();
|
2018-09-11 16:26:38 +02:00
|
|
|
|
2018-12-20 08:32:21 +01:00
|
|
|
delete paths.outline;
|
|
|
|
delete paths.panel1;
|
|
|
|
delete paths.panel2;
|
|
|
|
delete paths.panel3;
|
|
|
|
delete paths.panel4;
|
|
|
|
delete paths.panel6;
|
2018-09-11 16:26:38 +02:00
|
|
|
|
2018-12-20 08:32:21 +01:00
|
|
|
// Complete pattern?
|
2019-05-10 13:14:31 +02:00
|
|
|
if (complete) {
|
2018-12-20 08:32:21 +01:00
|
|
|
points.grainlineTop = new Point(
|
|
|
|
points.waistGap4Right.shiftFractionTowards(points.waistGap5Left, 0.5).x,
|
|
|
|
points.underbustGap4Right.y
|
|
|
|
);
|
|
|
|
points.grainlineBottom = new Point(
|
|
|
|
points.grainlineTop.x,
|
|
|
|
points.hipsGap5.y
|
|
|
|
);
|
2019-05-10 13:14:31 +02:00
|
|
|
macro("grainline", {
|
2018-12-20 08:32:21 +01:00
|
|
|
from: points.grainlineBottom,
|
|
|
|
to: points.grainlineTop
|
|
|
|
});
|
2019-05-10 13:14:31 +02:00
|
|
|
points.title = points.grainlineTop.shift(
|
|
|
|
-90,
|
|
|
|
points.grainlineTop.dy(points.waistGap5Left) / 2
|
|
|
|
);
|
|
|
|
macro("title", {
|
2018-12-20 08:32:21 +01:00
|
|
|
nr: 5,
|
2019-05-10 13:14:31 +02:00
|
|
|
title: "",
|
2018-12-20 08:32:21 +01:00
|
|
|
at: points.title
|
|
|
|
});
|
2019-05-10 13:14:31 +02:00
|
|
|
if (sa) paths.sa = paths.panel5.offset(sa).attr("class", "fabric sa");
|
2018-12-20 08:32:21 +01:00
|
|
|
}
|
2018-09-11 16:26:38 +02:00
|
|
|
|
2018-12-20 08:32:21 +01:00
|
|
|
// Paperless?
|
|
|
|
if (paperless) {
|
2019-05-10 13:14:31 +02:00
|
|
|
macro("hd", {
|
2018-12-20 08:32:21 +01:00
|
|
|
from: points.hipsGap4,
|
|
|
|
to: points.hipsGap5,
|
|
|
|
y: points.hipsGap4.y + sa + 15
|
|
|
|
});
|
2019-05-10 13:14:31 +02:00
|
|
|
macro("ld", {
|
2018-12-20 08:32:21 +01:00
|
|
|
from: points.waistGap4Right,
|
|
|
|
to: points.waistGap5Left
|
|
|
|
});
|
2019-05-10 13:14:31 +02:00
|
|
|
macro("hd", {
|
2018-12-20 08:32:21 +01:00
|
|
|
from: points.underbustGap4Right,
|
|
|
|
to: points.underbustGap5Left,
|
|
|
|
y: points.underbustGap5Left.y - sa - 15
|
|
|
|
});
|
2019-05-10 13:14:31 +02:00
|
|
|
macro("vd", {
|
2018-12-20 08:32:21 +01:00
|
|
|
from: points.hipsGap4,
|
|
|
|
to: points.waistGap4Right,
|
|
|
|
x: points.hipsGap4.x - sa - 15
|
|
|
|
});
|
2019-05-10 13:14:31 +02:00
|
|
|
macro("vd", {
|
2018-12-20 08:32:21 +01:00
|
|
|
from: points.waistGap4Right,
|
|
|
|
to: points.underbustGap4Right,
|
|
|
|
x: points.hipsGap4.x - sa - 15
|
|
|
|
});
|
2019-05-10 13:14:31 +02:00
|
|
|
macro("vd", {
|
2018-12-20 08:32:21 +01:00
|
|
|
from: points.hipsGap5,
|
|
|
|
to: points.waistGap4Right,
|
|
|
|
x: points.hipsGap5.x + sa + 15
|
|
|
|
});
|
2019-05-10 13:14:31 +02:00
|
|
|
macro("vd", {
|
2018-12-20 08:32:21 +01:00
|
|
|
from: points.waistGap4Right,
|
|
|
|
to: points.underbustGap5Left,
|
|
|
|
x: points.hipsGap5.x + sa + 15
|
|
|
|
});
|
2018-09-11 16:26:38 +02:00
|
|
|
}
|
|
|
|
|
2018-12-20 08:32:21 +01:00
|
|
|
return part;
|
2019-05-10 13:14:31 +02:00
|
|
|
}
|