diff --git a/designs/lily/i18n/en.json b/designs/lily/i18n/en.json index d36fc31faba..998a29467be 100644 --- a/designs/lily/i18n/en.json +++ b/designs/lily/i18n/en.json @@ -11,7 +11,7 @@ "adjustEase.d": "Knee, seat and waist ease should be set to fabric stretch * -1/10; click the button to adjust all three.", "adjustEase": "adjust ease" }, - "o": { + "o": { "lengthReduction": { "t": "Length reduction", "d": "Controls how much the leggings are shortened with respect to ankle length" @@ -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" } } } diff --git a/designs/titan/i18n/en.json b/designs/titan/i18n/en.json index 0051692bff0..bffada56f2a 100644 --- a/designs/titan/i18n/en.json +++ b/designs/titan/i18n/en.json @@ -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" diff --git a/designs/titan/src/back.mjs b/designs/titan/src/back.mjs index 0cccd59266c..2802b3b0bff 100644 --- a/designs/titan/src/back.mjs +++ b/designs/titan/src/back.mjs @@ -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,24 +238,31 @@ 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') ) { + points.styleWaistInNoAngle = points.styleWaistIn.clone() + 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 let triangleBase, triangleHeight - // use positive value for triangleBase: positive angle means higher back + // 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 diff --git a/sites/orgdocs/docs/designs/titan/options/usewaistanglefor/readme.mdx b/sites/orgdocs/docs/designs/titan/options/usewaistanglefor/readme.mdx new file mode 100644 index 00000000000..7df0bb54814 --- /dev/null +++ b/sites/orgdocs/docs/designs/titan/options/usewaistanglefor/readme.mdx @@ -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. diff --git a/sites/orgdocs/docs/designs/titan/options/waistangle/readme.mdx b/sites/orgdocs/docs/designs/titan/options/waistangle/readme.mdx new file mode 100644 index 00000000000..71fb1aeb2c5 --- /dev/null +++ b/sites/orgdocs/docs/designs/titan/options/waistangle/readme.mdx @@ -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.