1
0
Fork 0
freesewing/designs/benjamin/src/bow3.mjs

68 lines
1.3 KiB
JavaScript
Raw Normal View History

2022-09-03 20:06:18 -07:00
import { base } from './base.mjs'
2022-09-10 20:22:43 +02:00
function draftBenjaminBow3({
options,
Point,
points,
Path,
paths,
complete,
macro,
sa,
store,
paperless,
part,
}) {
2022-09-18 17:01:19 +02:00
if (!options.adjustmentRibbon) return part.hide()
2019-07-08 15:54:19 +02:00
2019-10-01 12:43:10 -07:00
points.bandBottomLeft = points.bandBottomLeft.shift(180, 290)
points.bandTopLeft = points.bandBottomLeft.flipY()
points.grainlineStart = new Point(-290, 0)
macro('grainline', {
from: points.grainlineStart,
2021-04-24 10:16:31 +02:00
to: points.tip.shift(180, 20),
2019-10-01 12:43:10 -07:00
})
paths.seam = new Path()
.move(points.bandTopLeft)
.line(points.bandBottomLeft)
.join(paths.bow)
.line(points.bandTopLeft)
.close()
.attr('class', 'fabric')
.unhide()
2019-10-01 12:43:10 -07:00
store.cutlist.addCut({ cut: 1 })
store.cutlist.addCut({ cut: 1, material: 'interfacing' })
2019-07-08 15:54:19 +02:00
if (complete) {
2019-10-01 12:43:10 -07:00
// Paperless?
if (paperless) {
macro('hd', {
from: points.bandBottomLeft,
to: points.tip2Bottom,
2021-04-24 10:16:31 +02:00
y: store.get('baseY'),
2019-10-01 12:43:10 -07:00
})
}
if (sa) {
paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa').unhide()
2019-10-01 12:43:10 -07:00
}
2019-08-03 15:03:33 +02:00
macro('title', {
2019-07-08 15:54:19 +02:00
at: points.titleAnchor,
nr: 3,
title: 'Long Bow',
2021-04-24 10:16:31 +02:00
scale: store.get('tipWidth') / 75,
2019-08-03 15:03:33 +02:00
})
2019-07-08 15:54:19 +02:00
}
2019-08-03 15:03:33 +02:00
return part
2019-07-08 15:54:19 +02:00
}
2022-09-03 20:06:18 -07:00
export const bow3 = {
name: 'benjamin.bow3',
from: base,
draft: draftBenjaminBow3,
}