chore(bob): Port to v3 stage 2
This commit is contained in:
parent
f32fdd45ad
commit
a4983dfdc6
3 changed files with 34 additions and 28 deletions
|
@ -10,9 +10,8 @@ export const bib = {
|
|||
lengthRatio: { pct: 75, min: 55, max: 85, menu: 'fit' },
|
||||
headSize: { pct: 100, min: 10, max: 200, snap: 5, menu: 'size' },
|
||||
},
|
||||
plugins: [ pluginBundle ],
|
||||
draft: part => {
|
||||
const {
|
||||
plugins: [pluginBundle],
|
||||
draft: ({
|
||||
Point,
|
||||
points,
|
||||
Path,
|
||||
|
@ -20,13 +19,13 @@ export const bib = {
|
|||
optionalMeasurements,
|
||||
options,
|
||||
macro,
|
||||
raise,
|
||||
log,
|
||||
complete,
|
||||
snippets,
|
||||
Snippet,
|
||||
paperless,
|
||||
} = part.shorthand()
|
||||
|
||||
part,
|
||||
}) => {
|
||||
// Head size
|
||||
const head = (optionalMeasurements?.head || 360) * options.headSize
|
||||
|
||||
|
@ -176,9 +175,9 @@ export const bib = {
|
|||
.close()
|
||||
.attr('class', 'fabric')
|
||||
|
||||
raise.info(['biasTapeLength', { mm: paths.seam.length() }])
|
||||
raise.info(['fabricHeight', { mm: points.tipRightTopStart.dy(points.bottomLeftEnd) }])
|
||||
raise.info(['fabricWidth', { mm: points.bottomLeftStart.dx(points.bottomRightEnd) }])
|
||||
log.info(['biasTapeLength', { mm: paths.seam.length() }])
|
||||
log.info(['fabricHeight', { mm: points.tipRightTopStart.dy(points.bottomLeftEnd) }])
|
||||
log.info(['fabricWidth', { mm: points.bottomLeftStart.dx(points.bottomRightEnd) }])
|
||||
|
||||
// Complete?
|
||||
if (complete) {
|
||||
|
@ -246,6 +245,5 @@ export const bib = {
|
|||
}
|
||||
|
||||
return part
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,16 @@
|
|||
export default function (part) {
|
||||
const { options, Point, Path, points, paths, Snippet, snippets, complete, sa, paperless, macro } =
|
||||
part.shorthand()
|
||||
|
||||
export default function ({
|
||||
options,
|
||||
Point,
|
||||
Path,
|
||||
points,
|
||||
paths,
|
||||
Snippet,
|
||||
snippets,
|
||||
complete,
|
||||
sa,
|
||||
paperless,
|
||||
macro,
|
||||
}) {
|
||||
const w = 500 * options.size
|
||||
points.topLeft = new Point(0, 0)
|
||||
points.topRight = new Point(w, 0)
|
||||
|
|
|
@ -5,9 +5,8 @@ import { bib } from './bib.mjs'
|
|||
// Setup our new design
|
||||
const Bob = new Design({
|
||||
data,
|
||||
parts: [ bib ],
|
||||
parts: [bib],
|
||||
})
|
||||
|
||||
//Named exports
|
||||
export { bib, Bob }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue