chore(core): Use hide, not render
This commit is contained in:
parent
026560ef24
commit
5dc7401308
82 changed files with 337 additions and 293 deletions
|
@ -44,7 +44,7 @@ export const front = {
|
||||||
part,
|
part,
|
||||||
}) => {
|
}) => {
|
||||||
// Hide Brian paths
|
// Hide Brian paths
|
||||||
for (let key of Object.keys(paths)) paths[key].render = false
|
for (let key of Object.keys(paths)) paths[key].hide()
|
||||||
|
|
||||||
// Handle stretch
|
// Handle stretch
|
||||||
for (let i in points) points[i].x = points[i].x * (1 - options.stretchFactor)
|
for (let i in points) points[i].x = points[i].x * (1 - options.stretchFactor)
|
||||||
|
|
|
@ -38,9 +38,7 @@ export const bandTie = {
|
||||||
}) => {
|
}) => {
|
||||||
// band tie
|
// band tie
|
||||||
if (!options.ties) {
|
if (!options.ties) {
|
||||||
if (!options.crossBackTies) {
|
if (!options.crossBackTies) part.hide()
|
||||||
part.render = false
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
let bandTieLength
|
let bandTieLength
|
||||||
if (options.crossBackTies)
|
if (options.crossBackTies)
|
||||||
|
|
|
@ -40,9 +40,7 @@ export const neckTie = {
|
||||||
part,
|
part,
|
||||||
}) => {
|
}) => {
|
||||||
// neck tie
|
// neck tie
|
||||||
if (!options.ties) {
|
if (!options.ties) part.hide()
|
||||||
part.render = false
|
|
||||||
}
|
|
||||||
let neckTieLength
|
let neckTieLength
|
||||||
if (options.crossBackTies)
|
if (options.crossBackTies)
|
||||||
neckTieLength =
|
neckTieLength =
|
||||||
|
|
|
@ -65,7 +65,7 @@ function draftBenjaminBase({
|
||||||
points.titleAnchor = new Point(points.tip1Top.x, 0)
|
points.titleAnchor = new Point(points.tip1Top.x, 0)
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
paths.cap = new Path().move(points.tip2Bottom)
|
paths.cap = new Path().hide().move(points.tip2Bottom)
|
||||||
if (options.endStyle === 'straight') {
|
if (options.endStyle === 'straight') {
|
||||||
paths.cap = new Path().move(points.tip2Bottom).line(points.tip2Top)
|
paths.cap = new Path().move(points.tip2Bottom).line(points.tip2Top)
|
||||||
} else if (options.endStyle === 'pointed') {
|
} else if (options.endStyle === 'pointed') {
|
||||||
|
@ -87,7 +87,6 @@ function draftBenjaminBase({
|
||||||
})
|
})
|
||||||
paths.cap = paths.bottomRounded.join(paths.topRounded)
|
paths.cap = paths.bottomRounded.join(paths.topRounded)
|
||||||
}
|
}
|
||||||
paths.cap.render = false
|
|
||||||
|
|
||||||
if (options.bowStyle === 'diamond' || options.bowStyle === 'butterfly') {
|
if (options.bowStyle === 'diamond' || options.bowStyle === 'butterfly') {
|
||||||
const cpl = options.bowStyle === 'diamond' ? bow / 10 : bow / 4
|
const cpl = options.bowStyle === 'diamond' ? bow / 10 : bow / 4
|
||||||
|
|
|
@ -13,10 +13,7 @@ function draftBenjaminBow2({
|
||||||
paperless,
|
paperless,
|
||||||
part,
|
part,
|
||||||
}) {
|
}) {
|
||||||
if (!options.adjustmentRibbon) {
|
if (!options.adjustmentRibbon) return part.hide()
|
||||||
part.render = false
|
|
||||||
return part
|
|
||||||
}
|
|
||||||
|
|
||||||
points.bandBottomLeft = points.bandBottomLeft.shift(180, 90)
|
points.bandBottomLeft = points.bandBottomLeft.shift(180, 90)
|
||||||
points.bandTopLeft = points.bandBottomLeft.flipY()
|
points.bandTopLeft = points.bandBottomLeft.flipY()
|
||||||
|
|
|
@ -13,10 +13,7 @@ function draftBenjaminBow3({
|
||||||
paperless,
|
paperless,
|
||||||
part,
|
part,
|
||||||
}) {
|
}) {
|
||||||
if (!options.adjustmentRibbon) {
|
if (!options.adjustmentRibbon) return part.hide()
|
||||||
part.render = false
|
|
||||||
return part
|
|
||||||
}
|
|
||||||
|
|
||||||
points.bandBottomLeft = points.bandBottomLeft.shift(180, 290)
|
points.bandBottomLeft = points.bandBottomLeft.shift(180, 290)
|
||||||
points.bandTopLeft = points.bandBottomLeft.flipY()
|
points.bandTopLeft = points.bandBottomLeft.flipY()
|
||||||
|
|
|
@ -12,10 +12,7 @@ function draftBenjaminRibbon({
|
||||||
paperless,
|
paperless,
|
||||||
part,
|
part,
|
||||||
}) {
|
}) {
|
||||||
if (options.adjustmentRibbon) {
|
if (options.adjustmentRibbon) return part.hide()
|
||||||
part.render = false
|
|
||||||
return part
|
|
||||||
}
|
|
||||||
|
|
||||||
// Points
|
// Points
|
||||||
points.bottomLeft = new Point(0, 0.5 * store.get('ribbonWidth'))
|
points.bottomLeft = new Point(0, 0.5 * store.get('ribbonWidth'))
|
||||||
|
|
|
@ -128,7 +128,7 @@ function draftBreannaBack({
|
||||||
|
|
||||||
paths.seam.close().attr('class', 'fabric')
|
paths.seam.close().attr('class', 'fabric')
|
||||||
paths.saBase.close()
|
paths.saBase.close()
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
|
|
||||||
// Store data
|
// Store data
|
||||||
if (options.shoulderDart) {
|
if (options.shoulderDart) {
|
||||||
|
|
|
@ -140,7 +140,7 @@ function draftBreannaFront({
|
||||||
|
|
||||||
// All done. Just set final path properties before we get to SA/final/paperless
|
// All done. Just set final path properties before we get to SA/final/paperless
|
||||||
paths.seam.close().attr('class', 'fabric')
|
paths.seam.close().attr('class', 'fabric')
|
||||||
paths.saBase.close().render = false
|
paths.saBase.close().hide()
|
||||||
|
|
||||||
// Anchor point
|
// Anchor point
|
||||||
points.gridAnchor = points.cfNeck.clone()
|
points.gridAnchor = points.cfNeck.clone()
|
||||||
|
|
|
@ -39,7 +39,7 @@ function draftBreannaSleeve(params) {
|
||||||
)
|
)
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
paths.sleevecap.render = false
|
paths.sleevecap.hide()
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
.move(points.bicepsLeft)
|
.move(points.bicepsLeft)
|
||||||
.line(points.wristLeft)
|
.line(points.wristLeft)
|
||||||
|
|
|
@ -32,7 +32,7 @@ export const front = {
|
||||||
paths.frontCollar = new Path()
|
paths.frontCollar = new Path()
|
||||||
.move(points.hps)
|
.move(points.hps)
|
||||||
.curve(points.neckCp2Front, points.cfNeckCp1, points.cfNeck)
|
.curve(points.neckCp2Front, points.cfNeckCp1, points.cfNeck)
|
||||||
.setRender(false)
|
.hide()
|
||||||
} else if (options.s3Collar > 0) {
|
} else if (options.s3Collar > 0) {
|
||||||
// Shift shoulder seam forward on the collar side
|
// Shift shoulder seam forward on the collar side
|
||||||
points.s3CollarSplit = utils.curveIntersectsY(
|
points.s3CollarSplit = utils.curveIntersectsY(
|
||||||
|
@ -46,7 +46,7 @@ export const front = {
|
||||||
.move(points.hps)
|
.move(points.hps)
|
||||||
.curve(points.neckCp2Front, points.cfNeckCp1, points.cfNeck)
|
.curve(points.neckCp2Front, points.cfNeckCp1, points.cfNeck)
|
||||||
.split(points.s3CollarSplit)[1]
|
.split(points.s3CollarSplit)[1]
|
||||||
.setRender(false)
|
.hide()
|
||||||
} else if (options.s3Collar < 0) {
|
} else if (options.s3Collar < 0) {
|
||||||
// Shift shoulder seam backward on the collar side
|
// Shift shoulder seam backward on the collar side
|
||||||
points.s3CollarSplit = utils.curveIntersectsY(
|
points.s3CollarSplit = utils.curveIntersectsY(
|
||||||
|
@ -64,14 +64,14 @@ export const front = {
|
||||||
.join(
|
.join(
|
||||||
new Path().move(points.hps).curve(points.neckCp2Front, points.cfNeckCp1, points.cfNeck)
|
new Path().move(points.hps).curve(points.neckCp2Front, points.cfNeckCp1, points.cfNeck)
|
||||||
)
|
)
|
||||||
.setRender(false)
|
.hide()
|
||||||
}
|
}
|
||||||
if (options.s3Armhole < 0.1 && options.s3Armhole > -0.1) {
|
if (options.s3Armhole < 0.1 && options.s3Armhole > -0.1) {
|
||||||
points.s3ArmholeSplit = points.shoulder
|
points.s3ArmholeSplit = points.shoulder
|
||||||
paths.frontArmhole = new Path()
|
paths.frontArmhole = new Path()
|
||||||
.move(points.armholePitch)
|
.move(points.armholePitch)
|
||||||
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
||||||
.setRender(false)
|
.hide()
|
||||||
} else if (options.s3Armhole > 0) {
|
} else if (options.s3Armhole > 0) {
|
||||||
// Shift shoulder seam forward on the armhole side
|
// Shift shoulder seam forward on the armhole side
|
||||||
points.s3ArmholeSplit = utils.curveIntersectsY(
|
points.s3ArmholeSplit = utils.curveIntersectsY(
|
||||||
|
@ -85,7 +85,7 @@ export const front = {
|
||||||
.move(points.armholePitch)
|
.move(points.armholePitch)
|
||||||
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
|
||||||
.split(points.s3ArmholeSplit)[0]
|
.split(points.s3ArmholeSplit)[0]
|
||||||
.setRender(false)
|
.hide()
|
||||||
} else if (options.s3Armhole < 0) {
|
} else if (options.s3Armhole < 0) {
|
||||||
// Shift shoulder seam forward on the armhole side
|
// Shift shoulder seam forward on the armhole side
|
||||||
points.s3ArmholeSplit = utils.curveIntersectsY(
|
points.s3ArmholeSplit = utils.curveIntersectsY(
|
||||||
|
@ -108,7 +108,7 @@ export const front = {
|
||||||
)
|
)
|
||||||
.split(points.s3ArmholeSplit)[0]
|
.split(points.s3ArmholeSplit)[0]
|
||||||
)
|
)
|
||||||
.setRender(false)
|
.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Rename cb (center back) to cf (center front)
|
// Rename cb (center back) to cf (center front)
|
||||||
|
@ -130,7 +130,7 @@ export const front = {
|
||||||
.line(points.s3CollarSplit)
|
.line(points.s3CollarSplit)
|
||||||
.join(paths.frontCollar)
|
.join(paths.frontCollar)
|
||||||
|
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
.move(points.cfNeck)
|
.move(points.cfNeck)
|
||||||
.line(points.cfHem)
|
.line(points.cfHem)
|
||||||
|
|
|
@ -43,7 +43,7 @@ export const sleeve = {
|
||||||
points.wristLeft = points.wristRight.rotate(180, points.centerWrist)
|
points.wristLeft = points.wristRight.rotate(180, points.centerWrist)
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
paths.sleevecap.render = false
|
paths.sleevecap.hide()
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
.move(points.bicepsLeft)
|
.move(points.bicepsLeft)
|
||||||
.move(points.wristLeft)
|
.move(points.wristLeft)
|
||||||
|
|
|
@ -130,9 +130,9 @@ function draftBruceFront({
|
||||||
.move(points.leftTuskRight)
|
.move(points.leftTuskRight)
|
||||||
.line(points.leftTuskLeft)
|
.line(points.leftTuskLeft)
|
||||||
.curve(points.curveLeftCpBottom, points.curveLeftCpTop, points.midLeft)
|
.curve(points.curveLeftCpBottom, points.curveLeftCpTop, points.midLeft)
|
||||||
paths.seamStart.render = false
|
paths.seamStart.hide()
|
||||||
paths.trimBase.render = false
|
paths.trimBase.hide()
|
||||||
paths.seamEnd.render = false
|
paths.seamEnd.hide()
|
||||||
paths.seam = paths.seamStart.join(paths.trimBase).join(paths.seamEnd)
|
paths.seam = paths.seamStart.join(paths.trimBase).join(paths.seamEnd)
|
||||||
} else {
|
} else {
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
|
|
|
@ -53,8 +53,8 @@ function draftBruceSide({
|
||||||
.line(points.topRight)
|
.line(points.topRight)
|
||||||
.line(points.bottomRight)
|
.line(points.bottomRight)
|
||||||
paths.hemBase = new Path().move(points.bottomRight).line(points.bottomLeft)
|
paths.hemBase = new Path().move(points.bottomRight).line(points.bottomLeft)
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
paths.seam = paths.saBase.join(paths.hemBase).close().attr('class', 'fabric')
|
paths.seam = paths.saBase.join(paths.hemBase).close().attr('class', 'fabric')
|
||||||
|
|
||||||
// Anchor point for sampling
|
// Anchor point for sampling
|
||||||
|
|
|
@ -28,7 +28,6 @@ function draftCarltonBelt({
|
||||||
via: points.topLeft,
|
via: points.topLeft,
|
||||||
prefix: 'roundTop',
|
prefix: 'roundTop',
|
||||||
radius: width / 4,
|
radius: width / 4,
|
||||||
render: true,
|
|
||||||
})
|
})
|
||||||
macro('round', {
|
macro('round', {
|
||||||
from: points.topLeft,
|
from: points.topLeft,
|
||||||
|
@ -36,7 +35,6 @@ function draftCarltonBelt({
|
||||||
via: points.bottomLeft,
|
via: points.bottomLeft,
|
||||||
prefix: 'roundBottom',
|
prefix: 'roundBottom',
|
||||||
radius: width / 4,
|
radius: width / 4,
|
||||||
render: true,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
|
|
|
@ -222,8 +222,8 @@ function draftCarltonFront({
|
||||||
.line(points.hemEdge)
|
.line(points.hemEdge)
|
||||||
.line(points.flbHem)
|
.line(points.flbHem)
|
||||||
paths.hemBase = new Path().move(points.flbHem).line(points.hem)
|
paths.hemBase = new Path().move(points.flbHem).line(points.hem)
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
paths.seam = paths.saBase.join(paths.hemBase).close().attr('class', 'fabric')
|
paths.seam = paths.saBase.join(paths.hemBase).close().attr('class', 'fabric')
|
||||||
|
|
||||||
paths.rollLine = new Path()
|
paths.rollLine = new Path()
|
||||||
|
|
|
@ -26,7 +26,6 @@ function draftCarltonTopSleeve({
|
||||||
from: points.cuffBottomLeft,
|
from: points.cuffBottomLeft,
|
||||||
via: points.cuffBottomRight,
|
via: points.cuffBottomRight,
|
||||||
radius: length / 3,
|
radius: length / 3,
|
||||||
render: true,
|
|
||||||
prefix: 'round',
|
prefix: 'round',
|
||||||
})
|
})
|
||||||
store.set('topCuffWidth', points.tsWristLeft.dist(points.tsWristRight))
|
store.set('topCuffWidth', points.tsWristLeft.dist(points.tsWristRight))
|
||||||
|
|
|
@ -25,7 +25,6 @@ function draftCarltonUnderSleeve({
|
||||||
from: points.cuffBottomLeft,
|
from: points.cuffBottomLeft,
|
||||||
via: points.cuffBottomRight,
|
via: points.cuffBottomRight,
|
||||||
radius: length / 3,
|
radius: length / 3,
|
||||||
render: true,
|
|
||||||
prefix: 'round',
|
prefix: 'round',
|
||||||
})
|
})
|
||||||
store.set('underCuffWidth', points.usWristLeft.dist(points.usWristRight))
|
store.set('underCuffWidth', points.usWristLeft.dist(points.usWristRight))
|
||||||
|
|
|
@ -72,8 +72,8 @@ function draftCathrinBase({ measurements, options, store, points, paths, Point,
|
||||||
.line(points.bottomSide)
|
.line(points.bottomSide)
|
||||||
.line(points.waistCF)
|
.line(points.waistCF)
|
||||||
.line(points.waistCB)
|
.line(points.waistCB)
|
||||||
paths.help1.render = false
|
paths.help1.hide()
|
||||||
paths.help2.render = false
|
paths.help2.hide()
|
||||||
|
|
||||||
paths.outline = new Path()
|
paths.outline = new Path()
|
||||||
.move(points.bottomCF)
|
.move(points.bottomCF)
|
||||||
|
|
|
@ -136,7 +136,7 @@ function draftCathrinPanels({ measurements, options, store, points, paths, Point
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
paths.outline.render = false
|
paths.outline.hide()
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
|
@ -76,8 +76,8 @@ export function draftDianaFrontOrBack({
|
||||||
|
|
||||||
paths.hemBase = new Path().move(points.cHem).line(points.hem)
|
paths.hemBase = new Path().move(points.cHem).line(points.hem)
|
||||||
|
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
|
|
||||||
paths.seam = paths.hemBase.join(paths.saBase).line(points.cHem)
|
paths.seam = paths.hemBase.join(paths.saBase).line(points.cHem)
|
||||||
|
|
||||||
|
|
|
@ -25,8 +25,8 @@ function draftDianaSleeve({ sa, points, paths, Path, complete, paperless, macro,
|
||||||
.join(paths.sleevecap)
|
.join(paths.sleevecap)
|
||||||
.line(points.wristLeft)
|
.line(points.wristLeft)
|
||||||
paths.hemBase = new Path().move(points.wristLeft).line(points.wristRight)
|
paths.hemBase = new Path().move(points.wristLeft).line(points.wristRight)
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
paths.sa = paths.saBase.offset(sa).join(paths.hemBase.offset(sa * 3))
|
paths.sa = paths.saBase.offset(sa).join(paths.hemBase.offset(sa * 3))
|
||||||
paths.sa.line(paths.sa.start()).close().attr('class', 'fabric sa')
|
paths.sa.line(paths.sa.start()).close().attr('class', 'fabric sa')
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,7 +45,7 @@ export const plugin_bartackalong = {
|
||||||
points.e = new Point(20, 10)
|
points.e = new Point(20, 10)
|
||||||
points.f = new Point(30, 10)
|
points.f = new Point(30, 10)
|
||||||
|
|
||||||
paths.a = new Path().move(points.a).curve(points.b, points.c, points.d).setRender(false)
|
paths.a = new Path().move(points.a).curve(points.b, points.c, points.d).hide()
|
||||||
|
|
||||||
macro('bartackAlong', {
|
macro('bartackAlong', {
|
||||||
path: paths.a,
|
path: paths.a,
|
||||||
|
@ -70,7 +70,7 @@ export const plugin_bartackfractionalong = {
|
||||||
points.e = new Point(20, 10)
|
points.e = new Point(20, 10)
|
||||||
points.f = new Point(30, 10)
|
points.f = new Point(30, 10)
|
||||||
|
|
||||||
paths.a = new Path().move(points.a).curve(points.b, points.c, points.d).setRender(false)
|
paths.a = new Path().move(points.a).curve(points.b, points.c, points.d).hide()
|
||||||
|
|
||||||
macro('bartackFractionAlong', {
|
macro('bartackFractionAlong', {
|
||||||
path: paths.a,
|
path: paths.a,
|
||||||
|
@ -187,7 +187,6 @@ export const plugin_gore = {
|
||||||
radius: 60,
|
radius: 60,
|
||||||
gores: 5,
|
gores: 5,
|
||||||
extraLength: 20,
|
extraLength: 20,
|
||||||
render: true,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return part
|
return part
|
||||||
|
@ -278,7 +277,6 @@ export const plugin_round = {
|
||||||
via: points.bottomLeft,
|
via: points.bottomLeft,
|
||||||
radius: 10,
|
radius: 10,
|
||||||
prefix: 'bl',
|
prefix: 'bl',
|
||||||
render: true,
|
|
||||||
})
|
})
|
||||||
macro('round', {
|
macro('round', {
|
||||||
from: points.bottomRight,
|
from: points.bottomRight,
|
||||||
|
@ -286,7 +284,6 @@ export const plugin_round = {
|
||||||
via: points.topRight,
|
via: points.topRight,
|
||||||
radius: 20,
|
radius: 20,
|
||||||
prefix: 'tr',
|
prefix: 'tr',
|
||||||
render: true,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return part
|
return part
|
||||||
|
|
|
@ -29,8 +29,8 @@ function draftFlorentBrimInterfacing({
|
||||||
points.insetStart = paths.inset.shiftAlong(5)
|
points.insetStart = paths.inset.shiftAlong(5)
|
||||||
points.insetEnd = paths.inset.reverse().shiftAlong(5)
|
points.insetEnd = paths.inset.reverse().shiftAlong(5)
|
||||||
paths.inset = paths.inset.split(points.insetStart).pop().split(points.insetEnd).shift()
|
paths.inset = paths.inset.split(points.insetStart).pop().split(points.insetEnd).shift()
|
||||||
paths.inset.render = false
|
paths.inset.hide()
|
||||||
paths.outset.render = false
|
paths.outset.hide()
|
||||||
|
|
||||||
paths.hint = paths.seam.clone().attr('class', 'dashed stroke-sm')
|
paths.hint = paths.seam.clone().attr('class', 'dashed stroke-sm')
|
||||||
paths.seam = paths.outset
|
paths.seam = paths.outset
|
||||||
|
|
|
@ -19,7 +19,7 @@ function draftFlorentSide({
|
||||||
}
|
}
|
||||||
|
|
||||||
paths.seam = paths.side.clone().line(points.foldTop).attr('class', 'fabric')
|
paths.seam = paths.side.clone().line(points.foldTop).attr('class', 'fabric')
|
||||||
paths.seam.render = true
|
paths.seam.unhide()
|
||||||
|
|
||||||
if (complete) {
|
if (complete) {
|
||||||
if (points.__miniscaleMetric) delete points.__miniscaleMetric
|
if (points.__miniscaleMetric) delete points.__miniscaleMetric
|
||||||
|
|
|
@ -135,7 +135,7 @@ function draftFlorentTop({
|
||||||
.attr('class', 'fabric')
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
// Uncomment to see the side part here
|
// Uncomment to see the side part here
|
||||||
paths.side.render = false
|
paths.side.hide()
|
||||||
|
|
||||||
if (complete) {
|
if (complete) {
|
||||||
points.title = new Point(points.midMid.x, points.midFrontCp2.y)
|
points.title = new Point(points.midMid.x, points.midFrontCp2.y)
|
||||||
|
|
|
@ -27,7 +27,6 @@ function draftHolmesGore({
|
||||||
gores: options.gores,
|
gores: options.gores,
|
||||||
extraLength: ((options.lengthRatio - 0.5) * headCircumference) / 2,
|
extraLength: ((options.lengthRatio - 0.5) * headCircumference) / 2,
|
||||||
prefix: 'gore_',
|
prefix: 'gore_',
|
||||||
render: true,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
|
@ -47,13 +46,13 @@ function draftHolmesGore({
|
||||||
.move(points.gore_p1)
|
.move(points.gore_p1)
|
||||||
.curve(points.gore_Cp1, points.gore_Cp2, points.gore_p2)
|
.curve(points.gore_Cp1, points.gore_Cp2, points.gore_p2)
|
||||||
.offset(sa)
|
.offset(sa)
|
||||||
.setRender(false)
|
.hide()
|
||||||
points.sa1 = new Point(points.gore_p3.x - sa * 2, points.gore_p3.y - sa)
|
points.sa1 = new Point(points.gore_p3.x - sa * 2, points.gore_p3.y - sa)
|
||||||
paths.saBase = new Path()
|
paths.saBase = new Path()
|
||||||
.move(points.gore_p3)
|
.move(points.gore_p3)
|
||||||
.line(points.p0)
|
.line(points.p0)
|
||||||
.offset(sa * 2)
|
.offset(sa * 2)
|
||||||
.setRender(false)
|
.hide()
|
||||||
paths.sa = new Path()
|
paths.sa = new Path()
|
||||||
.move(points.gore_p1)
|
.move(points.gore_p1)
|
||||||
.line(points.gore_p1.shift(0, sa))
|
.line(points.gore_p1.shift(0, sa))
|
||||||
|
|
|
@ -50,8 +50,8 @@ function draftHueyBack({
|
||||||
.join(paths.backCollar)
|
.join(paths.backCollar)
|
||||||
.attr('class', 'note stroke-xxl')
|
.attr('class', 'note stroke-xxl')
|
||||||
paths.hemBase = new Path().move(points.cbHem).line(points.hem).attr('class', 'note stroke-xxl')
|
paths.hemBase = new Path().move(points.cbHem).line(points.hem).attr('class', 'note stroke-xxl')
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
|
|
||||||
paths.seam = paths.saBase
|
paths.seam = paths.saBase
|
||||||
.clone()
|
.clone()
|
||||||
|
|
|
@ -70,8 +70,8 @@ function draftHueyFront({
|
||||||
.line(points.cfHem)
|
.line(points.cfHem)
|
||||||
.attr('class', 'note stroke-xxl')
|
.attr('class', 'note stroke-xxl')
|
||||||
paths.hemBase = new Path().move(points.cfHem).line(points.hem).attr('class', 'note stroke-xxl')
|
paths.hemBase = new Path().move(points.cfHem).line(points.hem).attr('class', 'note stroke-xxl')
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
|
|
||||||
paths.seam = paths.saBase.clone().join(paths.hemBase).close().attr('class', 'fabric')
|
paths.seam = paths.saBase.clone().join(paths.hemBase).close().attr('class', 'fabric')
|
||||||
|
|
||||||
|
|
|
@ -36,8 +36,8 @@ function draftHueySleeve({
|
||||||
.move(points.wristLeft)
|
.move(points.wristLeft)
|
||||||
.line(points.wristRight)
|
.line(points.wristRight)
|
||||||
.attr('class', 'various stroke-xxl')
|
.attr('class', 'various stroke-xxl')
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
|
|
||||||
paths.seam = paths.saBase.join(paths.hemBase).close().attr('class', 'fabric')
|
paths.seam = paths.saBase.join(paths.hemBase).close().attr('class', 'fabric')
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ function hugoBack({
|
||||||
.line(points.raglanTipBack)
|
.line(points.raglanTipBack)
|
||||||
.join(neckOpeningParts[0].reverse())
|
.join(neckOpeningParts[0].reverse())
|
||||||
paths.seam = paths.saBase.clone().close().attr('class', 'fabric')
|
paths.seam = paths.saBase.clone().close().attr('class', 'fabric')
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
|
|
||||||
// Store neck opening path
|
// Store neck opening path
|
||||||
store.set('neckOpeningPartBack', neckOpeningParts[1])
|
store.set('neckOpeningPartBack', neckOpeningParts[1])
|
||||||
|
|
|
@ -88,7 +88,7 @@ function hugoFront({
|
||||||
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
|
||||||
.line(points.raglanTipFront)
|
.line(points.raglanTipFront)
|
||||||
.join(neckOpeningParts[0].reverse())
|
.join(neckOpeningParts[0].reverse())
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.seam = paths.saBase.clone().close().attr('class', 'fabric')
|
paths.seam = paths.saBase.clone().close().attr('class', 'fabric')
|
||||||
// FIXME: This pocket path is not getting set on the paths object
|
// FIXME: This pocket path is not getting set on the paths object
|
||||||
// It's something to do with the paths proxy which -- I assume -- is proxying the wrong object?
|
// It's something to do with the paths proxy which -- I assume -- is proxying the wrong object?
|
||||||
|
@ -98,7 +98,7 @@ function hugoFront({
|
||||||
.curve(points.pocketTip, points.pocketTopCp, points.pocketTop)
|
.curve(points.pocketTip, points.pocketTopCp, points.pocketTop)
|
||||||
.line(points.pocketCf)
|
.line(points.pocketCf)
|
||||||
.attr('class', 'fabric help')
|
.attr('class', 'fabric help')
|
||||||
.setRender(false)
|
.hide()
|
||||||
// Store shoulder seam length, neck opening path, shoulder slope and raglan length
|
// Store shoulder seam length, neck opening path, shoulder slope and raglan length
|
||||||
store.set('shoulderLength', points.neck.dist(points.shoulder))
|
store.set('shoulderLength', points.neck.dist(points.shoulder))
|
||||||
store.set('neckOpeningPartFront', neckOpeningParts[1])
|
store.set('neckOpeningPartFront', neckOpeningParts[1])
|
||||||
|
@ -117,7 +117,6 @@ function hugoFront({
|
||||||
|
|
||||||
// Complete pattern?
|
// Complete pattern?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
//paths.pocket.setRender(true)
|
|
||||||
macro('cutonfold', {
|
macro('cutonfold', {
|
||||||
from: points.cfNeck,
|
from: points.cfNeck,
|
||||||
to: points.cfRibbing,
|
to: points.cfRibbing,
|
||||||
|
|
|
@ -24,7 +24,7 @@ function hugoPocket({
|
||||||
.line(points.pocketHem)
|
.line(points.pocketHem)
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric', true)
|
.attr('class', 'fabric', true)
|
||||||
paths.seam.render = true
|
paths.seam.unhide()
|
||||||
|
|
||||||
paths.saBase = new Path()
|
paths.saBase = new Path()
|
||||||
.move(points.cfRibbing)
|
.move(points.cfRibbing)
|
||||||
|
@ -32,7 +32,7 @@ function hugoPocket({
|
||||||
.line(points.pocketTip)
|
.line(points.pocketTip)
|
||||||
._curve(points.pocketTopCp, points.pocketTop)
|
._curve(points.pocketTopCp, points.pocketTop)
|
||||||
.line(points.pocketCf)
|
.line(points.pocketCf)
|
||||||
.setRender(false)
|
.hide()
|
||||||
|
|
||||||
store.set('facingWidth', points.pocketHem.dist(points.pocketTip) / 2)
|
store.set('facingWidth', points.pocketHem.dist(points.pocketTip) / 2)
|
||||||
|
|
||||||
|
@ -53,11 +53,11 @@ function hugoPocket({
|
||||||
.line(facing.start())
|
.line(facing.start())
|
||||||
.join(facing)
|
.join(facing)
|
||||||
.attr('class', ' fabric help')
|
.attr('class', ' fabric help')
|
||||||
paths.facing.render = false
|
paths.facing.hide()
|
||||||
|
|
||||||
// Complete pattern?
|
// Complete pattern?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
paths.facing.render = true
|
paths.facing.unhide()
|
||||||
macro('cutonfold', {
|
macro('cutonfold', {
|
||||||
from: points.pocketCf,
|
from: points.pocketCf,
|
||||||
to: points.cfRibbing,
|
to: points.cfRibbing,
|
||||||
|
|
|
@ -37,7 +37,7 @@ function jaegerBack({
|
||||||
.pop()
|
.pop()
|
||||||
.line(points.cbHem)
|
.line(points.cbHem)
|
||||||
paths.vent = paths.ventBase.offset(measurements.neck / 10)
|
paths.vent = paths.ventBase.offset(measurements.neck / 10)
|
||||||
paths.vent.render = false
|
paths.vent.hide()
|
||||||
points.ventSlopeStart = utils.lineIntersectsCurve(
|
points.ventSlopeStart = utils.lineIntersectsCurve(
|
||||||
paths.vent.start(),
|
paths.vent.start(),
|
||||||
paths.vent.start().shift(10, measurements.neck / 5),
|
paths.vent.start().shift(10, measurements.neck / 5),
|
||||||
|
@ -63,7 +63,7 @@ function jaegerBack({
|
||||||
.pop()
|
.pop()
|
||||||
.line(points.hem)
|
.line(points.hem)
|
||||||
paths.vent = paths.ventBase.offset(measurements.neck / -10)
|
paths.vent = paths.ventBase.offset(measurements.neck / -10)
|
||||||
paths.vent.render = false
|
paths.vent.hide()
|
||||||
points.ventSlopeStart = utils.lineIntersectsCurve(
|
points.ventSlopeStart = utils.lineIntersectsCurve(
|
||||||
paths.vent.start(),
|
paths.vent.start(),
|
||||||
paths.vent.start().shift(170, measurements.neck / 5),
|
paths.vent.start().shift(170, measurements.neck / 5),
|
||||||
|
@ -94,7 +94,7 @@ function jaegerBack({
|
||||||
.split(points.ventSlopeStart)
|
.split(points.ventSlopeStart)
|
||||||
.pop()
|
.pop()
|
||||||
)
|
)
|
||||||
paths.saBase.render = true
|
paths.saBase.unhide()
|
||||||
} else {
|
} else {
|
||||||
paths.saBase = new Path()
|
paths.saBase = new Path()
|
||||||
.move(points.hem)
|
.move(points.hem)
|
||||||
|
@ -126,13 +126,13 @@ function jaegerBack({
|
||||||
} else {
|
} else {
|
||||||
paths.saBase.curve(points.cbWaistCp2, points.cbHipsCp1, points.cbHips).line(points.cbHem)
|
paths.saBase.curve(points.cbWaistCp2, points.cbHipsCp1, points.cbHips).line(points.cbHem)
|
||||||
}
|
}
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
|
|
||||||
if (options.backVent === 2) paths.hemBase = new Path().move(points.cbHem).line(paths.vent.end())
|
if (options.backVent === 2) paths.hemBase = new Path().move(points.cbHem).line(paths.vent.end())
|
||||||
else if (options.backVent === 1)
|
else if (options.backVent === 1)
|
||||||
paths.hemBase = new Path().move(paths.vent.end()).line(points.hem)
|
paths.hemBase = new Path().move(paths.vent.end()).line(points.hem)
|
||||||
else paths.hemBase = new Path().move(points.cbHem).line(points.hem)
|
else paths.hemBase = new Path().move(points.cbHem).line(points.hem)
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
|
|
||||||
paths.seam = paths.saBase.join(paths.hemBase).attr('class', 'fabric')
|
paths.seam = paths.saBase.join(paths.hemBase).attr('class', 'fabric')
|
||||||
|
|
||||||
|
|
|
@ -334,10 +334,10 @@ function jaegerFront({
|
||||||
.line(points.cutawayPoint)
|
.line(points.cutawayPoint)
|
||||||
.curve(points.cutawayPointCp2, points.roundStartCp1, points.roundStart)
|
.curve(points.cutawayPointCp2, points.roundStartCp1, points.roundStart)
|
||||||
.curve(points.roundCp1, points.roundCp2, points.roundEnd)
|
.curve(points.roundCp1, points.roundCp2, points.roundEnd)
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
|
|
||||||
paths.hemBase = new Path().move(points.roundEnd).line(points.hem)
|
paths.hemBase = new Path().move(points.roundEnd).line(points.hem)
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
|
|
||||||
paths.seam = paths.saBase.clone().join(paths.hemBase).attr('class', 'fabric')
|
paths.seam = paths.saBase.clone().join(paths.hemBase).attr('class', 'fabric')
|
||||||
|
|
||||||
|
|
|
@ -35,7 +35,6 @@ function jaegerSide({
|
||||||
.pop()
|
.pop()
|
||||||
.line(points.bsHem)
|
.line(points.bsHem)
|
||||||
paths.vent = paths.ventBase.offset(measurements.neck / -10)
|
paths.vent = paths.ventBase.offset(measurements.neck / -10)
|
||||||
//paths.vent.render = false;
|
|
||||||
points.ventSlopeStart = utils.lineIntersectsCurve(
|
points.ventSlopeStart = utils.lineIntersectsCurve(
|
||||||
paths.vent.start(),
|
paths.vent.start(),
|
||||||
paths.vent.start().shift(170, measurements.neck / 5),
|
paths.vent.start().shift(170, measurements.neck / 5),
|
||||||
|
|
|
@ -58,8 +58,8 @@ function jaegerUnderCollar({
|
||||||
.line(paths.sa1.end())
|
.line(paths.sa1.end())
|
||||||
.line(points.collarCbTop)
|
.line(points.collarCbTop)
|
||||||
.attr('class', 'various sa')
|
.attr('class', 'various sa')
|
||||||
paths.sa1.render = false
|
paths.sa1.hide()
|
||||||
paths.sa2.render = false
|
paths.sa2.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paperless) {
|
if (paperless) {
|
||||||
|
|
|
@ -14,10 +14,10 @@ function nobleBackInside({
|
||||||
part,
|
part,
|
||||||
}) {
|
}) {
|
||||||
if (options.dartPosition != 'shoulder') {
|
if (options.dartPosition != 'shoulder') {
|
||||||
paths.insideSeam = paths.seam.clone().setRender(true)
|
paths.insideSeam = paths.seam.clone().unhide()
|
||||||
} else {
|
} else {
|
||||||
// Hide Bella paths
|
// Hide Bella paths
|
||||||
for (let key of Object.keys(paths)) paths[key].render = false
|
for (let key of Object.keys(paths)) paths[key].hide()
|
||||||
for (let i in snippets) delete snippets[i]
|
for (let i in snippets) delete snippets[i]
|
||||||
|
|
||||||
paths.insideSeam = new Path()
|
paths.insideSeam = new Path()
|
||||||
|
|
|
@ -3,7 +3,7 @@ import * as options from './options.mjs'
|
||||||
|
|
||||||
function nobleBackPoints({ points, Path, paths, options, snippets, log, part }) {
|
function nobleBackPoints({ points, Path, paths, options, snippets, log, part }) {
|
||||||
// Hide Bella paths
|
// Hide Bella paths
|
||||||
for (let key of Object.keys(paths)) paths[key].render = false
|
for (let key of Object.keys(paths)) paths[key].hide()
|
||||||
for (let i in snippets) delete snippets[i]
|
for (let i in snippets) delete snippets[i]
|
||||||
|
|
||||||
delete points.__titleNr
|
delete points.__titleNr
|
||||||
|
|
|
@ -5,7 +5,7 @@ function nobleFrontPoints({ log, points, Path, paths, snippets, options, macro,
|
||||||
const bCircle = 0.552284749831
|
const bCircle = 0.552284749831
|
||||||
|
|
||||||
// Hide Bella paths
|
// Hide Bella paths
|
||||||
for (let key of Object.keys(paths)) paths[key].render = false
|
for (let key of Object.keys(paths)) paths[key].hide()
|
||||||
for (let i in snippets) delete snippets[i]
|
for (let i in snippets) delete snippets[i]
|
||||||
|
|
||||||
// Remove macros from Bella
|
// Remove macros from Bella
|
||||||
|
@ -30,11 +30,10 @@ function nobleFrontPoints({ log, points, Path, paths, snippets, options, macro,
|
||||||
points.armholeDartInside = armholePath.shiftFractionAlong(options.armholeDartPosition)
|
points.armholeDartInside = armholePath.shiftFractionAlong(options.armholeDartPosition)
|
||||||
points.armholeDartOutside = points.armholeDartInside.clone()
|
points.armholeDartOutside = points.armholeDartInside.clone()
|
||||||
|
|
||||||
// paths.armholeTemp = armholePath.clone().setRender(true).attr('class', 'lining')
|
|
||||||
let armholePaths = armholePath.split(points.armholeDartInside)
|
let armholePaths = armholePath.split(points.armholeDartInside)
|
||||||
|
|
||||||
let armholePathInside = armholePaths[0].clone().setRender(false)
|
let armholePathInside = armholePaths[0].clone().hide()
|
||||||
let armholePathOutside = armholePaths[1].clone().setRender(false)
|
let armholePathOutside = armholePaths[1].clone().hide()
|
||||||
let armholeDartAngle =
|
let armholeDartAngle =
|
||||||
armholePathInside.reverse().shiftAlong(1).angle(armholePathOutside.shiftAlong(1)) - 90
|
armholePathInside.reverse().shiftAlong(1).angle(armholePathOutside.shiftAlong(1)) - 90
|
||||||
|
|
||||||
|
@ -78,13 +77,13 @@ function nobleFrontPoints({ log, points, Path, paths, snippets, options, macro,
|
||||||
paths.armholeInside = new Path()
|
paths.armholeInside = new Path()
|
||||||
.move(points.armholeDartInside)
|
.move(points.armholeDartInside)
|
||||||
.curve(points.armholeInsidePitchCp2, points.shoulderCp1, points.shoulder)
|
.curve(points.armholeInsidePitchCp2, points.shoulderCp1, points.shoulder)
|
||||||
.setRender(false)
|
.hide()
|
||||||
} else {
|
} else {
|
||||||
paths.armholeInside = new Path()
|
paths.armholeInside = new Path()
|
||||||
.move(points.armholeDartInside)
|
.move(points.armholeDartInside)
|
||||||
.curve(points.armholeDartInsideCp2, points.armholeInsidePitchCp1, points.armholeInsidePitch)
|
.curve(points.armholeDartInsideCp2, points.armholeInsidePitchCp1, points.armholeInsidePitch)
|
||||||
.curve(points.armholeInsidePitchCp2, points.shoulderCp1, points.shoulder)
|
.curve(points.armholeInsidePitchCp2, points.shoulderCp1, points.shoulder)
|
||||||
.setRender(false)
|
.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
let rotateAngle =
|
let rotateAngle =
|
||||||
|
@ -145,7 +144,7 @@ function nobleFrontPoints({ log, points, Path, paths, snippets, options, macro,
|
||||||
paths.armholeOutside = new Path()
|
paths.armholeOutside = new Path()
|
||||||
.move(points.armholeDartOutside)
|
.move(points.armholeDartOutside)
|
||||||
.curve(points.armholeDartOutsideCp1, points.armholeOutsidePitchCp2, points.armhole)
|
.curve(points.armholeDartOutsideCp1, points.armholeOutsidePitchCp2, points.armhole)
|
||||||
.setRender(false)
|
.hide()
|
||||||
} else {
|
} else {
|
||||||
paths.armholeOutside = new Path()
|
paths.armholeOutside = new Path()
|
||||||
.move(points.armholeDartOutside)
|
.move(points.armholeDartOutside)
|
||||||
|
@ -155,14 +154,14 @@ function nobleFrontPoints({ log, points, Path, paths, snippets, options, macro,
|
||||||
points.armholeOutsidePitch
|
points.armholeOutsidePitch
|
||||||
)
|
)
|
||||||
.curve(points.armholeOutsidePitchCp1, points.armholeCp2, points.armhole)
|
.curve(points.armholeOutsidePitchCp1, points.armholeCp2, points.armhole)
|
||||||
.setRender(false)
|
.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
paths.armholeTempDart = new Path()
|
paths.armholeTempDart = new Path()
|
||||||
.move(points.armholeDartOutside)
|
.move(points.armholeDartOutside)
|
||||||
._curve(points.armholeDartCpBottom, points.armholeDartTip)
|
._curve(points.armholeDartCpBottom, points.armholeDartTip)
|
||||||
.curve_(points.armholeDartCpTop, points.armholeDartInside)
|
.curve_(points.armholeDartCpTop, points.armholeDartInside)
|
||||||
.setRender(false)
|
.hide()
|
||||||
|
|
||||||
points.shoulderDartTipCpDownOutside = points.shoulderDartOutside.shiftFractionTowards(
|
points.shoulderDartTipCpDownOutside = points.shoulderDartOutside.shiftFractionTowards(
|
||||||
points.bust,
|
points.bust,
|
||||||
|
@ -186,17 +185,17 @@ function nobleFrontPoints({ log, points, Path, paths, snippets, options, macro,
|
||||||
.move(points.waistDartLeft)
|
.move(points.waistDartLeft)
|
||||||
.curve(points.waistDartLeftCp, points.shoulderDartTipCpDownInside, points.shoulderDartTip)
|
.curve(points.waistDartLeftCp, points.shoulderDartTipCpDownInside, points.shoulderDartTip)
|
||||||
.line(points.shoulderDartInside)
|
.line(points.shoulderDartInside)
|
||||||
.setRender(false)
|
.hide()
|
||||||
|
|
||||||
paths.armholeInsideSeam = new Path()
|
paths.armholeInsideSeam = new Path()
|
||||||
.move(points.waistDartLeft)
|
.move(points.waistDartLeft)
|
||||||
.curve(points.waistDartLeftCp, points.armholeDartTipCpDownInside, points.armholeDartTip)
|
.curve(points.waistDartLeftCp, points.armholeDartTipCpDownInside, points.armholeDartTip)
|
||||||
.setRender(false)
|
.hide()
|
||||||
|
|
||||||
paths.sOutsideSeam = new Path()
|
paths.sOutsideSeam = new Path()
|
||||||
.move(points.waistDartRight)
|
.move(points.waistDartRight)
|
||||||
.curve(points.bustAcp, points.shoulderDartTipCpDownOutside, points.shoulderDartOutside)
|
.curve(points.bustAcp, points.shoulderDartTipCpDownOutside, points.shoulderDartOutside)
|
||||||
.setRender(false)
|
.hide()
|
||||||
|
|
||||||
points.waistDartRightCp = points.bustAcp.clone()
|
points.waistDartRightCp = points.bustAcp.clone()
|
||||||
|
|
||||||
|
@ -204,7 +203,7 @@ function nobleFrontPoints({ log, points, Path, paths, snippets, options, macro,
|
||||||
.move(points.waistDartLeft)
|
.move(points.waistDartLeft)
|
||||||
.curve(points.waistDartLeftCp, points.shoulderDartTipCpDownInside, points.shoulderDartTip)
|
.curve(points.waistDartLeftCp, points.shoulderDartTipCpDownInside, points.shoulderDartTip)
|
||||||
.line(points.shoulderDartInside)
|
.line(points.shoulderDartInside)
|
||||||
.setRender(false)
|
.hide()
|
||||||
|
|
||||||
points.waistUpDartLeft = paths.armholeInsideSeam.shiftAlong(
|
points.waistUpDartLeft = paths.armholeInsideSeam.shiftAlong(
|
||||||
points.waistDartLeft.dist(points.armholeDartTip) * 0.5
|
points.waistDartLeft.dist(points.armholeDartTip) * 0.5
|
||||||
|
@ -293,7 +292,7 @@ function nobleFrontPoints({ log, points, Path, paths, snippets, options, macro,
|
||||||
.move(points.armholeDartOutside)
|
.move(points.armholeDartOutside)
|
||||||
.curve(points.armholeCircleOutsideCp1, points.waistCircleOutsideCp1, points.waistUpDartRight)
|
.curve(points.armholeCircleOutsideCp1, points.waistCircleOutsideCp1, points.waistUpDartRight)
|
||||||
.curve(points.waistUpDartRightCpDown, points.waistCpUp, points.waistDartRight)
|
.curve(points.waistUpDartRightCpDown, points.waistCpUp, points.waistDartRight)
|
||||||
.setRender(false)
|
.hide()
|
||||||
.attr('class', 'lining')
|
.attr('class', 'lining')
|
||||||
paths.armholeTempCircleInside = new Path()
|
paths.armholeTempCircleInside = new Path()
|
||||||
.move(points.armholeDartInside)
|
.move(points.armholeDartInside)
|
||||||
|
@ -303,7 +302,7 @@ function nobleFrontPoints({ log, points, Path, paths, snippets, options, macro,
|
||||||
points.armholeDartTipInside
|
points.armholeDartTipInside
|
||||||
)
|
)
|
||||||
.curve(points.armholeDartTipCpDownInside, points.waistDartLeftCp, points.waistDartLeft)
|
.curve(points.armholeDartTipCpDownInside, points.waistDartLeftCp, points.waistDartLeft)
|
||||||
.setRender(false)
|
.hide()
|
||||||
.attr('class', 'lining')
|
.attr('class', 'lining')
|
||||||
|
|
||||||
diff = paths.armholeTempCircleOutside.length() - paths.armholeTempCircleInside.length()
|
diff = paths.armholeTempCircleOutside.length() - paths.armholeTempCircleInside.length()
|
||||||
|
|
|
@ -13,10 +13,7 @@ function pacoBackPocketBag({
|
||||||
part,
|
part,
|
||||||
}) {
|
}) {
|
||||||
// Don't bother of we're not drafting back pockets
|
// Don't bother of we're not drafting back pockets
|
||||||
if (!options.backPockets) {
|
if (!options.backPockets) return part.hide()
|
||||||
part.render = false
|
|
||||||
return part
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
for (const path in paths) delete paths[path]
|
for (const path in paths) delete paths[path]
|
||||||
|
|
|
@ -14,10 +14,7 @@ function pacoBackPocketWelt({
|
||||||
part,
|
part,
|
||||||
}) {
|
}) {
|
||||||
// Don't bother of we're not drafting back pockets
|
// Don't bother of we're not drafting back pockets
|
||||||
if (!options.backPockets) {
|
if (!options.backPockets) return part.hide()
|
||||||
part.render = false
|
|
||||||
return part
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
for (const path in paths) delete paths[path]
|
for (const path in paths) delete paths[path]
|
||||||
|
|
|
@ -12,10 +12,7 @@ function pacoBackPocketWeltInterfacing({
|
||||||
part,
|
part,
|
||||||
}) {
|
}) {
|
||||||
// Don't bother of we're not drafting back pockets
|
// Don't bother of we're not drafting back pockets
|
||||||
if (!options.backPockets) {
|
if (!options.backPockets) return part.hide()
|
||||||
part.render = false
|
|
||||||
return part
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
for (const path in paths) delete paths[path]
|
for (const path in paths) delete paths[path]
|
||||||
|
|
|
@ -13,10 +13,7 @@ function pacoCuff({
|
||||||
macro,
|
macro,
|
||||||
part,
|
part,
|
||||||
}) {
|
}) {
|
||||||
if (!options.elasticatedHem) {
|
if (!options.elasticatedHem) return part.hide()
|
||||||
part.render = false
|
|
||||||
return part
|
|
||||||
}
|
|
||||||
|
|
||||||
let len = store.get('frontAnkle') + store.get('backAnkle')
|
let len = store.get('frontAnkle') + store.get('backAnkle')
|
||||||
points.topLeft = new Point(0, 0)
|
points.topLeft = new Point(0, 0)
|
||||||
|
|
|
@ -13,10 +13,7 @@ function pacoFrontPocketBag({
|
||||||
part,
|
part,
|
||||||
}) {
|
}) {
|
||||||
// Don't bother of we're not drafting front pockets
|
// Don't bother of we're not drafting front pockets
|
||||||
if (!options.frontPockets) {
|
if (!options.frontPockets) return part.hide()
|
||||||
part.render = false
|
|
||||||
return part
|
|
||||||
}
|
|
||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
for (const path in paths) delete paths[path]
|
for (const path in paths) delete paths[path]
|
||||||
|
|
|
@ -17,10 +17,7 @@ function penelopeWaistband({
|
||||||
store,
|
store,
|
||||||
part,
|
part,
|
||||||
}) {
|
}) {
|
||||||
if (!options.waistBand) {
|
if (!options.waistBand) return part.hide()
|
||||||
part.render = false
|
|
||||||
return part
|
|
||||||
}
|
|
||||||
|
|
||||||
let waist = measurements.waist
|
let waist = measurements.waist
|
||||||
waist += measurements.waist * options.waistEase
|
waist += measurements.waist * options.waistEase
|
||||||
|
|
|
@ -9,7 +9,6 @@ const pluginGore = ({ points, Point, options, macro, part }) => {
|
||||||
radius: options.goreRadius,
|
radius: options.goreRadius,
|
||||||
gores: options.goreGoreNumber,
|
gores: options.goreGoreNumber,
|
||||||
extraLength: options.goreExtraLength,
|
extraLength: options.goreExtraLength,
|
||||||
render: true,
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
return part
|
return part
|
||||||
|
|
|
@ -18,7 +18,7 @@ const pluginRound = ({ Point, points, Path, paths, macro, options, part }) => {
|
||||||
|
|
||||||
const opts = {
|
const opts = {
|
||||||
radius: options.roundRadius,
|
radius: options.roundRadius,
|
||||||
render: options.roundRender,
|
hide: options.roundHide,
|
||||||
}
|
}
|
||||||
|
|
||||||
macro('round', {
|
macro('round', {
|
||||||
|
@ -45,7 +45,7 @@ export const round = {
|
||||||
after: base,
|
after: base,
|
||||||
options: {
|
options: {
|
||||||
roundRadius: { count: 10, min: 0, max: 50, menu: 'round' },
|
roundRadius: { count: 10, min: 0, max: 50, menu: 'round' },
|
||||||
roundRender: { bool: true, menu: 'round' },
|
roundHide: { bool: false, menu: 'round' },
|
||||||
},
|
},
|
||||||
plugins: roundPlugin,
|
plugins: roundPlugin,
|
||||||
draft: pluginRound,
|
draft: pluginRound,
|
||||||
|
|
|
@ -141,8 +141,8 @@ function sandySkirt({
|
||||||
if (!options.seamlessFullCircle) paths.saBase = paths.saBase.line(points.ex1Rotated)
|
if (!options.seamlessFullCircle) paths.saBase = paths.saBase.line(points.ex1Rotated)
|
||||||
paths.saBase = paths.saBase.offset(sa * -1)
|
paths.saBase = paths.saBase.offset(sa * -1)
|
||||||
|
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
|
|
||||||
if (options.seamlessFullCircle) {
|
if (options.seamlessFullCircle) {
|
||||||
paths.sa = new Path()
|
paths.sa = new Path()
|
||||||
|
|
|
@ -98,8 +98,8 @@ function shinBack({
|
||||||
.join(paths.saBase)
|
.join(paths.saBase)
|
||||||
|
|
||||||
paths.hemBase = new Path().move(points.legSide).curve_(points.legSideCp, points.reducedLegInner)
|
paths.hemBase = new Path().move(points.legSide).curve_(points.legSideCp, points.reducedLegInner)
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
|
|
||||||
paths.seam = paths.saBase.join(paths.hemBase).attr('class', 'fabric')
|
paths.seam = paths.saBase.join(paths.hemBase).attr('class', 'fabric')
|
||||||
|
|
||||||
|
|
|
@ -99,8 +99,8 @@ function shinFront({
|
||||||
.join(paths.saBase)
|
.join(paths.saBase)
|
||||||
paths.hemBase = new Path().move(points.legSide).curve_(points.legSideCp, points.reducedLegInner)
|
paths.hemBase = new Path().move(points.legSide).curve_(points.legSideCp, points.reducedLegInner)
|
||||||
|
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
|
|
||||||
paths.seam = paths.saBase.join(paths.hemBase).attr('class', 'fabric')
|
paths.seam = paths.saBase.join(paths.hemBase).attr('class', 'fabric')
|
||||||
|
|
||||||
|
|
|
@ -131,11 +131,11 @@ function simonBack({
|
||||||
}
|
}
|
||||||
|
|
||||||
const [back, yoke] = paths.backArmhole.split(points.armholeYokeSplit)
|
const [back, yoke] = paths.backArmhole.split(points.armholeYokeSplit)
|
||||||
paths.backArmholeYoke = yoke.setRender(false)
|
paths.backArmholeYoke = yoke.hide()
|
||||||
// For 1/10 dolls with breasts, this path becomes non-existing so we put a dummy here
|
// For 1/10 dolls with breasts, this path becomes non-existing so we put a dummy here
|
||||||
paths.backArmholeBack = back.attributes
|
paths.backArmholeBack = back.attributes
|
||||||
? back.setRender(false)
|
? back.hide()
|
||||||
: new Path().move(points.armholeYokeSplit).line(points.armholeYokeSplit).setRender(false)
|
: new Path().move(points.armholeYokeSplit).line(points.armholeYokeSplit).hide()
|
||||||
|
|
||||||
// We'll re-use this
|
// We'll re-use this
|
||||||
const armholeToPitch = new Path()
|
const armholeToPitch = new Path()
|
||||||
|
@ -151,7 +151,7 @@ function simonBack({
|
||||||
paths.armhole = armholeToPitch
|
paths.armhole = armholeToPitch
|
||||||
if (options.yokeHeight === 0) paths.armhole = paths.armhole.join(paths.backArmhole)
|
if (options.yokeHeight === 0) paths.armhole = paths.armhole.join(paths.backArmhole)
|
||||||
else paths.armhole = paths.armhole.join(paths.backArmholeBack)
|
else paths.armhole = paths.armhole.join(paths.backArmholeBack)
|
||||||
paths.armhole.render = false
|
paths.armhole.hide()
|
||||||
|
|
||||||
if (options.roundBack > 0) {
|
if (options.roundBack > 0) {
|
||||||
points.cbTop = points.cbYoke.shift(90, points.armholePitch.x * options.roundBack)
|
points.cbTop = points.cbYoke.shift(90, points.armholePitch.x * options.roundBack)
|
||||||
|
@ -170,7 +170,7 @@ function simonBack({
|
||||||
points.boxPleatLeftBottom = new Point(points.boxPleatLeft.x, points.armholeHollowCp2.y)
|
points.boxPleatLeftBottom = new Point(points.boxPleatLeft.x, points.armholeHollowCp2.y)
|
||||||
points.boxPleatMidBottom = new Point(points.boxPleatMid.x, points.armholeHollowCp2.y)
|
points.boxPleatMidBottom = new Point(points.boxPleatMid.x, points.armholeHollowCp2.y)
|
||||||
points.boxPleatRightBottom = new Point(points.boxPleatRight.x, points.armholeHollowCp2.y)
|
points.boxPleatRightBottom = new Point(points.boxPleatRight.x, points.armholeHollowCp2.y)
|
||||||
paths.armhole.setRender(false)
|
paths.armhole.hide()
|
||||||
paths.armhole = paths.armhole.translate(store.get('boxPleatFold') * 2, 0)
|
paths.armhole = paths.armhole.translate(store.get('boxPleatFold') * 2, 0)
|
||||||
for (const p of [
|
for (const p of [
|
||||||
'armholePitch',
|
'armholePitch',
|
||||||
|
@ -235,8 +235,8 @@ function simonBack({
|
||||||
else paths.saBase = paths.saBase.line(points.cbYoke)
|
else paths.saBase = paths.saBase.line(points.cbYoke)
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
paths.seam = paths.hemBase.join(paths.saBase).close().attr('class', 'fabric')
|
paths.seam = paths.hemBase.join(paths.saBase).close().attr('class', 'fabric')
|
||||||
|
|
||||||
// Complete pattern?
|
// Complete pattern?
|
||||||
|
|
|
@ -110,10 +110,10 @@ function simonFront({
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.saBaseFromHips.render = false
|
paths.saBaseFromHips.hide()
|
||||||
paths.saBaseFromArmhole.render = false
|
paths.saBaseFromArmhole.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
paths.seam = paths.hemBase
|
paths.seam = paths.hemBase
|
||||||
.join(paths.saBase)
|
.join(paths.saBase)
|
||||||
.join(paths.saBaseFromArmhole)
|
.join(paths.saBaseFromArmhole)
|
||||||
|
|
|
@ -43,7 +43,7 @@ function simonSleeve({
|
||||||
.curve(points.capQ2Cp2, points.capQ3Cp1, points.capQ3)
|
.curve(points.capQ2Cp2, points.capQ3Cp1, points.capQ3)
|
||||||
.curve(points.capQ3Cp2, points.capQ4Cp1, points.capQ4)
|
.curve(points.capQ3Cp2, points.capQ4Cp1, points.capQ4)
|
||||||
.curve_(points.capQ4Cp2, points.bicepsLeft)
|
.curve_(points.capQ4Cp2, points.bicepsLeft)
|
||||||
.setRender(false)
|
.hide()
|
||||||
points.top = new Point(0, paths.sleevecap.edge('top').y)
|
points.top = new Point(0, paths.sleevecap.edge('top').y)
|
||||||
points.bottom = points.top.shift(-90, len)
|
points.bottom = points.top.shift(-90, len)
|
||||||
|
|
||||||
|
@ -114,10 +114,10 @@ function simonSleeve({
|
||||||
.curve(points.capQ2Cp2, points.capQ3Cp1, points.capQ3)
|
.curve(points.capQ2Cp2, points.capQ3Cp1, points.capQ3)
|
||||||
.curve(points.capQ3Cp2, points.capQ4Cp1, points.capQ4)
|
.curve(points.capQ3Cp2, points.capQ4Cp1, points.capQ4)
|
||||||
.curve_(points.capQ4Cp2, points.bicepsLeft)
|
.curve_(points.capQ4Cp2, points.bicepsLeft)
|
||||||
paths.frenchBase.render = false
|
paths.frenchBase.hide()
|
||||||
|
|
||||||
paths.saBase = new Path().move(points.bicepsLeft).line(points.wristLeft)
|
paths.saBase = new Path().move(points.bicepsLeft).line(points.wristLeft)
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
|
|
||||||
paths.cuffBase = new Path()
|
paths.cuffBase = new Path()
|
||||||
.move(points.wristLeft)
|
.move(points.wristLeft)
|
||||||
|
@ -128,7 +128,7 @@ function simonSleeve({
|
||||||
paths.cuffBase._curve(points.cuffRightCuspCp1, points.cuffRightCusp)
|
paths.cuffBase._curve(points.cuffRightCuspCp1, points.cuffRightCusp)
|
||||||
if (pleats === 2) paths.cuffBase.line(points.cuffPleat2Edge)
|
if (pleats === 2) paths.cuffBase.line(points.cuffPleat2Edge)
|
||||||
paths.cuffBase.curve_(points.cuffRightCuspCp2, points.wristRight)
|
paths.cuffBase.curve_(points.cuffRightCuspCp2, points.wristRight)
|
||||||
paths.cuffBase.render = false
|
paths.cuffBase.hide()
|
||||||
|
|
||||||
paths.seam = paths.frenchBase
|
paths.seam = paths.frenchBase
|
||||||
.clone()
|
.clone()
|
||||||
|
|
|
@ -31,10 +31,10 @@ function simonYoke({
|
||||||
clone: true,
|
clone: true,
|
||||||
})
|
})
|
||||||
paths.saBase = paths.saBase.join(paths.mirroredSaBase.reverse())
|
paths.saBase = paths.saBase.join(paths.mirroredSaBase.reverse())
|
||||||
paths.mirroredSaBase.setRender(false)
|
paths.mirroredSaBase.hide()
|
||||||
}
|
}
|
||||||
paths.seam = paths.saBase.clone()
|
paths.seam = paths.saBase.clone()
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.seam = paths.seam.close().attr('class', 'fabric')
|
paths.seam = paths.seam.close().attr('class', 'fabric')
|
||||||
|
|
||||||
// Complete pattern?
|
// Complete pattern?
|
||||||
|
|
|
@ -166,8 +166,8 @@ function simoneFbaFront({
|
||||||
.split(points.bustSideCut1_rot1)
|
.split(points.bustSideCut1_rot1)
|
||||||
paths.fbaAboveDart = toSplit.pop()
|
paths.fbaAboveDart = toSplit.pop()
|
||||||
paths.fbaBelowDart = toSplit.pop()
|
paths.fbaBelowDart = toSplit.pop()
|
||||||
paths.fbaAboveDart.render = false
|
paths.fbaAboveDart.hide()
|
||||||
paths.fbaBelowDart.render = false
|
paths.fbaBelowDart.hide()
|
||||||
points.belowDartCpTop_rot1 = paths.fbaBelowDart.ops[1].cp2
|
points.belowDartCpTop_rot1 = paths.fbaBelowDart.ops[1].cp2
|
||||||
points.belowDartCpBottom_rot1 = paths.fbaBelowDart.ops[1].cp1
|
points.belowDartCpBottom_rot1 = paths.fbaBelowDart.ops[1].cp1
|
||||||
points.aboveDartCpBottom_rot1 = paths.fbaAboveDart.ops[1].cp1 // (only one CP on this part
|
points.aboveDartCpBottom_rot1 = paths.fbaAboveDart.ops[1].cp1 // (only one CP on this part
|
||||||
|
@ -392,9 +392,9 @@ function simoneFbaFront({
|
||||||
.join(paths.saBaseFromArmhole)
|
.join(paths.saBaseFromArmhole)
|
||||||
.attr('class', 'fabric')
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
paths.saBaseFromHips.render = false
|
paths.saBaseFromHips.hide()
|
||||||
paths.saBaseFromArmhole.render = false
|
paths.saBaseFromArmhole.hide()
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
|
|
||||||
if (complete && sa) {
|
if (complete && sa) {
|
||||||
paths.saFrench = paths.saBase.offset(sa * options.ffsa).attr('class', 'fabric sa')
|
paths.saFrench = paths.saBase.offset(sa * options.ffsa).attr('class', 'fabric sa')
|
||||||
|
|
|
@ -45,8 +45,8 @@ function svenFrontBack({
|
||||||
if (front) paths.hemBase = new Path().move(points.cfHem).line(points.hem)
|
if (front) paths.hemBase = new Path().move(points.cfHem).line(points.hem)
|
||||||
else paths.hemBase = new Path().move(points.cbHem).line(points.hem)
|
else paths.hemBase = new Path().move(points.cbHem).line(points.hem)
|
||||||
|
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
|
|
||||||
paths.seam = paths.hemBase.join(paths.saBase)
|
paths.seam = paths.hemBase.join(paths.saBase)
|
||||||
if (front) paths.seam.line(points.cfHem)
|
if (front) paths.seam.line(points.cfHem)
|
||||||
|
|
|
@ -31,8 +31,8 @@ function svenSleeve({ store, sa, points, paths, Path, complete, paperless, macro
|
||||||
.join(paths.sleevecap)
|
.join(paths.sleevecap)
|
||||||
.line(points.wristLeft)
|
.line(points.wristLeft)
|
||||||
paths.hemBase = new Path().move(points.wristLeft).line(points.wristRight)
|
paths.hemBase = new Path().move(points.wristLeft).line(points.wristRight)
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
paths.sa = paths.saBase.offset(sa).join(paths.hemBase.offset(sa * (options.ribbing ? 1 : 3)))
|
paths.sa = paths.saBase.offset(sa).join(paths.hemBase.offset(sa * (options.ribbing ? 1 : 3)))
|
||||||
paths.sa.line(paths.sa.start()).close().attr('class', 'fabric sa')
|
paths.sa.line(paths.sa.start()).close().attr('class', 'fabric sa')
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,7 +20,7 @@ function teaganFront({
|
||||||
part,
|
part,
|
||||||
}) {
|
}) {
|
||||||
// Hide Brian paths
|
// Hide Brian paths
|
||||||
for (let key of Object.keys(paths)) paths[key].render = false
|
for (let key of Object.keys(paths)) paths[key].hide()
|
||||||
|
|
||||||
// Adapt fit to waist
|
// Adapt fit to waist
|
||||||
let width
|
let width
|
||||||
|
@ -61,7 +61,7 @@ function teaganFront({
|
||||||
log.info(['fullLengthFromHps', units(points.hps.dy(points.hem))])
|
log.info(['fullLengthFromHps', units(points.hps.dy(points.hem))])
|
||||||
|
|
||||||
// Draw seamline
|
// Draw seamline
|
||||||
paths.hemBase = new Path().move(points.cfHem).line(points.hem).setRender(false)
|
paths.hemBase = new Path().move(points.cfHem).line(points.hem).hide()
|
||||||
paths.saBase = new Path()
|
paths.saBase = new Path()
|
||||||
.move(points.hem)
|
.move(points.hem)
|
||||||
.curve_(points.waistCp2, points.armhole)
|
.curve_(points.waistCp2, points.armhole)
|
||||||
|
@ -69,7 +69,7 @@ function teaganFront({
|
||||||
.curve(points.armholeHollowCp2, points.shoulderCp1, points.shoulder)
|
.curve(points.armholeHollowCp2, points.shoulderCp1, points.shoulder)
|
||||||
.line(points.neck)
|
.line(points.neck)
|
||||||
.curve(points.neckCp2, points.cfNeckCp1, points.cfNeck)
|
.curve(points.neckCp2, points.cfNeckCp1, points.cfNeck)
|
||||||
.setRender(false)
|
.hide()
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
.move(points.cfHem)
|
.move(points.cfHem)
|
||||||
.join(paths.hemBase)
|
.join(paths.hemBase)
|
||||||
|
|
|
@ -403,8 +403,8 @@ function titanBack({
|
||||||
.join(paths.saBase.offset(sa))
|
.join(paths.saBase.offset(sa))
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric sa')
|
.attr('class', 'fabric sa')
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paperless && options.titanPaperless) {
|
if (paperless && options.titanPaperless) {
|
||||||
|
|
|
@ -477,8 +477,8 @@ function titanFront({
|
||||||
.join(paths.saBase.offset(sa))
|
.join(paths.saBase.offset(sa))
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric sa')
|
.attr('class', 'fabric sa')
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (paperless && options.titanPaperless) {
|
if (paperless && options.titanPaperless) {
|
||||||
|
|
|
@ -65,14 +65,12 @@ export const step7 = {
|
||||||
to: points.tipRight,
|
to: points.tipRight,
|
||||||
via: points.tipRightTop,
|
via: points.tipRightTop,
|
||||||
prefix: 'tipRightTop',
|
prefix: 'tipRightTop',
|
||||||
render: true,
|
|
||||||
})
|
})
|
||||||
macro('round', {
|
macro('round', {
|
||||||
from: points.tipRight,
|
from: points.tipRight,
|
||||||
to: points.top,
|
to: points.top,
|
||||||
via: points.tipRightBottom,
|
via: points.tipRightBottom,
|
||||||
prefix: 'tipRightBottom',
|
prefix: 'tipRightBottom',
|
||||||
render: true,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return part
|
return part
|
||||||
|
@ -111,14 +109,12 @@ export const step8 = {
|
||||||
to: points.tipRight,
|
to: points.tipRight,
|
||||||
via: points.tipRightTop,
|
via: points.tipRightTop,
|
||||||
prefix: 'tipRightTop',
|
prefix: 'tipRightTop',
|
||||||
render: true,
|
|
||||||
})
|
})
|
||||||
macro('round', {
|
macro('round', {
|
||||||
from: points.tipRight,
|
from: points.tipRight,
|
||||||
to: points.top,
|
to: points.top,
|
||||||
via: points.tipRightBottom,
|
via: points.tipRightBottom,
|
||||||
prefix: 'tipRightBottom',
|
prefix: 'tipRightBottom',
|
||||||
render: true,
|
|
||||||
})
|
})
|
||||||
|
|
||||||
paths.rect = new Path()
|
paths.rect = new Path()
|
||||||
|
|
|
@ -50,7 +50,6 @@ export const step10 = {
|
||||||
to: points.bottomRight,
|
to: points.bottomRight,
|
||||||
via: points.bottomLeft,
|
via: points.bottomLeft,
|
||||||
radius: points.bottomRight.x / 4,
|
radius: points.bottomRight.x / 4,
|
||||||
render: true,
|
|
||||||
prefix: 'bottomLeft',
|
prefix: 'bottomLeft',
|
||||||
})
|
})
|
||||||
macro('round', {
|
macro('round', {
|
||||||
|
@ -58,7 +57,6 @@ export const step10 = {
|
||||||
to: points.topRight,
|
to: points.topRight,
|
||||||
via: points.bottomRight,
|
via: points.bottomRight,
|
||||||
radius: points.bottomRight.x / 4,
|
radius: points.bottomRight.x / 4,
|
||||||
render: true,
|
|
||||||
prefix: 'bottomRight',
|
prefix: 'bottomRight',
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -102,10 +102,10 @@ function wahidBack({
|
||||||
.join(paths.dart)
|
.join(paths.dart)
|
||||||
.line(points.hem)
|
.line(points.hem)
|
||||||
.attr('class', 'fabric')
|
.attr('class', 'fabric')
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
paths.dart.render = false
|
paths.dart.hide()
|
||||||
|
|
||||||
if (complete) {
|
if (complete) {
|
||||||
//Grainline
|
//Grainline
|
||||||
|
|
|
@ -252,9 +252,9 @@ function wahidFront({
|
||||||
}
|
}
|
||||||
paths.dart = dartPath(part)
|
paths.dart = dartPath(part)
|
||||||
paths.seam = paths.saBase.join(paths.dart).join(paths.hemBase).close().attr('class', 'fabric')
|
paths.seam = paths.saBase.join(paths.dart).join(paths.hemBase).close().attr('class', 'fabric')
|
||||||
paths.saBase.render = false
|
paths.saBase.hide()
|
||||||
paths.hemBase.render = false
|
paths.hemBase.hide()
|
||||||
paths.dart.render = false
|
paths.dart.hide()
|
||||||
if (complete) {
|
if (complete) {
|
||||||
// Pocket path
|
// Pocket path
|
||||||
paths.pocket = new Path()
|
paths.pocket = new Path()
|
||||||
|
|
|
@ -24,7 +24,7 @@ function wahidPocketbag({
|
||||||
to: points.bottomRight,
|
to: points.bottomRight,
|
||||||
via: points.bottomLeft,
|
via: points.bottomLeft,
|
||||||
radius: pw / 8,
|
radius: pw / 8,
|
||||||
render: false,
|
hidden: true,
|
||||||
prefix: 'roundLeft',
|
prefix: 'roundLeft',
|
||||||
})
|
})
|
||||||
macro('round', {
|
macro('round', {
|
||||||
|
@ -32,7 +32,7 @@ function wahidPocketbag({
|
||||||
to: points.topRight,
|
to: points.topRight,
|
||||||
via: points.bottomRight,
|
via: points.bottomRight,
|
||||||
radius: pw / 8,
|
radius: pw / 8,
|
||||||
render: false,
|
hidden: true,
|
||||||
prefix: 'roundRight',
|
prefix: 'roundRight',
|
||||||
})
|
})
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
|
|
|
@ -27,7 +27,7 @@ function wahidPocketFacing({
|
||||||
to: points.bottomRight,
|
to: points.bottomRight,
|
||||||
via: points.bottomLeft,
|
via: points.bottomLeft,
|
||||||
radius: pw / 8,
|
radius: pw / 8,
|
||||||
render: false,
|
hidden: true,
|
||||||
prefix: 'roundLeft',
|
prefix: 'roundLeft',
|
||||||
})
|
})
|
||||||
macro('round', {
|
macro('round', {
|
||||||
|
@ -35,7 +35,7 @@ function wahidPocketFacing({
|
||||||
to: points.topRight,
|
to: points.topRight,
|
||||||
via: points.bottomRight,
|
via: points.bottomRight,
|
||||||
radius: pw / 8,
|
radius: pw / 8,
|
||||||
render: false,
|
hidden: true,
|
||||||
prefix: 'roundRight',
|
prefix: 'roundRight',
|
||||||
})
|
})
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
|
|
|
@ -29,7 +29,7 @@ function waraleeCutout({
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
paths.cutout.setRender(false)
|
paths.cutout.hide()
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
|
@ -79,9 +79,8 @@ function waraleeCutout({
|
||||||
x: points.mWaist.x + 15,
|
x: points.mWaist.x + 15,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
part.render = options.showMini
|
|
||||||
|
|
||||||
return part
|
return part.setHidden(!options.showMini)
|
||||||
}
|
}
|
||||||
|
|
||||||
export const cutout = {
|
export const cutout = {
|
||||||
|
|
|
@ -38,17 +38,17 @@ function waraleeMini({ options, Path, points, paths, complete, sa, macro, store,
|
||||||
.line(separateWaistband ? points.fWaistSideSeam : points.fWaistSide)
|
.line(separateWaistband ? points.fWaistSideSeam : points.fWaistSide)
|
||||||
.attr('class', 'help')
|
.attr('class', 'help')
|
||||||
|
|
||||||
paths.seam.setRender(true)
|
paths.seam.unhide()
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
macro('scalebox', { at: points.mLeg.shift(-90, 35) })
|
macro('scalebox', { at: points.mLeg.shift(-90, 35) })
|
||||||
|
|
||||||
if (options.frontPocket && 'welt' == options.frontPocketStyle) {
|
if (options.frontPocket && 'welt' == options.frontPocketStyle) {
|
||||||
paths.frontPocket.setRender(true)
|
paths.frontPocket.unhide()
|
||||||
}
|
}
|
||||||
if (options.backPocket) {
|
if (options.backPocket) {
|
||||||
paths.backPocket.setRender(true)
|
paths.backPocket.unhide()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sa) {
|
if (sa) {
|
||||||
|
@ -151,9 +151,7 @@ function waraleeMini({ options, Path, points, paths, complete, sa, macro, store,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
part.render = options.showMini
|
return part.setHidden(!options.showMini)
|
||||||
|
|
||||||
return part
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const mini = {
|
export const mini = {
|
||||||
|
|
|
@ -35,7 +35,7 @@ function waraleePants({
|
||||||
paths.legFold = paths.leg.offset(-1 * store.get('hem')).attr('class', 'fabric stroke-sm')
|
paths.legFold = paths.leg.offset(-1 * store.get('hem')).attr('class', 'fabric stroke-sm')
|
||||||
paths.backFold = paths.back.offset(-1 * store.get('hem')).attr('class', 'fabric stroke-sm')
|
paths.backFold = paths.back.offset(-1 * store.get('hem')).attr('class', 'fabric stroke-sm')
|
||||||
|
|
||||||
paths.seam.setRender(true)
|
paths.seam.unhide()
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
|
@ -56,10 +56,10 @@ function waraleePants({
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.frontPocket && 'welt' == options.frontPocketStyle) {
|
if (options.frontPocket && 'welt' == options.frontPocketStyle) {
|
||||||
paths.frontPocket.setRender(true)
|
paths.frontPocket.unhide()
|
||||||
}
|
}
|
||||||
if (options.backPocket) {
|
if (options.backPocket) {
|
||||||
paths.backPocket.setRender(true)
|
paths.backPocket.unhide()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paperless?
|
// Paperless?
|
||||||
|
@ -161,9 +161,7 @@ function waraleePants({
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
part.render = options.showMini == false
|
return part.setHidden(options.showMini != false)
|
||||||
|
|
||||||
return part
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const pants = {
|
export const pants = {
|
||||||
|
|
|
@ -122,10 +122,10 @@ function waraleePantsProto({ options, measurements, Point, Path, points, paths,
|
||||||
.curve(points.bWaistCrotchCP, points.bHipCrotchCP, points.mHip)
|
.curve(points.bWaistCrotchCP, points.bHipCrotchCP, points.mHip)
|
||||||
.split(points.bCutOutHip)
|
.split(points.bCutOutHip)
|
||||||
|
|
||||||
fPaths[0].setRender(false)
|
fPaths[0].hide()
|
||||||
fPaths[1].setRender(false)
|
fPaths[1].hide()
|
||||||
bPaths[0].setRender(false)
|
bPaths[0].hide()
|
||||||
bPaths[1].setRender(false)
|
bPaths[1].hide()
|
||||||
|
|
||||||
points.fCutOutHipCp1 = fPaths[1].ops[1].cp1.shiftFractionTowards(points.fCutOutHip, 1.25)
|
points.fCutOutHipCp1 = fPaths[1].ops[1].cp1.shiftFractionTowards(points.fCutOutHip, 1.25)
|
||||||
points.fCutOutHipCp2 = fPaths[1].ops[1].cp1.clone()
|
points.fCutOutHipCp2 = fPaths[1].ops[1].cp1.clone()
|
||||||
|
@ -137,20 +137,20 @@ function waraleePantsProto({ options, measurements, Point, Path, points, paths,
|
||||||
paths.frontBottomCutOut = new Path()
|
paths.frontBottomCutOut = new Path()
|
||||||
.move(points.mHip)
|
.move(points.mHip)
|
||||||
.curve(points.mHipCp1, points.fCutOutHipCp2, points.fCutOutHip)
|
.curve(points.mHipCp1, points.fCutOutHipCp2, points.fCutOutHip)
|
||||||
.setRender(false)
|
.hide()
|
||||||
paths.backBottomCutOut = new Path()
|
paths.backBottomCutOut = new Path()
|
||||||
.move(points.bCutOutHip)
|
.move(points.bCutOutHip)
|
||||||
.curve(points.bCutOutHipCp1, points.mHipCp2, points.mHip)
|
.curve(points.bCutOutHipCp1, points.mHipCp2, points.mHip)
|
||||||
.setRender(false)
|
.hide()
|
||||||
|
|
||||||
paths.frontTopCutOut = new Path()
|
paths.frontTopCutOut = new Path()
|
||||||
.move(points.fCutOutHip)
|
.move(points.fCutOutHip)
|
||||||
.curve(points.fCutOutHipCp1, points.fWaistAdjusted, points.fWaistAdjusted)
|
.curve(points.fCutOutHipCp1, points.fWaistAdjusted, points.fWaistAdjusted)
|
||||||
.setRender(false)
|
.hide()
|
||||||
paths.backTopCutOut = new Path()
|
paths.backTopCutOut = new Path()
|
||||||
.move(points.bWaistAdjusted)
|
.move(points.bWaistAdjusted)
|
||||||
.curve(points.bWaistAdjusted, points.bCutOutHipCp2, points.bCutOutHip)
|
.curve(points.bWaistAdjusted, points.bCutOutHipCp2, points.bCutOutHip)
|
||||||
.setRender(false)
|
.hide()
|
||||||
|
|
||||||
points.fWaistSideHem = paths.frontTopCutOut.reverse().shiftAlong(waistBand)
|
points.fWaistSideHem = paths.frontTopCutOut.reverse().shiftAlong(waistBand)
|
||||||
points.fWaistSideSeam = paths.frontTopCutOut.reverse().shiftAlong(waistBand * 2)
|
points.fWaistSideSeam = paths.frontTopCutOut.reverse().shiftAlong(waistBand * 2)
|
||||||
|
@ -187,7 +187,7 @@ function waraleePantsProto({ options, measurements, Point, Path, points, paths,
|
||||||
paths.frontTopCutOut = new Path()
|
paths.frontTopCutOut = new Path()
|
||||||
.move(points.fCutOutHip)
|
.move(points.fCutOutHip)
|
||||||
.curve(points.fCutOutHipCp1, points.fWaistSideCp2, points.fWaistSideSeam)
|
.curve(points.fCutOutHipCp1, points.fWaistSideCp2, points.fWaistSideSeam)
|
||||||
.setRender(false)
|
.hide()
|
||||||
if (false == separateWaistband) {
|
if (false == separateWaistband) {
|
||||||
paths.frontTopCutOut.line(points.fWaistSideHem)
|
paths.frontTopCutOut.line(points.fWaistSideHem)
|
||||||
paths.frontTopCutOut.line(points.fWaistSide)
|
paths.frontTopCutOut.line(points.fWaistSide)
|
||||||
|
@ -200,37 +200,35 @@ function waraleePantsProto({ options, measurements, Point, Path, points, paths,
|
||||||
} else {
|
} else {
|
||||||
paths.backTopCutOut = new Path().move(points.bWaistSideSeam)
|
paths.backTopCutOut = new Path().move(points.bWaistSideSeam)
|
||||||
}
|
}
|
||||||
paths.backTopCutOut
|
paths.backTopCutOut.curve(points.bWaistSideCp1, points.bCutOutHipCp2, points.bCutOutHip).hide()
|
||||||
.curve(points.bWaistSideCp1, points.bCutOutHipCp2, points.bCutOutHip)
|
|
||||||
.setRender(false)
|
|
||||||
|
|
||||||
paths.cutout = paths.backTopCutOut
|
paths.cutout = paths.backTopCutOut
|
||||||
.join(paths.backBottomCutOut)
|
.join(paths.backBottomCutOut)
|
||||||
.join(paths.frontBottomCutOut)
|
.join(paths.frontBottomCutOut)
|
||||||
.join(paths.frontTopCutOut)
|
.join(paths.frontTopCutOut)
|
||||||
.setRender(false)
|
.hide()
|
||||||
|
|
||||||
paths.waistBack = new Path()
|
paths.waistBack = new Path()
|
||||||
.move(separateWaistband ? points.bWaistBackOverlapSeam : points.bWaistBackOverlap)
|
.move(separateWaistband ? points.bWaistBackOverlapSeam : points.bWaistBackOverlap)
|
||||||
.line(separateWaistband ? points.bWaistBackSeam : points.bWaistBack)
|
.line(separateWaistband ? points.bWaistBackSeam : points.bWaistBack)
|
||||||
// .line(points.bWaistSideTemp) // This is a trick to make the offset() call work. Without it, the offset is crossing the cutout line.
|
// .line(points.bWaistSideTemp) // This is a trick to make the offset() call work. Without it, the offset is crossing the cutout line.
|
||||||
.line(separateWaistband ? points.bWaistSideSeam : points.bWaistSide)
|
.line(separateWaistband ? points.bWaistSideSeam : points.bWaistSide)
|
||||||
.setRender(false)
|
.hide()
|
||||||
paths.waistFront = new Path()
|
paths.waistFront = new Path()
|
||||||
.move(separateWaistband ? points.fWaistSideSeam : points.fWaistSide)
|
.move(separateWaistband ? points.fWaistSideSeam : points.fWaistSide)
|
||||||
.line(separateWaistband ? points.fWaistFrontOverlapSeam : points.fWaistFrontOverlap)
|
.line(separateWaistband ? points.fWaistFrontOverlapSeam : points.fWaistFrontOverlap)
|
||||||
.setRender(false)
|
.hide()
|
||||||
paths.front = new Path()
|
paths.front = new Path()
|
||||||
.move(separateWaistband ? points.fWaistFrontOverlapSeam : points.fWaistFrontOverlap)
|
.move(separateWaistband ? points.fWaistFrontOverlapSeam : points.fWaistFrontOverlap)
|
||||||
.line(points.fHipFrontOverlap)
|
.line(points.fHipFrontOverlap)
|
||||||
.line(points.fLegFrontOverlap)
|
.line(points.fLegFrontOverlap)
|
||||||
.setRender(false)
|
.hide()
|
||||||
paths.back = new Path()
|
paths.back = new Path()
|
||||||
.move(points.bLegBackOverlap)
|
.move(points.bLegBackOverlap)
|
||||||
.line(points.bHipBackOverlap)
|
.line(points.bHipBackOverlap)
|
||||||
.line(separateWaistband ? points.bWaistBackOverlapSeam : points.bWaistBackOverlap)
|
.line(separateWaistband ? points.bWaistBackOverlapSeam : points.bWaistBackOverlap)
|
||||||
.setRender(false)
|
.hide()
|
||||||
paths.leg = new Path().move(points.fLegFrontOverlap).line(points.bLegBackOverlap).setRender(false)
|
paths.leg = new Path().move(points.fLegFrontOverlap).line(points.bLegBackOverlap).hide()
|
||||||
|
|
||||||
paths.seam = paths.waistFront
|
paths.seam = paths.waistFront
|
||||||
.join(paths.front)
|
.join(paths.front)
|
||||||
|
@ -240,7 +238,7 @@ function waraleePantsProto({ options, measurements, Point, Path, points, paths,
|
||||||
.join(paths.cutout)
|
.join(paths.cutout)
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.attr('class', 'fabric')
|
||||||
.setRender(false)
|
.hide()
|
||||||
|
|
||||||
if (options.frontPocket) {
|
if (options.frontPocket) {
|
||||||
points.frontPocketTop = points.fWaistSideSeam
|
points.frontPocketTop = points.fWaistSideSeam
|
||||||
|
@ -266,7 +264,7 @@ function waraleePantsProto({ options, measurements, Point, Path, points, paths,
|
||||||
.line(points.frontPocketTop2)
|
.line(points.frontPocketTop2)
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.attr('class', 'fabric')
|
||||||
.setRender(false)
|
.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
if (options.backPocket) {
|
if (options.backPocket) {
|
||||||
|
@ -304,12 +302,10 @@ function waraleePantsProto({ options, measurements, Point, Path, points, paths,
|
||||||
.line(points.backPocketRight)
|
.line(points.backPocketRight)
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.attr('class', 'fabric')
|
||||||
.setRender(false)
|
.hide()
|
||||||
}
|
}
|
||||||
|
|
||||||
part.render = false
|
return part.hide()
|
||||||
|
|
||||||
return part
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export const pantsProto = {
|
export const pantsProto = {
|
||||||
|
|
|
@ -42,7 +42,8 @@ function yuriBack({
|
||||||
paths.gussetBase = new Path()
|
paths.gussetBase = new Path()
|
||||||
.move(points.bottom)
|
.move(points.bottom)
|
||||||
.line(points.armhole)
|
.line(points.armhole)
|
||||||
.attr('class', 'note stroke-xxl')
|
.setClass('note stroke-xxl')
|
||||||
|
.hide()
|
||||||
store.set('gussetLength', paths.gussetBase.length())
|
store.set('gussetLength', paths.gussetBase.length())
|
||||||
paths.saBase = new Path()
|
paths.saBase = new Path()
|
||||||
.move(points.armhole)
|
.move(points.armhole)
|
||||||
|
@ -51,14 +52,13 @@ function yuriBack({
|
||||||
.join(paths.backArmhole)
|
.join(paths.backArmhole)
|
||||||
.line(points.s3CollarSplit)
|
.line(points.s3CollarSplit)
|
||||||
.join(paths.backCollar)
|
.join(paths.backCollar)
|
||||||
.attr('class', 'note stroke-xxl')
|
.setClass('note stroke-xxl')
|
||||||
|
.hide()
|
||||||
paths.hemBase = new Path()
|
paths.hemBase = new Path()
|
||||||
.move(points.cbBottom)
|
.move(points.cbBottom)
|
||||||
.line(points.bottom)
|
.line(points.bottom)
|
||||||
.attr('class', 'note stroke-xxl')
|
.setClass('note stroke-xxl')
|
||||||
paths.gussetBase.render = false
|
.hide()
|
||||||
paths.saBase.render = false
|
|
||||||
paths.hemBase.render = false
|
|
||||||
|
|
||||||
paths.seam = paths.gussetBase
|
paths.seam = paths.gussetBase
|
||||||
.join(paths.saBase)
|
.join(paths.saBase)
|
||||||
|
|
|
@ -55,19 +55,19 @@ function yuriFront({
|
||||||
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
|
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
|
||||||
.join(paths.frontArmhole)
|
.join(paths.frontArmhole)
|
||||||
.line(points.s3CollarSplit)
|
.line(points.s3CollarSplit)
|
||||||
.attr('class', 'note stroke-xxl')
|
.setClass('note stroke-xxl')
|
||||||
|
.hide()
|
||||||
paths.buttonBase = new Path()
|
paths.buttonBase = new Path()
|
||||||
.move(points.s3CollarSplit)
|
.move(points.s3CollarSplit)
|
||||||
.line(points.button)
|
.line(points.button)
|
||||||
.line(points.cfBottom)
|
.line(points.cfBottom)
|
||||||
.attr('class', 'note stroke-xxl')
|
.attr('note stroke-xxl')
|
||||||
|
.hide()
|
||||||
paths.hemBase = new Path()
|
paths.hemBase = new Path()
|
||||||
.move(points.cfBottom)
|
.move(points.cfBottom)
|
||||||
.line(points.bottom)
|
.line(points.bottom)
|
||||||
.attr('class', 'note stroke-xxl')
|
.setClass('note stroke-xxl')
|
||||||
paths.saBase.render = false
|
.hide()
|
||||||
paths.hemBase.render = false
|
|
||||||
paths.buttonBase.render = false
|
|
||||||
|
|
||||||
paths.seam = paths.saBase
|
paths.seam = paths.saBase
|
||||||
.clone()
|
.clone()
|
||||||
|
|
|
@ -12,15 +12,15 @@ function yuriSleeve({ Point, Path, points, paths, complete, sa, paperless, macro
|
||||||
.line(points.bicepsRight)
|
.line(points.bicepsRight)
|
||||||
.join(paths.sleevecap)
|
.join(paths.sleevecap)
|
||||||
.line(points.wristLeft)
|
.line(points.wristLeft)
|
||||||
.attr('class', 'various stroke-xxl')
|
.setClass('various stroke-xxl')
|
||||||
|
.hide()
|
||||||
paths.hemBase = new Path()
|
paths.hemBase = new Path()
|
||||||
.move(points.wristLeft)
|
.move(points.wristLeft)
|
||||||
.line(points.wristRight)
|
.line(points.wristRight)
|
||||||
.attr('class', 'various stroke-xxl')
|
.setClass('various stroke-xxl')
|
||||||
paths.saBase.render = false
|
.hide()
|
||||||
paths.hemBase.render = false
|
|
||||||
|
|
||||||
paths.seam = paths.saBase.join(paths.hemBase).close().attr('class', 'fabric')
|
paths.seam = paths.saBase.join(paths.hemBase).close().setClass('fabric')
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
|
|
|
@ -30,8 +30,7 @@ export function Part() {
|
||||||
utils.__addNonEnumProp(this, 'hooks', new Hooks())
|
utils.__addNonEnumProp(this, 'hooks', new Hooks())
|
||||||
|
|
||||||
// Enumerable properties
|
// Enumerable properties
|
||||||
this.render = true // FIXME: Replace render with hide
|
this.hidden = false
|
||||||
this.hide = false // FIXME: Replace render with hide
|
|
||||||
this.attributes = new Attributes()
|
this.attributes = new Attributes()
|
||||||
this.points = {}
|
this.points = {}
|
||||||
this.paths = {}
|
this.paths = {}
|
||||||
|
@ -72,6 +71,41 @@ Part.prototype.getId = function (prefix = '') {
|
||||||
return prefix + this.freeId
|
return prefix + this.freeId
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hide the part
|
||||||
|
*
|
||||||
|
* @return {Part} part - The Part instance
|
||||||
|
*/
|
||||||
|
Part.prototype.hide = function () {
|
||||||
|
this.hidden = true
|
||||||
|
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reveal the part - alias for part.unhide()
|
||||||
|
*
|
||||||
|
* @return {Part} part - The Part instance
|
||||||
|
*/
|
||||||
|
Part.prototype.reveal = function () {
|
||||||
|
this.unhide()
|
||||||
|
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set the hidden attribute
|
||||||
|
*
|
||||||
|
* @param {boolean} hidden - The value to set the hidden property to
|
||||||
|
* @return {Part} this - The Part instance
|
||||||
|
*/
|
||||||
|
Part.prototype.setHidden = function (hidden = false) {
|
||||||
|
if (hidden) this.hidden = true
|
||||||
|
else this.hidden = false
|
||||||
|
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
/** Returns an object with shorthand access for pattern design */
|
/** Returns an object with shorthand access for pattern design */
|
||||||
/**
|
/**
|
||||||
* Returns an object that will be passed to draft method to be destructured
|
* Returns an object that will be passed to draft method to be destructured
|
||||||
|
@ -83,19 +117,19 @@ Part.prototype.shorthand = function () {
|
||||||
const paperless = this.context.settings?.paperless === true ? true : false
|
const paperless = this.context.settings?.paperless === true ? true : false
|
||||||
const sa = this.context.settings?.complete ? this.context.settings?.sa || 0 : 0
|
const sa = this.context.settings?.complete ? this.context.settings?.sa || 0 : 0
|
||||||
const shorthand = {
|
const shorthand = {
|
||||||
|
complete,
|
||||||
|
hide: this.hide,
|
||||||
|
log: this.context.store.log,
|
||||||
|
macro: this.__macroClosure(),
|
||||||
|
paperless,
|
||||||
part: this,
|
part: this,
|
||||||
|
reveal: this.reveal,
|
||||||
sa,
|
sa,
|
||||||
scale: this.context.settings?.scale,
|
scale: this.context.settings?.scale,
|
||||||
store: this.context.store,
|
store: this.context.store,
|
||||||
macro: this.__macroClosure(),
|
unhide: this.unhide,
|
||||||
units: this.__unitsClosure(),
|
units: this.__unitsClosure(),
|
||||||
utils: utils,
|
utils: utils,
|
||||||
complete,
|
|
||||||
paperless,
|
|
||||||
events: this.context.events,
|
|
||||||
log: this.context.store.log,
|
|
||||||
addCut: this.addCut,
|
|
||||||
removeCut: this.removeCut,
|
|
||||||
}
|
}
|
||||||
// Add top-level store methods and add a part name parameter
|
// Add top-level store methods and add a part name parameter
|
||||||
const partName = this.name
|
const partName = this.name
|
||||||
|
@ -170,6 +204,17 @@ Part.prototype.shorthand = function () {
|
||||||
return shorthand
|
return shorthand
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unhide the part - alias for part.reveal()
|
||||||
|
*
|
||||||
|
* @return {Part} part - The Part instance
|
||||||
|
*/
|
||||||
|
Part.prototype.unhide = function () {
|
||||||
|
this.hidden = false
|
||||||
|
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a value formatted for units set in settings
|
* Returns a value formatted for units set in settings
|
||||||
*
|
*
|
||||||
|
@ -198,7 +243,7 @@ Part.prototype.__boundary = function () {
|
||||||
for (let key in this.paths) {
|
for (let key in this.paths) {
|
||||||
try {
|
try {
|
||||||
let path = this.paths[key].__boundary()
|
let path = this.paths[key].__boundary()
|
||||||
if (path.render) {
|
if (!path.hidden) {
|
||||||
if (path.topLeft.x < topLeft.x) topLeft.x = path.topLeft.x
|
if (path.topLeft.x < topLeft.x) topLeft.x = path.topLeft.x
|
||||||
if (path.topLeft.y < topLeft.y) topLeft.y = path.topLeft.y
|
if (path.topLeft.y < topLeft.y) topLeft.y = path.topLeft.y
|
||||||
if (path.bottomRight.x > bottomRight.x) bottomRight.x = path.bottomRight.x
|
if (path.bottomRight.x > bottomRight.x) bottomRight.x = path.bottomRight.x
|
||||||
|
|
|
@ -24,12 +24,11 @@ import {
|
||||||
*/
|
*/
|
||||||
export function Path() {
|
export function Path() {
|
||||||
// Enumerable properties
|
// Enumerable properties
|
||||||
this.hide = false
|
this.hidden = false
|
||||||
this.ops = []
|
this.ops = []
|
||||||
this.attributes = new Attributes()
|
this.attributes = new Attributes()
|
||||||
this.topLeft = false
|
this.topLeft = false
|
||||||
this.bottomRight = false
|
this.bottomRight = false
|
||||||
this.render = true
|
|
||||||
|
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
@ -158,7 +157,7 @@ Path.prototype.bbox = function () {
|
||||||
* @return {Path} clone - A clone of this Path instance
|
* @return {Path} clone - A clone of this Path instance
|
||||||
*/
|
*/
|
||||||
Path.prototype.clone = function () {
|
Path.prototype.clone = function () {
|
||||||
let clone = new Path().__withLog(this.log).setRender(this.render)
|
let clone = new Path().__withLog(this.log).setHidden(this.hidden)
|
||||||
if (this.topLeft) clone.topLeft = this.topLeft.clone()
|
if (this.topLeft) clone.topLeft = this.topLeft.clone()
|
||||||
else clone.topLeft = false
|
else clone.topLeft = false
|
||||||
if (this.bottomRight) clone.bottomRight = this.bottomRight.clone()
|
if (this.bottomRight) clone.bottomRight = this.bottomRight.clone()
|
||||||
|
@ -313,6 +312,17 @@ Path.prototype.end = function () {
|
||||||
else return op.to
|
else return op.to
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Hide the path
|
||||||
|
*
|
||||||
|
* @return {Path} path - The Path instance
|
||||||
|
*/
|
||||||
|
Path.prototype.hide = function () {
|
||||||
|
this.hidden = true
|
||||||
|
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Replace a noop operation with the ops from path
|
* Replace a noop operation with the ops from path
|
||||||
*
|
*
|
||||||
|
@ -521,6 +531,17 @@ Path.prototype.offset = function (distance) {
|
||||||
return __pathOffset(this, distance, this.log)
|
return __pathOffset(this, distance, this.log)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Reveal the path - alias for path.unhide()
|
||||||
|
*
|
||||||
|
* @return {Path} path - The Path instance
|
||||||
|
*/
|
||||||
|
Path.prototype.reveal = function () {
|
||||||
|
this.unhide()
|
||||||
|
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns a reversed version of this Path
|
* Returns a reversed version of this Path
|
||||||
*
|
*
|
||||||
|
@ -590,10 +611,15 @@ Path.prototype.setClass = function (className = false) {
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
/** FIXME: This should go */
|
/**
|
||||||
Path.prototype.setRender = function (render = true) {
|
* Set the hidden attribute
|
||||||
if (render) this.render = true
|
*
|
||||||
else this.render = false
|
* @param {boolean} hidden - The value to set the hidden property to
|
||||||
|
* @return {object} this - The Path instance
|
||||||
|
*/
|
||||||
|
Path.prototype.setHidden = function (hidden = false) {
|
||||||
|
if (hidden) this.hidden = true
|
||||||
|
else this.hidden = false
|
||||||
|
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
@ -833,6 +859,17 @@ Path.prototype.trim = function () {
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Unhide the path - alias for path.reveal()
|
||||||
|
*
|
||||||
|
* @return {Path} path - The Path instance
|
||||||
|
*/
|
||||||
|
Path.prototype.unhide = function () {
|
||||||
|
this.hidden = false
|
||||||
|
|
||||||
|
return this
|
||||||
|
}
|
||||||
|
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
// PRIVATE METHODS //
|
// PRIVATE METHODS //
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
@ -956,9 +993,6 @@ Path.prototype.__withLog = function (log = false) {
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
// PUBLIC STATIC METHODS //
|
// PUBLIC STATIC METHODS //
|
||||||
//////////////////////////////////////////////
|
//////////////////////////////////////////////
|
||||||
|
@ -1217,8 +1251,9 @@ function shiftAlongBezier(distance, bezier, steps = false) {
|
||||||
.curve(
|
.curve(
|
||||||
new Point(...Object.values(bezier.points[1])),
|
new Point(...Object.values(bezier.points[1])),
|
||||||
new Point(...Object.values(bezier.points[2])),
|
new Point(...Object.values(bezier.points[2])),
|
||||||
new Point(...Object.values(bezier.points[3])),
|
new Point(...Object.values(bezier.points[3]))
|
||||||
).roughLength()
|
)
|
||||||
|
.roughLength()
|
||||||
if (rlen < 2) steps = 20
|
if (rlen < 2) steps = 20
|
||||||
else if (rlen < 10) steps = 40
|
else if (rlen < 10) steps = 40
|
||||||
else if (rlen < 100) steps = 100
|
else if (rlen < 100) steps = 100
|
||||||
|
|
|
@ -128,19 +128,19 @@ Pattern.prototype.draft = function () {
|
||||||
}
|
}
|
||||||
} else this.stores[set].log.error(`Unable to draft pattern. Part.draft() is not callable`)
|
} else this.stores[set].log.error(`Unable to draft pattern. Part.draft() is not callable`)
|
||||||
try {
|
try {
|
||||||
this.parts[set][partName].render =
|
this.parts[set][partName].hidden =
|
||||||
this.parts[set][partName].render === false ? false : this.__wants(partName, set)
|
this.parts[set][partName].hidden === true ? true : !this.__wants(partName, set)
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
this.stores[set].log.error([
|
this.stores[set].log.error([
|
||||||
`Unable to set \`render\` property on part \`${partName}\``,
|
`Unable to set \`hidden\` property on part \`${partName}\``,
|
||||||
err,
|
err,
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.stores[set].log.debug(
|
this.stores[set].log.debug(
|
||||||
`Part \`${partName}\` is not needed. Skipping draft and setting render to \`false\``
|
`Part \`${partName}\` is not needed. Skipping draft and setting hidden to \`true\``
|
||||||
)
|
)
|
||||||
this.parts[set][partName].render = false
|
this.parts[set][partName].hidden = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
this.__runHooks('postDraft')
|
this.__runHooks('postDraft')
|
||||||
|
@ -149,6 +149,15 @@ Pattern.prototype.draft = function () {
|
||||||
return this
|
return this
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Return the initialized configuration
|
||||||
|
*
|
||||||
|
* @return {object} config - The initialized config
|
||||||
|
*/
|
||||||
|
Pattern.prototype.getConfig = function () {
|
||||||
|
return this.init().config
|
||||||
|
}
|
||||||
|
|
||||||
/** Returns props required to render this pattern through
|
/** Returns props required to render this pattern through
|
||||||
* an external renderer (eg. a React component)
|
* an external renderer (eg. a React component)
|
||||||
*
|
*
|
||||||
|
@ -176,7 +185,7 @@ Pattern.prototype.getRenderProps = function () {
|
||||||
}))
|
}))
|
||||||
props.parts = {}
|
props.parts = {}
|
||||||
for (let p in this.parts) {
|
for (let p in this.parts) {
|
||||||
if (this.parts[p].render) {
|
if (!this.parts[p].hidden) {
|
||||||
props.parts[p] = {
|
props.parts[p] = {
|
||||||
paths: this.parts[p].paths,
|
paths: this.parts[p].paths,
|
||||||
points: this.parts[p].points,
|
points: this.parts[p].points,
|
||||||
|
|
|
@ -57,16 +57,16 @@ Svg.prototype.render = function (pattern) {
|
||||||
this.tail = this.__renderTail()
|
this.tail = this.__renderTail()
|
||||||
this.svg = ''
|
this.svg = ''
|
||||||
this.layout = {} // Reset layout
|
this.layout = {} // Reset layout
|
||||||
for (let partId in pattern.parts) {
|
for (let stackId in pattern.stacks) {
|
||||||
let part = pattern.parts[partId]
|
const stack = pattern.stacks[stackId]
|
||||||
if (part.render) {
|
if (!stack.hidden) {
|
||||||
let partSvg = this.__renderPart(part)
|
const stackSvg = this.__renderStack(stack)
|
||||||
this.layout[partId] = {
|
this.layout[stackId] = {
|
||||||
svg: partSvg,
|
svg: stackSvg,
|
||||||
transform: part.attributes.getAsArray('transform'),
|
transform: stack.attributes.getAsArray('transform'),
|
||||||
}
|
}
|
||||||
this.svg += this.__openGroup(`${this.idPrefix}part-${partId}`, part.attributes)
|
this.svg += this.__openGroup(`${this.idPrefix}stack-${stackId}`, stack.attributes)
|
||||||
this.svg += partSvg
|
this.svg += stackSvg
|
||||||
this.svg += this.__closeGroup()
|
this.svg += this.__closeGroup()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -279,11 +279,11 @@ Svg.prototype.__renderPathText = function (path) {
|
||||||
* @param {Part} part - The Part instance to render
|
* @param {Part} part - The Part instance to render
|
||||||
* @return {string} svg - The SVG markup for the Part object
|
* @return {string} svg - The SVG markup for the Part object
|
||||||
*/
|
*/
|
||||||
Svg.prototype.__renderPart = function (part) {
|
Svg.prototype.__renderPart = function (part, partId) {
|
||||||
let svg = ''
|
let svg = this.__openGroup(`${this.idPrefix}part-${partId}`, part.attributes)
|
||||||
for (let key in part.paths) {
|
for (let key in part.paths) {
|
||||||
let path = part.paths[key]
|
let path = part.paths[key]
|
||||||
if (path.render) svg += this.__renderPath(path)
|
if (!path.hidden) svg += this.__renderPath(path)
|
||||||
}
|
}
|
||||||
for (let key in part.points) {
|
for (let key in part.points) {
|
||||||
if (part.points[key].attributes.get('data-text')) {
|
if (part.points[key].attributes.get('data-text')) {
|
||||||
|
@ -297,6 +297,7 @@ Svg.prototype.__renderPart = function (part) {
|
||||||
let snippet = part.snippets[key]
|
let snippet = part.snippets[key]
|
||||||
svg += this.__renderSnippet(snippet, part)
|
svg += this.__renderSnippet(snippet, part)
|
||||||
}
|
}
|
||||||
|
svg += this.__closeGroup()
|
||||||
|
|
||||||
return svg
|
return svg
|
||||||
}
|
}
|
||||||
|
@ -346,6 +347,20 @@ Svg.prototype.__renderSnippet = function (snippet) {
|
||||||
return svg
|
return svg
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns SVG markup for a Stack object
|
||||||
|
*
|
||||||
|
* @private
|
||||||
|
* @param {Stack} stack - The Stack instance to render
|
||||||
|
* @return {string} svg - The SVG markup for the Stack object
|
||||||
|
*/
|
||||||
|
Svg.prototype.__renderStack = function (stack) {
|
||||||
|
let svg = ''
|
||||||
|
for (const part of stack.parts) svg += this.__renderPart(part)
|
||||||
|
|
||||||
|
return svg
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns SVG markup for the style block
|
* Returns SVG markup for the style block
|
||||||
*
|
*
|
||||||
|
|
|
@ -689,9 +689,9 @@ describe('Path', () => {
|
||||||
expect(p1.log()).to.equal('hello')
|
expect(p1.log()).to.equal('hello')
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should set render to true/false', () => {
|
it('Should set hidden to true/false', () => {
|
||||||
const p1 = new Path().setRender(false)
|
const p1 = new Path().setHidden(true)
|
||||||
expect(p1.render).to.equal(false)
|
expect(p1.hidden).to.equal(true)
|
||||||
})
|
})
|
||||||
|
|
||||||
it('Should set class with setClass', () => {
|
it('Should set class with setClass', () => {
|
||||||
|
|
|
@ -32,7 +32,7 @@ export const plugin = {
|
||||||
this.points[prefix + 'Cp2'],
|
this.points[prefix + 'Cp2'],
|
||||||
this.points[prefix + 'p2']
|
this.points[prefix + 'p2']
|
||||||
)
|
)
|
||||||
.setRender(false)
|
.hide()
|
||||||
|
|
||||||
this.points[prefix + 'p2'] = this.paths.auxiliaryPath.intersectsX(0)[0] //the new point p2 is the one in which the auxiliary curve intersects x=0
|
this.points[prefix + 'p2'] = this.paths.auxiliaryPath.intersectsX(0)[0] //the new point p2 is the one in which the auxiliary curve intersects x=0
|
||||||
this.paths.auxiliaryPath = this.paths.auxiliaryPath.split(this.points[prefix + 'p2'])[0] //the auxiliary curve is split
|
this.paths.auxiliaryPath = this.paths.auxiliaryPath.split(this.points[prefix + 'p2'])[0] //the auxiliary curve is split
|
||||||
|
@ -51,8 +51,8 @@ export const plugin = {
|
||||||
.close()
|
.close()
|
||||||
.attr('class', so.class ? so.class : '')
|
.attr('class', so.class ? so.class : '')
|
||||||
|
|
||||||
if (typeof so.render !== 'undefined' && so.render) this.paths[prefix + 'seam'].render = true
|
if (so?.hidden) this.paths[prefix + 'seam'].hide()
|
||||||
else this.paths[prefix + 'seam'].render = false
|
else this.paths[prefix + 'seam'].unhide()
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,9 +31,8 @@ export const plugin = {
|
||||||
this.points[prefix + 'End']
|
this.points[prefix + 'End']
|
||||||
)
|
)
|
||||||
.attr('class', so.class ? so.class : '')
|
.attr('class', so.class ? so.class : '')
|
||||||
if (typeof so.render !== 'undefined' && so.render)
|
if (so?.hidden) this.paths[prefix + 'Rounded'].hide()
|
||||||
this.paths[prefix + 'Rounded'].render = true
|
else this.paths[prefix + 'Rounded'].unhide()
|
||||||
else this.paths[prefix + 'Rounded'].render = false
|
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ export const plugin = {
|
||||||
: (svg.defs += grid.metric)
|
: (svg.defs += grid.metric)
|
||||||
for (const key in svg.pattern.parts) {
|
for (const key in svg.pattern.parts) {
|
||||||
const part = svg.pattern.parts[key]
|
const part = svg.pattern.parts[key]
|
||||||
if (part.render && svg.pattern.needs(key)) {
|
if (!part.hidden && svg.pattern.needs(key)) {
|
||||||
let anchor = new svg.pattern.Point(0, 0)
|
let anchor = new svg.pattern.Point(0, 0)
|
||||||
if (typeof part.points.gridAnchor !== 'undefined') anchor = part.points.gridAnchor
|
if (typeof part.points.gridAnchor !== 'undefined') anchor = part.points.gridAnchor
|
||||||
else if (typeof part.points.anchor !== 'undefined') anchor = part.points.anchor
|
else if (typeof part.points.anchor !== 'undefined') anchor = part.points.anchor
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue