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

128 lines
3 KiB
JavaScript
Raw Normal View History

import { collar } from './collar.mjs'
2022-09-05 18:47:21 +02:00
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.
*/
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)
.curve_(points.leftNeck, points.leftCollarCorner)
.line(points.notchLeft)
.line(points.notchTipRollLeft)
._curve(points.collarCbTopCpRollLeft, points.collarCbTopRoll)
.curve_(points.collarCbTopCpRoll, points.notchTipRoll)
2019-03-16 11:39:06 +01:00
.line(points.notch)
.line(points.collarCorner)
.close()
2019-08-03 15:03:33 +02:00
.attr('class', 'various')
2019-03-16 17:41:53 +01:00
if (sa) {
paths.partialSa1 = new Path()
.move(points.leftCollarCorner)
.line(points.notchLeft)
.line(points.notchTipRollLeft)
.offset(sa)
.hide()
paths.partialSa2 = new Path()
.move(points.notchTipRoll)
.line(points.notch)
.line(points.collarCorner)
.offset(sa)
.hide()
paths.sa1 = new Path()
.move(points.leftCollarCorner)
.join(paths.partialSa1)
.line(points.notchTipRollLeft)
.attr('class', 'various sa')
paths.sa2 = new Path()
.move(points.notchTipRoll)
.join(paths.partialSa2)
.line(points.collarCorner)
.attr('class', 'various sa')
}
2019-03-16 11:39:06 +01:00
2023-09-17 17:06:47 +02:00
/*
* Annotations
*/
// Cutlist
store.cutlist.setCut([
{ cut: 1, from: 'special' },
{ cut: 1, from: 'canvas' },
])
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: 'undercollar',
scale: 0.6,
2023-09-17 17:06:47 +02:00
})
// Dimensions
macro('rmad')
macro('hd', {
id: 'wAtTop',
from: points.leftCollarCorner,
to: points.collarCorner,
y: points.collarstandCbBottom.y - 10,
2023-09-17 17:06:47 +02:00
})
macro('hd', {
id: 'wFull',
from: points.notchLeft,
2023-09-17 17:06:47 +02:00
to: points.notch,
y: points.collarstandCbBottom.y - 25,
2023-09-17 17:06:47 +02:00
})
macro('hd', {
id: 'wAtBottom',
from: points.notchTipRollLeft,
to: points.notchTipRoll,
y: points.notchTipRoll.y + 15,
2023-09-17 17:06:47 +02:00
})
macro('vd', {
id: 'hAtCb',
to: points.collarstandCbBottom,
from: points.collarCbTopRoll,
2023-09-17 17:06:47 +02:00
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.notchTipRoll,
2023-09-17 17:06:47 +02:00
to: points.notch,
d: -15 - sa,
})
macro('vd', {
id: 'hFull',
from: points.notchTipRoll,
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: collar,
2022-09-05 18:47:21 +02:00
draft: jaegerUnderCollar,
}