Merge pull request #5015 from freesewing/joost
chore(yuri): Prepare for v3 beta
This commit is contained in:
commit
1b3aa10e91
9 changed files with 309 additions and 321 deletions
|
@ -434,6 +434,6 @@
|
||||||
"design": "Biou",
|
"design": "Biou",
|
||||||
"difficulty": 3,
|
"difficulty": 3,
|
||||||
"tags": ["tops"],
|
"tags": ["tops"],
|
||||||
"techniques": []
|
"techniques": ["curvedSeam", "flatSleeve", "hem", "button"]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -9,7 +9,10 @@
|
||||||
"hoodSide": "Hood side",
|
"hoodSide": "Hood side",
|
||||||
"sleeve": "Sleeve"
|
"sleeve": "Sleeve"
|
||||||
},
|
},
|
||||||
"s": {},
|
"s": {
|
||||||
|
"cutHoodCenter.t": "The hood center is not shown",
|
||||||
|
"cutHoodCenter.d": "The **Hood center** is a rectangular piece of fabric {{{ width }}} wide and {{{ length }}} long (this includes seam allowance). The hood center not shown because the **expand** core setting is currently disabled. Enable it to show this pattern part."
|
||||||
|
},
|
||||||
"o": {
|
"o": {
|
||||||
"hipsEase": {
|
"hipsEase": {
|
||||||
"t": "Hips ease",
|
"t": "Hips ease",
|
||||||
|
|
|
@ -2,20 +2,7 @@ import { back as brianBack } from '@freesewing/brian'
|
||||||
import { sharedDimensions } from './shared.mjs'
|
import { sharedDimensions } from './shared.mjs'
|
||||||
import { hidePresets } from '@freesewing/core'
|
import { hidePresets } from '@freesewing/core'
|
||||||
|
|
||||||
function yuriBack({
|
function yuriBack({ store, macro, Path, Point, points, paths, sa, options, measurements, part }) {
|
||||||
store,
|
|
||||||
macro,
|
|
||||||
Path,
|
|
||||||
Point,
|
|
||||||
points,
|
|
||||||
paths,
|
|
||||||
complete,
|
|
||||||
paperless,
|
|
||||||
sa,
|
|
||||||
options,
|
|
||||||
measurements,
|
|
||||||
part,
|
|
||||||
}) {
|
|
||||||
// Clear paths from Brian
|
// Clear paths from Brian
|
||||||
for (const i in paths) {
|
for (const i in paths) {
|
||||||
if (['backArmhole', 'backCollar'].indexOf(i) === -1) delete paths[i]
|
if (['backArmhole', 'backCollar'].indexOf(i) === -1) delete paths[i]
|
||||||
|
@ -69,30 +56,45 @@ function yuriBack({
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
// Complete?
|
if (sa) {
|
||||||
if (complete) {
|
paths.sa = paths.hemBase
|
||||||
macro('cutonfold', {
|
.offset(3 * sa)
|
||||||
from: points.cbNeck,
|
.join(paths.gussetBase.offset(sa))
|
||||||
to: points.cbBottom,
|
.join(paths.saBase.offset(sa))
|
||||||
grainline: true,
|
paths.sa
|
||||||
})
|
.move(paths.sa.end())
|
||||||
macro('scalebox', { at: new Point(points.armholePitch.x / 2, points.cbWaist.y) })
|
.line(points.cbNeck)
|
||||||
if (sa) {
|
.move(paths.sa.start())
|
||||||
paths.sa = paths.hemBase
|
.line(points.cbBottom)
|
||||||
.offset(3 * sa)
|
.attr('class', 'fabric sa')
|
||||||
.join(paths.gussetBase.offset(sa))
|
|
||||||
.join(paths.saBase.offset(sa))
|
|
||||||
paths.sa
|
|
||||||
.move(paths.sa.end())
|
|
||||||
.line(points.cbNeck)
|
|
||||||
.move(paths.sa.start())
|
|
||||||
.line(points.cbBottom)
|
|
||||||
.attr('class', 'fabric sa')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paperless?
|
/*
|
||||||
if (paperless) sharedDimensions(part, 'back')
|
* Annotations
|
||||||
|
*/
|
||||||
|
// Cutlist
|
||||||
|
store.cutlist.setCut({ cut: 1, from: 'fabric', onFold: true })
|
||||||
|
|
||||||
|
// Cut on fold
|
||||||
|
macro('cutonfold', {
|
||||||
|
from: points.cbNeck,
|
||||||
|
to: points.cbBottom,
|
||||||
|
grainline: true,
|
||||||
|
})
|
||||||
|
|
||||||
|
// Scalebox
|
||||||
|
macro('scalebox', { at: new Point(points.armholePitch.x / 2, points.cbWaist.y) })
|
||||||
|
|
||||||
|
// Title
|
||||||
|
macro('rmtitle')
|
||||||
|
macro('title', {
|
||||||
|
at: points.title,
|
||||||
|
nr: 2,
|
||||||
|
title: 'back',
|
||||||
|
})
|
||||||
|
|
||||||
|
// Dimensions
|
||||||
|
sharedDimensions(part, 'back')
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,8 +8,6 @@ function yuriFront({
|
||||||
Path,
|
Path,
|
||||||
points,
|
points,
|
||||||
paths,
|
paths,
|
||||||
complete,
|
|
||||||
paperless,
|
|
||||||
sa,
|
sa,
|
||||||
options,
|
options,
|
||||||
measurements,
|
measurements,
|
||||||
|
@ -77,31 +75,37 @@ function yuriFront({
|
||||||
.close()
|
.close()
|
||||||
.attr('class', 'fabric')
|
.attr('class', 'fabric')
|
||||||
|
|
||||||
// Complete?
|
if (sa) {
|
||||||
if (complete) {
|
paths.sa = paths.hemBase
|
||||||
macro('grainline', {
|
.offset(3 * sa)
|
||||||
from: points.s3CollarSplit,
|
.join(paths.saBase.offset(sa))
|
||||||
to: new Point(points.s3CollarSplit.x, points.bottom.y),
|
.join(paths.buttonBase.offset(3 * sa))
|
||||||
})
|
paths.sa = paths.sa.line(paths.sa.start()).close().attr('class', 'fabric sa')
|
||||||
snippets.buttonhole = new Snippet('buttonhole-start', points.button.shift(0, 25))
|
|
||||||
.attr('data-rotate', '90')
|
|
||||||
.attr('data-scale', '2.5')
|
|
||||||
snippets.button = new Snippet(
|
|
||||||
'button',
|
|
||||||
paths.buttonBase.shiftFractionAlong(0.146).shift(0, 30)
|
|
||||||
).attr('data-scale', '3.3')
|
|
||||||
|
|
||||||
if (sa) {
|
|
||||||
paths.sa = paths.hemBase
|
|
||||||
.offset(3 * sa)
|
|
||||||
.join(paths.saBase.offset(sa))
|
|
||||||
.join(paths.buttonBase.offset(3 * sa))
|
|
||||||
paths.sa = paths.sa.line(paths.sa.start()).close().attr('class', 'fabric sa')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paperless?
|
/*
|
||||||
if (paperless) sharedDimensions(part, 'front')
|
* Annotations
|
||||||
|
*/
|
||||||
|
// Cutlist
|
||||||
|
store.cutlist.setCut({ cut: 2, from: 'fabric' })
|
||||||
|
|
||||||
|
// Grainline
|
||||||
|
macro('grainline', {
|
||||||
|
from: points.s3CollarSplit,
|
||||||
|
to: new Point(points.s3CollarSplit.x, points.bottom.y),
|
||||||
|
})
|
||||||
|
|
||||||
|
// Button(hole)
|
||||||
|
snippets.buttonhole = new Snippet('buttonhole-start', points.button.shift(0, 25))
|
||||||
|
.attr('data-rotate', '90')
|
||||||
|
.attr('data-scale', '2.5')
|
||||||
|
snippets.button = new Snippet(
|
||||||
|
'button',
|
||||||
|
paths.buttonBase.shiftFractionAlong(0.146).shift(0, 30)
|
||||||
|
).attr('data-scale', '3.3')
|
||||||
|
|
||||||
|
// Dimensions
|
||||||
|
sharedDimensions(part, 'front')
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,19 +1,6 @@
|
||||||
import { back } from './back.mjs'
|
import { back } from './back.mjs'
|
||||||
|
|
||||||
function yuriGusset({
|
function yuriGusset({ Point, Path, points, paths, Snippet, snippets, sa, macro, store, part }) {
|
||||||
Point,
|
|
||||||
Path,
|
|
||||||
points,
|
|
||||||
paths,
|
|
||||||
Snippet,
|
|
||||||
snippets,
|
|
||||||
complete,
|
|
||||||
sa,
|
|
||||||
paperless,
|
|
||||||
macro,
|
|
||||||
store,
|
|
||||||
part,
|
|
||||||
}) {
|
|
||||||
const w = store.get('gussetLength')
|
const w = store.get('gussetLength')
|
||||||
points.top = new Point(0, 0)
|
points.top = new Point(0, 0)
|
||||||
points.bottom = new Point(0, w)
|
points.bottom = new Point(0, w)
|
||||||
|
@ -35,55 +22,65 @@ function yuriGusset({
|
||||||
|
|
||||||
paths.seam = paths.hat.join(paths.curve).close()
|
paths.seam = paths.hat.join(paths.curve).close()
|
||||||
|
|
||||||
// Complete?
|
if (sa) {
|
||||||
if (complete) {
|
paths.saBase = new Path().move(points.right).line(points.top).hide()
|
||||||
macro('cutonfold', {
|
paths.sa = paths.curve
|
||||||
from: new Point(points.top.x, points.top.y + 50),
|
.offset(3 * sa)
|
||||||
to: points.bottom,
|
.join(paths.saBase.offset(sa))
|
||||||
grainline: true,
|
.line(points.top)
|
||||||
})
|
.close()
|
||||||
macro('title', {
|
.attr('class', 'fabric sa')
|
||||||
at: points.title,
|
|
||||||
nr: 4,
|
|
||||||
title: 'gusset',
|
|
||||||
})
|
|
||||||
points.logo = points.title.shift(-75, 100)
|
|
||||||
snippets.logo = new Snippet('logo', points.logo)
|
|
||||||
if (sa) {
|
|
||||||
paths.saBase = new Path().move(points.right).line(points.top).hide()
|
|
||||||
paths.sa = paths.curve
|
|
||||||
.offset(3 * sa)
|
|
||||||
.join(paths.saBase.offset(sa))
|
|
||||||
.line(points.top)
|
|
||||||
.close()
|
|
||||||
.attr('class', 'fabric sa')
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Paperless?
|
/*
|
||||||
if (paperless) {
|
* Annotations
|
||||||
macro('vd', {
|
*/
|
||||||
from: points.top,
|
// Cutlist
|
||||||
to: points.bottom,
|
store.cutlist.setCut({ cut: 2, from: 'fabric', onFold: true })
|
||||||
x: points.top.x - sa - 15,
|
|
||||||
})
|
|
||||||
macro('vd', {
|
|
||||||
from: new Point(0, points.right.y),
|
|
||||||
to: points.bottom,
|
|
||||||
x: 20,
|
|
||||||
})
|
|
||||||
|
|
||||||
macro('ld', {
|
// Cut on fold
|
||||||
from: points.top,
|
macro('cutonfold', {
|
||||||
to: points.right,
|
from: new Point(points.top.x, points.top.y + 50),
|
||||||
d: sa + 15,
|
to: points.bottom,
|
||||||
})
|
grainline: true,
|
||||||
macro('hd', {
|
})
|
||||||
from: new Point(0, points.right),
|
|
||||||
to: points.right,
|
// Title
|
||||||
y: points.right.y,
|
macro('title', {
|
||||||
})
|
at: points.title,
|
||||||
}
|
nr: 4,
|
||||||
|
title: 'gusset',
|
||||||
|
})
|
||||||
|
|
||||||
|
// Logo
|
||||||
|
points.logo = points.title.shift(-75, 100)
|
||||||
|
snippets.logo = new Snippet('logo', points.logo)
|
||||||
|
|
||||||
|
// Dimensions
|
||||||
|
macro('vd', {
|
||||||
|
id: 'hFull',
|
||||||
|
from: points.top,
|
||||||
|
to: points.bottom,
|
||||||
|
x: points.top.x - sa - 15,
|
||||||
|
})
|
||||||
|
macro('vd', {
|
||||||
|
id: 'hBottomToTipRight',
|
||||||
|
from: new Point(0, points.right.y),
|
||||||
|
to: points.bottom,
|
||||||
|
x: 20,
|
||||||
|
})
|
||||||
|
macro('ld', {
|
||||||
|
id: 'lSide',
|
||||||
|
from: points.top,
|
||||||
|
to: points.right,
|
||||||
|
d: sa + 15,
|
||||||
|
})
|
||||||
|
macro('hd', {
|
||||||
|
id: 'wFull',
|
||||||
|
from: new Point(0, points.right),
|
||||||
|
to: points.right,
|
||||||
|
y: points.right.y,
|
||||||
|
})
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,92 +1,79 @@
|
||||||
import { hoodSide } from './hoodside.mjs'
|
import { hoodSide } from './hoodside.mjs'
|
||||||
|
|
||||||
function yuriHoodCenter({
|
function yuriHoodCenter({ store, sa, Point, points, Path, paths, expand, macro, units, part }) {
|
||||||
store,
|
|
||||||
sa,
|
|
||||||
Point,
|
|
||||||
points,
|
|
||||||
Path,
|
|
||||||
paths,
|
|
||||||
complete,
|
|
||||||
paperless,
|
|
||||||
macro,
|
|
||||||
units,
|
|
||||||
part,
|
|
||||||
}) {
|
|
||||||
const width = store.get('hoodCenterWidth')
|
const width = store.get('hoodCenterWidth')
|
||||||
const length = complete ? width * 2.5 : store.get('hoodCenterLength')
|
const length = store.get('hoodCenterLength')
|
||||||
|
|
||||||
|
if (expand) {
|
||||||
|
store.flag.preset('expandIsOn')
|
||||||
|
} else {
|
||||||
|
// Expand is off, do not draw the part but flag this to the user
|
||||||
|
store.flag.note({
|
||||||
|
msg: `yuri:cutHoodCenter`,
|
||||||
|
replace: {
|
||||||
|
width: units(width + 2 * sa),
|
||||||
|
length: units(length + 2 * sa),
|
||||||
|
},
|
||||||
|
suggest: {
|
||||||
|
text: 'flag:show',
|
||||||
|
icon: 'expand',
|
||||||
|
update: {
|
||||||
|
settings: ['expand', 1],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
// Also hint about expand
|
||||||
|
store.flag.preset('expandIsOff')
|
||||||
|
|
||||||
|
return part.hide()
|
||||||
|
}
|
||||||
|
|
||||||
points.topLeft = new Point(0, 0)
|
points.topLeft = new Point(0, 0)
|
||||||
points.bottomLeft = new Point(0, width)
|
points.bottomLeft = new Point(0, width)
|
||||||
points.topMidLeft = new Point(width, 0)
|
|
||||||
points.bottomMidLeft = new Point(width, width)
|
|
||||||
points.topMidRight = new Point(width * 1.5, 0)
|
|
||||||
points.bottomMidRight = new Point(width * 1.5, width)
|
|
||||||
points.topRight = new Point(length, 0)
|
points.topRight = new Point(length, 0)
|
||||||
points.bottomRight = new Point(length, width)
|
points.bottomRight = new Point(length, width)
|
||||||
|
|
||||||
if (complete) {
|
paths.seam = new Path()
|
||||||
paths.seam = new Path()
|
.move(points.topLeft)
|
||||||
.move(points.topMidLeft)
|
.line(points.bottomLeft)
|
||||||
.line(points.topLeft)
|
.line(points.bottomRight)
|
||||||
.line(points.bottomLeft)
|
.line(points.topRight)
|
||||||
.line(points.bottomMidLeft)
|
.line(points.topLeft)
|
||||||
.move(points.bottomMidRight)
|
.close()
|
||||||
.line(points.bottomRight)
|
.attr('class', 'fabric')
|
||||||
.line(points.topRight)
|
|
||||||
.line(points.topMidRight)
|
|
||||||
.attr('class', 'fabric')
|
|
||||||
paths.hint = new Path()
|
|
||||||
.move(points.topMidLeft)
|
|
||||||
.line(points.topMidRight)
|
|
||||||
.move(points.bottomMidLeft)
|
|
||||||
.line(points.bottomMidRight)
|
|
||||||
.attr('class', 'fabric dashed')
|
|
||||||
} else {
|
|
||||||
paths.seam = new Path()
|
|
||||||
.move(points.topLeft)
|
|
||||||
.line(points.bottomLeft)
|
|
||||||
.line(points.bottomRight)
|
|
||||||
.line(points.topRight)
|
|
||||||
.close()
|
|
||||||
.attr('class', 'fabric')
|
|
||||||
}
|
|
||||||
|
|
||||||
// Complete pattern?
|
if (sa) paths.sa = paths.seam.offset(sa).addClass('fabric sa')
|
||||||
if (complete) {
|
|
||||||
if (sa)
|
/*
|
||||||
paths.sa = new Path()
|
* Annotations
|
||||||
.move(points.topLeft.shift(180, sa))
|
*/
|
||||||
.line(points.bottomLeft.shift(180, sa))
|
// Cutlist
|
||||||
.line(points.bottomLeft.shift(-90, sa))
|
store.cutlist.setCut({ cut: 2, from: 'fabric' })
|
||||||
.line(points.bottomRight.shift(-90, sa))
|
|
||||||
.line(points.bottomRight.shift(0, sa))
|
// Title
|
||||||
.line(points.topRight.shift(0, sa))
|
points.title = points.bottomLeft.shiftFractionTowards(points.topRight, 0.5)
|
||||||
.line(points.topRight.shift(90, sa))
|
macro('title', { at: points.title, nr: 6, title: 'hoodCenter' })
|
||||||
.line(points.topLeft.shift(90, sa))
|
|
||||||
.close()
|
// Grainline
|
||||||
.attr('class', 'fabric sa')
|
macro('grainline', {
|
||||||
points.title = points.bottomLeft.shiftFractionTowards(points.topRight, 0.5)
|
from: points.topLeft.shift(-90, width / 2),
|
||||||
macro('title', { at: points.title, nr: 6, title: 'hoodCenter' })
|
to: points.topRight.shift(-90, width / 2),
|
||||||
macro('grainline', {
|
})
|
||||||
from: points.topLeft.shift(-90, width / 2),
|
|
||||||
to: points.topRight.shift(-90, width / 2),
|
// Dimensions
|
||||||
})
|
macro('hd', {
|
||||||
// Always include this dimension as we don't print the entire part
|
id: 'wFull',
|
||||||
macro('hd', {
|
from: points.bottomLeft,
|
||||||
from: points.bottomLeft,
|
to: points.bottomRight,
|
||||||
to: points.bottomRight,
|
y: points.bottomRight.y + sa + 15,
|
||||||
y: points.bottomRight.y + sa + 15,
|
text: units(store.get('hoodCenterLength')),
|
||||||
text: units(store.get('hoodCenterLength')),
|
})
|
||||||
})
|
macro('vd', {
|
||||||
// Paperless?
|
id: 'hFull',
|
||||||
if (paperless) {
|
from: points.bottomRight,
|
||||||
macro('vd', {
|
to: points.topRight,
|
||||||
from: points.bottomRight,
|
x: points.topRight.x + sa + 15,
|
||||||
to: points.topRight,
|
})
|
||||||
x: points.topRight.x + sa + 15,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
|
@ -11,8 +11,6 @@ function yuriHoodSide({
|
||||||
Snippet,
|
Snippet,
|
||||||
snippets,
|
snippets,
|
||||||
measurements,
|
measurements,
|
||||||
complete,
|
|
||||||
paperless,
|
|
||||||
macro,
|
macro,
|
||||||
part,
|
part,
|
||||||
}) {
|
}) {
|
||||||
|
@ -73,79 +71,91 @@ function yuriHoodSide({
|
||||||
.length()
|
.length()
|
||||||
)
|
)
|
||||||
|
|
||||||
// Complete pattern?
|
if (sa)
|
||||||
if (complete) {
|
paths.sa = paths.seam
|
||||||
if (sa) {
|
.reverse() // Reversing this curve sidesteps a bezierjs edge case
|
||||||
// Reversing this curve sidesteps a bezierjs edge case
|
.offset(sa * -1)
|
||||||
paths.sa = paths.seam
|
.addClass('fabric sa')
|
||||||
.reverse()
|
|
||||||
.offset(sa * -1)
|
|
||||||
.attr('class', 'fabric sa')
|
|
||||||
}
|
|
||||||
points.title = points.hoodTop.shift(-90, 50)
|
|
||||||
macro('title', { at: points.title, nr: 5, title: 'hoodSide' })
|
|
||||||
points.logo = points.title.shift(-90, 60)
|
|
||||||
snippets.logo = new Snippet('logo', points.logo)
|
|
||||||
macro('grainline', {
|
|
||||||
from: points.shoulderNotch,
|
|
||||||
to: points.hoodTop,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
// Paperless?
|
/*
|
||||||
if (paperless) {
|
* Annotations
|
||||||
const neckSeam = new Path()
|
*/
|
||||||
.move(points.neckEdge)
|
// Cutlist
|
||||||
.curve(points.neckEdgeCp2, points.frontEdgeCp1, points.frontEdge)
|
store.cutlist.setCut({ cut: 4, from: 'fabric' })
|
||||||
.split(points.shoulderNotch)
|
|
||||||
const centralSeam = new Path()
|
|
||||||
.move(points.hoodRim)
|
|
||||||
.curve(points.hoodRim, points.hoodTopCp1, points.hoodTop)
|
|
||||||
.curve(points.hoodTopCp2, points.neckEdge, points.neckEdge)
|
|
||||||
.reverse()
|
|
||||||
const openingSeam = new Path()
|
|
||||||
.move(points.neckRoll)
|
|
||||||
.curve(points.neckRollCp2, points.hoodRimCp, points.hoodRim)
|
|
||||||
|
|
||||||
macro('pd', {
|
// TItle
|
||||||
path: neckSeam[0],
|
points.title = points.hoodTop.shift(-90, 50)
|
||||||
d: sa + 15,
|
macro('title', { at: points.title, nr: 5, title: 'hoodSide' })
|
||||||
})
|
|
||||||
macro('pd', {
|
// Logo
|
||||||
path: neckSeam[1],
|
points.logo = points.title.shift(-90, 60)
|
||||||
d: sa + 15,
|
snippets.logo = new Snippet('logo', points.logo)
|
||||||
})
|
|
||||||
macro('pd', {
|
// Grainline
|
||||||
path: centralSeam,
|
macro('grainline', {
|
||||||
d: sa * -1 - 15,
|
from: points.shoulderNotch,
|
||||||
})
|
to: points.hoodTop,
|
||||||
macro('hd', {
|
})
|
||||||
from: points.neckEdge,
|
|
||||||
to: points.frontEdge,
|
// Dimensions
|
||||||
y: points.frontEdge.y + sa + 30,
|
const neckSeam = new Path()
|
||||||
})
|
.move(points.neckEdge)
|
||||||
macro('hd', {
|
.curve(points.neckEdgeCp2, points.frontEdgeCp1, points.frontEdge)
|
||||||
from: centralSeam.edge('left'),
|
.split(points.shoulderNotch)
|
||||||
to: points.frontEdge,
|
const centralSeam = new Path()
|
||||||
y: points.frontEdge.y + sa + 45,
|
.move(points.hoodRim)
|
||||||
})
|
.curve(points.hoodRim, points.hoodTopCp1, points.hoodTop)
|
||||||
const openingEdge = openingSeam.edge('left')
|
.curve(points.hoodTopCp2, points.neckEdge, points.neckEdge)
|
||||||
macro('hd', {
|
.reverse()
|
||||||
from: openingEdge,
|
const openingSeam = new Path()
|
||||||
to: points.frontEdge,
|
.move(points.neckRoll)
|
||||||
y: openingEdge.y,
|
.curve(points.neckRollCp2, points.hoodRimCp, points.hoodRim)
|
||||||
})
|
macro('pd', {
|
||||||
macro('vd', {
|
id: 'lNeckBackToNotch',
|
||||||
from: points.frontEdge,
|
path: neckSeam[0],
|
||||||
to: points.hoodRim,
|
d: sa + 15,
|
||||||
x: points.hoodRim.x + sa + 15,
|
})
|
||||||
})
|
macro('pd', {
|
||||||
macro('vd', {
|
id: 'lNotchToNeckFront',
|
||||||
from: points.frontEdge,
|
path: neckSeam[1],
|
||||||
to: points.hoodTop,
|
d: sa + 15,
|
||||||
x: points.hoodRim.x + sa + 30,
|
})
|
||||||
})
|
macro('pd', {
|
||||||
}
|
id: 'lCentralSeam',
|
||||||
|
path: centralSeam,
|
||||||
|
d: sa * -1 - 15,
|
||||||
|
})
|
||||||
|
macro('hd', {
|
||||||
|
id: 'wAtNeck',
|
||||||
|
from: points.neckEdge,
|
||||||
|
to: points.frontEdge,
|
||||||
|
y: points.frontEdge.y + sa + 30,
|
||||||
|
})
|
||||||
|
macro('hd', {
|
||||||
|
id: 'wFull',
|
||||||
|
from: centralSeam.edge('left'),
|
||||||
|
to: points.frontEdge,
|
||||||
|
y: points.frontEdge.y + sa + 45,
|
||||||
|
})
|
||||||
|
const openingEdge = openingSeam.edge('left')
|
||||||
|
macro('hd', {
|
||||||
|
id: 'wOpeningDepth',
|
||||||
|
from: openingEdge,
|
||||||
|
to: points.frontEdge,
|
||||||
|
y: openingEdge.y,
|
||||||
|
})
|
||||||
|
macro('vd', {
|
||||||
|
id: 'hToOpeningTop',
|
||||||
|
from: points.frontEdge,
|
||||||
|
to: points.hoodRim,
|
||||||
|
x: points.hoodRim.x + sa + 15,
|
||||||
|
})
|
||||||
|
macro('vd', {
|
||||||
|
id: 'hFull',
|
||||||
|
from: points.frontEdge,
|
||||||
|
to: points.hoodTop,
|
||||||
|
x: points.hoodRim.x + sa + 30,
|
||||||
|
})
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export const sharedDimensions = function (part, s) {
|
export const sharedDimensions = function (part, s) {
|
||||||
let { macro, Point, points, sa } = part.shorthand()
|
const { macro, Point, points, sa } = part.shorthand()
|
||||||
|
|
||||||
if (s === 'front') {
|
if (s === 'front') {
|
||||||
points.cHem = points.cfBottom
|
points.cHem = points.cfBottom
|
||||||
|
@ -10,17 +10,20 @@ export const sharedDimensions = function (part, s) {
|
||||||
}
|
}
|
||||||
|
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
|
id: 'wAtHem',
|
||||||
from: points.cHem,
|
from: points.cHem,
|
||||||
to: points.bottom,
|
to: points.bottom,
|
||||||
y: points.cHem.y + 3 * sa + 15,
|
y: points.cHem.y + 3 * sa + 15,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
|
id: 'wHemToArmhole',
|
||||||
from: points.armhole,
|
from: points.armhole,
|
||||||
to: points.bottom,
|
to: points.bottom,
|
||||||
y: points.bottom.y + 10,
|
y: points.bottom.y + 10,
|
||||||
})
|
})
|
||||||
if (s === 'front') {
|
if (s === 'front') {
|
||||||
macro('ld', {
|
macro('ld', {
|
||||||
|
id: 'wCollarToArmholePitch',
|
||||||
from: new Point(points.s3CollarSplit.x, points.armholePitch.y),
|
from: new Point(points.s3CollarSplit.x, points.armholePitch.y),
|
||||||
to: points.armholePitch,
|
to: points.armholePitch,
|
||||||
})
|
})
|
||||||
|
@ -32,16 +35,19 @@ export const sharedDimensions = function (part, s) {
|
||||||
}
|
}
|
||||||
if (s === 'back') {
|
if (s === 'back') {
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
|
id: 'wCbNeckToHps',
|
||||||
from: points.cNeck,
|
from: points.cNeck,
|
||||||
to: points.neck,
|
to: points.neck,
|
||||||
y: points.neck.y - sa - 15,
|
y: points.neck.y - sa - 15,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
|
id: 'wCbNeckToShoulder',
|
||||||
from: points.cNeck,
|
from: points.cNeck,
|
||||||
to: points.shoulder,
|
to: points.shoulder,
|
||||||
y: points.neck.y - sa - 30,
|
y: points.neck.y - sa - 30,
|
||||||
})
|
})
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
|
id: 'wFull',
|
||||||
from: points.cNeck,
|
from: points.cNeck,
|
||||||
to: points.armhole,
|
to: points.armhole,
|
||||||
y: points.neck.y - sa - 45,
|
y: points.neck.y - sa - 45,
|
||||||
|
@ -49,68 +55,81 @@ export const sharedDimensions = function (part, s) {
|
||||||
}
|
}
|
||||||
if (s === 'front') {
|
if (s === 'front') {
|
||||||
macro('hd', {
|
macro('hd', {
|
||||||
|
id: 'wEdgeToCollar',
|
||||||
from: points.button,
|
from: points.button,
|
||||||
to: points.s3CollarSplit,
|
to: points.s3CollarSplit,
|
||||||
y: points.s3CollarSplit.y,
|
y: points.s3CollarSplit.y,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
id: 'hEdgeToCollar',
|
||||||
from: points.button,
|
from: points.button,
|
||||||
to: points.s3CollarSplit,
|
to: points.s3CollarSplit,
|
||||||
x: points.button.x,
|
x: points.button.x,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
id: 'hShoulderToCollar',
|
||||||
from: points.s3CollarSplit,
|
from: points.s3CollarSplit,
|
||||||
to: points.s3ArmholeSplit,
|
to: points.s3ArmholeSplit,
|
||||||
x: points.s3ArmholeSplit.x,
|
x: points.s3ArmholeSplit.x,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
macro('ld', {
|
macro('ld', {
|
||||||
|
id: 'lShoulderSeam',
|
||||||
from: points.neck,
|
from: points.neck,
|
||||||
to: points.shoulder,
|
to: points.shoulder,
|
||||||
d: -15,
|
d: -15,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
id: 'hHem',
|
||||||
from: points.cHem,
|
from: points.cHem,
|
||||||
to: points.bottom,
|
to: points.bottom,
|
||||||
x: points.bottom.x + 10,
|
x: points.bottom.x + 10,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
id: 'hHemToArmhole',
|
||||||
from: points.bottom,
|
from: points.bottom,
|
||||||
to: points.armhole,
|
to: points.armhole,
|
||||||
x: points.armhole.x + sa + 15,
|
x: points.armhole.x + sa + 15,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
id: 'hArmholeToArmholePitch',
|
||||||
from: points.armhole,
|
from: points.armhole,
|
||||||
to: points.armholePitch,
|
to: points.armholePitch,
|
||||||
x: points.armhole.x + sa + 15,
|
x: points.armhole.x + sa + 15,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
id: 'hArmholePitchToShoulder',
|
||||||
from: points.armholePitch,
|
from: points.armholePitch,
|
||||||
to: points.shoulder,
|
to: points.shoulder,
|
||||||
x: points.armhole.x + sa + 15,
|
x: points.armhole.x + sa + 15,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
from: points.armhole,
|
from: points.armhole,
|
||||||
|
id: 'hArmholeToShoulder',
|
||||||
to: points.shoulder,
|
to: points.shoulder,
|
||||||
x: points.armhole.x + sa + 30,
|
x: points.armhole.x + sa + 30,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
id: 'hArmholeToHps',
|
||||||
from: points.armhole,
|
from: points.armhole,
|
||||||
to: points.neck,
|
to: points.neck,
|
||||||
x: points.armhole.x + sa + 45,
|
x: points.armhole.x + sa + 45,
|
||||||
})
|
})
|
||||||
if (s === 'back') {
|
if (s === 'back') {
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
id: 'hCbNeckToHps',
|
||||||
from: points.cNeck,
|
from: points.cNeck,
|
||||||
to: points.neck,
|
to: points.neck,
|
||||||
x: points.cNeck.x - 15,
|
x: points.cNeck.x - 15,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
id: 'hHemToCbHeck',
|
||||||
from: points.cHem,
|
from: points.cHem,
|
||||||
to: points.cNeck,
|
to: points.cNeck,
|
||||||
x: points.cNeck.x - 15,
|
x: points.cNeck.x - 15,
|
||||||
})
|
})
|
||||||
macro('vd', {
|
macro('vd', {
|
||||||
|
id: 'hFull',
|
||||||
from: points.cHem,
|
from: points.cHem,
|
||||||
to: points.neck,
|
to: points.neck,
|
||||||
x: points.cNeck.x - 30,
|
x: points.cNeck.x - 30,
|
||||||
|
|
|
@ -1,11 +1,9 @@
|
||||||
import { sleeve as brianSleeve } from '@freesewing/brian'
|
import { sleeve as brianSleeve } from '@freesewing/brian'
|
||||||
import { hidePresets } from '@freesewing/core'
|
import { hidePresets } from '@freesewing/core'
|
||||||
|
|
||||||
function yuriSleeve({ Point, Path, points, paths, complete, sa, paperless, macro, part }) {
|
function yuriSleeve({ Path, points, paths, sa, part }) {
|
||||||
// Clear paths from Brian, but keep sleevecap
|
// This sleeve is identical to Brian, but has more hem allowance
|
||||||
for (let p of Object.keys(paths)) {
|
// Which is kinda hard to patch in so we re-create the paths
|
||||||
if (p !== 'sleevecap') delete paths[p]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Paths
|
// Paths
|
||||||
paths.saBase = new Path()
|
paths.saBase = new Path()
|
||||||
|
@ -23,45 +21,13 @@ function yuriSleeve({ Point, Path, points, paths, complete, sa, paperless, macro
|
||||||
|
|
||||||
paths.seam = paths.saBase.join(paths.hemBase).close().setClass('fabric')
|
paths.seam = paths.saBase.join(paths.hemBase).close().setClass('fabric')
|
||||||
|
|
||||||
// Complete?
|
if (sa) {
|
||||||
if (complete) {
|
paths.sa = paths.saBase
|
||||||
macro('grainline', {
|
.clone()
|
||||||
from: new Point(0, points.wristLeft.y),
|
.offset(sa)
|
||||||
to: new Point(0, points.backPitch.y),
|
.join(paths.hemBase.offset(3 * sa))
|
||||||
})
|
.close()
|
||||||
if (sa) {
|
paths.sa.attr('class', 'fabric sa')
|
||||||
paths.sa = paths.saBase
|
|
||||||
.clone()
|
|
||||||
.offset(sa)
|
|
||||||
.join(paths.hemBase.offset(3 * sa))
|
|
||||||
.close()
|
|
||||||
paths.sa.attr('class', 'fabric sa')
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Paperless?
|
|
||||||
if (paperless) {
|
|
||||||
const hemSa = 3 * sa
|
|
||||||
macro('hd', {
|
|
||||||
from: points.wristLeft,
|
|
||||||
to: points.wristRight,
|
|
||||||
y: points.wristLeft.y + hemSa + 15,
|
|
||||||
})
|
|
||||||
macro('hd', {
|
|
||||||
from: points.bicepsLeft,
|
|
||||||
to: points.bicepsRight,
|
|
||||||
y: points.sleeveTip.y - sa - 15,
|
|
||||||
})
|
|
||||||
macro('vd', {
|
|
||||||
from: points.wristLeft,
|
|
||||||
to: points.bicepsLeft,
|
|
||||||
x: points.bicepsLeft.x - sa - 15,
|
|
||||||
})
|
|
||||||
macro('vd', {
|
|
||||||
from: points.wristLeft,
|
|
||||||
to: points.sleeveTip,
|
|
||||||
x: points.bicepsLeft.x - sa - 30,
|
|
||||||
})
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return part
|
return part
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue