2023-10-19 15:24:06 +00:00
|
|
|
import { backPoints } from './backpoints.mjs'
|
|
|
|
|
|
|
|
export const backInside = {
|
2023-10-22 18:58:54 +00:00
|
|
|
name: 'tristan.backInside',
|
2023-10-19 15:24:06 +00:00
|
|
|
from: backPoints,
|
|
|
|
draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, part }) => {
|
2023-11-01 02:25:39 +00:00
|
|
|
const lacing = true == options.lacing && 'back' == options.lacingLocation
|
|
|
|
|
2023-10-22 18:58:54 +00:00
|
|
|
paths.cut = new Path()
|
|
|
|
.move(points.strapInside)
|
2023-11-01 02:25:39 +00:00
|
|
|
.curve(points.strapInsideCp, points.cbCutCp, lacing ? points.lacingCut : points.cbCut)
|
|
|
|
|
|
|
|
if (lacing) {
|
|
|
|
paths.cut.line(points.lacingWaist)
|
|
|
|
paths.originalSide = new Path()
|
|
|
|
.move(points.lacingCut)
|
|
|
|
.line(points.cbCut)
|
|
|
|
.curve_(points.cbCutCp2, points.waistCenter)
|
|
|
|
.line(points.lacingWaist)
|
|
|
|
.setClass('note dashed')
|
|
|
|
} else {
|
|
|
|
paths.cut.curve_(points.cbCutCp2, points.waistCenter)
|
|
|
|
}
|
2023-10-22 18:58:54 +00:00
|
|
|
|
2023-11-01 02:25:39 +00:00
|
|
|
paths.seam = new Path()
|
2023-10-22 18:58:54 +00:00
|
|
|
.move(points.strapInside)
|
|
|
|
.join(paths.cut)
|
|
|
|
.line(points.dartBottomLeft)
|
|
|
|
.curve(points.dartLeftCp, points.shoulderDartCpDown, points.dartTip)
|
|
|
|
.curve(points.shoulderDartCpUp, points.shoulderDart, points.shoulderDart)
|
2023-11-01 02:25:39 +00:00
|
|
|
.line(points.strapInside)
|
2023-10-22 18:58:54 +00:00
|
|
|
.close()
|
|
|
|
.attr('class', 'fabric')
|
2023-10-19 15:24:06 +00:00
|
|
|
|
2023-11-01 02:25:39 +00:00
|
|
|
points.titleAnchor = points.dartBottomLeft.shiftFractionTowards(
|
|
|
|
lacing ? points.lacingCut : points.cbCut,
|
|
|
|
0.75
|
|
|
|
)
|
|
|
|
macro('title', {
|
|
|
|
at: points.titleAnchor,
|
|
|
|
nr: 3,
|
|
|
|
title: 'backInside',
|
|
|
|
})
|
|
|
|
|
2023-11-07 02:22:52 +00:00
|
|
|
points.grainlineFrom = new Point(points.hps.x / 4, points.cbCut.y)
|
|
|
|
points.grainlineTo = new Point(points.hps.x / 4, points.waistSide.y)
|
|
|
|
macro('grainline', {
|
|
|
|
from: points.grainlineFrom,
|
|
|
|
to: points.grainlineTo,
|
|
|
|
})
|
|
|
|
|
|
|
|
points.scaleboxAnchor = points.titleAnchor.shiftFractionTowards(points.dartBottomLeft, 0.5)
|
|
|
|
macro('scalebox', { at: points.scaleboxAnchor, rotate: 270 })
|
|
|
|
|
2023-11-01 02:25:39 +00:00
|
|
|
if (sa) {
|
|
|
|
paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
|
|
|
}
|
|
|
|
|
2023-11-07 02:22:52 +00:00
|
|
|
macro('hd', {
|
|
|
|
from: points.cbCut,
|
|
|
|
to: points.strapInside,
|
|
|
|
y: points.strapInside.y - sa - 15,
|
|
|
|
id: 'cutWidth',
|
|
|
|
})
|
|
|
|
macro('hd', {
|
|
|
|
from: points.cbCut,
|
|
|
|
to: points.shoulderDart,
|
|
|
|
y: points.strapInside.y - sa - 25,
|
|
|
|
id: 'cutToDart',
|
|
|
|
})
|
|
|
|
macro('hd', {
|
|
|
|
from: lacing ? points.lacingWaist : points.waistCenter,
|
|
|
|
to: points.dartBottomLeft,
|
|
|
|
y: points.waistCenter.y + sa + 15,
|
|
|
|
id: 'waistCenterToSide',
|
|
|
|
})
|
|
|
|
macro('hd', {
|
|
|
|
from: points.cbCut,
|
|
|
|
to: points.dartBottomLeft,
|
|
|
|
y: points.waistCenter.y + sa + 25,
|
|
|
|
id: 'waistCutToSide',
|
|
|
|
})
|
|
|
|
|
|
|
|
macro('vd', {
|
|
|
|
from: lacing ? points.lacingWaist : points.waistCenter,
|
|
|
|
to: points.cbCut,
|
|
|
|
x: points.cbCut.x - sa - 15,
|
|
|
|
id: 'waistToCut',
|
|
|
|
})
|
|
|
|
macro('vd', {
|
|
|
|
from: lacing ? points.lacingWaist : points.waistCenter,
|
|
|
|
to: points.strapInside,
|
|
|
|
x: points.cbCut.x - sa - 25,
|
|
|
|
id: 'waistToStrap',
|
|
|
|
})
|
|
|
|
macro('vd', {
|
|
|
|
from: points.dartBottomLeft,
|
|
|
|
to: points.shoulderDart,
|
|
|
|
x: points.shoulderDart.x + sa + 15,
|
|
|
|
id: 'dartToDart',
|
|
|
|
})
|
|
|
|
macro('vd', {
|
|
|
|
from: points.dartBottomLeft,
|
|
|
|
to: points.strapInside,
|
|
|
|
x: points.shoulderDart.x + sa + 25,
|
|
|
|
id: 'dartToStrap',
|
|
|
|
})
|
|
|
|
|
2023-10-19 15:24:06 +00:00
|
|
|
return part
|
|
|
|
},
|
|
|
|
}
|