sparkles: Added pocket lining
This commit is contained in:
parent
6fb1f21f43
commit
028be248e5
5 changed files with 113 additions and 11 deletions
|
@ -36,7 +36,9 @@ export default {
|
||||||
cuffFacing: ["topSleeve", "underSleeve"],
|
cuffFacing: ["topSleeve", "underSleeve"],
|
||||||
pocket: "front",
|
pocket: "front",
|
||||||
pocketFlap: "front",
|
pocketFlap: "front",
|
||||||
|
pocketLining: "pocket",
|
||||||
chestPocketWelt: "front",
|
chestPocketWelt: "front",
|
||||||
|
chestPocketBag: "front",
|
||||||
innerPocketWelt: "front",
|
innerPocketWelt: "front",
|
||||||
innerPocketBag: "front",
|
innerPocketBag: "front",
|
||||||
innerPocketTab: "front",
|
innerPocketTab: "front",
|
||||||
|
@ -51,6 +53,7 @@ export default {
|
||||||
topSleeve: "bentTopSleeve",
|
topSleeve: "bentTopSleeve",
|
||||||
underSleeve: "bentUnderSleeve",
|
underSleeve: "bentUnderSleeve",
|
||||||
collar: "collarStand",
|
collar: "collarStand",
|
||||||
|
pocketLining: "pocket",
|
||||||
},
|
},
|
||||||
hide: [
|
hide: [
|
||||||
"bentBase",
|
"bentBase",
|
||||||
|
@ -60,7 +63,6 @@ export default {
|
||||||
"bentTopSleeve",
|
"bentTopSleeve",
|
||||||
"bentUnderSleeve",
|
"bentUnderSleeve",
|
||||||
],
|
],
|
||||||
//parts: ["collar"],
|
|
||||||
options: {
|
options: {
|
||||||
// Constants
|
// Constants
|
||||||
brianFitSleeve: true,
|
brianFitSleeve: true,
|
||||||
|
|
|
@ -55,11 +55,11 @@
|
||||||
"naturalWaistToSeat": 280,
|
"naturalWaistToSeat": 280,
|
||||||
"seatCircumference": 1130
|
"seatCircumference": 1130
|
||||||
},
|
},
|
||||||
//only: ["topSleeve"]
|
only: ["pocket", "pocketLining"]
|
||||||
};
|
};
|
||||||
var pattern = new freesewing.patterns.carlton(settings);
|
var pattern = new freesewing.patterns.carlton(settings);
|
||||||
pattern.use(freesewing.plugins.theme);
|
pattern.use(freesewing.plugins.theme);
|
||||||
//pattern.use(freesewing.plugins.designer);
|
pattern.use(freesewing.plugins.designer);
|
||||||
pattern.use(freesewing.plugins.validate);
|
pattern.use(freesewing.plugins.validate);
|
||||||
pattern.draft();
|
pattern.draft();
|
||||||
//pattern.sampleOption("collarFlare");
|
//pattern.sampleOption("collarFlare");
|
||||||
|
|
|
@ -15,6 +15,7 @@ import draftCollar from "./collar";
|
||||||
import draftCuffFacing from "./cufffacing";
|
import draftCuffFacing from "./cufffacing";
|
||||||
import draftPocket from "./pocket";
|
import draftPocket from "./pocket";
|
||||||
import draftPocketFlap from "./pocketflap";
|
import draftPocketFlap from "./pocketflap";
|
||||||
|
import draftPocketLining from "./pocketlining";
|
||||||
import draftChestPocketWelt from "./chestpocketwelt";
|
import draftChestPocketWelt from "./chestpocketwelt";
|
||||||
import draftInnerPocketWelt from "./innerpocketwelt";
|
import draftInnerPocketWelt from "./innerpocketwelt";
|
||||||
import draftInnerPocketBag from "./innerpocketbag";
|
import draftInnerPocketBag from "./innerpocketbag";
|
||||||
|
@ -58,6 +59,7 @@ Carlton.prototype.draftCollar = draftCollar;
|
||||||
Carlton.prototype.draftCuffFacing = draftCuffFacing;
|
Carlton.prototype.draftCuffFacing = draftCuffFacing;
|
||||||
Carlton.prototype.draftPocket = draftPocket;
|
Carlton.prototype.draftPocket = draftPocket;
|
||||||
Carlton.prototype.draftPocketFlap = draftPocketFlap;
|
Carlton.prototype.draftPocketFlap = draftPocketFlap;
|
||||||
|
Carlton.prototype.draftPocketLining = draftPocketLining;
|
||||||
Carlton.prototype.draftChestPocketWelt = draftChestPocketWelt;
|
Carlton.prototype.draftChestPocketWelt = draftChestPocketWelt;
|
||||||
Carlton.prototype.draftInnerPocketWelt = draftInnerPocketWelt;
|
Carlton.prototype.draftInnerPocketWelt = draftInnerPocketWelt;
|
||||||
Carlton.prototype.draftInnerPocketBag = draftInnerPocketBag;
|
Carlton.prototype.draftInnerPocketBag = draftInnerPocketBag;
|
||||||
|
|
|
@ -14,6 +14,11 @@ export default function(part) {
|
||||||
points.bottomRight.x,
|
points.bottomRight.x,
|
||||||
points.topLeft.y
|
points.topLeft.y
|
||||||
);
|
);
|
||||||
|
points.edgeLeft = points.bottomLeft.shiftFractionTowards(points.topLeft, 1.25);
|
||||||
|
points.edgeRight = new Point(
|
||||||
|
points.topRight.x,
|
||||||
|
points.edgeLeft.y
|
||||||
|
);
|
||||||
if (options.pocketRadius > 0) {
|
if (options.pocketRadius > 0) {
|
||||||
macro("round", {
|
macro("round", {
|
||||||
from: points.topLeft,
|
from: points.topLeft,
|
||||||
|
@ -31,24 +36,29 @@ export default function(part) {
|
||||||
});
|
});
|
||||||
|
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
.move(points.topLeft)
|
.move(points.edgeLeft)
|
||||||
.line(points.roundLeftStart)
|
.line(points.roundLeftStart)
|
||||||
.curve(points.roundLeftCp1, points.roundLeftCp2, points.roundLeftEnd)
|
.curve(points.roundLeftCp1, points.roundLeftCp2, points.roundLeftEnd)
|
||||||
.line(points.roundRightStart)
|
.line(points.roundRightStart)
|
||||||
.curve(points.roundRightCp1, points.roundRightCp2, points.roundRightEnd)
|
.curve(points.roundRightCp1, points.roundRightCp2, points.roundRightEnd)
|
||||||
} else {
|
} else {
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
.move(points.topLeft)
|
.move(points.edgeLeft)
|
||||||
.line(points.bottomLeft)
|
.line(points.bottomLeft)
|
||||||
.line(points.bottomRight);
|
.line(points.bottomRight);
|
||||||
}
|
}
|
||||||
|
|
||||||
paths.seam = paths.seam
|
paths.seam = paths.seam
|
||||||
.line(points.topRight)
|
.line(points.edgeRight)
|
||||||
.line(points.topLeft)
|
.line(points.edgeLeft)
|
||||||
.close()
|
.close()
|
||||||
.attr("class", "fabric");
|
.attr("class", "fabric");
|
||||||
|
|
||||||
|
paths.fold = new Path()
|
||||||
|
.move(points.topLeft)
|
||||||
|
.line(points.topRight)
|
||||||
|
.attr("class", "fabric dashed");
|
||||||
|
|
||||||
if (complete) {
|
if (complete) {
|
||||||
points.title = points.topLeft.shiftFractionTowards(points.bottomRight, 0.5);
|
points.title = points.topLeft.shiftFractionTowards(points.bottomRight, 0.5);
|
||||||
macro("title", {
|
macro("title", {
|
||||||
|
@ -59,7 +69,7 @@ export default function(part) {
|
||||||
|
|
||||||
macro("grainline", {
|
macro("grainline", {
|
||||||
from: points.bottomLeft.shift(0, 10+store.get("pocketRadius")),
|
from: points.bottomLeft.shift(0, 10+store.get("pocketRadius")),
|
||||||
to: points.topLeft.shift(0, 10+store.get("pocketRadius")),
|
to: points.edgeLeft.shift(0, 10+store.get("pocketRadius")),
|
||||||
});
|
});
|
||||||
|
|
||||||
if (sa) paths.sa = paths.seam.offset(sa).attr("class", "fabric sa");
|
if (sa) paths.sa = paths.seam.offset(sa).attr("class", "fabric sa");
|
||||||
|
@ -70,10 +80,15 @@ export default function(part) {
|
||||||
to: points.topRight,
|
to: points.topRight,
|
||||||
x: points.topRight.x + sa + 15
|
x: points.topRight.x + sa + 15
|
||||||
});
|
});
|
||||||
|
macro("vd", {
|
||||||
|
from: points.bottomRight,
|
||||||
|
to: points.edgeRight,
|
||||||
|
x: points.topRight.x + sa + 30
|
||||||
|
});
|
||||||
macro("hd", {
|
macro("hd", {
|
||||||
from: points.topLeft,
|
from: points.edgeLeft,
|
||||||
to: points.topRight,
|
to: points.edgeRight,
|
||||||
y: points.topRight.y - sa - 15
|
y: points.edgeRight.y - sa - 15
|
||||||
});
|
});
|
||||||
if (options.pocketRadius > 0) {
|
if (options.pocketRadius > 0) {
|
||||||
macro("hd", {
|
macro("hd", {
|
||||||
|
|
83
packages/carlton/src/pocketlining.js
Normal file
83
packages/carlton/src/pocketlining.js
Normal file
|
@ -0,0 +1,83 @@
|
||||||
|
export default function(part) {
|
||||||
|
let { paperless, sa, store, complete, points, options, macro, Point, paths, Path } = part.shorthand();
|
||||||
|
|
||||||
|
points.topLeft = points.bottomLeft.shiftFractionTowards(points.topLeft, 0.75);
|
||||||
|
points.topRight = new Point(
|
||||||
|
points.bottomRight.x,
|
||||||
|
points.topLeft.y
|
||||||
|
);
|
||||||
|
if (options.pocketRadius > 0) {
|
||||||
|
macro("round", {
|
||||||
|
from: points.topLeft,
|
||||||
|
to: points.bottomRight,
|
||||||
|
via: points.bottomLeft,
|
||||||
|
radius: store.get("pocketRadius"),
|
||||||
|
prefix: "roundLeft"
|
||||||
|
});
|
||||||
|
macro("round", {
|
||||||
|
from: points.bottomLeft,
|
||||||
|
to: points.topRight,
|
||||||
|
via: points.bottomRight,
|
||||||
|
radius: store.get("pocketRadius"),
|
||||||
|
prefix: "roundRight"
|
||||||
|
});
|
||||||
|
|
||||||
|
paths.seam = new Path()
|
||||||
|
.move(points.topLeft)
|
||||||
|
.line(points.roundLeftStart)
|
||||||
|
.curve(points.roundLeftCp1, points.roundLeftCp2, points.roundLeftEnd)
|
||||||
|
.line(points.roundRightStart)
|
||||||
|
.curve(points.roundRightCp1, points.roundRightCp2, points.roundRightEnd)
|
||||||
|
} else {
|
||||||
|
paths.seam = new Path()
|
||||||
|
.move(points.topLeft)
|
||||||
|
.line(points.bottomLeft)
|
||||||
|
.line(points.bottomRight);
|
||||||
|
}
|
||||||
|
|
||||||
|
paths.seam = paths.seam
|
||||||
|
.line(points.topRight)
|
||||||
|
.line(points.topLeft)
|
||||||
|
.close()
|
||||||
|
.attr("class", "lining");
|
||||||
|
|
||||||
|
delete paths.fold;
|
||||||
|
|
||||||
|
if (complete) {
|
||||||
|
points.title = points.topLeft.shiftFractionTowards(points.bottomRight, 0.5);
|
||||||
|
macro("title", {
|
||||||
|
at: points.title,
|
||||||
|
nr: 16,
|
||||||
|
title: "pocketLining"
|
||||||
|
});
|
||||||
|
|
||||||
|
macro("grainline", {
|
||||||
|
from: points.bottomLeft.shift(0, 10+store.get("pocketRadius")),
|
||||||
|
to: points.topLeft.shift(0, 10+store.get("pocketRadius")),
|
||||||
|
});
|
||||||
|
|
||||||
|
if (sa) paths.sa = paths.seam.offset(sa).attr("class", "lining sa");
|
||||||
|
|
||||||
|
if (paperless) {
|
||||||
|
macro("vd", {
|
||||||
|
from: points.bottomRight,
|
||||||
|
to: points.topRight,
|
||||||
|
x: points.topRight.x + sa + 15
|
||||||
|
});
|
||||||
|
macro("hd", {
|
||||||
|
from: points.topLeft,
|
||||||
|
to: points.topRight,
|
||||||
|
y: points.topRight.y - sa - 15
|
||||||
|
});
|
||||||
|
if (options.pocketRadius > 0) {
|
||||||
|
macro("hd", {
|
||||||
|
from: points.roundRightStart,
|
||||||
|
to: points.roundRightEnd,
|
||||||
|
y: points.bottomRight.y + sa + 15
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return part;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue