1
0
Fork 0
freesewing/packages/brian/src/shared.js

59 lines
1.7 KiB
JavaScript
Raw Normal View History

export function s3Notches(part, type) {
const { snippets, Snippet, points, options } = part.shorthand()
if (options.s3Armhole !== 0) snippets.shoulderNotch = new Snippet(type, points.shoulder)
if (options.s3Collar !== 0) snippets.collarNotch = new Snippet(type, points.hps)
2018-08-06 16:19:12 +02:00
}
export function armholeLength(points, Path) {
return new Path()
.move(points.armhole)
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
2019-08-03 15:03:33 +02:00
.length()
2018-08-06 16:19:12 +02:00
}
export function shoulderToArmholePitch(points, Path) {
return new Path()
.move(points.armholePitch)
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
2019-08-03 15:03:33 +02:00
.length()
2018-08-06 16:19:12 +02:00
}
export function dimensions(part, side) {
const { macro, points, Path, sa, paths } = part.shorthand()
2019-08-03 15:03:33 +02:00
macro('pd', {
2018-08-06 16:19:12 +02:00
path: new Path()
.move(points.armhole)
2018-08-11 14:13:40 +02:00
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
2019-08-03 15:03:33 +02:00
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
.join(paths[`${side}Armhole`]),
2021-04-24 10:16:31 +02:00
d: sa + 15,
2019-08-03 15:03:33 +02:00
})
macro('pd', {
path: paths[`${side}Armhole`],
2021-04-24 10:16:31 +02:00
d: -15,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
from: points.hem,
2018-08-06 16:19:12 +02:00
to: points.armhole,
2021-04-24 10:16:31 +02:00
x: points.hips.x + sa + 15,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
from: points.hem,
2018-08-06 16:19:12 +02:00
to: points.armholePitch,
2021-04-24 10:16:31 +02:00
x: points.hips.x + sa + 30,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
from: points.hem,
to: points.s3ArmholeSplit,
2021-04-24 10:16:31 +02:00
x: points.hips.x + sa + 45,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
from: points.hem,
to: points.s3CollarSplit,
2021-04-24 10:16:31 +02:00
x: points.hips.x + sa + 60,
2019-08-03 15:03:33 +02:00
})
macro('ld', { from: points.s3CollarSplit, to: points.s3ArmholeSplit, d: sa + 15 })
2018-08-06 16:19:12 +02:00
}