diff --git a/packages/breanna/config/index.js b/packages/breanna/config/index.js index 5652af6266d..2d48b74986a 100644 --- a/packages/breanna/config/index.js +++ b/packages/breanna/config/index.js @@ -37,7 +37,7 @@ export default { 'acrossBackFactor', 'armholeDepthFactor', 'frontArmholeDeeper', - //'shoulderSlopeReduction', + 'shoulderSlopeReduction', 'sleeveWidthGuarantee', { sleevecap: [ @@ -96,26 +96,15 @@ export default { options: { // Constants collarFactor: 4.8, - armholeDepthBase: 0.65, + armholeDepthBase: 0.6, breannaFitSleeve: true, breannaFitCollar: true, - // Percentages - acrossBackFactor: { pct: 97, min: 93, max: 100 }, - armholeDepthFactor: { pct: 100, min: 80, max: 120 }, + // Booleans shoulderDart: { bool: false }, - shoulderDartSize: { pct: 7, min: 4, max: 10 }, - shoulderDartLength: { pct: 85, min: 60, max: 100 }, waistDart: { bool: true }, - waistDartSize: { pct: 10, min: 4, max: 15 }, - waistDartLength: { pct: 85, min: 60, max: 100 }, - verticalEase: { pct: 1, min: 0, max: 5 }, - frontArmholeDeeper: { pct: 0.5, min: 0, max: 1.5 }, - shoulderEase: { pct: 0, min: -2, max: 6 }, - collarEase: { pct: 3.5, min: 0, max: 10 }, - chestEase: { pct: 8, min: -4, max: 20 }, - waistEase: { pct: 8, min: -4, max: 20 }, + // Lists primaryBustDart: { list: [ '06:00', @@ -134,7 +123,7 @@ export default { '16:00', '17:00' ], - dflt: '14:00' + dflt: '06:00' }, secondaryBustDart: { list: [ @@ -155,16 +144,28 @@ export default { '16:00', '17:00' ], - dflt: '15:00' + dflt: '13:30' }, + + // Percentages + acrossBackFactor: { pct: 96, min: 93, max: 100 }, + armholeDepthFactor: { pct: 100, min: 80, max: 120 }, + shoulderDartSize: { pct: 7, min: 4, max: 10 }, + shoulderDartLength: { pct: 85, min: 60, max: 100 }, + waistDartSize: { pct: 10, min: 4, max: 15 }, + waistDartLength: { pct: 85, min: 60, max: 100 }, + verticalEase: { pct: 2, min: 0, max: 8 }, + frontArmholeDeeper: { pct: 1, min: 0, max: 5 }, + shoulderEase: { pct: 0, min: 0, max: 4 }, + collarEase: { pct: 3.5, min: 0, max: 10 }, + chestEase: { pct: 10, min: 5, max: 20 }, + waistEase: { pct: 10, min: 5, max: 20 }, primaryBustDartShaping: { pct: 50, min: 25, max: 75 }, primaryBustDartLength: { pct: 85, min: 65, max: 95 }, secondaryBustDartLength: { pct: 85, min: 65, max: 95 }, - - //shoulderSlopeReduction: { pct: 0, min: 0, max: 100 }, - + shoulderSlopeReduction: { pct: 0, min: 0, max: 100 }, bicepsEase: { pct: 15, min: 0, max: 50 }, - cuffEase: { pct: 20, min: 0, max: 200 }, + cuffEase: { pct: 20, min: 0, max: 50 }, sleevecapEase: { pct: 1, min: 0, max: 10 }, sleevecapTopFactorX: { pct: 50, min: 25, max: 75 }, sleevecapTopFactorY: { pct: 100, min: 35, max: 165 }, diff --git a/packages/breanna/package.json b/packages/breanna/package.json index c89f79579ca..758620bab40 100644 --- a/packages/breanna/package.json +++ b/packages/breanna/package.json @@ -1,6 +1,6 @@ { "name": "@freesewing/breanna", - "version": "2.1.6", + "version": "2.2.0-beta.0", "description": "A FreeSewing pattern for a basic body block for womenswear", "author": "Joost De Cock (https://github.com/joostdecock)", "homepage": "https://freesewing.org/", diff --git a/packages/breanna/src/back.js b/packages/breanna/src/back.js index c6d36cee922..61ae6fb39e7 100644 --- a/packages/breanna/src/back.js +++ b/packages/breanna/src/back.js @@ -172,6 +172,9 @@ export default part => { .length() * 2 ) + // Anchor point + points.gridAnchor = points.cbNeck.clone() + // Complete pattern? if (complete) { // Title @@ -277,12 +280,5 @@ export default part => { }) } - macro('pd', { - path: new Path() - .move(points.armhole) - .curve(points.armholeCp2, points.armholePitchCp1, points.armholePitch) - .curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder), - d: 15 - }) return part } diff --git a/packages/breanna/src/base.js b/packages/breanna/src/base.js index 1b0cc1fc1dc..e463023f21e 100644 --- a/packages/breanna/src/base.js +++ b/packages/breanna/src/base.js @@ -17,27 +17,29 @@ export default part => { } = part.shorthand() // Shoulder - if (true) { - points.cbHps = new Point(0, 0) - // Step 1/3: no vertical ease to make sure shoulder slope is not influenced - points.cbWaist = new Point(0, measurements.hpsToWaistBack) - points.cbHips = new Point(0, measurements.hpsToHipsBack) - points.shoulder = utils - .circlesIntersect( - points.cbHps, - measurements.shoulderToShoulder / 2, - points.cbHips, - measurements.shoulderSlope, - 'y' - ) - .shift() - // Step 2/3: add vertical ease to waist and hips - points.cbWaist = new Point(0, measurements.hpsToWaistBack * (1 + options.verticalEase)) - points.cbHips = new Point(0, measurements.hpsToHipsBack * (1 + options.verticalEase)) - } + points.cbHps = new Point(0, 0) + // Step 1/3: no vertical ease to make sure shoulder slope is not influenced + points.cbWaist = new Point(0, measurements.hpsToWaistBack) + points.cbHips = new Point(0, measurements.hpsToHipsBack) + points.shoulder = utils + .circlesIntersect( + points.cbHps, + measurements.shoulderToShoulder / 2, + points.cbHips, + measurements.shoulderSlope, + 'y' + ) + .shift() + + // Step 2/3: add vertical ease to waist and hips + points.cbWaist = new Point(0, measurements.hpsToWaistBack * (1 + options.verticalEase)) + points.cbHips = new Point(0, measurements.hpsToHipsBack * (1 + options.verticalEase)) // Neck - points.cbNeck = points.cbHips.shift(90, measurements.centerBackNeckToHips) + points.cbNeck = points.cbHips.shift( + 90, + measurements.centerBackNeckToHips * (1 + options.verticalEase) + ) points.hps = new Point( (measurements.neckCircumference * (1 + options.collarEase)) / options.collarFactor, 0 @@ -49,8 +51,16 @@ export default part => { ) points.waist = points.cbWaist.shift(0, (measurements.naturalWaist * (1 + options.waistEase)) / 4) + if (points.shoulder.y < points.hps.y) { + // Shoulder should never be higher than HPS + points.shoulder = utils.beamIntersectsY(points.shoulder, points.cbHips, points.hps.y) + } else { + // Take shoulder slope reduction into account + points.shoulder.y -= (points.shoulder.y - points.hps.y) * options.shoulderSlopeReduction + } + // Step 3/3: Add shoulder ease to shoulder point - points.shouder = points.hps.shiftOutwards( + points.shoulder = points.hps.shiftOutwards( points.shoulder, (measurements.shoulderToShoulder * options.shoulderEase) / 2 ) @@ -60,7 +70,8 @@ export default part => { ((measurements.highBust - measurements.highBustFront) * (1 + options.chestEase)) / 2, (points.shoulder.y + measurements.bicepsCircumference * options.armholeDepthBase) * options.armholeDepthFactor * - (1 + options.verticalEase) + (1 + options.verticalEase) * + (1 + options.bicepsEase) ) points.armholePitch = new Point( (measurements.shoulderToShoulder * options.acrossBackFactor * (1 + options.shoulderEase)) / 2, @@ -72,7 +83,7 @@ export default part => { points.armholePitch.x ) points.shoulderCp1 = points.shoulder - .shiftTowards(points.hps, points.shoulder.dist(points.armholePitch) / 5) + .shiftTowards(points.hps, points.shoulder.dist(points.armholePitch) / 8) .rotate(90, points.shoulder) points.armholePitchCp2 = points.armholePitch.shift( 90, diff --git a/packages/breanna/src/front-base.js b/packages/breanna/src/front-base.js index 03006e2ae1e..6f2dd55924e 100644 --- a/packages/breanna/src/front-base.js +++ b/packages/breanna/src/front-base.js @@ -48,10 +48,8 @@ export default part => { // Armhole deeper at the front if (options.frontArmholeDeeper > 0) { - let deeper = (measurements.shoulderToShoulder * options.frontArmholeDeeper) / 2 - points.armholePitch = points.armholePitch.shift(180, deeper) - points.armholePitchCp1 = points.armholePitch.shift(180, deeper) - points.armholePitchCp2 = points.armholePitch.shift(180, deeper) + for (let p of ['armholePitch', 'armholePitchCp1', 'armholePitchCp2']) + points[p].x -= (measurements.shoulderToShoulder * options.frontArmholeDeeper) / 2 } // Bust @@ -64,14 +62,15 @@ export default part => { // Work in room for bust from armhole pitch point down let bustDelta = - (points.armhole.dx(points.bustSide) * points.armhole.dy(points.bustSide)) / + (points.armhole.dx(points.bustSide) * points.armholePitch.dy(points.armhole)) / points.armholePitch.dy(points.bustSide) points.armhole = points.armhole.shift(0, bustDelta) // Adjust waist down to accomodate bust points.cfWaist = new Point( 0, - measurements.hpsToHipsFront - (measurements.hpsToHipsBack - measurements.hpsToWaistBack) + measurements.hpsToHipsFront * (1 + options.verticalEase) - + (measurements.hpsToHipsBack - measurements.hpsToWaistBack) * (1 + options.verticalEase) ) points.waist = utils.beamIntersectsY(points.armhole, points.bustSide, points.cfWaist.y) points.waist = points.armhole.shiftTowards(points.waist, store.get('backSideSeamLength')) diff --git a/packages/breanna/src/front.js b/packages/breanna/src/front.js index 32c4882290d..41885f7b263 100644 --- a/packages/breanna/src/front.js +++ b/packages/breanna/src/front.js @@ -141,6 +141,9 @@ export default part => { paths.seam.close().attr('class', 'fabric') paths.saBase.close().render = false + // Anchor point + points.gridAnchor = points.cfNeck.clone() + // Complete pattern? if (complete) { // Logo @@ -246,13 +249,5 @@ export default part => { } } - macro('pd', { - path: new Path() - .move(points.armhole) - .curve(points.armholeCp2, points.armholePitchCp1, points.armholePitch) - .curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder), - d: 15 - }) - return part } diff --git a/packages/breanna/src/sleeve.js b/packages/breanna/src/sleeve.js index a82a60d73e7..dc79bd147c7 100644 --- a/packages/breanna/src/sleeve.js +++ b/packages/breanna/src/sleeve.js @@ -20,7 +20,8 @@ export default part => { let top = paths.sleevecap.edge('topLeft').y points.centerWrist = new Point( 0, - top + measurements.shoulderToWrist * (1 + options.sleeveLengthBonus) + top + + measurements.shoulderToWrist * (1 + options.sleeveLengthBonus) * (1 + options.verticalEase) ) points.wristRight = points.centerWrist.shift( 0, @@ -72,7 +73,7 @@ export default part => { else if (q4Len > backTarget) points.backNotch = q4.shiftAlong(backTarget) else { let q3 = new Path().move(points.capQ4).curve(points.capQ4Cp1, points.capQ3Cp2, points.capQ3) - points.backNotch = q3.shiftAlong(frontTarget - q4Len) + points.backNotch = q3.shiftAlong(backTarget - q4Len) } snippets.frontNotch = new Snippet('notch', points.frontNotch) snippets.backNotch = new Snippet('bnotch', points.backNotch) diff --git a/packages/core/src/path.js b/packages/core/src/path.js index ee9ee7a230e..d5cd77a6953 100644 --- a/packages/core/src/path.js +++ b/packages/core/src/path.js @@ -1,6 +1,6 @@ import Attributes from './attributes' import Point from './point' -import Bezier from '@freesewing/bezier-js' +import Bezier from 'bezier-js' import { linesIntersect, lineIntersectsCurve, diff --git a/packages/core/src/utils.js b/packages/core/src/utils.js index ef71f661c0d..a3c5b8346cf 100644 --- a/packages/core/src/utils.js +++ b/packages/core/src/utils.js @@ -1,6 +1,6 @@ import Path from './path' import Point from './point' -import Bezier from '@freesewing/bezier-js' +import Bezier from 'bezier-js' export function capitalize(string) { return string.charAt(0).toUpperCase() + string.slice(1) diff --git a/packages/i18n/src/locales/en/options/breanna.yml b/packages/i18n/src/locales/en/options/breanna.yml new file mode 100644 index 00000000000..d4c87839936 --- /dev/null +++ b/packages/i18n/src/locales/en/options/breanna.yml @@ -0,0 +1,40 @@ +shoulderDart: + title: Shoulder dart + description: Whether or not to inlude a dart at the shoulder to round the back +shoulderDartSize: + title: Shoulder dart size + description: The size of the shoulder dart +shoulderDartLength: + title: Shoulder dart length + description: The length of the shoulder dart +waistDart: + title: Waist dart + description: Whether or not to inlude a dart at the waist to round the back +waistDartSize: + title: Waist dart size + description: The size of the waist dart +waistDartLength: + title: Waist dart length + description: The length of the waist dart +verticalEase: + title: Vertical ease + description: The amount of ease to distribute along the length of the garment +waistEase: + title: Waist ease + description: The amount of ease at the waist +primaryBustDart: + title: Bust dart + description: Where to place the bust dart to shape the chest +primaryBustDartLength: + title: Bust dart length + description: The length of the bust dart +secondaryBustDart: + title: Secondary bust dart + description: Optionally include a secondary bust dart to distribute the shaping of the chest +secondaryBustDartLength: + title: Secondary bust dart length + description: The length of the secondary bust dart +primaryBustDartShaping: + title: Bust darts shaping + description: Controls the balance between the main and secondary bust darts + diff --git a/packages/i18n/src/locales/en/options/index.js b/packages/i18n/src/locales/en/options/index.js index 8efa9c17445..0834f83ad59 100644 --- a/packages/i18n/src/locales/en/options/index.js +++ b/packages/i18n/src/locales/en/options/index.js @@ -1,4 +1,5 @@ import brian from './brian.yml' +import breanna from './breanna.yml' import aaron from './aaron.yml' import simon from './simon.yml' import simone from './simone.yml' @@ -26,6 +27,7 @@ import shared from '../../../shared-options.yml' let patterns = { brian, + breanna, aaron, simon, simone, diff --git a/packages/i18n/src/locales/en/patterns.yml b/packages/i18n/src/locales/en/patterns.yml index 8408d10ab38..b1bc35fada9 100644 --- a/packages/i18n/src/locales/en/patterns.yml +++ b/packages/i18n/src/locales/en/patterns.yml @@ -7,8 +7,11 @@ benjamin: bent: description: This two-part sleeve block is the basis of our coat and jacket patterns. title: Bent body Block +breanna: + description: Breanna is a basic body block for womenswear. + title: Breanna body block brian: - description: Brian is a basic body block for men. + description: Brian is a basic body block for menswear. title: Brian body block bruce: description: Bruce are comfortable yet stylish boxer briefs. diff --git a/packages/i18n/src/shared-options.yml b/packages/i18n/src/shared-options.yml index fd3c1070fc2..ad7d7506519 100644 --- a/packages/i18n/src/shared-options.yml +++ b/packages/i18n/src/shared-options.yml @@ -4,6 +4,8 @@ benjamin: dflt: brian bent: dflt: brian +breanna: + dflt: brian carlton: dflt: brian other: diff --git a/packages/pattern-info/src/prebuild.js b/packages/pattern-info/src/prebuild.js index 10e606a98c6..6ccde0f19bc 100644 --- a/packages/pattern-info/src/prebuild.js +++ b/packages/pattern-info/src/prebuild.js @@ -4,6 +4,7 @@ const aaron = require('@freesewing/aaron').config const benjamin = require('@freesewing/benjamin').config const bent = require('@freesewing/bent').config const brian = require('@freesewing/brian').config +const breanna = require('@freesewing/breanna').config const bruce = require('@freesewing/bruce').config const carlita = require('@freesewing/carlita').config const carlton = require('@freesewing/carlton').config @@ -29,6 +30,7 @@ const patterns = { benjamin, bent, brian, + breanna, bruce, carlita, carlton,