1
0
Fork 0

fix(bee): Various improvements for v3

This commit is contained in:
Joost De Cock 2023-09-10 16:15:30 +02:00
parent 93bc7d8551
commit b57c068c40
28 changed files with 191 additions and 530 deletions

View file

@ -8,9 +8,10 @@
}, },
"s": { "s": {
"casingStitchingLine": "Sew down casing here", "casingStitchingLine": "Sew down casing here",
"cutBandTie": "Cut 1 band tie:", "cutBandTie.t": "The band ties are not shown",
"cutNeckTie": "Cut 2 neck ties:", "cutBandTie.d": "The **band ties** are {{{ width }}} wide and {{{ length }}} long (this includes seam allowance). Refer to the cutting instructions for details on how many of them you should cut. \n\nThey are not shown because the **expand** core setting is currently disabled. Enable it to show this pattern part.",
"neckTieLength": "Length of the neck ties" "cutNeckTie.t": "The neck ties are not shown",
"cutNeckTie.d": "The **neck ties** are {{{ width }}} wide and {{{ length }}} long (this includes seam allowance). Refer to the cutting instructions for details on how many of them you should cut. \n\nThey are not shown because the **expand** core setting is currently disabled. Enable it to show this pattern part."
}, },
"o": { "o": {
"chestEase": { "chestEase": {
@ -46,12 +47,28 @@
"d": "Controls the curvature of the front of the bikini cup" "d": "Controls the curvature of the front of the bikini cup"
}, },
"bellaGuide": { "bellaGuide": {
"t": "Show Bella outline",
"d": "Do you want the pattern to show the outline of the Bella block Bee is based on?"
},
"bellaGuideYes": {
"t": "Show Bella", "t": "Show Bella",
"d": "Shows the outline of the Bella block Bee is based on" "d": "Shows the outline of the Bella block"
},
"bellaGuideNo": {
"t": "Do not show Bella",
"d": "Only shows the final Bee pattern"
}, },
"ties": { "ties": {
"t": "Ties", "t": "Ties",
"d": "Whether to includes ties, yes or no" "d": "Whether to includes ties on the pattern"
},
"tiesYes": {
"t": "With ties",
"d": "Draft a pattern including ties"
},
"tiesNo": {
"t": "Without ties",
"d": "Draft a pattern without ties"
}, },
"bandTieWidth": { "bandTieWidth": {
"t": "Band (chest) tie width", "t": "Band (chest) tie width",
@ -61,13 +78,29 @@
"t": "Band (chest) tie length", "t": "Band (chest) tie length",
"d": "Controls the length of the ties around your chest" "d": "Controls the length of the ties around your chest"
}, },
"bandTieEnds": { "pointedTieEnds": {
"t": "Band (chest) tie ends", "t": "Pointed tie ends",
"d": "Whether you like straight or pointy ends on the ties around your chest" "d": "Enable this options if you prefer tie ends to be pointy, rarther than straight"
}, },
"bandTieColours": { "pointedTieEndsYes": {
"t": "Band (chest) tie length colours", "t": "Pointy ends",
"d": "Whether you want single color ties around your chest, or dual-coloured ones" "d": "Make the tie ends pointy"
},
"pointedTieEndsNo": {
"t": "Straight ends",
"d": "Make the tie ends straight"
},
"duoColorTies": {
"t": "Duo-colored ties",
"d": "Enable this option to generate a pattern for bands using two colors instead of one"
},
"duoColorTiesYes": {
"t": "Two colors",
"d": "Use two colors for the ties"
},
"duoColorTiesNo": {
"t": "Single color",
"d": "Use a single color for the ties"
}, },
"neckTieWidth": { "neckTieWidth": {
"t": "Neck tie width", "t": "Neck tie width",
@ -89,6 +122,14 @@
"t": "Cross back ties", "t": "Cross back ties",
"d": "Whether you'd like to use the cross back tie variation of Bee" "d": "Whether you'd like to use the cross back tie variation of Bee"
}, },
"crossBackTiesYes": {
"t": "Use cross back ties",
"d": "Generate a pattern for ties that cross your back"
},
"crossBackTiesNo": {
"t": "Use regular ties",
"d": "Generate a pattern for the default ties"
},
"bandLength": { "bandLength": {
"t": "Band Length (Cross back ties)", "t": "Band Length (Cross back ties)",
"d": "Controls the length of the band around your chest for the cross back ties variation of Bee" "d": "Controls the length of the band around your chest for the cross back ties variation of Bee"
@ -130,7 +171,7 @@
"d": "Create a Bee that you can wear with both sides out, posssibly ussing different fabrics" "d": "Create a Bee that you can wear with both sides out, posssibly ussing different fabrics"
}, },
"reversibleNo": { "reversibleNo": {
"t": "Do not make it teversible", "t": "Do not make it reversible",
"d": "Create a Bee with where only one side is intended to be worn on the outside" "d": "Create a Bee with where only one side is intended to be worn on the outside"
} }
} }

