Adjusted defaults and armhole calc
This commit is contained in:
parent
f71a52eaf8
commit
9807f9a1eb
5 changed files with 99 additions and 44 deletions
|
@ -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
|
||||
},
|
||||
}
|
||||
|
|
|
@ -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
|
||||
},
|
||||
|
|
|
@ -54,6 +54,8 @@ export const frontOutside = {
|
|||
to: points.grainTop,
|
||||
})
|
||||
|
||||
console.log({ frontSide: points.sideHem.dist(points.armhole) })
|
||||
|
||||
store.cutlist.removeCut()
|
||||
store.cutlist.addCut()
|
||||
|
||||
|
|
|
@ -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
|
||||
},
|
||||
}
|
||||
|
|
|
@ -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' }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue