1
0
Fork 0

Adds support for 'expand' for crotchGusset.

This commit is contained in:
Thrunic 2023-11-12 13:27:28 -05:00
parent 6a4c991011
commit df2b856e8f
4 changed files with 20 additions and 4 deletions

View file

@ -20,6 +20,7 @@
"cutOneSkirt": "Cut one rectangle of fabric\nfor the skirt, with dimensions:", "cutOneSkirt": "Cut one rectangle of fabric\nfor the skirt, with dimensions:",
"cutTwoSleeveRibbing": "Cut two rectangles of ribbing\nfor the wrists, with dimensions:", "cutTwoSleeveRibbing": "Cut two rectangles of ribbing\nfor the wrists, with dimensions:",
"cutTwoLegRibbing": "Cut two rectangles of ribbing\nfor the legs, with dimensions:", "cutTwoLegRibbing": "Cut two rectangles of ribbing\nfor the legs, with dimensions:",
"cutOneCrotchGusset": "Cut one rectangle of main fabric\nfor the crotch gusset, with dimensions:",
"cutNeckband": "Cut one rectangle of\nribbing or main fabric\nfor the neckband, with dimensions:" "cutNeckband": "Cut one rectangle of\nribbing or main fabric\nfor the neckband, with dimensions:"
}, },
"o": { "o": {

View file

@ -11,11 +11,14 @@ function draftCrotchGusset({
part, part,
store, store,
sa, sa,
expand,
macro, macro,
snippets, snippets,
Snippet, Snippet,
scale, scale,
}) { }) {
if (!expand) return part.hide()
const crotchGussetLength = store.get('crotchGussetLength') const crotchGussetLength = store.get('crotchGussetLength')
const crotchGussetWidth = store.get('crotchGussetWidth') const crotchGussetWidth = store.get('crotchGussetWidth')

View file

@ -178,6 +178,22 @@ function draftFront({
) )
} }
const crotchGussetLength = store.get('crotchGussetLength')
const crotchGussetWidth = store.get('crotchGussetWidth')
points.crotchGussetInstructions = points.legRibbingInstructions
if (complete && !expand) {
points.crotchGussetInstructions = points.crotchGussetInstructions
.translate(0, 50)
.attr('data-text', 'onyx:cutOneCrotchGusset')
.attr('data-text', ':\n')
.attr(
'data-text',
`${units(2 * sa + store.get('crotchGussetWidth'))} x ${units(
sa + (options.legRibbing ? sa : absoluteOptions.legHem) + store.get('crotchGussetLength')
)}`
)
}
const neckPath = new Path() const neckPath = new Path()
.move(points.neckShoulderCorner) .move(points.neckShoulderCorner)
.curve(points.neckCp1, points.neckCp2, points.cfNeck) .curve(points.neckCp1, points.neckCp2, points.cfNeck)

View file

@ -316,10 +316,6 @@ function draftRaglanSleeve({
} }
points.neckbandInstructions = points.sleeveRibbingInstructions points.neckbandInstructions = points.sleeveRibbingInstructions
const neckbandLength =
(store.get('neckLengthFront') + store.get('neckLengthBack') + store.get('neckLengthSide')) *
options.neckbandLength
const neckbandWidth = 2 * absoluteOptions.neckbandWidth
if (complete && !expand && options.legRibbing) { if (complete && !expand && options.legRibbing) {
points.neckbandInstructions = points.neckbandInstructions points.neckbandInstructions = points.neckbandInstructions
.translate(0, 50) .translate(0, 50)