2022-09-03 14:05:00 +02:00
|
|
|
import { sleeve as brianSleeve } from '@freesewing/brian'
|
|
|
|
|
|
|
|
function draft (part) {
|
2021-09-09 20:25:59 +02:00
|
|
|
let { Point, Path, points, paths, complete, sa, paperless, macro } = part.shorthand()
|
2021-07-25 19:56:42 +02:00
|
|
|
|
|
|
|
// Clear paths from Brian, but keep sleevecap
|
|
|
|
for (let p of Object.keys(paths)) {
|
|
|
|
if (p !== 'sleevecap') delete paths[p]
|
|
|
|
}
|
|
|
|
|
|
|
|
// Paths
|
|
|
|
paths.saBase = new Path()
|
|
|
|
.move(points.wristRight)
|
|
|
|
.line(points.bicepsRight)
|
|
|
|
.join(paths.sleevecap)
|
|
|
|
.line(points.wristLeft)
|
|
|
|
.attr('class', 'various stroke-xxl')
|
|
|
|
paths.hemBase = new Path()
|
|
|
|
.move(points.wristLeft)
|
|
|
|
.line(points.wristRight)
|
|
|
|
.attr('class', 'various stroke-xxl')
|
|
|
|
paths.saBase.render = false
|
|
|
|
paths.hemBase.render = false
|
|
|
|
|
|
|
|
paths.seam = paths.saBase.join(paths.hemBase).close().attr('class', 'fabric')
|
|
|
|
|
|
|
|
// Complete?
|
|
|
|
if (complete) {
|
|
|
|
macro('grainline', {
|
|
|
|
from: new Point(0, points.wristLeft.y),
|
|
|
|
to: new Point(0, points.backPitch.y),
|
|
|
|
})
|
|
|
|
if (sa) {
|
2021-07-26 21:14:47 +02:00
|
|
|
paths.sa = paths.saBase
|
|
|
|
.clone()
|
|
|
|
.offset(sa)
|
|
|
|
.join(paths.hemBase.offset(3 * sa))
|
|
|
|
.close()
|
2021-07-25 19:56:42 +02:00
|
|
|
paths.sa.attr('class', 'fabric sa')
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// Paperless?
|
|
|
|
if (paperless) {
|
2021-07-26 21:14:47 +02:00
|
|
|
const hemSa = 3 * sa
|
2021-07-25 19:56:42 +02:00
|
|
|
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
|
|
|
|
}
|
2022-09-03 14:05:00 +02:00
|
|
|
|
|
|
|
export const sleeve = {
|
|
|
|
name: 'yuri.sleeve',
|
|
|
|
from: brianSleeve,
|
|
|
|
hideDependencies: true,
|
|
|
|
draft
|
|
|
|
}
|
|
|
|
|