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": {
"casingStitchingLine": "Sew down casing here",
"cutBandTie": "Cut 1 band tie:",
"cutNeckTie": "Cut 2 neck ties:",
"neckTieLength": "Length of the neck ties"
"cutBandTie.t": "The band ties are not shown",
"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.",
"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": {
"chestEase": {
@ -46,12 +47,28 @@
"d": "Controls the curvature of the front of the bikini cup"
},
"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",
"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": {
"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": {
"t": "Band (chest) tie width",
@ -61,13 +78,29 @@
"t": "Band (chest) tie length",
"d": "Controls the length of the ties around your chest"
},
"bandTieEnds": {
"t": "Band (chest) tie ends",
"d": "Whether you like straight or pointy ends on the ties around your chest"
"pointedTieEnds": {
"t": "Pointed tie ends",
"d": "Enable this options if you prefer tie ends to be pointy, rarther than straight"
},
"bandTieColours": {
"t": "Band (chest) tie length colours",
"d": "Whether you want single color ties around your chest, or dual-coloured ones"
"pointedTieEndsYes": {
"t": "Pointy ends",
"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": {
"t": "Neck tie width",
@ -89,6 +122,14 @@
"t": "Cross back ties",
"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": {
"t": "Band Length (Cross back ties)",
"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"
},
"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"
}
}

View file

@ -16,8 +16,6 @@ export const bandTie = {
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: ({
store,
@ -67,15 +65,13 @@ export const bandTie = {
points.bottomRight = new Point(points.topRight.x, bandTieLength)
points.topMiddle = new Point(bandTieWidth, points.topLeft.y)
if (!options.crossBackTies && options.bandTieEnds === 'pointed')
points.topMiddle.y -= bandTieWidth
if (!options.crossBackTies && options.pointedTieEnds) points.topMiddle.y -= bandTieWidth
points.bottomMiddle = new Point(points.topMiddle.x, bandTieLength)
paths.seam =
options.bandTieColours === 'one'
? new Path().move(points.bottomRight).line(points.topRight)
: new Path().move(points.bottomMiddle)
paths.seam = options.duoColorTies
? new Path().move(points.bottomMiddle)
: new Path().move(points.bottomRight).line(points.topRight)
paths.seam.line(points.topMiddle).line(points.topLeft).line(points.bottomLeft).close()
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
@ -83,6 +79,11 @@ export const bandTie = {
/*
* 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.grainlineLeft = points.topLeft.translate(bandTieWidth * (1 / 8), bandTieLength * (3 / 4))
// Title
@ -95,17 +96,18 @@ export const bandTie = {
})
// Foldline
if (options.bandTieColours === 'one') {
points.cofRight = points.bottomLeft.shift(0, bandTieWidth * (15 / 8))
points.grainlineRight = points.grainlineLeft.shift(0, bandTieWidth * (14 / 8))
paths.foldline = new Path()
.move(points.bottomMiddle)
.line(points.topMiddle)
.addText('foldLine', 'center fill-note text-sm')
.attr('class', 'note help')
} else {
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.grainlineRight = points.grainlineLeft.shift(0, bandTieWidth * (14 / 8))
if (complete)
paths.foldline = new Path()
.move(points.bottomMiddle)
.line(points.topMiddle)
.addText('foldLine', 'center fill-note text-sm')
.attr('class', 'note help')
}
// Grainline
@ -134,12 +136,6 @@ export const bandTie = {
snippets.centreNotch = new Snippet('notch', points.bottomRight)
points.sideNotch = points.bottomRight.shift(90, gatherLength)
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', {
@ -151,7 +147,7 @@ export const bandTie = {
macro('hd', {
id: 'wTop',
from: points.topLeft,
to: points.topRight,
to: options.duoColorties ? points.middleRight : points.topRight,
y: points.topLeft.x - sa - 20,
})

View file

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

View file

@ -12,33 +12,42 @@ const Bee = new Design({
})
// Merge translations
const i18nKeepOptions = [
...Object.keys(cup.options),
...Object.keys(neckTie.options),
...Object.keys(bandTie.options),
'bustDartCurve',
'bustSpanEase',
'chestEase',
'fullChestEaseReduction',
'shoulderToShoulderEase',
'waistEase',
'backDartHeight',
'bustDartLength',
'waistDartLength',
'armholeDepth',
'backArmholeCurvature',
'backArmholePitchDepth',
'backArmholeSlant',
'frontArmholeCurvature',
'frontArmholePitchDepth',
'backHemSlope',
'backNeckCutout',
'frontShoulderWidth',
'highBustWidth',
]
for (const o of [
'reversible',
'duoColorTies',
'pointedTieEnds',
'crossBackTies',
'bellaGuide',
'ties',
])
i18nKeepOptions.push(o + 'Yes', o + 'No')
const i18n = mergeI18n([bellaI18n, beeI18n], {
o: {
keep: [
...Object.keys(cup.options),
...Object.keys(neckTie.options),
...Object.keys(bandTie.options),
'bustDartCurve',
'bustSpanEase',
'chestEase',
'fullChestEaseReduction',
'shoulderToShoulderEase',
'waistEase',
'backDartHeight',
'bustDartLength',
'waistDartLength',
'armholeDepth',
'backArmholeCurvature',
'backArmholePitchDepth',
'backArmholeSlant',
'frontArmholeCurvature',
'frontArmholePitchDepth',
'backHemSlope',
'backNeckCutout',
'frontShoulderWidth',
'highBustWidth',
],
},
o: { keep: i18nKeepOptions },
})
export { cup, neckTie, bandTie, Bee, i18n }

View file

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