View file

@ -16,8 +16,6 @@ export const bandTie = {
menu: 'style', menu: 'style',
}, },
bandTieLength: { pct: 35, min: 30, max: 50, menu: 'style' }, bandTieLength: { pct: 35, min: 30, max: 50, menu: 'style' },
bandTieEnds: { dflt: 'straight', list: ['straight', 'pointed'], menu: 'style' },
bandTieColours: { dflt: 'one', list: ['one', 'two'], menu: 'style' },
}, },
draft: ({ draft: ({
store, store,
@ -67,15 +65,13 @@ export const bandTie = {
points.bottomRight = new Point(points.topRight.x, bandTieLength) points.bottomRight = new Point(points.topRight.x, bandTieLength)
points.topMiddle = new Point(bandTieWidth, points.topLeft.y) points.topMiddle = new Point(bandTieWidth, points.topLeft.y)
if (!options.crossBackTies && options.bandTieEnds === 'pointed') if (!options.crossBackTies && options.pointedTieEnds) points.topMiddle.y -= bandTieWidth
points.topMiddle.y -= bandTieWidth
points.bottomMiddle = new Point(points.topMiddle.x, bandTieLength) points.bottomMiddle = new Point(points.topMiddle.x, bandTieLength)
paths.seam = paths.seam = options.duoColorTies
options.bandTieColours === 'one' ? new Path().move(points.bottomMiddle)
? new Path().move(points.bottomRight).line(points.topRight) : new Path().move(points.bottomRight).line(points.topRight)
: new Path().move(points.bottomMiddle)
paths.seam.line(points.topMiddle).line(points.topLeft).line(points.bottomLeft).close() paths.seam.line(points.topMiddle).line(points.topLeft).line(points.bottomLeft).close()
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
@ -83,6 +79,11 @@ export const bandTie = {
/* /*
* Annotations * Annotations
*/ */
// Cut list
if (options.crossBackTies) store.cutlist.addCut({ cut: 1, from: 'fabric' })
else store.cutlist.addCut({ cut: 2, from: 'fabric' })
points.cofLeft = points.bottomLeft.shift(0, bandTieWidth * (1 / 8)) points.cofLeft = points.bottomLeft.shift(0, bandTieWidth * (1 / 8))
points.grainlineLeft = points.topLeft.translate(bandTieWidth * (1 / 8), bandTieLength * (3 / 4)) points.grainlineLeft = points.topLeft.translate(bandTieWidth * (1 / 8), bandTieLength * (3 / 4))
// Title // Title
@ -95,17 +96,18 @@ export const bandTie = {
}) })
// Foldline // Foldline
if (options.bandTieColours === 'one') { if (options.duoColorTies) {
points.cofRight = points.bottomLeft.shift(0, bandTieWidth * (7 / 8))
points.grainlineRight = points.grainlineLeft.shift(0, bandTieWidth * (7 / 8))
} else {
points.cofRight = points.bottomLeft.shift(0, bandTieWidth * (15 / 8)) points.cofRight = points.bottomLeft.shift(0, bandTieWidth * (15 / 8))
points.grainlineRight = points.grainlineLeft.shift(0, bandTieWidth * (14 / 8)) points.grainlineRight = points.grainlineLeft.shift(0, bandTieWidth * (14 / 8))
if (complete)
paths.foldline = new Path() paths.foldline = new Path()
.move(points.bottomMiddle) .move(points.bottomMiddle)
.line(points.topMiddle) .line(points.topMiddle)
.addText('foldLine', 'center fill-note text-sm') .addText('foldLine', 'center fill-note text-sm')
.attr('class', 'note help') .attr('class', 'note help')
} else {
points.cofRight = points.bottomLeft.shift(0, bandTieWidth * (7 / 8))
points.grainlineRight = points.grainlineLeft.shift(0, bandTieWidth * (7 / 8))
} }
// Grainline // Grainline
@ -134,12 +136,6 @@ export const bandTie = {
snippets.centreNotch = new Snippet('notch', points.bottomRight) snippets.centreNotch = new Snippet('notch', points.bottomRight)
points.sideNotch = points.bottomRight.shift(90, gatherLength) points.sideNotch = points.bottomRight.shift(90, gatherLength)
snippets.sideNotch = new Snippet('notch', points.sideNotch) snippets.sideNotch = new Snippet('notch', points.sideNotch)
paths.casingFold = new Path()
.move(points.topLeft.shift(-90, options.neckTieWidth))
.line(points.topRight.shift(-90, options.neckTieWidth))
.attr('class', 'various')
.attr('data-text', 'Fold-line')
.attr('data-text-class', 'center')
} }
macro('vd', { macro('vd', {
@ -151,7 +147,7 @@ export const bandTie = {
macro('hd', { macro('hd', {
id: 'wTop', id: 'wTop',
from: points.topLeft, from: points.topLeft,
to: points.topRight, to: options.duoColorties ? points.middleRight : points.topRight,
y: points.topLeft.x - sa - 20, y: points.topLeft.x - sa - 20,
}) })

View file

@ -18,6 +18,8 @@ export const cup = {
sideCurve: { pct: 0, min: -50, max: 50, menu: 'fit' }, sideCurve: { pct: 0, min: -50, max: 50, menu: 'fit' },
frontCurve: { pct: 0, min: -50, max: 50, menu: 'fit' }, frontCurve: { pct: 0, min: -50, max: 50, menu: 'fit' },
bellaGuide: { bool: false, menu: 'fit' }, bellaGuide: { bool: false, menu: 'fit' },
pointedTieEnds: { bool: false, menu: 'style' },
duoColorTies: { bool: false, menu: 'style' },
//changed from Bella //changed from Bella
backArmholeCurvature: 0.63, backArmholeCurvature: 0.63,
backArmholePitchDepth: 0.35, backArmholePitchDepth: 0.35,
@ -29,11 +31,11 @@ export const cup = {
backHemSlope: 2.5, backHemSlope: 2.5,
backNeckCutout: 0.06, backNeckCutout: 0.06,
//catergory changed from Bella //catergory changed from Bella
armholeDepth: { pct: 44, min: 38, max: 46, menu: 'advanced.bellaArmhole' }, armholeDepth: { pct: 44, min: 38, max: 46, menu: 'advanced' },
frontArmholePitchDepth: { pct: 29, max: 31, min: 27, menu: 'advanced.bellaArmhole' }, frontArmholePitchDepth: { pct: 29, max: 31, min: 27, menu: 'advanced' },
backDartHeight: { pct: 46, min: 38, max: 54, menu: 'advanced.bellaDarts' }, backDartHeight: { pct: 46, min: 38, max: 54, menu: 'advanced' },
frontShoulderWidth: { pct: 95, max: 98, min: 92, menu: 'advanced.bellaAdvanced' }, frontShoulderWidth: { pct: 95, max: 98, min: 92, menu: 'advanced' },
highBustWidth: { pct: 86, max: 92, min: 80, menu: 'advanced.bellaAdvanced' }, highBustWidth: { pct: 86, max: 92, min: 80, menu: 'advanced' },
}, },
draft: ({ draft: ({
store, store,
@ -174,7 +176,7 @@ export const cup = {
.line(points.bustA) .line(points.bustA)
.line(points.waistDartRightRotated) .line(points.waistDartRightRotated)
.line(points.sideHemNew) .line(points.sideHemNew)
.attr('class', 'various lashed') .addClass('note help')
.close() .close()
} }

View file

@ -12,9 +12,7 @@ const Bee = new Design({
}) })
// Merge translations // Merge translations
const i18n = mergeI18n([bellaI18n, beeI18n], { const i18nKeepOptions = [
o: {
keep: [
...Object.keys(cup.options), ...Object.keys(cup.options),
...Object.keys(neckTie.options), ...Object.keys(neckTie.options),
...Object.keys(bandTie.options), ...Object.keys(bandTie.options),
@ -37,8 +35,19 @@ const i18n = mergeI18n([bellaI18n, beeI18n], {
'backNeckCutout', 'backNeckCutout',
'frontShoulderWidth', 'frontShoulderWidth',
'highBustWidth', 'highBustWidth',
], ]
}, for (const o of [
'reversible',
'duoColorTies',
'pointedTieEnds',
'crossBackTies',
'bellaGuide',
'ties',
])
i18nKeepOptions.push(o + 'Yes', o + 'No')
const i18n = mergeI18n([bellaI18n, beeI18n], {
o: { keep: i18nKeepOptions },
}) })
export { cup, neckTie, bandTie, Bee, i18n } export { cup, neckTie, bandTie, Bee, i18n }

View file

@ -19,8 +19,6 @@ export const neckTie = {
menu: 'style', menu: 'style',
...pctBasedOn('bustSpan'), ...pctBasedOn('bustSpan'),
}, },
neckTieEnds: { dflt: 'straight', list: ['straight', 'pointed'], menu: 'style' },
neckTieColours: { dflt: 'one', list: ['one', 'two'], menu: 'style' },
reversible: { bool: false, menu: 'style' }, reversible: { bool: false, menu: 'style' },
}, },
draft: ({ draft: ({
@ -31,6 +29,8 @@ export const neckTie = {
Path, Path,
paths, paths,
options, options,
units,
complete,
macro, macro,
measurements, measurements,
utils, utils,
@ -57,15 +57,25 @@ export const neckTie = {
* Don't bother unless expand is set * Don't bother unless expand is set
*/ */
if (!expand) { if (!expand) {
points.text = new Point(10, 10) store.flag.note({
.addText('bee:cutNeckTie', 'fill-note') title: `bee:cutNeckTie.t`,
.addText(':') desc: `bee:cutNeckTie.d`,
.addText(utils.units((absoluteOptions.neckTieWidth + sa) * 2)) replace: {
.addText(' x ') width: units(absoluteOptions.neckTieWidth * 2 + 2 * sa),
.addText(utils.units(neckTieLength)) length: units(neckTieLength * 2),
paths.diag = new Path().move(new Point(0, 0)).line(new Point(100, 15)).addClass('hidden') },
suggest: {
text: 'flag:show',
icon: 'expand',
update: {
settings: ['expand', 1],
},
},
})
// Also hint about expand
store.flag.preset('expand')
return part return part.hide()
} }
points.topLeft = new Point(0, 0) points.topLeft = new Point(0, 0)
@ -73,31 +83,28 @@ export const neckTie = {
points.bottomLeft = new Point(points.topLeft.x, neckTieLength) points.bottomLeft = new Point(points.topLeft.x, neckTieLength)
points.bottomRight = new Point(points.topRight.x, neckTieLength) points.bottomRight = new Point(points.topRight.x, neckTieLength)
points.topMiddle = points.topMiddle = options.pointedTieEnds
options.neckTieEnds === 'straight' ? new Point(absoluteOptions.neckTieWidth, points.topLeft.y - absoluteOptions.neckTieWidth)
? (points.topMiddle = new Point(absoluteOptions.neckTieWidth, points.topLeft.y)) : new Point(absoluteOptions.neckTieWidth, points.topLeft.y)
: (points.topMiddle = new Point(
absoluteOptions.neckTieWidth,
points.topLeft.y - absoluteOptions.neckTieWidth
))
points.bottomMiddle = new Point(points.topMiddle.x, neckTieLength) points.bottomMiddle = new Point(points.topMiddle.x, neckTieLength)
paths.seam = paths.seam = options.duoColorTies
options.neckTieColours === 'one'
? new Path() ? new Path()
.move(points.bottomMiddle)
.line(points.topMiddle)
.line(points.topLeft)
.line(points.bottomLeft)
.close()
.addClass('fabric')
: new Path()
.move(points.bottomRight) .move(points.bottomRight)
.line(points.topRight) .line(points.topRight)
.line(points.topMiddle) .line(points.topMiddle)
.line(points.topLeft) .line(points.topLeft)
.line(points.bottomLeft) .line(points.bottomLeft)
.close() .close()
: new Path() .addClass('fabric')
.move(points.bottomMiddle)
.line(points.topMiddle)
.line(points.topLeft)
.line(points.bottomLeft)
.close()
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
@ -110,6 +117,14 @@ export const neckTie = {
neckTieLength * (3 / 4) neckTieLength * (3 / 4)
) )
// Cut list
if (options.reversible) {
store.cutlist.addCut({ cut: 2, from: 'fabric' })
store.cutlist.addCut({ cut: 2, from: 'altFabric1' })
} else {
store.cutlist.addCut({ cut: 4, from: 'fabric' })
}
// Title // Title
points.title = points.topLeft.translate( points.title = points.topLeft.translate(
absoluteOptions.neckTieWidth * (1 / 8), absoluteOptions.neckTieWidth * (1 / 8),
@ -122,17 +137,18 @@ export const neckTie = {
scale: 0.5, scale: 0.5,
}) })
if (options.neckTieColours === 'one') { if (options.duoColorTies) {
points.cofRight = points.bottomLeft.shift(0, absoluteOptions.neckTieWidth * (7 / 8))
points.grainlineRight = points.grainlineLeft.shift(0, absoluteOptions.neckTieWidth * (7 / 8))
} else {
points.cofRight = points.bottomLeft.shift(0, absoluteOptions.neckTieWidth * (15 / 8)) points.cofRight = points.bottomLeft.shift(0, absoluteOptions.neckTieWidth * (15 / 8))
points.grainlineRight = points.grainlineLeft.shift(0, absoluteOptions.neckTieWidth * (14 / 8)) points.grainlineRight = points.grainlineLeft.shift(0, absoluteOptions.neckTieWidth * (14 / 8))
if (complete)
paths.foldline = new Path() paths.foldline = new Path()
.move(points.bottomMiddle) .move(points.bottomMiddle)
.line(points.topMiddle) .line(points.topMiddle)
.addText('foldLine', 'center fill-note text-sm') .addText('foldLine', 'center fill-note text-sm')
.addClass('note help') .addClass('note help')
} else {
points.cofRight = points.bottomLeft.shift(0, absoluteOptions.neckTieWidth * (7 / 8))
points.grainlineRight = points.grainlineLeft.shift(0, absoluteOptions.neckTieWidth * (7 / 8))
} }
// Grainline // Grainline
@ -166,7 +182,7 @@ export const neckTie = {
macro('hd', { macro('hd', {
id: 'wTop', id: 'wTop',
from: points.topLeft, from: points.topLeft,
to: points.topRight, to: options.duoColorTies ? points.topMiddle : points.topRight,
y: points.topLeft.x - sa - 20, y: points.topLeft.x - sa - 20,
}) })

View file

@ -1,11 +0,0 @@
---
title: "Band (chest) tie length colours"
---
***
Whether you want single color tie around your chest, or dual-coloured ones
## Effect of this option on the pattern
![This image shows the effect of this option by superimposing several variants that have a different value for this option](bee_bandtiecolours_sample.svg "Effect of this option on the pattern")

View file

@ -1,11 +0,0 @@
---
title: "Band (chest) tie ends"
---
***
Whether you like straight or pointy ends on the tie around your chest
## Effect of this option on the pattern
![This image shows the effect of this option by superimposing several variants that have a different value for this option](bee_bandtieends_sample.svg "Effect of this option on the pattern")

View file

@ -0,0 +1,9 @@
---
title: Duo color ties
---
This option allows you to generate a pattern where the ties use two colors rather than one.
Enable this option if you want ties using two colors.
Leave it disabled (the default) if you want ties using a single color.

File diff suppressed because one or more lines are too long

Before

Width:  |  Height:  |  Size: 20 KiB

View file

@ -1,11 +0,0 @@
---
title: "Enden des Nackenträgers"
---
***
Ob du gerade oder spitze Enden an den Krawatten um deinen Hals magst
## Effekt dieser Option auf das Schnittmuster
![Dieses Bild zeigt den Effekt dieser Option, indem es mehrere Varianten überlagert, die einen anderen Wert für diese Option haben](bee_necktieends_sample.svg "Effekt dieser Option auf das Schnittmuster")

View file

@ -1,11 +0,0 @@
---
title: "Neck tie ends"
---
***
Whether you like straight or pointy ends on the ties around your neck
## Effect of this option on the pattern
![This image shows the effect of this option by superimposing several variants that have a different value for this option](bee_necktieends_sample.svg "Effect of this option on the pattern")

View file

@ -1,11 +0,0 @@
---
title: "Puntas de la cinta del cuello"
---
***
Si prefieres que las puntas de las cintas alrededor del cuello sean planas o acaben en punta
## Efecto de esta opción en el patrón
![Esta imagen muestra el efecto de esta opción superponiendo varias variantes que tienen un valor diferente para esta opción](bee_necktieends_sample.svg "Efecto de esta opción en el patrón")

View file

@ -1,11 +0,0 @@
---
title: "Extrémités des bandes de cou"
---
***
Que vous aimiez les extrémités droites ou pointues sur les liens autour de votre cou
## Effet de cette option sur le motif
![Cette image montre l'effet de cette option en superposant plusieurs variantes qui ont une valeur différente pour cette option](bee_necktieends_sample.svg "Effet de cette option sur le motif")

View file

@ -1,11 +0,0 @@
---
title: "Uiteinden nekdas"
---
***
Of je nu houdt van rechte of puntige uiteinden aan de stropdassen om je nek
## Effect van deze optie op het patroon
![Deze afbeelding toont het effect van deze optie door meerdere varianten die een andere waarde hebben voor deze optie te vervangen](bee_necktieends_sample.svg "Effect van deze optie op het patroon")

View file

@ -1,11 +0,0 @@
---
title: "Кінці краватки на шиї"
---
***
Незалежно від того, чи подобаються вам прямі або загострені кінці краваток на шиї
## Вплив цієї опції на шаблон
![На цьому зображенні показано вплив цієї опції шляхом накладання декількох варіантів, які мають різне значення для цієї опції](bee_necktieends_sample.svg "Вплив цієї опції на шаблон")

View file

@ -0,0 +1,8 @@
---
title: Pointed tie ends
---
This option allows you to generate a pattern where the ties have a pointy end, rather than a straight one.
Enable this option if you want your ties to have pointy ends.
Disable this option (the default) if you want your ties to have straight ends.