1
0
Fork 0

[bee]: Refactor code & fixes (#200)

Closes #105
Closes #76
Closes #148

This is a major clean up and overhaul of Bee's code.

Changes

-     Reinstating the ability to toggle the colours of neck and band tie independently
-     Reinstating the ability to toggle pointed edge of neck and band tie independently
-     Simplify snap options
-     Simplfication of the code
-     Simplify Cutting Instructions
-     Cutlist re-work
-     Hidden tie flag message also now appears when !options.ties
-     Neck tie is no longer hidden when options.pointedNeckTieEnds == true
-     Band tie is no longer hidden when options.crossBackTies == true
-     Band tie is no longer hidden when options.pointedBandTieEnds == true && !options.crossBackTies
-     options.reversible now acts as an override for options.duoNeckTieColours & options.duoBandTieColours
-     options.reversible markdown updated to reflect this
-     Updated neckTieLength when crossBackTies == true this was an error from the original code.
-     Designer note links updated for new options.
-     i18n en.json file updated to reflect change in options

Fixes

-     Neck ties no longer cut on fold (This was an error from when originally coded)
-     Band tie locks in duo colours when options.crossBackTies == true (this is why there were incorrect notch placements)
-     options.bandLength move to neck.mjs
-     Locking Bella options that were added post Bee.

Additions

-     options.duoNeckTieColours
-     options.duoBandTieColours
-     options.pointedNeckTieEnds
-     options.pointedBandTieEnds
-     New option markdown
-     Added snap info to neckTieWidth & bandTieWidth markdown

Removed

-     options.duoTieColors
-     options.pointedTieEnds
-     removed option markdown
-     Hidden tie flag message has had expand flags removed

Things to Note

-     The cut list is not using the mirrored preset to hopefully lessen confusion.

Moving forward, as the original coder of this design, in an effort to maintain the design as intended by the original designer in the future, it would streamline the process and be helpful if any requests for maintenance were sent directly to me.

Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/200
Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org>
Co-authored-by: bobgeorgethe3rd <bobgeorgethe3rd@googlemail.com>
Co-committed-by: bobgeorgethe3rd <bobgeorgethe3rd@googlemail.com>
This commit is contained in:
bobgeorgethe3rd 2025-04-03 16:13:24 +00:00 committed by Joost De Cock
parent 3cba9e4020
commit d973cb4248
15 changed files with 642 additions and 620 deletions

View file

@ -78,29 +78,53 @@
"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"
}, },
"pointedTieEnds": { "pointedBandTieEnds": {
"t": "Pointed tie ends", "t": "Pointed band tie ends",
"d": "Enable this options if you prefer tie ends to be pointy, rather than straight" "d": "Enable this options if you prefer band tie ends to be pointy, rather than straight"
}, },
"pointedTieEndsYes": { "pointedBandTieEndsYes": {
"t": "Pointy ends", "t": "Pointy band tie ends",
"d": "Make the tie ends pointy" "d": "Make the band tie ends pointy"
}, },
"pointedTieEndsNo": { "pointedBandTieEndsNo": {
"t": "Straight ends", "t": "Straight band tie ends",
"d": "Make the tie ends straight" "d": "Make the band tie ends straight"
}, },
"duoColorTies": { "pointedNeckTieEnds": {
"t": "Duo-colored ties", "t": "Pointed neck tie ends",
"d": "Enable this option to generate a pattern for bands using two colors instead of one" "d": "Enable this options if you prefer neck tie ends to be pointy, rather than straight"
}, },
"duoColorTiesYes": { "pointedNeckTieEndsYes": {
"t": "Two colors", "t": "Pointy neck tie ends",
"d": "Use two colors for the ties" "d": "Make the neck tie ends pointy"
}, },
"duoColorTiesNo": { "pointedNeckTieEndsNo": {
"t": "Single color", "t": "Straight neck tie ends",
"d": "Use a single color for the ties" "d": "Make the neck tie ends straight"
},
"duoBandTieColours": {
"t": "Duo-coloured band ties",
"d": "Enable this option to generate a pattern for bands using two band tie colours instead of one"
},
"duoBandTieColoursYes": {
"t": "Two band tie colours",
"d": "Use two band tie colours for the ties"
},
"duoBandTieColoursNo": {
"t": "Single band tie colour",
"d": "Use a single band tie colour for the ties"
},
"duoNeckTieColours": {
"t": "Duo-coloured neck ties",
"d": "Enable this option to generate a pattern for bands using two neck tie colours instead of one"
},
"duoNeckTieColoursYes": {
"t": "Two neck tie colours",
"d": "Use two neck tie colours for the ties"
},
"duoNeckTieColoursNo": {
"t": "Single neck tie colour",
"d": "Use a single neck tie colour for the ties"
}, },
"neckTieWidth": { "neckTieWidth": {
"t": "Neck tie width", "t": "Neck tie width",
@ -175,4 +199,4 @@
"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

@ -1,21 +1,21 @@
import { pctBasedOn } from '@freesewing/core'
import { cup } from './cup.mjs' import { cup } from './cup.mjs'
export const bandTie = { export const bandTie = {
name: 'bee.bandTie', name: 'bee.bandTie',
after: cup, after: cup,
options: { options: {
//Style
bandTieWidth: { bandTieWidth: {
pct: 3, pct: 3,
min: 1, min: 1,
max: 9, max: 9,
snap: { snap: 6.35,
metric: [6, 13, 19, 25, 32, 38], ...pctBasedOn('hpsToWaistFront'),
imperial: [6.35, 12.7, 19.05, 25.4, 31.75, 38.1],
},
toAbs: (pct, { measurements }) => measurements.hpsToWaistFront * pct,
menu: 'style', menu: 'style',
}, },
bandTieLength: { pct: 35, min: 30, max: 50, menu: 'style' }, pointedBandTieEnds: { bool: false, menu: 'style' },
duoBandTieColours: { bool: false, menu: 'style' },
}, },
draft: ({ draft: ({
store, store,
@ -25,132 +25,145 @@ export const bandTie = {
Path, Path,
paths, paths,
options, options,
complete,
macro, macro,
measurements, measurements,
snippets, snippets,
expand, expand,
Snippet, Snippet,
paperless,
utils, utils,
absoluteOptions, absoluteOptions,
part, part,
}) => { }) => {
if (!options.ties && !options.crossBackTies) part.hide() //lock option
if (options.reversible) options.duoBandTieColours = true
//measures
const bandTieLength = options.crossBackTies const bandTieLength = options.crossBackTies
? (measurements.underbust * options.bandLength) / 2 + options.neckTieWidth * 2 ? (measurements.underbust * options.bandLength) / 2 + options.neckTieWidth * 2
: (measurements.underbust + measurements.underbust * options.bandTieLength) / 2 : (measurements.underbust * (1 + options.bandTieLength)) / 2
const bandTieWidth = options.crossBackTies const bandTieWidth =
? absoluteOptions.bandTieWidth * 2 options.crossBackTies || !options.duoBandTieColours
: absoluteOptions.bandTieWidth ? absoluteOptions.bandTieWidth * 2
: absoluteOptions.bandTieWidth
/* /*
* Don't bother unless expand is set * Don't bother unless expand is set
*/ */
if (!expand) { if (((!expand && !options.pointedBandTieEnds) || !options.ties) && !options.crossBackTies) {
points.text = new Point(10, 10) const extraSa = sa ? 2 * sa : 0
.addText('bee:cutBandTie', 'fill-note') store.flag.note({
.addText(':') msg: `bee:cutBandTie`,
.addText(utils.units((bandTieWidth + sa) * 2)) notes: [sa ? 'flag:saIncluded' : 'flag:saExcluded'],
.addText(' x ') replace: {
.addText(utils.units(bandTieLength)) width: utils.units(bandTieWidth + extraSa),
paths.diag = new Path().move(new Point(0, 0)).line(new Point(100, 15)).addClass('hidden') length: utils.units(bandTieLength * 2),
},
})
return part return part
} }
//let's begin
points.topLeft = new Point(0, 0) points.topLeft = new Point(0, 0)
points.topRight = new Point(bandTieWidth * 2, points.topLeft.y) points.topRight = new Point(bandTieWidth, points.topLeft.y)
points.bottomLeft = new Point(points.topLeft.x, bandTieLength) points.bottomLeft = new Point(points.topLeft.x, bandTieLength)
points.bottomRight = new Point(points.topRight.x, bandTieLength) points.bottomRight = new Point(points.topRight.x, points.bottomLeft.y)
points.topMid = new Point(points.topRight.x / 2, points.topLeft.y)
points.bottomMid = new Point(points.topMid.x, points.bottomLeft.y)
points.topMiddle = new Point(bandTieWidth, points.topLeft.y) points.topPeak =
if (!options.crossBackTies && options.pointedTieEnds) points.topMiddle.y -= bandTieWidth options.crossBackTies || !options.pointedBandTieEnds
? points.topMid
: options.duoBandTieColours
? points.topRight.shift(90, bandTieWidth)
: points.topMid.shift(90, bandTieWidth / 2)
//paths
paths.seam = new Path()
.move(points.bottomRight)
.line(points.topRight)
.line(points.topPeak)
.line(points.topLeft)
.line(points.bottomLeft)
.close()
.addClass('fabric')
points.bottomMiddle = new Point(points.topMiddle.x, bandTieLength) if (sa) paths.sa = paths.seam.offset(sa).close().addClass('fabric sa')
paths.seam = options.duoColorTies //detail
? new Path().move(points.bottomMiddle) //grainline
: new Path().move(points.bottomRight).line(points.topRight) points.cutOnFoldFrom = points.bottomLeft
paths.seam.line(points.topMiddle).line(points.topLeft).line(points.bottomLeft).close() points.cutOnFoldTo = points.bottomRight
macro('cutonfold', {
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') from: points.cutOnFoldFrom,
to: points.cutOnFoldTo,
/* grainline: true,
* Annotations })
*/ //cutlist
store.cutlist.addCut({ cut: 1, from: 'fabric', onfold: 'true' })
// Cut list if (options.duoBandTieColours && !options.crossBackTies)
if (options.crossBackTies) store.cutlist.addCut({ cut: 1, from: 'fabric' }) store.cutlist.addCut({ cut: 1, from: 'constrast', onfold: 'true' })
else store.cutlist.addCut({ cut: 2, from: 'fabric' }) //notches
if (options.crossBackTies) {
points.cofLeft = points.bottomLeft.shift(0, bandTieWidth * (1 / 8)) points.sideNotchLeft = points.bottomLeft.shift(90, store.get('cupWidth'))
points.grainlineLeft = points.topLeft.translate(bandTieWidth * (1 / 8), bandTieLength * (3 / 4)) points.sideNotchRight = points.sideNotchLeft.flipX(points.topMid)
// Title macro('sprinkle', {
points.title = points.topLeft.translate(bandTieWidth * (1 / 8), bandTieLength * (1 / 4)) snippet: 'notch',
on: ['bottomRight', 'sideNotchLeft', 'sideNotchRight'],
})
}
//title
points.title = points.topLeft.translate(bandTieWidth / 8, bandTieLength / 4)
macro('title', { macro('title', {
at: points.title, at: points.title,
nr: 3, nr: 3,
title: options.crossBackTies ? 'band' : 'bandTie', title: options.crossBackTies ? 'band' : 'bandTie',
scale: 0.7, scale: 0.5,
}) })
//fold-line
// Foldline if (options.crossBackTies || !options.duoBandTieColours) {
if (options.duoColorTies) { paths.foldline = new Path()
points.cofRight = points.bottomLeft.shift(0, bandTieWidth * (7 / 8)) .move(points.topPeak)
points.grainlineRight = points.grainlineLeft.shift(0, bandTieWidth * (7 / 8)) .line(points.bottomMid)
} else { .addText('foldLine', 'center fill-note text-sm')
points.cofRight = points.bottomLeft.shift(0, bandTieWidth * (15 / 8)) .addClass('note help')
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')
} }
//paperless
if (paperless) {
macro('vd', {
from: points.topLeft,
to: points.bottomLeft,
x: points.topLeft.x - sa - 15,
id: 'vd0',
})
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + sa + 15,
id: 'hd0',
})
// Grainline if (options.pointedBandTieEnds && !options.crossBackTies) {
macro('grainline', { macro('vd', {
from: points.grainlineLeft, from: points.topPeak,
to: points.grainlineRight, to: points.topLeft,
classes: { x: points.topLeft.x - sa - 15,
text: 'text-sm fill-note', id: 'vdP0',
line: 'stroke-sm', })
}, macro('vd', {
}) from: points.topPeak,
to: points.bottomLeft,
// Cut on fold x: points.topLeft.x - sa - 30,
macro('cutonfold', { id: 'vdP1',
from: points.cofLeft, })
to: points.cofRight, if (!options.duoBandTieColours) {
offset: 10, macro('hd', {
classes: { from: points.topLeft,
text: 'text-sm center fill-note', to: points.topPeak,
line: 'stroke-sm note', y: points.topPeak.y - sa - 15,
}, id: 'hdP0',
}) })
}
if (complete && options.crossBackTies) { }
let gatherLength = store.get('gatherLength')
snippets.centreNotch = new Snippet('notch', points.bottomRight)
points.sideNotch = points.bottomRight.shift(90, gatherLength)
snippets.sideNotch = new Snippet('notch', points.sideNotch)
} }
macro('vd', {
id: 'hLeft',
from: points.bottomLeft,
to: points.topLeft,
x: points.topLeft.x - sa - 20,
})
macro('hd', {
id: 'wTop',
from: points.topLeft,
to: options.duoColorties ? points.middleRight : points.topRight,
y: points.topLeft.x - sa - 20,
})
return part return part
}, },
} }

