diff --git a/packages/brian/config/config.js b/packages/brian/config/config.js index 4ceb1de7312..f3611deed75 100644 --- a/packages/brian/config/config.js +++ b/packages/brian/config/config.js @@ -27,7 +27,7 @@ export default { { id: "sleeveLengthBonus", val: 0, min: -40, max: 80 }, // Percentages - { id: "frontArmholeDeeper", val: 1, type: "%" }, + { id: "frontArmholeDeeper", val: 0.5, type: "%" }, { id: "chestEase", val: 8, type: "%", min: -4, max: 20 }, { id: "collarEase", val: 3.5, type: "%", min: 0, max: 10 }, { id: "bicepsEase", val: 15, type: "%", min: 0, max: 100 }, diff --git a/packages/brian/src/back.js b/packages/brian/src/back.js index dd1c7f8a082..01dfd2a289f 100644 --- a/packages/brian/src/back.js +++ b/packages/brian/src/back.js @@ -41,7 +41,7 @@ var back = { points.armholePitch.x / 2, points.armholePitch.y ); - macro("title", { at: points.title, nr: 2 }); + macro("title", { at: points.title, nr: 2, title: "back" }); points.logo = points.title.shift(-90, 100); snippets.logo = new snippet("logo", points.logo); @@ -95,6 +95,7 @@ var back = { }); macro("ld", { from: points.neck, to: points.shoulder, d: sa + 15 }); macro("pd", { + id: "armholeLengthDimension", path: new path() .move(points.armhole) .curve(points.armholeCp1, points.armholeCp2, points.armholeHollow) @@ -111,6 +112,7 @@ var back = { d: sa + 15 }); macro("pd", { + id: "armholePitchDimension", path: new path() .move(points.armholePitch) .curve( diff --git a/packages/brian/src/front.js b/packages/brian/src/front.js index cbcc9c5ce23..a43522f0bc1 100644 --- a/packages/brian/src/front.js +++ b/packages/brian/src/front.js @@ -2,11 +2,75 @@ import freesewing from "freesewing"; import base from "./base"; var front = { - draft: function(part) { - // prettier-ignore - let {sa, point, points, path, paths, snippet, snippets, final, paperless, macro} = freesewing.utils.shorthand(part); + draft: function(pattern) { + let part = new pattern.part().copy(pattern.parts.back); + + // prettier-ignore + let {sa, point, points, path, paths, snippet, snippets, options, measurements, final, paperless, macro} = freesewing.utils.shorthand(part); + + let deeper = measurements.chestCircumference * options.frontArmholeDeeper; + points.armholeHollowCp2.x -= deeper; + points.armholePitch.x -= deeper; + points.armholePitchCp1.x -= deeper; + + paths.seam = null; + paths.seam = new path() + .move(points.cbNeck) + .line(points.cbHips) + .line(points.hips) + .line(points.armhole) + .curve(points.armholeCp1, points.armholeCp2, points.armholeHollow) + .curve( + points.armholeHollowCp1, + points.armholeHollowCp2, + points.armholePitch + ) + .curve(points.armholePitchCp1, points.armholePitchCp2, points.shoulder) + .line(points.neck) + .curve(points.neckCp1, points.cbNeck, points.cbNeck) + .close() + .attr("class", "fabric"); + + // Final? + if (final) { + macro("title", { at: points.title, nr: 1, title: "front" }); + snippets.armholePitchNotch = new snippet("notch", points.armholePitch); + if (sa) paths.sa = paths.seam.offset(sa).attr("class", "fabric sa"); + } + + // Paperless? + + if (paperless) { + macro("pd", { + id: "armholeLengthDimension", + path: new path() + .move(points.armhole) + .curve(points.armholeCp1, points.armholeCp2, points.armholeHollow) + .curve( + points.armholeHollowCp1, + points.armholeHollowCp2, + points.armholePitch + ) + .curve( + points.armholePitchCp1, + points.armholePitchCp2, + points.shoulder + ), + d: sa + 15 + }); + macro("pd", { + id: "armholePitchDimension", + path: new path() + .move(points.armholePitch) + .curve( + points.armholePitchCp1, + points.armholePitchCp2, + points.shoulder + ), + d: -15 + }); + } - macro("title", { at: points.title, nr: 1 }); return part; } }; diff --git a/packages/brian/src/index.js b/packages/brian/src/index.js index 74de651e34f..b5c6bb02648 100644 --- a/packages/brian/src/index.js +++ b/packages/brian/src/index.js @@ -18,6 +18,7 @@ var pattern = new freesewing.pattern({ version: version, ...config }) pattern.draft = function() { pattern.parts.back = back.draft(pattern); + pattern.parts.front = front.draft(pattern); // Clone back //pattern.parts.front = pattern.parts.back.clone(pattern.parts.front.id); // Draft front