1
0
Fork 0

sparkles: brianFitSleeve option and changes for freesewing v0.17

This commit is contained in:
Joost De Cock 2018-09-12 17:38:21 +02:00
parent 95a50bc07f
commit c4f58b0475
9 changed files with 122 additions and 1057 deletions

View file

@ -14,6 +14,7 @@ export default {
],
options: {
// Constants
brianFitSleeve: true,
collarFactor: 4.8,
// Percentages

View file

@ -26,6 +26,7 @@
;
pattern.settings.locale = 'nl';
pattern.settings.paperless = true;
//pattern.settings.complete = false;
pattern.settings.measurements = freesewing.models.men.manSize38;
pattern.settings.sa = 10;
pattern.settings.units = 'metric';
@ -34,7 +35,7 @@
focus: 'manSize34',
models: freesewing.models.men
}
pattern.settings.onl='base';
//pattern.sampleOption('shoulderSlopeReduction');
//pattern.sampleMeasurement('shoulderSlope');
//pattern.sampleModels(freesewing.models.men, 'manSize34');

File diff suppressed because it is too large Load diff

View file

@ -46,8 +46,8 @@
]
},
"dependencies": {
"@freesewing/plugin-bundle": "0.3.0",
"freesewing": "0.16.3"
"@freesewing/plugin-bundle": "^0.3",
"freesewing": "^0.17"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.56",

View file

@ -4,7 +4,7 @@ import * as shared from "./shared";
var back = {
draft: function(part) {
// 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
paths.saBase = shared.saBase("back", points, Path);
@ -21,8 +21,8 @@ var back = {
shared.shoulderToArmholePitch(points, Path)
);
// Final?
if (final) {
// Complete pattern?
if (complete) {
macro("cutonfold", {
from: points.cbNeck,
to: points.cbHips,

View file

@ -5,7 +5,7 @@ var base = {
part.render = false;
// 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(
"shoulderEase",
@ -113,8 +113,8 @@ var base = {
// Anchor point for sampling
points.gridAnchor = points.cbHips;
// Final?
if (final) {
// Complete pattern?
if (complete) {
points.title = new Point(
points.armholePitch.x / 2,
points.armholePitch.y

View file

@ -5,7 +5,7 @@ import * as shared from "./shared";
var front = {
draft: function(part) {
// 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
let deeper = measurements.chestCircumference * options.frontArmholeDeeper;
@ -41,8 +41,8 @@ var front = {
shared.shoulderToArmholePitch(points, Path)
);
// Final?
if (final) {
// Complete pattern?
if (complete) {
macro("cutonfold", {
from: points.cfNeck,
to: points.cfHips,

View file

@ -3,7 +3,7 @@ import freesewing from "freesewing";
var sleeve = {
draft: function(part) {
// 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
let top = paths.sleevecap.bbox().topLeft.y;
@ -18,6 +18,7 @@ var sleeve = {
(measurements.wristCircumference * (1 + options.cuffEase)) / 2
);
points.wristLeft = points.wristRight.rotate(180, points.centerWrist);
points.sleeveTip = paths.sleevecap.shiftFractionAlong(0.5);
// Paths
paths.sleevecap.render = false;
@ -33,8 +34,8 @@ var sleeve = {
// Anchor point for sampling
points.gridAnchor = new Point(0, 0);
// Final?
if (final) {
// Complete pattern?
if (complete) {
points.logo = points.centerBiceps.shiftFractionTowards(
points.centerWrist,
0.3
@ -48,7 +49,6 @@ var sleeve = {
);
macro("scalebox", { at: points.scalebox });
points.sleeveTip = paths.sleevecap.shiftFractionAlong(0.5);
points.frontNotch = paths.sleevecap.shiftAlong(
paths.sleevecap.length() / 2 -
store.get("frontShoulderToArmholePitch") -
@ -81,6 +81,11 @@ var sleeve = {
to: points.bicepsRight,
y: points.sleeveTip.y - sa - 30
});
macro("hd", {
from: points.wristLeft,
to: points.wristRight,
y: points.wristLeft.y + sa + 30
});
macro("pd", {
path: paths.sleevecap.reverse(),
d: -1 * sa - 15

View file

@ -147,7 +147,7 @@ function draftSleevecap(part, run) {
var sleevecap = {
draft: function(part) {
// 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);
let run = 1;
@ -160,7 +160,11 @@ var sleevecap = {
);
sleevecapAdjust(store);
run++;
} while (Math.abs(sleevecapDelta(store)) > 2 && run < 100);
} while (
options.brianFitSleeve === true &&
run < 100 &&
Math.abs(sleevecapDelta(store)) > 2
);
// Paths
paths.sleevecap.attr("class", "fabric");