View file

@ -11,163 +11,79 @@ export const cup = {
after: neckTie, after: neckTie,
measurements: ['bustPointToUnderbust'], measurements: ['bustPointToUnderbust'],
options: { options: {
//Bee's //Constant
backArmholeCurvature: 0.63, //Altered from Bella
backArmholePitchDepth: 0.35, //Altered from Bella
backArmholeSlant: 5, //Altered from Bella
frontArmholeCurvature: 0.63, //Altered from Bella
bustDartCurve: 1, //Altered from Bella
bustDartLength: 1, //Altered from Bella
waistDartLength: 1, //Altered from Bella
backHemSlope: 2.5, //Altered from Bella
backNeckCutout: 0.06, //Altered from Bella
bustDartAngle: 0, //Altered from Bella
waistDartCurve: 1, //Altered from Bella
bustDartMinimumFabric: 0.05, //Altered from Bella
//Fit
topDepth: { pct: 54, min: 50, max: 80, menu: 'fit' }, topDepth: { pct: 54, min: 50, max: 80, menu: 'fit' },
bottomCupDepth: { pct: 8, min: 0, max: 20, menu: 'fit' }, bottomCupDepth: { pct: 8, min: 0, max: 20, menu: 'fit' },
sideDepth: { pct: 20.6, min: 0, max: 30, menu: 'fit' }, sideDepth: { pct: 20.6, min: 0, max: 30, menu: 'fit' },
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' }, //Style
duoColorTies: { bool: false, menu: 'style' }, bandTieLength: { pct: 35, min: 30, max: 50, menu: 'style' },
//changed from Bella //Advanced
backArmholeCurvature: 0.63, armholeDepth: { pct: 44, min: 38, max: 46, menu: 'advanced' }, //moved from Bella
backArmholePitchDepth: 0.35, frontArmholePitchDepth: { pct: 29, max: 31, min: 27, menu: 'advanced' }, //moved from Bella
backArmholeSlant: 5, backDartHeight: { pct: 46, min: 38, max: 54, menu: 'advanced' }, //moved from Bella
frontArmholeCurvature: 0.63, frontShoulderWidth: { pct: 95, max: 98, min: 92, menu: 'advanced' }, //moved from Bella
bustDartCurve: 1, highBustWidth: { pct: 86, max: 92, min: 80, menu: 'advanced' }, //moved from Bella
bustDartLength: 1,
waistDartLength: 1,
waistDartCurve: 1,
backHemSlope: 2.5,
backNeckCutout: 0.06,
bustDartAngle: 0,
bustDartMinimumFabric: 0,
//catergory changed from Bella
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: ({ draft: ({
store, store,
sa, sa,
points, points,
Point,
Path, Path,
paths, paths,
options, options,
complete,
macro, macro,
utils, utils,
measurements, measurements,
snippets, snippets,
Snippet, Snippet,
absoluteOptions, absoluteOptions,
paperless,
expand,
part, part,
}) => { }) => {
/* //removing paths and snippets not required from Bella
* Cleaning up paths and snippets from Bella for (const i in paths) delete paths[i]
*/ for (const i in snippets) delete snippets[i]
for (let i in paths) delete paths[i] //removing macros not required from Bella
for (let i in snippets) delete snippets[i]
/*
* Removing macros from Bella
*/
macro('rmtitle') macro('rmtitle')
macro('rmscalebox') macro('rmscalebox')
macro('rmcutonfold')
//measurements
const cupWidth = measurements.bustPointToUnderbust * (1 + options.bottomCupDepth)
const bandTieWidth = options.crossBackTies ? 0 : absoluteOptions.bandTieWidth
//rotate to close bust dart
points.bustDartClosed = points.bustDartTop
/* const rot = ['waistDartRightCp', 'waistDartRight', 'sideHemInitial']
* Bella alterations for (const p of rot) points[p] = points[p].rotate(store.get('bustDartAngleSide'), points.bust)
*/
points.sideHemNew = points.armhole.shiftOutwards( points.sideHem = utils.beamsIntersect(
points.bustDartTop, points.waistDartRight,
points.bustDartBottom.dist(points.sideHemInitial) points.sideHemInitial,
)
points.waistDartRightRotated = points.waistDartRight.rotate(
store.get('bustDartAngleSide'),
points.bust
)
// Bikini top
const underbust =
measurements.bustPointToUnderbust + measurements.bustPointToUnderbust * options.bottomCupDepth
points.top = points.bustA.shiftTowards(points.hps, measurements.hpsToBust * options.topDepth)
points.topLeft = points.top.shift(
points.top.angle(points.hps) + 90,
absoluteOptions.neckTieWidth / 2
)
points.topRight = points.top.shift(
points.top.angle(points.hps) - 90,
absoluteOptions.neckTieWidth / 2
)
points.leftDart = points.bustA.shiftTowards(points.waistDartLeft, underbust)
points.rightDart = points.bustA.shiftTowards(points.waistDartRightRotated, underbust)
points.lefti = utils.beamsIntersect(
points.leftDart,
points.leftDart.shift(points.leftDart.angle(points.bustA) + 90, 10),
points.cfNeck,
points.cfHem
)
points.righti = utils.beamsIntersect(
points.rightDart,
points.rightDart.shift(points.rightDart.angle(points.bustA) - 90, 10),
points.armhole, points.armhole,
points.sideHemNew points.bustDartClosed
) )
points.rightiOffset = points.righti.shiftFractionTowards(points.rightDart, options.sideDepth) //guide
points.sideEdge = points.rightiOffset.shift(
points.armhole.angle(points.righti),
absoluteOptions.bandTieWidth
)
points.frontEdge = points.lefti.shift(
points.cfNeck.angle(points.cfHem),
absoluteOptions.bandTieWidth
)
points.middleDart = points.bustA.shift(
points.bustA.angle(points.leftDart) +
(points.bustA.angle(points.rightDart) - points.bustA.angle(points.leftDart)) / 2,
points.bustA.dist(points.leftDart)
)
points.casingDart = points.bustA.shiftOutwards(points.middleDart, absoluteOptions.bandTieWidth)
points.leftControli = utils.beamsIntersect(
points.casingDart,
points.casingDart.shift(points.bustA.angle(points.middleDart) - 90, 10),
points.cfNeck,
points.cfHem
)
points.rightControli = utils.beamsIntersect(
points.casingDart,
points.casingDart.shift(points.bustA.angle(points.middleDart) + 90, 10),
points.armhole,
points.sideHemNew
)
points.leftControl = points.casingDart.shiftFractionTowards(points.leftControli, 0.5)
points.rightControl = points.casingDart.shiftFractionTowards(points.rightControli, 0.5)
points.middleSideFront = points.rightiOffset.shiftFractionTowards(points.topRight, 0.5)
points.sideCurveControl = points.middleSideFront.shiftFractionTowards(
points.bustA,
options.sideCurve
)
points.middleFront = points.topLeft.shiftFractionTowards(points.lefti, 0.5)
points.frontCurveControl = points.middleFront.shiftFractionTowards(
points.bustA,
options.frontCurve
)
points.leftControlOffset = points.leftControl.shiftTowards(
points.top,
absoluteOptions.bandTieWidth
)
points.rightControlOffset = points.rightControl.shiftTowards(
points.top,
absoluteOptions.bandTieWidth
)
points.bottomEdge = options.crossBackTies
? new Path()
.move(points.lefti)
.curve_(points.leftControlOffset, points.middleDart)
.curve_(points.rightControlOffset, points.rightiOffset)
.edge('bottom')
: new Path()
.move(points.frontEdge)
.curve_(points.leftControl, points.casingDart)
.curve_(points.rightControl, points.sideEdge)
.edge('bottom')
if (options.bellaGuide) { if (options.bellaGuide) {
paths.bellaGuide = new Path() paths.bellaGuide = new Path()
.move(points.sideHemNew) .move(points.sideHem)
.line(points.bustDartTop) .line(points.bustDartTop)
.line(points.armhole) .line(points.armhole)
.curve(points.armholeCp2, points.armholePitchCp1, points.armholePitch) .curve(points.armholeCp2, points.armholePitchCp1, points.armholePitch)
@ -176,253 +92,311 @@ export const cup = {
.curve(points.hpsCp2, points.cfNeckCp1, points.cfNeck) .curve(points.hpsCp2, points.cfNeckCp1, points.cfNeck)
.line(points.cfHem) .line(points.cfHem)
.line(points.waistDartLeft) .line(points.waistDartLeft)
.line(points.bustA) .line(points.bust)
.line(points.waistDartRightRotated) .line(points.waistDartRight)
.line(points.sideHemNew) .line(points.sideHem)
.addClass('note help') .addClass('various lashed')
.close() .close()
} }
//let's begin
points.topMid = points.bust.shiftTowards(points.hps, measurements.hpsToBust * options.topDepth)
points.topLeft = points.topMid.shift(
points.topMid.angle(points.hps) + 90,
absoluteOptions.neckTieWidth / 2
)
points.topRight = points.topMid.shift(
points.topMid.angle(points.hps) - 90,
absoluteOptions.neckTieWidth / 2
)
points.leftDart = points.bust.shiftTowards(points.waistDartLeft, cupWidth)
points.rightDart = points.bust.shiftTowards(points.waistDartRight, cupWidth)
points.bottomLeft = utils.beamsIntersect(
points.leftDart,
points.bust.rotate(90, points.leftDart),
points.cfNeck,
points.cfHem
)
points.bottomRightAnchor = utils.beamsIntersect(
points.rightDart,
points.bust.rotate(-90, points.rightDart),
points.armhole,
points.sideHem
)
points.bottomRight = points.bottomRightAnchor.shiftFractionTowards(
points.rightDart,
options.sideDepth
)
points.sideEdge = points.bottomRight.shift(points.armhole.angle(points.sideHem), bandTieWidth)
points.frontEdge = points.bottomLeft.shift(points.cfNeck.angle(points.cfHem), bandTieWidth)
points.bottomDart = points.bust.shift(
points.bust.angle(points.leftDart) +
(points.bust.angle(points.rightDart) - points.bust.angle(points.leftDart)) / 2,
points.bust.dist(points.leftDart)
)
points.dartEdge = points.bust.shiftOutwards(points.bottomDart, bandTieWidth)
points.frontEdgeCp2 = utils.beamsIntersect(
points.dartEdge,
points.dartEdge.shift(points.bust.angle(points.bottomDart) - 90, 10),
points.cfNeck,
points.cfHem
)
points.sideEdgeCp2Target = utils.beamsIntersect(
points.dartEdge,
points.dartEdge.shift(points.bust.angle(points.bottomDart) + 90, 10),
points.armhole,
points.sideHem
)
points.frontEdgeCp2 = points.dartEdge.shiftFractionTowards(points.frontEdgeCp2, 0.5)
points.sideEdgeCp1 = points.dartEdge.shiftFractionTowards(points.sideEdgeCp2Target, 0.5)
points.middleSideFront = points.bottomRight.shiftFractionTowards(points.topRight, 0.5)
points.bottomRightCp2 = points.middleSideFront.shiftFractionTowards(
points.bust,
options.sideCurve
)
points.middleFront = points.topLeft.shiftFractionTowards(points.bottomLeft, 0.5)
points.bottomLeftCp1 = points.middleFront.shiftFractionTowards(points.bust, options.frontCurve)
points.bottomLeftCp2 = points.frontEdgeCp2.shiftTowards(points.topMid, bandTieWidth)
points.bottomRightCp1 = points.sideEdgeCp1.shiftTowards(points.topMid, bandTieWidth)
//paths
paths.seam = new Path()
.move(points.sideEdge)
.line(points.bottomRight)
.curve_(points.bottomRightCp2, points.topRight)
.line(points.topLeft)
.curve_(points.bottomLeftCp1, points.bottomLeft)
.line(points.frontEdge)
.curve_(points.frontEdgeCp2, points.dartEdge)
.curve_(points.sideEdgeCp1, points.sideEdge)
.close()
.addClass('fabric')
paths.seam = options.crossBackTies if (sa) paths.sa = paths.seam.offset(sa).close().addClass('fabric sa')
? new Path()
.move(points.rightiOffset)
.curve_(points.sideCurveControl, points.topRight)
.line(points.topLeft)
.curve_(points.frontCurveControl, points.lefti)
.curve_(points.leftControlOffset, points.middleDart)
.curve_(points.rightControlOffset, points.rightiOffset)
.close()
: new Path()
.move(points.sideEdge)
.line(points.rightiOffset)
.curve_(points.sideCurveControl, points.topRight)
.line(points.topLeft)
.curve_(points.frontCurveControl, points.lefti)
.line(points.frontEdge)
.curve_(points.leftControl, points.casingDart)
.curve_(points.rightControl, points.sideEdge)
.close()
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') //stores
if (options.crossBackTies) {
points.leftSplit = utils.lineIntersectsCurve(
points.bust,
points.waistDartLeft,
points.frontEdge,
points.frontEdgeCp2,
points.dartEdge,
points.dartEdge
)
points.rightSplit = utils.lineIntersectsCurve(
points.bust,
points.waistDartRight,
points.dartEdge,
points.sideEdgeCp1,
points.sideEdge,
points.sideEdge
)
paths.bottomCurve = new Path()
.move(points.bottomLeft)
.line(points.frontEdge)
.curve_(points.frontEdgeCp2, points.dartEdge)
.curve_(points.sideEdgeCp1, points.sideEdge)
.hide()
store.set(
'cupWidth',
paths.bottomCurve.split(points.leftSplit)[0].length() +
paths.bottomCurve.split(points.rightSplit)[1].length()
)
}
/* //details
* Annotations //grainline
*/ points.grainlineFrom = points.topMid.shiftFractionTowards(points.bust, 0.05)
// Cut list points.grainlineTo = points.bust.shiftFractionTowards(points.topMid, 0.05)
// Removing the cutonfold indicator should do the trick, but it does not
// So I am setting ignoreOnFold below until I fix this
macro('rmcutonfold')
store.cutlist.addCut({ cut: 2, material: 'fabric', ignoreOnFold: true })
points.gridAnchor = points.lefti
if (options.reversible)
store.cutlist.addCut({ cut: 2, material: 'altFabric1', ignoreOnFold: true })
// Grainline
points.grainlineTop = points.top.shiftFractionTowards(points.bustA, 0.05)
points.grainlineBottom = points.bustA.shiftFractionTowards(points.top, 0.05)
macro('grainline', { macro('grainline', {
from: points.grainlineTop, from: points.grainlineFrom,
to: points.grainlineBottom, to: points.grainlineTo,
}) })
//cutlist
// Notches if (options.reversible) {
points.frontNotch = new Path() store.cutlist.setCut({ cut: 2, from: 'fabric', identical: 'true' })
store.cutlist.addCut({ cut: 2, from: 'constrast', identical: 'true' })
} else {
store.cutlist.setCut({ cut: 4, from: 'fabric', identical: 'true' })
}
//notches
paths.frontCurve = new Path()
.move(points.topLeft) .move(points.topLeft)
.curve_(points.frontCurveControl, points.lefti) .curve_(points.bottomLeftCp1, points.bottomLeft)
.shiftFractionAlong(0.5) .hide()
snippets.frontNotch = new Snippet('notch', points.frontNotch) points.frontNotch = paths.frontCurve.shiftFractionAlong(0.5)
snippets.lefti = new Snippet('notch', points.lefti) macro('sprinkle', {
snippets.righti = new Snippet('notch', points.rightiOffset) snippet: 'notch',
on: ['frontNotch', 'bottomLeft', 'bottomRight'],
// Title })
if (!options.crossBackTies) {
macro('sprinkle', {
snippet: 'notch',
on: ['frontEdge', 'sideEdge'],
})
//casingLine
paths.casingline = new Path()
.move(points.bottomLeft)
.curve_(points.bottomLeftCp2, points.bottomDart)
.curve_(points.bottomRightCp1, points.bottomRight)
.addClass('fabric lashed')
.addText('bee:casingStitchingLine', 'center')
}
//title
points.title = points.bottomLeftCp1.shiftFractionTowards(points.bottomRight, 0.5)
macro('title', { macro('title', {
at: points.grainlineBottom, at: points.title,
nr: 1, nr: 1,
title: 'cup', title: 'cup',
scale: 0.7, scale: 0.7,
}) })
//scalebox
if (!options.crossBackTies) { points.scalebox = new Point(points.bottomLeft.x + 12.7, points.topLeft.y + 12.7)
snippets.frontEdge = new Snippet('notch', points.frontEdge)
snippets.sideEdge = new Snippet('notch', points.sideEdge)
}
// Scalebox
points.scalebox = points.grainlineBottom.shift(180, 30)
macro('miniscale', { at: points.scalebox }) macro('miniscale', { at: points.scalebox })
//logo
// Logo points.logo = points.bust.shiftFractionTowards(points.bottomDart, 0.5)
points.logo = points.grainlineTop.shiftFractionTowards(points.grainlineBottom, 0.3) snippets.logo = new Snippet('logo', points.logo).attr('data-scale', 0.7)
snippets.logo = new Snippet('logo', points.logo).scale(0.7) //tie measures
if (!options.ties || !expand) {
// Conditional annotations points.neckTieLength = points.topLeft
if (complete && !options.crossBackTies) { .shiftFractionTowards(points.bottomLeft, 0.7)
paths.casingline = new Path() .addText('Neck Tie Length: ' + utils.units(store.get('neckTieLength')))
.move(points.lefti)
.curve_(points.leftControlOffset, points.middleDart)
.curve_(points.rightControlOffset, points.rightiOffset)
.attr('class', 'fabric lashed')
.addText('bee:casingStitchingLine', 'center')
}
if (complete && !options.ties) {
points.neckTieLength = points.grainlineBottom
.shift(-90, 42)
.addText('bee:neckTieLength')
.addText(':')
.addText(utils.units(store.get('neckTieLength')))
if (!options.crossBackTies) { if (!options.crossBackTies) {
points.backTieLength = points.grainlineBottom points.backTieLength = points.topLeft
.shift(-90, 49) .shiftFractionTowards(points.bottomLeft, 0.8)
.addText('bee:bandTieLength')
.addText(':')
.addText( .addText(
utils.units(measurements.underbust + measurements.underbust * options.bandTieLength) 'Band Tie Length: ' + utils.units(measurements.underbust * (1 + options.bandTieLength))
) )
} }
} }
//paperless
// Dimensions if (paperless) {
if (!options.crossBackTies) { //vertical distances
macro('vd', { macro('vd', {
from: points.frontEdge, from: points.bottomLeft,
to: points.lefti, to: paths.seam.bbox().bottomRight,
x: points.frontEdge.x - sa - 15, x: points.bottomLeft.x - sa - 15,
id: 'hCasing', id: 'vd0',
}) })
macro('vd', { macro('vd', {
from: points.frontEdge, from: points.topMid,
to: points.topRight, to: points.bottomLeft,
x: points.frontEdge.x - sa - 30, x: points.bottomLeft.x - sa - 15,
id: 'hLeft', id: 'vd1',
})
macro('vd', {
from: points.topRight,
to: paths.seam.bbox().bottomRight,
x: points.bottomLeft.x - sa - 30,
id: 'vd3',
})
macro('vd', {
from: points.topRight,
to: points.bottomRight,
x: points.sideEdge.x + sa + 15,
id: 'vd4',
}) })
}
macro('vd', {
from: points.lefti,
to: points.topLeft,
x: points.frontEdge.x - sa - 15,
id: 'hNoCasing',
})
macro('hd', {
from: points.topLeft,
to: points.topRight,
y: points.topRight.y - sa - 15,
id: 'tipWidth',
})
macro('hd', {
from: points.lefti,
to: points.topLeft,
y: points.topRight.y - sa - 15,
id: 'wLeftToTip',
})
macro('hd', {
from: points.topRight,
to: points.rightiOffset,
y: points.topRight.y - sa - 15,
id: 'wTipToRight',
})
macro('hd', {
from: points.frontEdge,
to: options.crossBackTies ? points.rightiOffset : points.sideEdge,
y: points.topRight.y - sa - 30,
id: 'wpToRight',
})
macro('vd', {
from: points.topRight,
to: options.crossBackTies ? points.rightiOffset : points.sideEdge,
x: points.sideEdge.x + sa + 20,
id: 'sdfsd',
})
if (!options.crossBackTies) {
macro('vd', { macro('vd', {
id: 'hIncorrectEdgeRight',
from: points.sideEdge, from: points.sideEdge,
to: points.casingDart, to: paths.seam.bbox().bottomRight,
x: points.sideEdge.x + sa + 10, x: points.sideEdge.x + sa + 15,
id: 'vd5',
})
macro('vd', {
from: points.topRight,
to: paths.seam.bbox().bottomRight,
x: points.sideEdge.x + sa + 30,
id: 'vd6',
})
macro('vd', {
from: points.topMid,
to: points.dartEdge,
x: points.topMid.x,
id: 'vd7',
})
//horizontal distances
macro('hd', {
from: points.bottomLeft,
to: points.topLeft,
y: points.topLeft.y - sa - 15,
id: 'hd0',
}) })
macro('hd', { macro('hd', {
id: 'wBottomHalfRight', from: points.topLeft,
from: points.casingDart, to: points.topRight,
y: points.topRight.y - sa - 30,
id: 'hd1',
})
macro('hd', {
from: points.topRight,
to: points.bottomRight,
y: points.topRight.y - sa - 15,
id: 'hd2',
})
macro('hd', {
from: points.bottomLeft,
to: points.sideEdge, to: points.sideEdge,
y: points.casingDart.y + sa + 20, y: points.topRight.y - sa - 45,
id: 'hd3',
})
macro('hd', {
from: points.topMid,
to: points.dartEdge,
y: points.dartEdge.y,
id: 'hd4',
}) })
macro('hd', { macro('hd', {
id: 'wBottomHalfLeft',
from: points.frontEdge, from: points.frontEdge,
to: points.casingDart, to: points.dartEdge,
y: points.casingDart.y + sa + 20, y: points.dartEdge.y + sa + 15,
}) id: 'hd5',
macro('vd', {
id: 'hLeft',
from: points.bottomEdge,
to: points.topRight,
x: points.frontEdge.x - sa - 40,
})
}
if (options.crossBackTies) {
macro('vd', {
from: points.rightiOffset,
to: points.bottomEdge,
x: points.sideEdge.x + sa + 10,
}) })
macro('hd', { macro('hd', {
from: points.rightiOffset, from: points.dartEdge,
to: points.middleDart, to: paths.seam.bbox().bottomRight,
y: points.casingDart.y + sa + 20, y: points.dartEdge.y + sa + 15,
id: 'hd6',
}) })
macro('hd', { macro('hd', {
from: points.middleDart, from: points.frontEdge,
to: points.lefti, to: paths.seam.bbox().bottomRight,
y: points.casingDart.y + sa + 20, y: points.dartEdge.y + sa + 30,
id: 'hd7',
}) })
macro('vd', { //linear distances
from: points.bottomEdge, macro('ld', {
to: points.lefti, from: points.topLeft,
x: points.frontEdge.x - sa - 10,
})
macro('vd', {
from: points.bottomEdge,
to: points.topRight, to: points.topRight,
x: points.frontEdge.x - sa - 30, d: sa + 15,
id: 'ld0',
}) })
} macro('ld', {
macro('ld', { from: points.topMid,
from: points.rightiOffset, to: points.dartEdge,
to: points.righti, id: 'ld1',
}) })
//crossBackTies distances
if (complete && options.crossBackTies) { if (!options.crossBackTies) {
paths.curve = new Path() macro('vd', {
.move(points.lefti) from: points.bottomLeft,
.curve_(points.leftControlOffset, points.middleDart) to: points.frontEdge,
.curve_(points.rightControlOffset, points.rightiOffset) x: points.bottomLeft.x - sa - 15,
.hide() id: 'vdC0',
paths.dart = new Path() })
.move( macro('vd', {
points.bustA.shiftOutwards(points.leftDart, points.topRight.dist(points.rightiOffset)) from: points.bottomRight,
) to: points.sideEdge,
.line(points.bustA) x: points.sideEdge.x + sa + 15,
.line( id: 'vdC1',
points.bustA.shiftOutwards(points.rightDart, points.topRight.dist(points.rightiOffset)) })
) macro('hd', {
.hide() from: points.bottomRight,
for (let p of paths.curve.intersects(paths.dart)) { to: points.sideEdge,
points.rightDarti = points.bustA.shiftFractionTowards(p, 1) y: points.topRight.y - sa - 15,
id: 'hdC0',
})
} }
for (let p of paths.curve.reverse().intersects(paths.dart)) {
points.leftDarti = points.bustA.shiftFractionTowards(p, 1)
}
let leftCurve = paths.curve.reverse().split(points.leftDarti)
for (let i in leftCurve) {
paths.leftCurve = leftCurve[i].hide()
}
let rightCurve = paths.curve.split(points.rightDarti)
for (let i in rightCurve) {
paths.rightCurve = rightCurve[i].hide()
}
store.set('gatherLength', paths.leftCurve.length() + paths.rightCurve.length())
} }
return part return part
}, },
} }

View file

@ -4,6 +4,7 @@ export const neckTie = {
name: 'bee.neckTie', name: 'bee.neckTie',
measurements: ['underbust', 'hpsToBust', 'hpsToWaistFront'], measurements: ['underbust', 'hpsToBust', 'hpsToWaistFront'],
options: { options: {
//Style
ties: { bool: true, menu: 'style' }, ties: { bool: true, menu: 'style' },
crossBackTies: { bool: false, menu: 'style' }, crossBackTies: { bool: false, menu: 'style' },
bandLength: { pct: 85, min: 75, max: 90, menu: 'style' }, bandLength: { pct: 85, min: 75, max: 90, menu: 'style' },
@ -12,13 +13,12 @@ export const neckTie = {
pct: 6, pct: 6,
min: 2, min: 2,
max: 18, max: 18,
snap: { snap: 6.35,
metric: [6, 13, 19, 25, 32, 38],
imperial: [6.35, 12.7, 19.05, 25.4, 31.75, 38.1],
},
menu: 'style', menu: 'style',
...pctBasedOn('bustSpan'), ...pctBasedOn('bustSpan'),
}, },
pointedNeckTieEnds: { bool: false, menu: 'style' },
duoNeckTieColours: { bool: false, menu: 'style' },
reversible: { bool: false, menu: 'style' }, reversible: { bool: false, menu: 'style' },
}, },
draft: ({ draft: ({
@ -30,162 +30,142 @@ export const neckTie = {
paths, paths,
options, options,
units, units,
complete, paperless,
macro, macro,
measurements, measurements,
expand, expand,
absoluteOptions, absoluteOptions,
part, part,
}) => { }) => {
if (!options.ties) part.hide() //lock option
if (options.reversible) options.duoNeckTieColours = true
//measures
const neckTieLength = options.crossBackTies const neckTieLength = options.crossBackTies
? (Math.sqrt( ? Math.sqrt(
Math.pow(measurements.hpsToWaistFront, 2) + Math.pow(measurements.hpsToWaistFront, 2) +
Math.pow(measurements.underbust - measurements.underbust * options.neckTieLength, 2) Math.pow(
) + (measurements.underbust * options.bandLength - measurements.underbust * 0.5) * 0.5,
measurements.underbust - 2
measurements.underbust * options.bandLength + )
measurements.underbust - ) *
measurements.underbust * options.bandLength * options.neckTieLength) / (1 + options.neckTieLength)
2 : measurements.hpsToBust * (1 + options.neckTieLength)
: (measurements.hpsToBust + measurements.hpsToBust * options.neckTieLength) / 2 const neckTieWidth = options.duoNeckTieColours
store.set('neckTieLength', neckTieLength * 2) ? absoluteOptions.neckTieWidth
: absoluteOptions.neckTieWidth * 2
store.set('neckTieLength', neckTieLength)
/* /*
* Don't bother unless expand is set * Don't bother unless expand is set
*/ */
if (!expand) { if ((!expand && !options.pointedNeckTieEnds) || !options.ties) {
const extraSa = sa ? 2 * sa : 0 const extraSa = sa ? 2 * sa : 0
store.flag.note({ store.flag.note({
msg: `bee:cutNeckTie`, msg: `bee:cutNeckTie`,
notes: [sa ? 'flag:saIncluded' : 'flag:saExcluded', 'flag:partHiddenByExpand'], notes: [sa ? 'flag:saIncluded' : 'flag:saExcluded'],
replace: { replace: {
width: units(absoluteOptions.neckTieWidth * 2 + extraSa), width: units(neckTieWidth + extraSa),
length: units(neckTieLength * 2), length: units(neckTieLength),
},
suggest: {
text: 'flag:show',
icon: 'expand',
update: {
settings: ['expand', 1],
},
}, },
}) })
// Also hint about expand
store.flag.preset('expand')
return part.hide() return part.hide()
} }
//let's begin
points.topLeft = new Point(0, 0) points.topLeft = new Point(0, 0)
points.topRight = new Point(absoluteOptions.neckTieWidth * 2, points.topLeft.y) points.topRight = new Point(neckTieWidth, points.topLeft.y)
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, points.bottomLeft.y)
points.topMid = new Point(neckTieWidth / 2, points.topLeft.y)
points.bottomMid = new Point(points.topMid.x, points.bottomLeft.y)
points.topMiddle = options.pointedTieEnds points.topPeak = options.pointedNeckTieEnds
? new Point(absoluteOptions.neckTieWidth, points.topLeft.y - absoluteOptions.neckTieWidth) ? options.duoNeckTieColours
: new Point(absoluteOptions.neckTieWidth, points.topLeft.y) ? points.topRight.shift(90, neckTieWidth)
: points.topMid.shift(90, neckTieWidth / 2)
: points.topMid
points.bottomMiddle = new Point(points.topMiddle.x, neckTieLength) //paths
paths.seam = new Path()
.move(points.bottomLeft)
.line(points.bottomRight)
.line(points.topRight)
.line(points.topPeak)
.line(points.topLeft)
.line(points.bottomLeft)
.close()
.addClass('fabric')
paths.seam = options.duoColorTies if (sa) paths.sa = paths.seam.offset(sa).close().addClass('fabric sa')
? 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') //details
//grainline
/* points.grainlineFrom = points.topLeft.shift(0, absoluteOptions.neckTieWidth / 2)
* Annotations points.grainlineTo = new Point(points.grainlineFrom.x, points.bottomLeft.y)
*/ macro('grainline', {
points.cofLeft = points.bottomLeft.shift(0, absoluteOptions.neckTieWidth * (1 / 8)) from: points.grainlineFrom,
points.grainlineLeft = points.topLeft.translate( to: points.grainlineTo,
absoluteOptions.neckTieWidth * (1 / 8), })
neckTieLength * (3 / 4) //cutlist
) store.cutlist.addCut({ cut: 2, from: 'fabric', identical: 'true' })
if (options.duoNeckTieColours)
// Cut list store.cutlist.addCut({ cut: 2, from: 'constrast', identical: 'true' })
if (options.reversible) { //title
store.cutlist.addCut({ cut: 2, from: 'fabric', onFold: true })
store.cutlist.addCut({ cut: 2, from: 'altFabric1', onFold: true })
} else {
store.cutlist.addCut({ cut: 4, from: 'fabric', onFold: true })
}
// Title
points.title = points.topLeft.translate( points.title = points.topLeft.translate(
absoluteOptions.neckTieWidth * (1 / 8), absoluteOptions.neckTieWidth / 8,
neckTieLength * (1 / 4) points.bottomLeft.y / 4
) )
macro('title', { macro('title', {
at: points.title, at: points.title,
nr: 2, nr: 2,
title: 'neck tie', title: 'neckTie',
scale: 0.5, scale: 0.2,
}) })
//fold line
if (options.duoColorTies) { if (!options.duoNeckTieColours) {
points.cofRight = points.bottomLeft.shift(0, absoluteOptions.neckTieWidth * (7 / 8)) paths.foldline = new Path()
points.grainlineRight = points.grainlineLeft.shift(0, absoluteOptions.neckTieWidth * (7 / 8)) .move(points.topPeak)
} else { .line(points.bottomMid)
points.cofRight = points.bottomLeft.shift(0, absoluteOptions.neckTieWidth * (15 / 8)) .addText('foldLine', 'center fill-note text-sm')
points.grainlineRight = points.grainlineLeft.shift(0, absoluteOptions.neckTieWidth * (14 / 8)) .attr('class', 'note help')
if (complete) }
paths.foldline = new Path() //paperless
.move(points.bottomMiddle) if (paperless) {
.line(points.topMiddle) macro('vd', {
.addText('foldLine', 'center fill-note text-sm') from: points.topLeft,
.addClass('note help') to: points.bottomLeft,
x: points.topLeft.x - sa - 15,
id: 'vd0',
})
macro('hd', {
from: points.bottomLeft,
to: points.bottomRight,
y: points.bottomLeft.y + sa + 15,
id: 'hd0',
})
if (options.pointedNeckTieEnds) {
macro('vd', {
from: points.topPeak,
to: points.topLeft,
x: points.topLeft.x - sa - 15,
id: 'vdP0',
})
macro('vd', {
from: points.topPeak,
to: points.bottomLeft,
x: points.topLeft.x - sa - 30,
id: 'vdP1',
})
if (!options.duoNeckTieColours) {
macro('hd', {
from: points.topLeft,
to: points.topPeak,
y: points.topPeak.y - sa - 15,
id: 'hdP0',
})
}
}
} }
// Grainline
macro('grainline', {
from: points.grainlineLeft,
to: points.grainlineRight,
classes: {
text: 'text-sm fill-note',
line: 'stroke-sm',
},
})
// Cut on fold
macro('cutonfold', {
from: points.cofLeft,
to: points.cofRight,
offset: 10,
classes: {
text: 'text-sm center fill-note',
line: 'stroke-sm note',
},
})
// Dimensions
macro('vd', {
id: 'hLeft',
from: points.bottomLeft,
to: points.topMiddle,
x: points.topLeft.x - sa - 20,
})
macro('hd', {
id: 'wTop',
from: points.topLeft,
to: options.duoColorTies ? points.topMiddle : points.topRight,
y: points.topLeft.x - sa - 20,
})
return part return part
}, },
} }

