sparkles: Added chest pocket bag
This commit is contained in:
parent
5bdaddedd9
commit
86709c051e
4 changed files with 77 additions and 2 deletions
|
@ -55,7 +55,7 @@
|
|||
"naturalWaistToSeat": 280,
|
||||
"seatCircumference": 1130
|
||||
},
|
||||
only: ["pocket", "pocketLining"]
|
||||
only: ["chestPocketBag"]
|
||||
};
|
||||
var pattern = new freesewing.patterns.carlton(settings);
|
||||
pattern.use(freesewing.plugins.theme);
|
||||
|
|
73
packages/carlton/src/chestpocketbag.js
Normal file
73
packages/carlton/src/chestpocketbag.js
Normal file
|
@ -0,0 +1,73 @@
|
|||
export default function(part) {
|
||||
let { units, paperless, sa, store, complete, points, options, macro, Point, paths, Path } = part.shorthand();
|
||||
|
||||
points.topLeft = new Point(0, 0);
|
||||
points.bottomRight = new Point(
|
||||
store.get("chestPocketHeight"),
|
||||
store.get("chestPocketBagDepth") / 2
|
||||
);
|
||||
points.bottomLeft = new Point(
|
||||
points.topLeft.x,
|
||||
points.bottomRight.y
|
||||
);
|
||||
points.topRight = new Point(
|
||||
points.bottomRight.x,
|
||||
points.topLeft.y
|
||||
);
|
||||
points.startLeft = points.topLeft.shiftFractionTowards(points.bottomLeft, 0.33);
|
||||
points.endLeft = points.topLeft.shiftFractionTowards(points.bottomLeft, 0.66);
|
||||
points.startRight = points.topRight.shiftFractionTowards(points.bottomRight, 0.33);
|
||||
points.endRight = points.topRight.shiftFractionTowards(points.bottomRight, 0.66);
|
||||
|
||||
paths.seam = new Path()
|
||||
.move(points.startRight)
|
||||
.line(points.topRight)
|
||||
.line(points.topLeft)
|
||||
.line(points.startLeft)
|
||||
.move(points.endLeft)
|
||||
.line(points.bottomLeft)
|
||||
.line(points.bottomRight)
|
||||
.line(points.endRight)
|
||||
.attr("class", "lining");
|
||||
|
||||
paths.hint = new Path()
|
||||
.move(points.startLeft)
|
||||
.line(points.endLeft)
|
||||
.move(points.endRight)
|
||||
.line(points.startRight)
|
||||
.attr("class", "lining dashed");
|
||||
|
||||
if (complete) {
|
||||
points.title = points.topLeft.shiftFractionTowards(points.bottomRight, 0.5);
|
||||
macro("title", {
|
||||
at: points.title,
|
||||
nr: 17,
|
||||
title: "chestPocketBag"
|
||||
});
|
||||
|
||||
macro("grainline", {
|
||||
from: points.bottomLeft.shift(0, 10),
|
||||
to: points.topLeft.shift(0, 10)
|
||||
});
|
||||
|
||||
if (sa) {
|
||||
paths.sa = paths.seam.offset(sa).attr("class", "lining sa");
|
||||
}
|
||||
macro("ld", {
|
||||
from: points.bottomRight.shift(180, 15),
|
||||
to: points.topRight.shift(180, 15),
|
||||
text: units(store.get("chestPocketBagDepth") * 2)
|
||||
|
||||
});
|
||||
|
||||
if (paperless) {
|
||||
macro("hd", {
|
||||
from: points.bottomLeft,
|
||||
to: points.bottomRight,
|
||||
y: points.bottomLeft.y + sa + 15
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return part;
|
||||
}
|
|
@ -133,7 +133,7 @@ export default function(part) {
|
|||
"chestPocketBottomLeft",
|
||||
"chestPocketTopRight",
|
||||
"chestPocketBottomRight"]) points[i] = points[i].rotate(options.chestPocketAngle, points.chestPocketAnchor);
|
||||
|
||||
store.set("chestPocketBagDepth", points.button3Left.dx(points.chestPocketBottomLeft));
|
||||
|
||||
// Inner pocket
|
||||
points.innerPocketAnchor = new Point(
|
||||
|
|
|
@ -17,6 +17,7 @@ import draftPocket from "./pocket";
|
|||
import draftPocketFlap from "./pocketflap";
|
||||
import draftPocketLining from "./pocketlining";
|
||||
import draftChestPocketWelt from "./chestpocketwelt";
|
||||
import draftChestPocketBag from "./chestpocketbag";
|
||||
import draftInnerPocketWelt from "./innerpocketwelt";
|
||||
import draftInnerPocketBag from "./innerpocketbag";
|
||||
import draftInnerPocketTab from "./innerpockettab";
|
||||
|
@ -61,6 +62,7 @@ Carlton.prototype.draftPocket = draftPocket;
|
|||
Carlton.prototype.draftPocketFlap = draftPocketFlap;
|
||||
Carlton.prototype.draftPocketLining = draftPocketLining;
|
||||
Carlton.prototype.draftChestPocketWelt = draftChestPocketWelt;
|
||||
Carlton.prototype.draftChestPocketBag = draftChestPocketBag;
|
||||
Carlton.prototype.draftInnerPocketWelt = draftInnerPocketWelt;
|
||||
Carlton.prototype.draftInnerPocketBag = draftInnerPocketBag;
|
||||
Carlton.prototype.draftInnerPocketTab = draftInnerPocketTab;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue