From 9807f9a1eb37782eddb521f76272bd01eefca6d2 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Fri, 27 Oct 2023 04:43:09 +0000 Subject: [PATCH] Adjusted defaults and armhole calc --- designs/tristan/src/backoutside.mjs | 9 +++- designs/tristan/src/backpoints.mjs | 56 ++++++++++++++--------- designs/tristan/src/frontoutside.mjs | 2 + designs/tristan/src/frontpoints.mjs | 67 ++++++++++++++++++++-------- designs/tristan/src/options.mjs | 9 +++- 5 files changed, 99 insertions(+), 44 deletions(-) diff --git a/designs/tristan/src/backoutside.mjs b/designs/tristan/src/backoutside.mjs index d6984137af1..5d18df696f1 100644 --- a/designs/tristan/src/backoutside.mjs +++ b/designs/tristan/src/backoutside.mjs @@ -1,7 +1,7 @@ import { backPoints } from './backpoints.mjs' export const backOutside = { - name: 'noble.backOutside', + name: 'tristan.backOutside', from: backPoints, draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, part }) => { paths.cut = new Path() @@ -27,6 +27,13 @@ export const backOutside = { .close() .attr('class', 'fabric') + console.log({ + backSide: new Path() + .move(points.waistSide) + .curve_(points.waistSideCp2, points.armhole) + .length(), + }) + return part }, } diff --git a/designs/tristan/src/backpoints.mjs b/designs/tristan/src/backpoints.mjs index 9405d93af12..cf1051702c6 100644 --- a/designs/tristan/src/backpoints.mjs +++ b/designs/tristan/src/backpoints.mjs @@ -64,18 +64,30 @@ export const backPoints = { 1 - options.cutRoundnessBack ) - points.armholeCutCp = points.armhole.shiftFractionTowards( - points.cutSeamOutside, - 1 - options.cutRoundnessBack - ) + points.armholeCutCp = points.armhole + .shift(180, options.armholeBackIn * points.armhole.dist(points.dartTip)) + .addCircle(4) + // points.cutSeamOutside = points.armhole.shiftFractionTowards( + // points.cutSeamOutside, + // 1 - options.cutRoundnessBack + // ) - points.strapOutsideCp = points.strapOutside.shiftFractionTowards( - points.cutSeamOutside.shift( - points.cutSeamOutside.angle(points.shoulderDart) - 90, - strapWidth / 2 - ), - 1 - options.cutRoundnessBack - ) + points.strapOutsideCp = points.strapOutside + .shiftFractionTowards( + points.cutSeamOutside.shift( + points.cutSeamOutside.angle(points.shoulderDart) - 90, + strapWidth / 2 + ), + options.armholeFrontDepth + ) + .addCircle(2) + // points.strapOutsideCp = points.strapOutside.shiftFractionTowards( + // points.cutSeamOutside.shift( + // points.cutSeamOutside.angle(points.shoulderDart) - 90, + // strapWidth / 2 + // ), + // 1 - options.cutRoundnessBack + // ).addCircle(2) const armHole = new Path() .move(points.armhole) @@ -90,17 +102,17 @@ export const backPoints = { ).length, }) - var iter = 0 - while ( - armHole.intersects( - new Path() - .move(points.strapOutside) - .curve(points.strapOutsideCp, points.armholeCutCp, points.armhole) - ).length != 0 && - ++iter < 250 - ) { - points.armholeCutCp = points.armholeCutCp.shiftFractionTowards(points.cutSeamOutside, 0.05) - } + // var iter = 0 + // while ( + // armHole.intersects( + // new Path() + // .move(points.strapOutside) + // .curve(points.strapOutsideCp, points.armholeCutCp, points.armhole) + // ).length != 0 && + // ++iter < 250 + // ) { + // points.armholeCutCp = points.armholeCutCp.shiftFractionTowards(points.cutSeamOutside, 0.05) + // } return part }, diff --git a/designs/tristan/src/frontoutside.mjs b/designs/tristan/src/frontoutside.mjs index 753760cbf21..6409b26994a 100644 --- a/designs/tristan/src/frontoutside.mjs +++ b/designs/tristan/src/frontoutside.mjs @@ -54,6 +54,8 @@ export const frontOutside = { to: points.grainTop, }) + console.log({ frontSide: points.sideHem.dist(points.armhole) }) + store.cutlist.removeCut() store.cutlist.addCut() diff --git a/designs/tristan/src/frontpoints.mjs b/designs/tristan/src/frontpoints.mjs index 26163a980bb..75ae4a9f6eb 100644 --- a/designs/tristan/src/frontpoints.mjs +++ b/designs/tristan/src/frontpoints.mjs @@ -1,14 +1,26 @@ import { frontPoints as nobleFrontPoints } from '@freesewing/noble' import { hidePresets } from '@freesewing/core' import * as options from './options.mjs' -import { utils } from 'mocha' export const frontPoints = { name: 'tristan.frontPoints', from: nobleFrontPoints, hide: hidePresets.HIDE_ALL, options, - draft: ({ log, points, Path, paths, snippets, options, macro, utils, store, part }) => { + draft: ({ + log, + measurements, + Point, + points, + Path, + paths, + snippets, + options, + macro, + utils, + store, + part, + }) => { const bCircle = 0.552284749831 // Hide Noble paths @@ -34,6 +46,7 @@ export const frontPoints = { strapWidth = shoulderWidthOutside * 2 } store.set('strapWidth', strapWidth) + console.log({ strapWidth: strapWidth }) console.log({ options: JSON.parse(JSON.stringify(options)) }) console.log({ paths: JSON.parse(JSON.stringify(paths)) }) @@ -47,6 +60,7 @@ export const frontPoints = { // .curve(points.armholeCp2, points.armholePitchCp1, points.armholePitch) // .curve_(points.armholePitchCp2, points.shoulder) points.cfCut = points.cfNeck.shiftFractionTowards(points.cfBust, options.cutDepthFront) + console.log({ cut: points.cfNeck.dist(points.cfCut) }) points.cutSeamInside = new Path() .move(points.waistDartLeft) @@ -63,6 +77,7 @@ export const frontPoints = { points.shoulderDartOutside ) .intersectsY(points.cfCut.y)[0] + .addCircle(6) points.cfCutCp = points.cfCut.shiftFractionTowards( points.cutSeamInside, @@ -76,18 +91,28 @@ export const frontPoints = { 1 - options.cutRoundnessFront ) - points.armholeCutCp = points.armhole.shiftFractionTowards( - points.cutSeamOutside, - 1 - options.cutRoundnessFront - ) + points.armholeCutCp = points.armhole + .shiftFractionTowards(points.bustDartTip, options.armholeFrontIn) + .addCircle(4) + // points.armholeCutCp = points.armhole.shiftFractionTowards( + // points.cutSeamOutside, + // 1 - options.cutRoundnessFront + // ).addCircle(4) points.strapOutsideCp = points.strapOutside.shiftFractionTowards( - points.cutSeamOutside.shift( + points.bustDartTip.shift( points.cutSeamOutside.angle(points.shoulderDartOutside) - 90, strapWidth / 2 ), - 1 - options.cutRoundnessFront + options.armholeFrontDepth ) + // points.strapOutsideCp = points.strapOutside.shiftFractionTowards( + // points.cutSeamOutside.shift( + // points.cutSeamOutside.angle(points.shoulderDartOutside) - 90, + // strapWidth / 2 + // ), + // 1 - options.cutRoundnessFront + // ) const armHole = new Path() .move(points.armhole) @@ -102,18 +127,22 @@ export const frontPoints = { ).length, }) - var iter = 0 - while ( - armHole.intersects( - new Path() - .move(points.strapOutside) - .curve(points.strapOutsideCp, points.armholeCutCp, points.armhole) - ).length != 0 && - ++iter < 250 - ) { - points.armholeCutCp = points.armholeCutCp.shiftFractionTowards(points.cutSeamOutside, 0.05) - } + // var iter = 0 + // while ( + // armHole.intersects( + // new Path() + // .move(points.strapOutside) + // .curve(points.strapOutsideCp, points.armholeCutCp, points.armhole) + // ).length != 0 && + // ++iter < 250 + // ) { + // points.armholeCutCp = points.armholeCutCp.shiftFractionTowards(points.cutSeamOutside, 0.05) + // } + // armhole adjustment + if (points.sideHem.y < points.waistDartRight.y) { + points.sideHem.y = points.waistDartRight.y + } return part }, } diff --git a/designs/tristan/src/options.mjs b/designs/tristan/src/options.mjs index c4f79f7a968..c51c388aa36 100644 --- a/designs/tristan/src/options.mjs +++ b/designs/tristan/src/options.mjs @@ -4,14 +4,19 @@ import { pctBasedOn } from '@freesewing/core' export const shoulderToShoulderCorrection = 0.995 export const bustDartCurve = 1 export const bustDartLength = 0.9 +export const armholeFrontIn = 0.2 +export const armholeFrontDepth = 0.65 +export const armholeBackIn = 0.6 +export const armholeBackDepth = 0.6 export const dartPosition = 'shoulder' // Percentages -export const strapWidth = { pct: 15, min: 5, max: 100, menu: 'style' } +export const armholeDepth = { pct: 44, min: 38, max: 55, menu: 'armhole' } +export const strapWidth = { pct: 45, min: 5, max: 100, menu: 'style' } export const cutDepthFront = { pct: 80, min: 0, max: 125, menu: 'style' } export const cutDepthBack = { pct: 40, min: 0, max: 125, menu: 'style' } // export const cutShape = { pct: 80, min: 0, max: 100, menu: 'style' } export const cutRoundnessFront = { pct: 10, min: 0, max: 100, menu: 'style' } -export const cutRoundnessBack = { pct: 10, min: 0, max: 100, menu: 'style' } +export const cutRoundnessBack = { pct: 20, min: 0, max: 100, menu: 'style' } export const bustSpanEase = { pct: 0, min: -5, max: 20, ...pctBasedOn('bustSpan'), menu: 'fit' } export const backHemSlope = { deg: 2.5, min: 0, max: 5, menu: 'advanced' } export const upperDartLength = { pct: 90, min: 80, max: 95, menu: 'darts' }