2018-12-20 08:32:21 +01:00
|
|
|
export default function(part) {
|
|
|
|
// prettier-ignore
|
|
|
|
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?
|
|
|
|
if(complete) {
|
|
|
|
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
|
|
|
|
);
|
|
|
|
macro('grainline', {
|
|
|
|
from: points.grainlineBottom,
|
|
|
|
to: points.grainlineTop
|
|
|
|
});
|
|
|
|
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap5Left)/2);
|
|
|
|
macro('title', {
|
|
|
|
nr: 5,
|
|
|
|
title: '',
|
|
|
|
at: points.title
|
|
|
|
});
|
|
|
|
if(sa) paths.sa = paths.panel5.offset(sa).attr('class', 'fabric sa');
|
|
|
|
}
|
2018-09-11 16:26:38 +02:00
|
|
|
|
2018-12-20 08:32:21 +01:00
|
|
|
// Paperless?
|
|
|
|
if (paperless) {
|
|
|
|
macro('hd', {
|
|
|
|
from: points.hipsGap4,
|
|
|
|
to: points.hipsGap5,
|
|
|
|
y: points.hipsGap4.y + sa + 15
|
|
|
|
});
|
|
|
|
macro('ld', {
|
|
|
|
from: points.waistGap4Right,
|
|
|
|
to: points.waistGap5Left
|
|
|
|
});
|
|
|
|
macro('hd', {
|
|
|
|
from: points.underbustGap4Right,
|
|
|
|
to: points.underbustGap5Left,
|
|
|
|
y: points.underbustGap5Left.y - sa - 15
|
|
|
|
});
|
|
|
|
macro('vd', {
|
|
|
|
from: points.hipsGap4,
|
|
|
|
to: points.waistGap4Right,
|
|
|
|
x: points.hipsGap4.x - sa - 15
|
|
|
|
});
|
|
|
|
macro('vd', {
|
|
|
|
from: points.waistGap4Right,
|
|
|
|
to: points.underbustGap4Right,
|
|
|
|
x: points.hipsGap4.x - sa - 15
|
|
|
|
});
|
|
|
|
macro('vd', {
|
|
|
|
from: points.hipsGap5,
|
|
|
|
to: points.waistGap4Right,
|
|
|
|
x: points.hipsGap5.x + sa + 15
|
|
|
|
});
|
|
|
|
macro('vd', {
|
|
|
|
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;
|
|
|
|
};
|