sparkles: brianFitSleeve option and changes for freesewing v0.17
This commit is contained in:
parent
95a50bc07f
commit
c4f58b0475
9 changed files with 122 additions and 1057 deletions
|
@ -14,6 +14,7 @@ export default {
|
||||||
],
|
],
|
||||||
options: {
|
options: {
|
||||||
// Constants
|
// Constants
|
||||||
|
brianFitSleeve: true,
|
||||||
collarFactor: 4.8,
|
collarFactor: 4.8,
|
||||||
|
|
||||||
// Percentages
|
// Percentages
|
||||||
|
|
|
@ -26,6 +26,7 @@
|
||||||
;
|
;
|
||||||
pattern.settings.locale = 'nl';
|
pattern.settings.locale = 'nl';
|
||||||
pattern.settings.paperless = true;
|
pattern.settings.paperless = true;
|
||||||
|
//pattern.settings.complete = false;
|
||||||
pattern.settings.measurements = freesewing.models.men.manSize38;
|
pattern.settings.measurements = freesewing.models.men.manSize38;
|
||||||
pattern.settings.sa = 10;
|
pattern.settings.sa = 10;
|
||||||
pattern.settings.units = 'metric';
|
pattern.settings.units = 'metric';
|
||||||
|
@ -34,7 +35,7 @@
|
||||||
focus: 'manSize34',
|
focus: 'manSize34',
|
||||||
models: freesewing.models.men
|
models: freesewing.models.men
|
||||||
}
|
}
|
||||||
|
pattern.settings.onl='base';
|
||||||
//pattern.sampleOption('shoulderSlopeReduction');
|
//pattern.sampleOption('shoulderSlopeReduction');
|
||||||
//pattern.sampleMeasurement('shoulderSlope');
|
//pattern.sampleMeasurement('shoulderSlope');
|
||||||
//pattern.sampleModels(freesewing.models.men, 'manSize34');
|
//pattern.sampleModels(freesewing.models.men, 'manSize34');
|
||||||
|
|
1132
packages/brian/package-lock.json
generated
1132
packages/brian/package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
@ -46,8 +46,8 @@
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@freesewing/plugin-bundle": "0.3.0",
|
"@freesewing/plugin-bundle": "^0.3",
|
||||||
"freesewing": "0.16.3"
|
"freesewing": "^0.17"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@babel/core": "7.0.0-beta.56",
|
"@babel/core": "7.0.0-beta.56",
|
||||||
|
|
|
@ -4,7 +4,7 @@ import * as shared from "./shared";
|
||||||
var back = {
|
var back = {
|
||||||
draft: function(part) {
|
draft: function(part) {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
let {store, sa, points, Path, paths, Snippet, snippets, final, paperless, macro} = part.shorthand();
|
let {store, sa, points, Path, paths, Snippet, snippets, complete, paperless, macro} = part.shorthand();
|
||||||
|
|
||||||
// Seamline
|
// Seamline
|
||||||
paths.saBase = shared.saBase("back", points, Path);
|
paths.saBase = shared.saBase("back", points, Path);
|
||||||
|
@ -21,8 +21,8 @@ var back = {
|
||||||
shared.shoulderToArmholePitch(points, Path)
|
shared.shoulderToArmholePitch(points, Path)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Final?
|
// Complete pattern?
|
||||||
if (final) {
|
if (complete) {
|
||||||
macro("cutonfold", {
|
macro("cutonfold", {
|
||||||
from: points.cbNeck,
|
from: points.cbNeck,
|
||||||
to: points.cbHips,
|
to: points.cbHips,
|
||||||
|
|
|
@ -5,7 +5,7 @@ var base = {
|
||||||
part.render = false;
|
part.render = false;
|
||||||
|
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
let {measurements, options, store, points, snippets, Point, Snippet, utils, final } = part.shorthand();
|
let {measurements, options, store, points, snippets, Point, Snippet, utils, complete } = part.shorthand();
|
||||||
|
|
||||||
store.set(
|
store.set(
|
||||||
"shoulderEase",
|
"shoulderEase",
|
||||||
|
@ -113,8 +113,8 @@ var base = {
|
||||||
// Anchor point for sampling
|
// Anchor point for sampling
|
||||||
points.gridAnchor = points.cbHips;
|
points.gridAnchor = points.cbHips;
|
||||||
|
|
||||||
// Final?
|
// Complete pattern?
|
||||||
if (final) {
|
if (complete) {
|
||||||
points.title = new Point(
|
points.title = new Point(
|
||||||
points.armholePitch.x / 2,
|
points.armholePitch.x / 2,
|
||||||
points.armholePitch.y
|
points.armholePitch.y
|
||||||
|
|
|
@ -5,7 +5,7 @@ import * as shared from "./shared";
|
||||||
var front = {
|
var front = {
|
||||||
draft: function(part) {
|
draft: function(part) {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
let {store, sa, Point, points, Path, paths, Snippet, snippets, options, measurements, final, paperless, macro} = part.shorthand();
|
let {store, sa, Point, points, Path, paths, Snippet, snippets, options, measurements, complete, paperless, macro} = part.shorthand();
|
||||||
|
|
||||||
// Cut arm a bit deeper at the front
|
// Cut arm a bit deeper at the front
|
||||||
let deeper = measurements.chestCircumference * options.frontArmholeDeeper;
|
let deeper = measurements.chestCircumference * options.frontArmholeDeeper;
|
||||||
|
@ -41,8 +41,8 @@ var front = {
|
||||||
shared.shoulderToArmholePitch(points, Path)
|
shared.shoulderToArmholePitch(points, Path)
|
||||||
);
|
);
|
||||||
|
|
||||||
// Final?
|
// Complete pattern?
|
||||||
if (final) {
|
if (complete) {
|
||||||
macro("cutonfold", {
|
macro("cutonfold", {
|
||||||
from: points.cfNeck,
|
from: points.cfNeck,
|
||||||
to: points.cfHips,
|
to: points.cfHips,
|
||||||
|
|
|
@ -3,7 +3,7 @@ import freesewing from "freesewing";
|
||||||
var sleeve = {
|
var sleeve = {
|
||||||
draft: function(part) {
|
draft: function(part) {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
let {debug, store, units, sa, measurements, options, Point, points, Path, paths, Snippet, snippets, final, paperless, macro} = part.shorthand();
|
let {debug, store, units, sa, measurements, options, Point, points, Path, paths, Snippet, snippets, complete, paperless, macro} = part.shorthand();
|
||||||
|
|
||||||
// Wrist
|
// Wrist
|
||||||
let top = paths.sleevecap.bbox().topLeft.y;
|
let top = paths.sleevecap.bbox().topLeft.y;
|
||||||
|
@ -18,6 +18,7 @@ var sleeve = {
|
||||||
(measurements.wristCircumference * (1 + options.cuffEase)) / 2
|
(measurements.wristCircumference * (1 + options.cuffEase)) / 2
|
||||||
);
|
);
|
||||||
points.wristLeft = points.wristRight.rotate(180, points.centerWrist);
|
points.wristLeft = points.wristRight.rotate(180, points.centerWrist);
|
||||||
|
points.sleeveTip = paths.sleevecap.shiftFractionAlong(0.5);
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
paths.sleevecap.render = false;
|
paths.sleevecap.render = false;
|
||||||
|
@ -33,8 +34,8 @@ var sleeve = {
|
||||||
// Anchor point for sampling
|
// Anchor point for sampling
|
||||||
points.gridAnchor = new Point(0, 0);
|
points.gridAnchor = new Point(0, 0);
|
||||||
|
|
||||||
// Final?
|
// Complete pattern?
|
||||||
if (final) {
|
if (complete) {
|
||||||
points.logo = points.centerBiceps.shiftFractionTowards(
|
points.logo = points.centerBiceps.shiftFractionTowards(
|
||||||
points.centerWrist,
|
points.centerWrist,
|
||||||
0.3
|
0.3
|
||||||
|
@ -48,7 +49,6 @@ var sleeve = {
|
||||||
);
|
);
|
||||||
macro("scalebox", { at: points.scalebox });
|
macro("scalebox", { at: points.scalebox });
|
||||||
|
|
||||||
points.sleeveTip = paths.sleevecap.shiftFractionAlong(0.5);
|
|
||||||
points.frontNotch = paths.sleevecap.shiftAlong(
|
points.frontNotch = paths.sleevecap.shiftAlong(
|
||||||
paths.sleevecap.length() / 2 -
|
paths.sleevecap.length() / 2 -
|
||||||
store.get("frontShoulderToArmholePitch") -
|
store.get("frontShoulderToArmholePitch") -
|
||||||
|
@ -81,6 +81,11 @@ var sleeve = {
|
||||||
to: points.bicepsRight,
|
to: points.bicepsRight,
|
||||||
y: points.sleeveTip.y - sa - 30
|
y: points.sleeveTip.y - sa - 30
|
||||||
});
|
});
|
||||||
|
macro("hd", {
|
||||||
|
from: points.wristLeft,
|
||||||
|
to: points.wristRight,
|
||||||
|
y: points.wristLeft.y + sa + 30
|
||||||
|
});
|
||||||
macro("pd", {
|
macro("pd", {
|
||||||
path: paths.sleevecap.reverse(),
|
path: paths.sleevecap.reverse(),
|
||||||
d: -1 * sa - 15
|
d: -1 * sa - 15
|
||||||
|
|
|
@ -147,7 +147,7 @@ function draftSleevecap(part, run) {
|
||||||
var sleevecap = {
|
var sleevecap = {
|
||||||
draft: function(part) {
|
draft: function(part) {
|
||||||
// prettier-ignore
|
// prettier-ignore
|
||||||
let {debug, store, units, sa, measurements, options, Point, points, Path, paths, Snippet, snippets, final, paperless, macro} = part.shorthand();
|
let {debug, store, units, sa, measurements, options, Point, points, Path, paths } = part.shorthand();
|
||||||
|
|
||||||
store.set("sleeveFactor", 1);
|
store.set("sleeveFactor", 1);
|
||||||
let run = 1;
|
let run = 1;
|
||||||
|
@ -160,7 +160,11 @@ var sleevecap = {
|
||||||
);
|
);
|
||||||
sleevecapAdjust(store);
|
sleevecapAdjust(store);
|
||||||
run++;
|
run++;
|
||||||
} while (Math.abs(sleevecapDelta(store)) > 2 && run < 100);
|
} while (
|
||||||
|
options.brianFitSleeve === true &&
|
||||||
|
run < 100 &&
|
||||||
|
Math.abs(sleevecapDelta(store)) > 2
|
||||||
|
);
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
paths.sleevecap.attr("class", "fabric");
|
paths.sleevecap.attr("class", "fabric");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue