1
0
Fork 0
freesewing/designs/bent/src/undersleeve.mjs

69 lines
1.4 KiB
JavaScript
Raw Normal View History

2022-09-04 06:05:13 -07:00
import { sleeve } from './sleeve.mjs'
import { dimensions } from './shared.mjs'
2019-02-26 17:46:07 +01:00
2023-09-07 19:19:48 +02:00
function draftBentUnderSleeve({ macro, Path, points, paths, snippets, Snippet, sa, store, part }) {
2019-02-26 17:46:07 +01:00
// Extract seamline from sleeve
2019-08-03 15:03:33 +02:00
delete paths.ts
paths.seam = paths.us.clone().attr('class', 'fabric', true)
delete paths.us
2019-02-26 17:46:07 +01:00
points.anchor = points.usTip.clone()
2023-09-07 13:38:26 +02:00
// Seam allowance
if (sa) {
paths.sa = paths.seam.clone()
// Remove hem
paths.sa.ops.splice(-2)
paths.sa = paths.sa
.offset(sa)
.join(
new Path()
.move(points.usWristLeft)
.line(points.usWristRight)
.offset(sa * 3)
)
.close()
.attr('class', 'fabric sa')
}
/*
* Annotatinos
*/
// Cutlist
2023-09-13 16:11:26 +02:00
store.cutlist.addCut({ cut: 2, from: 'fabric' })
2023-04-26 18:53:16 -07:00
2023-09-07 13:38:26 +02:00
// Logo
snippets.logo = new Snippet('logo', points.elbowCenter)
2019-02-26 17:46:07 +01:00
2023-09-07 13:38:26 +02:00
// Title
macro('title', {
at: points.armCenter,
nr: 4,
title: 'undersleeve',
})
2019-02-26 17:46:07 +01:00
2023-09-07 13:38:26 +02:00
// Dimensions
dimensions(part, 'us')
macro('hd', {
id: 'wArmholeInnerSleeveCapTip',
from: points.usLeftEdge,
to: points.usTip,
y: points.usTip.y - sa - 15,
})
macro('vd', {
id: 'hArmholeInnerSleeveCapTip',
from: points.tsRightEdge,
to: points.usTip,
x: points.tsRightEdge.x + sa + 15,
})
2019-02-26 17:46:07 +01:00
2019-08-03 15:03:33 +02:00
return part
2019-02-26 17:46:07 +01:00
}
2022-09-04 06:05:13 -07:00
export const underSleeve = {
name: 'bent.underSleeve',
from: sleeve,
draft: draftBentUnderSleeve,
}