1
0
Fork 0

Removes several pieces of useless code identified by Deepscan.

This commit is contained in:
Thrunic 2024-05-01 12:49:39 -04:00
parent adeb3fbe0b
commit 755e2da326
2 changed files with 9 additions and 12 deletions

View file

@ -273,8 +273,6 @@ function draftBack({
points.hammerLoopMax, points.hammerLoopMax,
options.hammerLoopCurve options.hammerLoopCurve
) )
const hammerLoopStartAngle = points.hammerLoopTop.angle(points.hammerLoopMax)
const hammerLoopEndAngle = points.hammerLoopMax.angle(points.hammerLoopOutseam)
const hammerLoopWidth = pocketMetric * options.hammerLoopWidth const hammerLoopWidth = pocketMetric * options.hammerLoopWidth
paths.centerSeam = new Path() paths.centerSeam = new Path()
@ -641,7 +639,7 @@ function draftBack({
export const back = { export const back = {
name: 'back', name: 'back',
after: front, after: bib,
draft: draftBack, draft: draftBack,
options: { options: {
// What angle the back bib leaves the outseam at. 0 is horizontal, 90 is vertical. // What angle the back bib leaves the outseam at. 0 is horizontal, 90 is vertical.
@ -766,5 +764,4 @@ export const back = {
hammerLoopFirstFold: { pct: 90, min: 0, max: 100, menu: 'style' }, hammerLoopFirstFold: { pct: 90, min: 0, max: 100, menu: 'style' },
hammerLoopSecondFold: { pct: 60, min: 0, max: 200, menu: 'style' }, hammerLoopSecondFold: { pct: 60, min: 0, max: 200, menu: 'style' },
}, },
after: bib,
} }

View file

@ -161,14 +161,14 @@ function draftBib({
) )
.addClass('fabric dashed') .addClass('fabric dashed')
if (options.pocketBib && options.pocketBibStyle === 'pentagon' && options.bibPocketOnFold) if (options.pocketBibStyle === 'pentagon' && options.bibPocketOnFold)
paths.bibPocketSeam = new Path() paths.bibPocketSeam = new Path()
.move(points.pocketCenterTop) .move(points.pocketCenterTop)
.line(points.pocketCenterBottom) .line(points.pocketCenterBottom)
.line(points.pocketFeatureSide) .line(points.pocketFeatureSide)
.line(points.pocketSideTop) .line(points.pocketSideTop)
.addClass('fabric dashed') .addClass('fabric dashed')
if (options.pocketBib && options.pocketBibStyle === 'pentagon' && !options.bibPocketOnFold) if (options.pocketBibStyle === 'pentagon' && !options.bibPocketOnFold)
paths.bibPocketSeam = new Path() paths.bibPocketSeam = new Path()
.move(points.pocketSideTop.flipX(points.pocketCenterTop)) .move(points.pocketSideTop.flipX(points.pocketCenterTop))
.line(points.pocketFeatureSide.flipX(points.pocketCenterTop)) .line(points.pocketFeatureSide.flipX(points.pocketCenterTop))
@ -176,7 +176,7 @@ function draftBib({
.line(points.pocketFeatureSide) .line(points.pocketFeatureSide)
.line(points.pocketSideTop) .line(points.pocketSideTop)
.addClass('fabric dashed') .addClass('fabric dashed')
if (options.pocketBib && options.pocketBibStyle === 'hexagon' && options.bibPocketOnFold) if (options.pocketBibStyle === 'hexagon' && options.bibPocketOnFold)
paths.bibPocketSeam = new Path() paths.bibPocketSeam = new Path()
.move(points.pocketCenterTop) .move(points.pocketCenterTop)
.line(points.pocketCenterBottom) .line(points.pocketCenterBottom)
@ -184,7 +184,7 @@ function draftBib({
.line(points.pocketFeatureSide) .line(points.pocketFeatureSide)
.line(points.pocketSideTop) .line(points.pocketSideTop)
.addClass('fabric dashed') .addClass('fabric dashed')
if (options.pocketBib && options.pocketBibStyle === 'hexagon' && !options.bibPocketOnFold) if (options.pocketBibStyle === 'hexagon' && !options.bibPocketOnFold)
paths.bibPocketSeam = new Path() paths.bibPocketSeam = new Path()
.move(points.pocketSideTop.flipX(points.pocketCenterTop)) .move(points.pocketSideTop.flipX(points.pocketCenterTop))
.line(points.pocketFeatureSide.flipX(points.pocketCenterTop)) .line(points.pocketFeatureSide.flipX(points.pocketCenterTop))
@ -193,7 +193,7 @@ function draftBib({
.line(points.pocketFeatureSide) .line(points.pocketFeatureSide)
.line(points.pocketSideTop) .line(points.pocketSideTop)
.addClass('fabric dashed') .addClass('fabric dashed')
if (options.pocketBib && options.pocketBibStyle === 'curvedBottom' && options.bibPocketOnFold) if (options.pocketBibStyle === 'curvedBottom' && options.bibPocketOnFold)
paths.bibPocketSeam = new Path() paths.bibPocketSeam = new Path()
.move(points.pocketCenterTop) .move(points.pocketCenterTop)
.line(points.pocketCenterBottom) .line(points.pocketCenterBottom)
@ -201,7 +201,7 @@ function draftBib({
.curve(points.pocketSideBottomCp2, points.pocketFeatureSideCp1, points.pocketFeatureSide) .curve(points.pocketSideBottomCp2, points.pocketFeatureSideCp1, points.pocketFeatureSide)
.line(points.pocketSideTop) .line(points.pocketSideTop)
.addClass('fabric dashed') .addClass('fabric dashed')
if (options.pocketBib && options.pocketBibStyle === 'curvedBottom' && !options.bibPocketOnFold) if (options.pocketBibStyle === 'curvedBottom' && !options.bibPocketOnFold)
paths.bibPocketSeam = new Path() paths.bibPocketSeam = new Path()
.move(points.pocketSideTop.flipX(points.pocketCenterTop)) .move(points.pocketSideTop.flipX(points.pocketCenterTop))
.line(points.pocketFeatureSide.flipX(points.pocketCenterTop)) .line(points.pocketFeatureSide.flipX(points.pocketCenterTop))
@ -214,14 +214,14 @@ function draftBib({
.curve(points.pocketSideBottomCp2, points.pocketFeatureSideCp1, points.pocketFeatureSide) .curve(points.pocketSideBottomCp2, points.pocketFeatureSideCp1, points.pocketFeatureSide)
.line(points.pocketSideTop) .line(points.pocketSideTop)
.addClass('fabric dashed') .addClass('fabric dashed')
if (options.pocketBib && options.pocketBibStyle === 'rectangle' && options.bibPocketOnFold) if (options.pocketBibStyle === 'rectangle' && options.bibPocketOnFold)
paths.bibPocketSeam = new Path() paths.bibPocketSeam = new Path()
.move(points.pocketCenterTop) .move(points.pocketCenterTop)
.line(points.pocketCenterBottom) .line(points.pocketCenterBottom)
.line(points.pocketSideBottom) .line(points.pocketSideBottom)
.line(points.pocketSideTop) .line(points.pocketSideTop)
.addClass('fabric dashed') .addClass('fabric dashed')
if (options.pocketBib && options.pocketBibStyle === 'rectangle' && !options.bibPocketOnFold) if (options.pocketBibStyle === 'rectangle' && !options.bibPocketOnFold)
paths.bibPocketSeam = new Path() paths.bibPocketSeam = new Path()
.move(points.pocketSideTop.flipX(points.pocketCenterTop)) .move(points.pocketSideTop.flipX(points.pocketCenterTop))
.line(points.pocketSideBottom.flipX(points.pocketCenterTop)) .line(points.pocketSideBottom.flipX(points.pocketCenterTop))