View file

@ -3,7 +3,7 @@ It is based on a garment they made and wanted to make available for other people
We worked of FreeSewing's body block Bella as a base, converting it to a single dart block to make the top. We worked of FreeSewing's body block Bella as a base, converting it to a single dart block to make the top.
During pattern testing one of our contributors TangerineShark made a variant with crossover back ties which we found so cool we added it to Bee! During pattern testing one of our contributors TangerineShark made a variant with crossover back ties which we found so cool we added it to Bee!
You can get this variation by using [option Cross Back Ties](/docs/designs/bee/options#crossbackties). You can get this variation by using [option Cross Back Ties](/docs/designs/bee/options#crossbackties).
Bee can also be made reversible by using options [Reversible](/docs/designs/bee/options#reversible) & [Duo Colours Ties](/docs/designs/bee/options#duocolorties). Bee can also be made reversible by using options [Reversible](/docs/designs/bee/options#reversible), [Duo neck colour ties](/docs/designs/bee/options#duonecktiecolours) & [Duo band colour ties](/docs/designs/bee/options#duobandtiecolours).
With the previous pattern being retired you can use [Uma](/docs/designs/uma) to make a matching bikini bottom. With the previous pattern being retired you can use [Uma](/docs/designs/uma) to make a matching bikini bottom.
bobgeorgethe3rd bobgeorgethe3rd

View file

@ -3,3 +3,9 @@ title: 'Band (chest) tie width'
--- ---
Controls the width of the tie/band around your chest Controls the width of the tie/band around your chest
:::note
This is a snap option and will snap to the nearest 1/4"
:::

View file

@ -0,0 +1,14 @@
---
title: Duo band tie colours
---
This option allows you to generate a pattern where the band ties use two colours rather than one.
Enable this option if you want band ties using two colours.
Leave it disabled (the default) if you want band ties using a single colour.
:::note
This is unavailable when using the cross back tie variation
:::

View file

@ -1,8 +0,0 @@
---
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.

View file

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

View file

@ -3,3 +3,9 @@ title: 'Neck tie width'
--- ---
Controls the width of the ties around your neck Controls the width of the ties around your neck
:::note
This is a snap option and will snap to the nearest 1/4"
:::

View file

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

View file

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

View file

@ -1,8 +0,0 @@
---
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.

View file

@ -3,3 +3,10 @@ title: Reversible
--- ---
Whether you want to make a fully reversible Bee or not. Whether you want to make a fully reversible Bee or not.
:::note
This option reconfigures and locks other options to allow for a reversible Bee.
:::

View file

@ -42,38 +42,28 @@ You only need lining fabric if you intend to make the pattern reversible or if y
## Cutting Instructions {#cutting} ## Cutting Instructions {#cutting}
There are three variations of this pattern. **One Colour**, which is where the bikini top is made out of one colour. **Two Colours**, where the bikini top is made reversible by using two colours, and **Cross Back Tie Variant**, where the neck ties tie in the back replacing the band tie.
### One Colour (Non-Reversible)
**Main fabric** **Main fabric**
- Cut **4 cup** parts. - Cut **4 cup** parts.
- Cut **2 neck tie** parts. - Cut **2 neck tie** parts.
- Cut **1 band tie** part. - Cut **1 band tie** part on fold.
### Two Colours (Reversible) :::note
This pattern is easily made reversible by buying a similar fabric to the main fabric and using it as contrast.
**Main fabric** **Main fabric**
- Cut **2 cup** parts from main.
- Cut **2 neck tie** parts.
- Cut **1 band tie** part.
**Lining fabric**
- Cut **2 cup** parts. - Cut **2 cup** parts.
- Cut **2 neck tie** parts. - Cut **2 neck tie** parts.
- Cut **1 band tie** part. - Cut **1 band tie** part on fold.
### Cross Back Tie Variant. **Constrast Fabric**
**Main fabric** - Cut **2 cup** parts.
- Cut **2 neck tie** parts.
- Cut **1 band tie** part on fold.
- Cut **4 cup** parts or Cut **2 cups** from main and lining if making reversible ties. However if you are using the Cross Back Tie variation the band is designed to **only** be cut from the main fabric.
- Cut **2 neck tie** parts or Cut **2 neck ties** from main and lining if making reversible ties.
- Cut **1 band** part if making cross back tie variant instead of band tie variant.
:::note When following the instructions use your contrasting pieces as the lining peices.
This pattern is easily made reversible by buying a similar fabric to the main fabric and using it as contrast. To save confusion on instructions it will be referred to as the lining fabric.
::: :::