sparkles: Paperless yoke
This commit is contained in:
parent
62565120cb
commit
fde568f35e
15 changed files with 266 additions and 30 deletions
|
@ -112,9 +112,9 @@ let settings1 = { ...settings };
|
|||
pattern1.settings.options.cuffButtonRows = 2;
|
||||
pattern1.settings.options.barrelCuffNarrowButton = "yes";
|
||||
pattern1.settings.options.cuffStyle = "straightBarrelCuff";
|
||||
//pattern1.settings.options.splitYoke = "yes";
|
||||
pattern1.settings.options.splitYoke = "yes";
|
||||
pattern1.settings.sa = 10;
|
||||
pattern1.settings.only = "collar";
|
||||
pattern1.settings.only = "yoke";
|
||||
pattern1.draft();
|
||||
console.log(pattern1);
|
||||
document.getElementById("svg1").innerHTML = pattern1.render();
|
||||
|
|
|
@ -1,8 +1,22 @@
|
|||
import { calculateReduction } from "./shared";
|
||||
|
||||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
// Populare store with data we need
|
||||
calculateReduction(part);
|
||||
|
|
|
@ -1,8 +1,22 @@
|
|||
import { addButtonHoles } from "./shared";
|
||||
|
||||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
if (
|
||||
options.buttonholePlacketType !== "seperate" ||
|
||||
|
|
|
@ -1,8 +1,22 @@
|
|||
import { addButtons } from "./shared";
|
||||
|
||||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
if (
|
||||
options.buttonPlacketType !== "seperate" ||
|
||||
|
|
|
@ -1,6 +1,20 @@
|
|||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
const draft = function(tweak = 1) {
|
||||
let length =
|
||||
|
|
|
@ -5,8 +5,22 @@ import {
|
|||
} from "./shared";
|
||||
|
||||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
draftBarrelCuff(part);
|
||||
let height = store.get("cuffHeight");
|
||||
|
|
|
@ -1,8 +1,22 @@
|
|||
import { calculateReduction } from "./shared";
|
||||
|
||||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
// Populare store with data we need
|
||||
calculateReduction(part);
|
||||
|
|
|
@ -1,8 +1,22 @@
|
|||
import { addButtonHoles } from "./shared";
|
||||
|
||||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
let fold = options.buttonholePlacketFoldWidth;
|
||||
let width = options.buttonholePlacketWidth;
|
||||
|
|
|
@ -1,8 +1,22 @@
|
|||
import { addButtonHoles } from "./shared";
|
||||
|
||||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
let fold = options.buttonholePlacketFoldWidth;
|
||||
points.neckEdge = utils.lineIntersectsCurve(
|
||||
|
|
|
@ -1,8 +1,22 @@
|
|||
import { addButtonHoles } from "./shared";
|
||||
|
||||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
console.log("seamless buttonjholes");
|
||||
let fold = options.buttonholePlacketFoldWidth;
|
||||
|
|
|
@ -1,8 +1,22 @@
|
|||
import { addButtons } from "./shared";
|
||||
|
||||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
let width = options.buttonPlacketWidth;
|
||||
points.placketTopIn = utils.lineIntersectsCurve(
|
||||
|
|
|
@ -1,6 +1,20 @@
|
|||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
let width = options.buttonPlacketWidth;
|
||||
points.placketTopIn = utils.lineIntersectsCurve(
|
||||
|
|
|
@ -1,8 +1,22 @@
|
|||
import { addButtons } from "./shared";
|
||||
|
||||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
let width = options.buttonPlacketWidth;
|
||||
points.placketTopFold1 = points.cfNeck.shift(0, width / 2);
|
||||
|
|
|
@ -1,8 +1,22 @@
|
|||
import { calculateReduction } from "./shared";
|
||||
|
||||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
// TODO: Sleeve pleats
|
||||
|
||||
|
|
|
@ -1,8 +1,22 @@
|
|||
import { calculateReduction } from "./shared";
|
||||
|
||||
export default part => {
|
||||
// prettier-ignore
|
||||
let {store, measurements, utils, sa, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro, options} = part.shorthand();
|
||||
let {
|
||||
store,
|
||||
measurements,
|
||||
utils,
|
||||
sa,
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
paperless,
|
||||
macro,
|
||||
options
|
||||
} = part.shorthand();
|
||||
|
||||
for (let id of Object.keys(part.paths)) delete part.paths[id];
|
||||
|
||||
|
@ -63,6 +77,46 @@ export default part => {
|
|||
|
||||
// Paperless?
|
||||
if (paperless) {
|
||||
macro("pd", {
|
||||
path: new Path().move(points.cbNeck)._curve(points.neckCp2, points.neck),
|
||||
d: 15
|
||||
});
|
||||
macro("hd", {
|
||||
from: points.cbNeck,
|
||||
to: points.neck,
|
||||
y: points.neck.y - 15 - sa
|
||||
});
|
||||
macro("ld", {
|
||||
from: points.neck,
|
||||
to: points.shoulder,
|
||||
d: 15 + sa
|
||||
});
|
||||
macro("hd", {
|
||||
from: points.cbYoke,
|
||||
to: points.armholePitch,
|
||||
y: points.cbYoke.y + 15 + sa
|
||||
});
|
||||
macro("hd", {
|
||||
from: points.cbYoke,
|
||||
to: points.shoulder,
|
||||
y: points.cbYoke.y + 30 + sa
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.cbYoke,
|
||||
to: points.cbNeck,
|
||||
x: points.cbYoke.x - 15 - sa
|
||||
});
|
||||
macro("pd", {
|
||||
path: new Path()
|
||||
.move(points.armholePitch)
|
||||
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder),
|
||||
d: 15 + sa
|
||||
});
|
||||
macro("vd", {
|
||||
from: points.armholePitch,
|
||||
to: points.shoulder,
|
||||
x: points.shoulder.x + 30 + sa
|
||||
});
|
||||
}
|
||||
|
||||
return part;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue