1
0
Fork 0
freesewing/designs/jaeger/src/undercollar.mjs

117 lines
2.8 KiB
JavaScript
Raw Normal View History

2022-09-05 18:47:21 +02:00
import { collarStand } from './collarstand.mjs'
2019-03-16 11:39:06 +01:00
/*
2019-03-16 17:41:53 +01:00
* This collar would benefit from a redesign
2019-03-16 11:39:06 +01:00
* but I find collar design to be rather tricky business and
* would love the input from someone with more pattern design
* experience, or more tailoring exprience.
*/
2023-09-17 17:06:47 +02:00
function jaegerUnderCollar({ sa, snippets, points, macro, store, paths, Path, part }) {
2019-03-16 17:41:53 +01:00
// Clean up
2019-08-03 15:03:33 +02:00
for (let i of Object.keys(paths)) delete paths[i]
for (let i of Object.keys(snippets)) delete snippets[i]
2019-03-16 17:41:53 +01:00
// Paths
2019-03-16 11:39:06 +01:00
paths.seam = new Path()
.move(points.collarCorner)
._curve(points.neck, points.collarstandCbBottom)
.line(points.collarCbTop)
2019-03-16 11:39:06 +01:00
.curve_(points.collarCbTopCp, points.notchTip)
.line(points.notch)
.line(points.collarCorner)
2019-08-03 15:03:33 +02:00
.attr('class', 'various')
2019-03-16 17:41:53 +01:00
2023-09-17 17:06:47 +02:00
if (sa) {
paths.sa1 = new Path().move(points.collarstandCbBottom).line(points.collarCbTop).offset(sa)
2023-09-17 17:06:47 +02:00
paths.sa2 = new Path()
.move(points.collarCorner)
2023-09-17 17:06:47 +02:00
.line(points.notch)
.line(points.notchTip)
.offset(-1 * sa)
paths.sa = new Path()
.move(points.collarstandTip)
.line(points.collarCorner)
2023-09-17 17:06:47 +02:00
.join(paths.sa2)
.line(points.notchTip)
.move(points.collarstandCbBottom)
2023-09-17 17:06:47 +02:00
.line(paths.sa1.start())
.line(paths.sa1.end())
.line(points.collarCbTop)
.attr('class', 'various sa')
paths.sa1.hide()
paths.sa2.hide()
}
2019-03-16 11:39:06 +01:00
2023-09-17 17:06:47 +02:00
/*
* Annotations
*/
// Cutlist
store.cutlist.setCut({ cut: 2, from: 'special' })
2019-03-17 17:15:59 +01:00
2023-09-17 17:06:47 +02:00
// Title
points.title = points.collarCbTopCp
.shiftFractionTowards(points.collarstandCbTopCp, 0.4)
.shiftFractionTowards(points.collarstandCbTop, 0.5)
2023-09-17 17:06:47 +02:00
macro('rmtitle')
macro('title', {
at: points.title,
nr: 6,
title: 'Under-collar-and-stand',
scale: 0.6,
2023-09-17 17:06:47 +02:00
})
// Dimensions
macro('rmad')
macro('hd', {
id: 'wAtTop',
from: points.collarstandCbBottom,
to: points.collarCorner,
y: points.collarstandCbBottom.y - 15,
2023-09-17 17:06:47 +02:00
})
macro('hd', {
id: 'wFull',
from: points.collarstandCbBottom,
2023-09-17 17:06:47 +02:00
to: points.notch,
y: points.collarstandCbBottom.y - 30,
2023-09-17 17:06:47 +02:00
})
macro('hd', {
id: 'wAtBottom',
from: points.collarCbTop,
to: points.notchTip,
y: points.notchTip.y + 15,
})
macro('vd', {
id: 'hAtCb',
to: points.collarstandCbBottom,
2023-09-17 17:06:47 +02:00
from: points.collarCbTop,
x: points.collarCbTop.x - sa - 15,
})
macro('ld', {
id: 'lTopSide',
to: points.collarCorner,
2023-09-17 17:06:47 +02:00
from: points.notch,
d: -1 * sa - 15,
})
macro('ld', {
id: 'lBottomSide',
from: points.notchTip,
to: points.notch,
d: -15 - sa,
})
macro('vd', {
id: 'hFull',
from: points.notchTip,
to: points.collarstandCbBottom,
2023-09-17 17:06:47 +02:00
x: points.notch.x + sa + 40,
})
2019-03-16 17:56:38 +01:00
2019-08-03 15:03:33 +02:00
return part
2019-03-16 11:39:06 +01:00
}
2022-09-05 18:47:21 +02:00
export const underCollar = {
name: 'jaeger.underCollar',
from: collarStand,
draft: jaegerUnderCollar,
}