1
0
Fork 0

sparkles: Paperless brims

This commit is contained in:
Joost De Cock 2019-04-08 18:25:01 +02:00
parent 3b96721e6e
commit c8cdb215d4
3 changed files with 101 additions and 6 deletions

View file

@ -48,10 +48,43 @@ export default function(part) {
.attr("class", "fabric"); .attr("class", "fabric");
if (complete) { if (complete) {
if (sa) { points.title = points.innerMid.shiftFractionTowards(
} points.outerMidCp2,
0.35
);
macro("title", {
at: points.title,
nr: 3,
title: "brimBottom"
});
macro("grainline", {
from: points.outerMid,
to: points.innerMid
});
if (sa) paths.sa = paths.seam.offset(sa).attr("class", "fabric sa");
if (paperless) { if (paperless) {
macro("hd", {
from: points.tipLeft,
to: points.tipRight,
y: points.tipLeft.y - sa - 15
});
macro("hd", {
from: paths.seam.edge("left"),
to: paths.seam.edge("right"),
y: points.tipLeft.y - sa - 30
});
macro("vd", {
from: points.outerMid,
to: points.innerMid,
x: points.innerMid.x - 15
});
macro("vd", {
from: points.outerMid,
to: points.tipRight,
x: points.tipRight.x + sa + 18
});
} }
} }

View file

@ -56,11 +56,44 @@ export default function(part) {
.close() .close()
.attr("class", "interfacing"); .attr("class", "interfacing");
// Clean up
for (let i of Object.keys(paths)) {
if (["seam", "inset", "outset"].indexOf(i) === -1) delete paths[i];
}
if (complete) { if (complete) {
if (sa) { points.title = points.innerMid.shiftFractionTowards(
} points.outerMidCp2,
0.35
);
macro("title", {
at: points.title,
nr: 5,
title: "brimInterfacing"
});
macro("grainline", {
from: points.outerMid,
to: points.innerMid
});
if (sa) paths.sa = paths.seam.offset(sa).attr("class", "fabric sa");
if (paperless) { if (paperless) {
macro("hd", {
from: paths.seam.edge("left"),
to: paths.seam.edge("right"),
y: points.tipLeft.y - sa - 15
});
macro("vd", {
from: paths.outset.edge("bottom"),
to: paths.inset.edge("bottom"),
x: points.innerMid.x - 15
});
macro("vd", {
from: paths.outset.edge("bottom"),
to: paths.inset.edge("topRight"),
x: points.tipRight.x + sa + 18
});
} }
} }

View file

@ -29,10 +29,39 @@ export default function(part) {
.attr("class", "fabric"); .attr("class", "fabric");
if (complete) { if (complete) {
if (sa) { points.title = points.innerMid.shiftFractionTowards(
} points.outerMidCp2,
0.35
);
macro("title", {
at: points.title,
nr: 4,
title: "brimTop"
});
macro("grainline", {
from: points.outerMid,
to: points.innerMid
});
if (sa) paths.sa = paths.seam.offset(sa).attr("class", "fabric sa");
if (paperless) { if (paperless) {
let bottom = paths.seam.edge("bottom");
macro("hd", {
from: paths.seam.edge("left"),
to: paths.seam.edge("right"),
y: points.tipLeft.y - sa - 15
});
macro("vd", {
from: bottom,
to: points.innerMid,
x: points.innerMid.x - 15
});
macro("vd", {
from: bottom,
to: points.tipRight,
x: points.tipRight.x + sa + 18
});
} }
} }