1
0
Fork 0

fix(titan): Changed mm option to snapped pct

This commit is contained in:
joostdecock 2021-10-29 15:57:06 +02:00
parent 22e584bfd3
commit 8252b12425
6 changed files with 25 additions and 6 deletions

View file

@ -9,6 +9,12 @@
- Removed lingering console.log statements
### titan
#### Changed
- Migrated the `waistbandWidth` option from mm to snapped pct
### trayvon
#### Changed

View file

@ -5,6 +5,8 @@ unreleased:
- Removed lingering console.log statements
Changed:
titan:
- Migrated the `waistbandWidth` option from mm to snapped pct
trayvon:
- Migrated the `knotWidth` and `tipWidth` options from mm to snapped pct

View file

@ -1,6 +1,12 @@
# Change log for: @freesewing/titan
## unreleased (NaN-NaN-NaN)
### Changed
- Migrated the `waistbandWidth` option from mm to snapped pct
## 2.16.1 (2021-05-30)
### Changed

View file

@ -1,4 +1,7 @@
import { version } from '../package.json'
import { elastics } from '@freesewing/snapseries'
import freesewing from '@freesewing/core'
const { pctBasedOn } = freesewing
export default {
name: 'titan',
@ -69,6 +72,6 @@ export default {
crotchSeamCurveAngle: { deg: 25, min: 0, max: 35 },
waistBalance: { pct: 60, min: 30, max: 90 },
grainlinePosition: { pct: 45, min: 30, max: 60 },
waistbandWidth: { mm: 0, min: 0, max: 60 },
waistbandWidth: { pct: 3, min: 1, max: 6, snap: elastics, ...pctBasedOn('waistToFloor') },
},
}

View file

@ -97,6 +97,7 @@ export default (part) => {
snippets,
Snippet,
sa,
absoluteOptions,
} = part.shorthand()
// Let's get to work
@ -191,10 +192,10 @@ export default (part) => {
store.set('outseamBack', drawOutseam().length())
// Only now style the waist lower if requested
if (options.waistHeight < 1 || options.waistbandWidth > 0) {
if (options.waistHeight < 1 || absoluteOptions.waistbandWidth > 0) {
points.styleWaistOut = drawOutseam()
.reverse()
.shiftAlong(measurements.waistToHips * (1 - options.waistHeight) + options.waistbandWidth)
.shiftAlong(measurements.waistToHips + absoluteOptions.waistbandWidth)
points.styleWaistIn = utils.beamsIntersect(
points.styleWaistOut,
points.styleWaistOut.shift(points.waistOut.angle(points.waistIn), 10),

View file

@ -170,6 +170,7 @@ export default (part) => {
snippets,
Snippet,
sa,
absoluteOptions,
} = part.shorthand()
// Let's get to work
@ -215,7 +216,7 @@ export default (part) => {
points.kneeOutCp1 = points.kneeOut.shift(90, points.fork.dy(points.knee) / 3)
points.seatOutCp1 = points.seatOut.shift(
90,
measurements.waistToHips * options.waistHeight + options.waistbandWidth
measurements.waistToHips + absoluteOptions.waistbandWidth
)
points.seatOutCp2 = points.seatOut.shift(-90, points.seatOut.dy(points.knee) / 3)
@ -270,9 +271,9 @@ export default (part) => {
adaptInseam()
// Only now style the waist lower if requested
if (options.waistHeight < 1 || options.waistbandWidth > 0) {
if (options.waistHeight < 1 || absoluteOptions.waistbandWidth > 0) {
points.styleWaistOut = drawOutseam().shiftAlong(
measurements.waistToHips * (1 - options.waistHeight) + options.waistbandWidth
measurements.waistToHips + absoluteOptions.waistbandWidth
)
points.styleWaistIn = utils.beamsIntersect(
points.styleWaistOut,