sparkle: Paperless front right
This commit is contained in:
parent
c152c42976
commit
509aecf6d5
8 changed files with 252 additions and 121 deletions
|
@ -103,21 +103,23 @@
|
|||
let settings1 = { ...settings };
|
||||
var pattern1 = new freesewing.patterns.simon(settings1);
|
||||
pattern1.use(freesewing.plugins.theme);
|
||||
//pattern1.use(freesewing.plugins.designer);
|
||||
pattern1.use(freesewing.plugins.designer);
|
||||
pattern1.use(freesewing.plugins.flip);
|
||||
pattern1.use(freesewing.plugins.banner);
|
||||
pattern1.use(freesewing.plugins.debug);
|
||||
pattern1.settings.options.yokeDart = 0;
|
||||
pattern1.settings.options.lengthBonus = 0.1;
|
||||
pattern1.settings.options.hemStyle = "slashed";
|
||||
pattern1.settings.options.buttonholePlacketType = "seperate";
|
||||
pattern1.settings.options.hemStyle = "baseball";
|
||||
pattern1.settings.options.buttonPlacketType = "cut-on";
|
||||
pattern1.settings.options.buttonPlacketStyle = "classic";
|
||||
pattern1.settings.options.buttonholePlacketType = "cut-on";
|
||||
pattern1.settings.options.buttonholePlacketStyle = "seamless";
|
||||
pattern1.settings.options.cuffButtonRows = 2;
|
||||
pattern1.settings.options.barrelCuffNarrowButton = "yes";
|
||||
pattern1.settings.options.cuffStyle = "straightBarrelCuff";
|
||||
pattern1.settings.options.splitYoke = "yes";
|
||||
pattern1.settings.sa = 10;
|
||||
pattern1.settings.nly = ["sleeve"];
|
||||
//pattern1.settings.only = ["frontRight", "frontLeft"];
|
||||
pattern1.draft();
|
||||
document.getElementById("svg1").innerHTML = pattern1.render();
|
||||
|
||||
|
|
|
@ -120,6 +120,33 @@ export default part => {
|
|||
|
||||
// Paperless?
|
||||
if (paperless) {
|
||||
macro("hd", {
|
||||
from: points.placketTopIn,
|
||||
to: points.placketTopOut,
|
||||
y: points.placketTopIn.y - 15 - sa
|
||||
});
|
||||
macro("hd", {
|
||||
from: points.placketTopIn,
|
||||
to: points.placketTopEdge,
|
||||
y: points.placketTopIn.y - 30 - sa
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.placketBottomEdge,
|
||||
to: points.placketTopEdge,
|
||||
x: points.placketTopEdge.x + 15 + sa
|
||||
});
|
||||
let len =
|
||||
points.cfNeck.dist(points.cfHips) * (1 - options.buttonFreeLength);
|
||||
points.button0 = points.placketTopEdge;
|
||||
let j;
|
||||
for (let i = 0; i < options.buttons; i++) {
|
||||
j = i + 1;
|
||||
macro("vd", {
|
||||
from: points["button" + j],
|
||||
to: points["button" + i],
|
||||
x: points.placketTopIn.x - 15 - sa
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return part;
|
||||
|
|
|
@ -83,7 +83,6 @@ export default part => {
|
|||
"placketBottomFold2",
|
||||
"placketBottomFold1",
|
||||
"cfHem",
|
||||
"slashEnd",
|
||||
"hips"
|
||||
]) {
|
||||
offset += 15;
|
||||
|
|
|
@ -1,125 +1,18 @@
|
|||
import { frontDimensions } from "./shared";
|
||||
import frontLeftClassicSeperate from "./frontleft-classic-seperate";
|
||||
import frontLeftClassicCuton from "./frontleft-classic-cuton";
|
||||
import frontLeftSeamless from "./frontleft-seamless";
|
||||
|
||||
export default part => {
|
||||
let {
|
||||
sa,
|
||||
options,
|
||||
complete,
|
||||
paperless,
|
||||
points,
|
||||
macro,
|
||||
Path,
|
||||
paths
|
||||
} = part.shorthand();
|
||||
let { sa, options, complete, paperless, points, macro } = part.shorthand();
|
||||
|
||||
if (complete) {
|
||||
macro("banner", {
|
||||
path: "hemSa",
|
||||
text: ["hem", ": 3x", "seamAllowance"]
|
||||
if (complete && paperless) {
|
||||
frontDimensions(part, "left");
|
||||
macro("ld", {
|
||||
from: points.neck,
|
||||
to: points.shoulder,
|
||||
d: 15 + sa
|
||||
});
|
||||
macro("banner", {
|
||||
path: "saFrench",
|
||||
text: ["frenchSeam", ": 2x", "seamAllowance"]
|
||||
});
|
||||
if (paperless) {
|
||||
macro("ld", {
|
||||
from: points.neck,
|
||||
to: points.shoulder,
|
||||
d: 15 + sa
|
||||
});
|
||||
macro("pd", {
|
||||
path: new Path()
|
||||
.move(points.armholePitch)
|
||||
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder),
|
||||
d: -15
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.armhole,
|
||||
to: points.armholePitch,
|
||||
x: points.armhole.x + 15 + sa * 2
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.armhole,
|
||||
to: points.shoulder,
|
||||
x: points.armhole.x + 30 + sa * 2
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.armhole,
|
||||
to: points.neck,
|
||||
x: points.armhole.x + 45 + sa * 2
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.waist,
|
||||
to: points.armhole,
|
||||
x: points.armhole.x + 15 + sa * 2
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.hips,
|
||||
to: points.armhole,
|
||||
x: points.armhole.x + 30 + sa * 2
|
||||
});
|
||||
if (options.hemStyle === "baseball") {
|
||||
macro("vd", {
|
||||
from: points.bballStart,
|
||||
to: points.bballEnd,
|
||||
x: points.hips.x + 15 + 2 * sa
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.bballStart,
|
||||
to: points.hips,
|
||||
x: points.hips.x + 30 + 2 * sa
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.bballStart,
|
||||
to: points.armhole,
|
||||
x: points.hips.x + 45 + 2 * sa
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.bballStart,
|
||||
to: points.neck,
|
||||
x: points.hips.x + 60 + 2 * sa
|
||||
});
|
||||
macro("hd", {
|
||||
from: points.bballStart,
|
||||
to: points.bballEnd,
|
||||
y: points.bballStart.y + 15 + 3 * sa
|
||||
});
|
||||
} else if (options.hemStyle === "slashed") {
|
||||
macro("vd", {
|
||||
from: points.slashEnd,
|
||||
to: points.slashStart,
|
||||
x: points.hips.x + 15 + 3 * sa
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.slashEnd,
|
||||
to: points.hips,
|
||||
x: points.hips.x + 30 + 3 * sa
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.slashEnd,
|
||||
to: points.armhole,
|
||||
x: points.hips.x + 45 + 3 * sa
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.slashEnd,
|
||||
to: points.neck,
|
||||
x: points.hips.x + 60 + 3 * sa
|
||||
});
|
||||
} else {
|
||||
macro("vd", {
|
||||
from: points.hem,
|
||||
to: points.armhole,
|
||||
x: points.armhole.x + 45 + 2 * sa
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.hem,
|
||||
to: points.neck,
|
||||
x: points.armhole.x + 60 + 2 * sa
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return options.buttonholePlacketStyle === "seamless"
|
||||
|
|
|
@ -89,6 +89,48 @@ export default part => {
|
|||
|
||||
// Paperless?
|
||||
if (paperless) {
|
||||
macro("hd", {
|
||||
from: points.placketTopOut,
|
||||
to: points.placketTopEdge,
|
||||
y: points.placketTopEdge.y - 15 - sa
|
||||
});
|
||||
macro("hd", {
|
||||
from: points.cfNeck,
|
||||
to: points.placketTopEdge,
|
||||
y: points.placketTopEdge.y - 30 - sa
|
||||
});
|
||||
macro("hd", {
|
||||
from: points.placketTopIn,
|
||||
to: points.placketTopEdge,
|
||||
y: points.placketTopEdge.y - 45 - sa
|
||||
});
|
||||
macro("hd", {
|
||||
from: points.neck,
|
||||
to: points.placketTopEdge,
|
||||
y: points.neck.y - 15 - sa
|
||||
});
|
||||
macro("hd", {
|
||||
from: points.shoulder,
|
||||
to: points.placketTopEdge,
|
||||
y: points.neck.y - 30 - sa
|
||||
});
|
||||
let len =
|
||||
points.cfNeck.dist(points.cfHips) * (1 - options.buttonFreeLength);
|
||||
points.button0 = points.placketTopEdge;
|
||||
let j;
|
||||
for (let i = 0; i < options.buttons; i++) {
|
||||
j = i + 1;
|
||||
macro("vd", {
|
||||
from: points["button" + j],
|
||||
to: points["button" + i],
|
||||
x: points.placketTopEdge.x + 15 + sa
|
||||
});
|
||||
}
|
||||
macro("vd", {
|
||||
from: points.placketBottomEdge,
|
||||
to: points.placketTopEdge,
|
||||
x: points.placketTopEdge.x + 30 + sa
|
||||
});
|
||||
}
|
||||
|
||||
return part;
|
||||
|
|
|
@ -34,12 +34,44 @@ export default part => {
|
|||
if (complete) {
|
||||
// Title
|
||||
macro("title", { at: points.title, nr: "1a", title: "rightFront" });
|
||||
delete snippets["cfWaist-notch"];
|
||||
delete snippets["cfHips-notch"];
|
||||
delete snippets["cfArmhole-notch"];
|
||||
points.edgeArmhole = new Point(points.placketTopIn.x, points.armhole.y);
|
||||
points.edgeWaist = new Point(points.placketTopIn.x, points.waist.y);
|
||||
points.edgeHips = new Point(points.placketTopIn.x, points.hips.y);
|
||||
|
||||
if (sa) paths.saFromArmhole.line(paths.hemSa.start());
|
||||
}
|
||||
|
||||
// Paperless?
|
||||
if (paperless) {
|
||||
macro("hd", {
|
||||
from: points.neck,
|
||||
to: points.placketTopIn,
|
||||
y: points.neck.y - sa - 15
|
||||
});
|
||||
macro("hd", {
|
||||
from: points.shoulder,
|
||||
to: points.placketTopIn,
|
||||
y: points.neck.y - sa - 30
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.placketTopIn,
|
||||
to: points.neck,
|
||||
x: points.placketTopIn.x + sa + 15
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.placketBottomIn,
|
||||
to: points.placketTopIn,
|
||||
x: points.placketTopIn.x + sa + 15
|
||||
});
|
||||
for (let pid of ["Armhole", "Waist", "Hips"]) {
|
||||
macro("hd", {
|
||||
from: points["edge" + pid],
|
||||
to: points[pid.toLowerCase()]
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return part;
|
||||
|
|
|
@ -1,13 +1,33 @@
|
|||
import { frontDimensions } from "./shared";
|
||||
import frontRightClassicSeperate from "./frontright-classic-seperate";
|
||||
import frontRightClassicCuton from "./frontright-classic-cuton";
|
||||
import frontRightSeamless from "./frontright-seamless";
|
||||
|
||||
export default part => {
|
||||
let { macro, options, points } = part.shorthand();
|
||||
let {
|
||||
sa,
|
||||
options,
|
||||
complete,
|
||||
paperless,
|
||||
points,
|
||||
macro,
|
||||
paths
|
||||
} = part.shorthand();
|
||||
macro("flip");
|
||||
points.scalebox = points.waist.shiftFractionTowards(points.cfWaist, 0.5);
|
||||
macro("scalebox", { at: points.scalebox });
|
||||
|
||||
if (complete && paperless) {
|
||||
frontDimensions(part, "right");
|
||||
macro("ld", {
|
||||
from: points.shoulder,
|
||||
to: points.neck,
|
||||
d: 15 + sa
|
||||
});
|
||||
paths.hemSa.attr("data-text-dy", 7, true);
|
||||
paths.saFrench.attr("data-text-dy", 7, true);
|
||||
}
|
||||
|
||||
return options.buttonPlacketStyle === "seamless"
|
||||
? frontRightSeamless(part)
|
||||
: options.buttonPlacketType === "seperate"
|
||||
|
|
|
@ -248,3 +248,119 @@ export const paperlessFrenchCuff = part => {
|
|||
|
||||
return part;
|
||||
};
|
||||
|
||||
export const frontDimensions = (part, side = "left") => {
|
||||
let {
|
||||
sa,
|
||||
options,
|
||||
complete,
|
||||
paperless,
|
||||
points,
|
||||
macro,
|
||||
Path,
|
||||
paths
|
||||
} = part.shorthand();
|
||||
let factor = side === "right" ? -1 : 1;
|
||||
macro("banner", {
|
||||
path: "hemSa",
|
||||
text: ["hem", ": 3x", "seamAllowance"]
|
||||
});
|
||||
macro("banner", {
|
||||
path: "saFrench",
|
||||
text: ["frenchSeam", ": 2x", "seamAllowance"]
|
||||
});
|
||||
if (paperless) {
|
||||
macro("pd", {
|
||||
path: new Path()
|
||||
.move(points.armholePitch)
|
||||
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder),
|
||||
d: -15 * factor
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.armhole,
|
||||
to: points.armholePitch,
|
||||
x: points.armhole.x + (15 + sa * 2) * factor
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.armhole,
|
||||
to: points.shoulder,
|
||||
x: points.armhole.x + (30 + sa * 2) * factor
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.armhole,
|
||||
to: points.neck,
|
||||
x: points.armhole.x + (45 + sa * 2) * factor
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.waist,
|
||||
to: points.armhole,
|
||||
x: points.armhole.x + (15 + sa * 2) * factor
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.hips,
|
||||
to: points.armhole,
|
||||
x: points.armhole.x + (30 + sa * 2) * factor
|
||||
});
|
||||
if (options.hemStyle === "baseball") {
|
||||
macro("vd", {
|
||||
from: points.bballStart,
|
||||
to: points.bballEnd,
|
||||
x: points.hips.x + (15 + 2 * sa) * factor
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.bballStart,
|
||||
to: points.hips,
|
||||
x: points.hips.x + (30 + 2 * sa) * factor
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.bballStart,
|
||||
to: points.armhole,
|
||||
x: points.hips.x + (45 + 2 * sa) * factor
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.bballStart,
|
||||
to: points.neck,
|
||||
x: points.hips.x + (60 + 2 * sa) * factor
|
||||
});
|
||||
macro("hd", {
|
||||
from: points.bballStart,
|
||||
to: points.bballEnd,
|
||||
y: points.bballStart.y + 15 + 3 * sa
|
||||
});
|
||||
} else if (options.hemStyle === "slashed") {
|
||||
macro("vd", {
|
||||
from: points.slashEnd,
|
||||
to: points.slashStart,
|
||||
x: points.hips.x + (15 + 3 * sa) * factor
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.slashEnd,
|
||||
to: points.hips,
|
||||
x: points.hips.x + (30 + 3 * sa) * factor
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.slashEnd,
|
||||
to: points.armhole,
|
||||
x: points.hips.x + (45 + 3 * sa) * factor
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.slashEnd,
|
||||
to: points.neck,
|
||||
x: points.hips.x + (60 + 3 * sa) * factor
|
||||
});
|
||||
} else {
|
||||
macro("vd", {
|
||||
from: points.hem,
|
||||
to: points.armhole,
|
||||
x: points.armhole.x + (45 + 2 * sa) * factor
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.hem,
|
||||
to: points.neck,
|
||||
x: points.armhole.x + (60 + 2 * sa) * factor
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
return part;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue