fix(albert): Keep straps even when there's no SA
The width of the straps was calculated by multiplying with the `sa` value. As a result, when the user asks to draft a pattern without SA, the straps drop off the pattern. I've also change the way the width is calculated. It used to be based on a percentage option that was then multiplied by SA. While technically that follows the best practice of using percentages, it won't scale with the model unless you multiply it with a measurement.
This commit is contained in:
parent
53a44559ea
commit
eebbdd7842
3 changed files with 3 additions and 3 deletions
|
@ -34,6 +34,6 @@ export default {
|
|||
chestDepth: { pct: 22, min: 15, max: 90 },
|
||||
bibLength: { pct: 75, min: 0, max: 90 },
|
||||
bibWidth: { pct: 100, min: 50, max: 125 },
|
||||
strapWidth: { pct: 750, min: 100, max: 1500 }
|
||||
strapWidth: { pct: 60, min: 20, max: 100 }
|
||||
}
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ export default function (part) {
|
|||
(1 - options.backOpening)
|
||||
*/
|
||||
let apronWidth = measurements.waist * (1 - options.backOpening)
|
||||
let strapWidth = options.strapWidth * sa
|
||||
let strapWidth = (measurements.hpsToWaistBack * options.strapWidth) / 8
|
||||
let hemWidth = 3 * sa
|
||||
let pocketSize = apronLength / 4
|
||||
|
||||
|
|
|
@ -31,9 +31,9 @@ export default function (part) {
|
|||
measurements.hpsToWaistBack -
|
||||
measurements.hpsToWaistBack * options.bibLength
|
||||
|
||||
let strapWidth = (measurements.hpsToWaistBack * options.strapWidth) / 8
|
||||
let strapLength =
|
||||
Math.sqrt(hSpan * hSpan + vSpan * vSpan) + measurements.chest * options.chestDepth
|
||||
let strapWidth = options.strapWidth * sa
|
||||
/*
|
||||
console.log('chestWidth ' + chestWidth)
|
||||
console.log('backOpening ' + backOpening)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue