1
0
Fork 0
freesewing/packages/penelope/src/front.js

76 lines
1.4 KiB
JavaScript
Raw Normal View History

import { BuildMainShape } from './shape'
2019-08-21 11:11:05 -07:00
export default function(part) {
let {
options,
/*measurements,*/
/*Point,*/
2019-08-21 11:11:05 -07:00
Path,
points,
paths,
Snippet,
snippets,
/*store,*/
2019-08-21 11:11:05 -07:00
complete,
sa,
paperless,
macro
} = part.shorthand()
2019-08-21 11:11:05 -07:00
BuildMainShape(part, true)
2019-08-21 11:11:05 -07:00
paths.seam = paths.leftSide
.clone()
.join(paths.bottom)
.join(paths.sideSeam)
.join(paths.waist)
.attr('class', 'fabric')
2019-08-21 11:11:05 -07:00
// Complete?
if (complete) {
macro('cutonfold', {
2019-08-21 11:11:05 -07:00
from: points.lWaist,
to: points.lLeg,
margin: 5,
offset: 10
})
macro('title', {
nr: 1,
2019-08-21 11:11:05 -07:00
at: points.titleAnchor,
title: 'front'
})
macro('grainline', {
2019-08-21 11:11:05 -07:00
from: points.grainlineTop,
to: points.grainlineBottom
})
2019-08-21 11:11:05 -07:00
points.scaleBox = points.logoAnchor.shift(270, 100)
macro('scalebox', { at: points.scaleBox })
2019-08-21 11:11:05 -07:00
snippets.logo = new Snippet('logo', points.logoAnchor)
2019-08-21 11:11:05 -07:00
if (sa) {
paths.sa = new Path()
.move(points.lHem)
.join(
paths.bottom
.join(paths.sideSeam)
.join(paths.waistSA)
.offset(sa)
)
.line(points.lWaist)
.attr('class', 'fabric sa')
2019-08-21 11:11:05 -07:00
}
if (paperless) {
macro('hd', {
2019-08-21 11:11:05 -07:00
from: points.lHem,
to: points.rHem,
y: points.rHem.y - options.paperlessOffset
})
2019-08-21 11:11:05 -07:00
}
}
return part
2019-08-21 11:11:05 -07:00
}