1
0
Fork 0

Add missing descriptions for titan waistband balance (#7234)

* Add i18n descriptions for Titan angled waistband

Fix code style

* Add docusaurus documentation for waistband option

* Lily i18n doesn't inherit from Titan, so duplicate strings here
This commit is contained in:
Jonathan Haas 2024-11-16 15:38:30 +01:00 committed by GitHub
parent ee72ce3117
commit 7fb499fd2b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 77 additions and 17 deletions

View file

@ -75,6 +75,26 @@
"waistbandWidth": {
"t": "Waistband width",
"d": "The width of the waistband"
},
"waistAngle": {
"t": "Waistband angle",
"d": "Change the angle of the waistband when viewed from the side"
},
"useWaistAngleFor": {
"t": "Use waistband angle for",
"d": "Apply the waistband angle to the front, back or both"
},
"useWaistAngleFor.both": {
"t": "Both",
"d": "Apply the waistband angle to the front and back"
},
"useWaistAngleFor.backOnly": {
"t": "Back",
"d": "Apply the waistband angle only to the back"
},
"useWaistAngleFor.frontOnly": {
"t": "Front",
"d": "Apply the waistband angle only to the front"
}
}
}

View file

@ -88,6 +88,26 @@
"t": "Waist ease",
"d": "Controls the amount of ease at your waist"
},
"waistAngle": {
"t": "Waistband angle",
"d": "Change the angle of the waistband when viewed from the side"
},
"useWaistAngleFor": {
"t": "Use waistband angle for",
"d": "Apply the waistband angle to the front, back or both"
},
"useWaistAngleFor.both": {
"t": "Both",
"d": "Apply the waistband angle to the front and back"
},
"useWaistAngleFor.backOnly": {
"t": "Back",
"d": "Apply the waistband angle only to the back"
},
"useWaistAngleFor.frontOnly": {
"t": "Front",
"d": "Apply the waistband angle only to the front"
},
"grainlinePosition": {
"t": "Grainline position",
"d": "Controls the horizontal position of the leg relative to the seat"

View file

@ -200,7 +200,7 @@ function titanBack({
// Revert back to the previous rotation.
for (const i of rotate) {
points[i] = saved[i]
}
}
points.fork = saved.fork
points.forkCp2 = saved.forkCp2
}
@ -238,10 +238,14 @@ function titanBack({
points.styleWaistIn = points.waistIn.clone()
points.styleWaistOut = points.waistOut.clone()
}
// Now angle the waist (if requested)
// create a backup of the unangled position, for use in dependent patterns
points.styleWaistInNoAngle = points.styleWaistIn.clone()
if (options.waistAngle != 0 && (options.useWaistAngleFor === 'both' || options.useWaistAngleFor === 'backOnly') ) {
if (
options.waistAngle !== 0 &&
(options.useWaistAngleFor === 'both' || options.useWaistAngleFor === 'backOnly')
) {
// calculate how much to add/subtract
// assume that from the crossSeamCurveStart upwards, the crotch seam will be vertical
// base of the triangle is then horizontal distance from crossSeamCurveStart to fork
@ -249,13 +253,16 @@ function titanBack({
// use positive value for triangleBase: positive angle means higher back
triangleBase = points.fork.dx(points.crossSeamCurveStart)
// length of opposite side is length of adjacent side times tangent of the angle
triangleHeight = Math.tan(options.waistAngle * Math.PI/180) * triangleBase
triangleHeight = Math.tan((options.waistAngle * Math.PI) / 180) * triangleBase
// top of cross seam is a straight line, so just extend
points.styleWaistIn = points.crossSeamCurveStart.shiftOutwards(points.styleWaistIn,triangleHeight)
points.styleWaistIn = points.crossSeamCurveStart.shiftOutwards(
points.styleWaistIn,
triangleHeight
)
// report the change in height
log.info(['additionalHeightCenterBack',units(triangleHeight)])
log.info(['additionalHeightCenterBack', units(triangleHeight)])
}
// Adapt the vertical placement of the seat control point to the lowered waist
points.seatOutCp2.y = points.seatOut.y - points.styleWaistOut.dy(points.seatOut) / 2
@ -447,13 +454,9 @@ export const back = {
fitKnee: { bool: false, menu: 'style' },
waistAngle: { deg: 0, min: -20, max: 20, menu: 'style' },
useWaistAngleFor: {
dflt: "both",
list: [
"both",
"backOnly",
"frontOnly",
],
menu: 'style'
dflt: 'both',
list: ['both', 'backOnly', 'frontOnly'],
menu: 'style',
},
// Advanced

View file

@ -0,0 +1,7 @@
---
title: 'Use waistband angle for'
---
Determines if the Waistband angle setting is applied to the back part, the front part or both.
Note that applying the setting to only one of the parts can create an angle at the sideseam.

View file

@ -0,0 +1,10 @@
---
title: 'Waistband angle'
---
Controls the angle of the waistband when the garment is viewed from the side.
Increasing this option will raise the back of the pants and lower the waistband in the front.
This is ideal for those with a curvy body who want the waistband to sit below the belly in the front, but above the butt in the back.
If you're setting the waistband angle to a larger value, it's also a good idea to increase the waist height to make sure you've got enough coverage in the front.