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

112 lines
2.7 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.
*/
2022-09-11 15:48:48 +02:00
function jaegerUnderCollar({
paperless,
sa,
snippets,
complete,
points,
macro,
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
2019-03-16 11:39:06 +01:00
paths.seam = new Path()
.move(points.collarCbTop)
.curve_(points.collarCbTopCp, points.notchTip)
.line(points.notch)
.line(points.collarstandTip)
._curve(points.collarstandCbTopCp, points.collarstandCbTop)
2019-03-16 17:41:53 +01:00
.line(points.collarCbTop)
2019-03-16 11:39:06 +01:00
.close()
2019-08-03 15:03:33 +02:00
.attr('class', 'various')
2019-03-16 17:41:53 +01:00
if (complete) {
// Title
2019-08-03 15:03:33 +02:00
points.title = points.collarCbTopCp.shiftFractionTowards(points.collarstandCbTopCp, 0.5)
macro('title', {
2019-03-16 17:41:53 +01:00
at: points.title,
nr: 6,
2021-04-24 10:16:31 +02:00
title: 'underCollar',
2019-08-03 15:03:33 +02:00
})
2019-03-16 11:39:06 +01:00
2019-03-16 17:56:38 +01:00
if (sa) {
2021-01-31 09:22:15 +01:00
paths.sa1 = new Path().move(points.collarstandCbTop).line(points.collarCbTop).offset(sa)
2019-03-16 17:56:38 +01:00
paths.sa2 = new Path()
.move(points.collarstandTip)
.line(points.notch)
.line(points.notchTip)
2019-08-03 15:03:33 +02:00
.offset(-1 * sa)
2019-03-16 17:56:38 +01:00
paths.sa = new Path()
.move(points.collarstandTip)
.line(paths.sa2.start())
.join(paths.sa2)
.line(points.notchTip)
.move(points.collarstandCbTop)
.line(paths.sa1.start())
.line(paths.sa1.end())
.line(points.collarCbTop)
2019-08-03 15:03:33 +02:00
.attr('class', 'various sa')
2022-09-18 17:01:19 +02:00
paths.sa1.hide()
paths.sa2.hide()
2019-03-16 17:56:38 +01:00
}
2019-03-17 17:15:59 +01:00
if (paperless) {
2019-08-03 15:03:33 +02:00
macro('hd', {
2019-03-17 17:15:59 +01:00
from: points.collarstandCbTop,
to: points.collarstandTip,
2021-04-24 10:16:31 +02:00
y: points.collarstandCbTop.y - 15,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-17 17:15:59 +01:00
from: points.collarstandCbTop,
to: points.notch,
2021-04-24 10:16:31 +02:00
y: points.collarstandCbTop.y - 30,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-17 17:15:59 +01:00
from: points.collarCbTop,
to: points.notchTip,
2021-04-24 10:16:31 +02:00
y: points.notchTip.y + 15,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-17 17:15:59 +01:00
from: points.collarCbTop,
to: points.collarstandCbTop,
2021-04-24 10:16:31 +02:00
x: points.collarCbTop.x - sa - 15,
2019-08-03 15:03:33 +02:00
})
macro('ld', {
2019-03-17 17:15:59 +01:00
from: points.collarstandTip,
to: points.notch,
2021-04-24 10:16:31 +02:00
d: sa + 15,
2019-08-03 15:03:33 +02:00
})
macro('ld', {
2019-03-17 17:15:59 +01:00
from: points.notchTip,
to: points.notch,
2021-04-24 10:16:31 +02:00
d: -15 - sa,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-17 17:15:59 +01:00
from: points.notchTip,
to: points.collarstandCbTop,
2021-04-24 10:16:31 +02:00
x: points.notch.x + sa + 40,
2019-08-03 15:03:33 +02:00
})
2019-03-17 17:15:59 +01:00
}
2019-03-16 17:41:53 +01:00
}
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,
}