1
0
Fork 0
freesewing/designs/noble/src/frontoutside.mjs

228 lines
6 KiB
JavaScript
Raw Normal View History

2022-09-05 16:13:41 +02:00
import { frontPoints } from './frontpoints.mjs'
import { frontInside } from './frontinside.mjs'
2022-09-11 16:05:55 +02:00
function nobleFrontOutside({
store,
sa,
points,
Path,
paths,
Snippet,
snippets,
options,
complete,
paperless,
macro,
part,
}) {
2022-06-19 23:23:10 +00:00
delete points.bustDartTop
delete points.bustSide
delete points.bustDartMiddle
delete points.bustDartBottom
delete points.bustDartCpBottom
delete points.bustB
delete points.bustDartEdge
2023-04-26 18:53:16 -07:00
macro('cutonfold', false)
2022-06-19 23:23:10 +00:00
2022-09-05 16:13:41 +02:00
if (options.dartPosition == 'shoulder') {
2022-06-20 19:40:41 +00:00
paths.princessSeam = new Path()
.move(points.shoulderDartOutside)
2022-09-05 16:13:41 +02:00
.curve(
points.shoulderDartTipCpDownOutside,
points.waistUpDartRightCpUp,
points.waistUpDartRight
)
2022-06-20 19:40:41 +00:00
.curve(points.waistUpDartRightCpDown, points.waistCpUp, points.waistDartRight)
.hide()
2022-06-20 19:40:41 +00:00
paths.armhole = new Path()
.move(points.armhole)
.curve(points.armholeCp2, points.armholePitchCp1, points.armholePitch)
.curve_(points.armholePitchCp2, points.shoulder)
.hide()
2022-06-20 19:40:41 +00:00
2022-06-19 23:23:10 +00:00
paths.seam = new Path()
.move(points.waistDartRight)
.line(points.sideHem)
.line(points.armhole)
2022-06-20 19:40:41 +00:00
.join(paths.armhole)
2022-06-19 23:23:10 +00:00
.line(points.shoulderDartOutside)
2022-06-20 19:40:41 +00:00
.join(paths.princessSeam)
2022-06-19 23:23:10 +00:00
.close()
.attr('class', 'fabric')
} else {
2022-06-20 19:40:41 +00:00
paths.princessSeam = new Path()
.move(points.armholeDartOutside)
.curve(points.armholeCircleOutsideCp1, points.waistCircleOutsideCp1, points.waistUpDartRight)
.curve(points.waistUpDartRightCpDown, points.waistCpUp, points.waistDartRight)
.hide()
2022-06-20 19:40:41 +00:00
2022-06-19 23:23:10 +00:00
paths.seam = new Path()
2022-06-20 19:40:41 +00:00
.move(points.waistDartRight)
.line(points.sideHem)
.line(points.armhole)
2022-06-21 02:09:57 +00:00
.join(paths.armholeOutside.reverse())
2022-06-20 19:40:41 +00:00
.join(paths.princessSeam)
.close()
.attr('class', 'fabric')
2022-06-19 23:23:10 +00:00
}
points.grainTop = points.armhole.shift(225, 20)
points.grainBottom = points.sideHemInitial.shift(135, 20)
macro('grainline', {
from: points.grainBottom,
to: points.grainTop,
})
store.cutlist.removeCut()
store.cutlist.addCut()
2022-06-19 23:23:10 +00:00
if (complete) {
2022-09-05 16:13:41 +02:00
points.snippet = paths.princessSeam.shiftAlong(
paths.princessSeam.length() - store.get('shoulderDartTipNotch')
)
2022-06-20 19:40:41 +00:00
snippets.shoulderDartTip = new Snippet('notch', points.snippet)
2022-06-19 23:23:10 +00:00
points.titleAnchor = points.waistDartRight
2022-06-20 19:40:41 +00:00
.shiftFractionTowards(points.armhole, 0.3)
2022-06-19 23:23:10 +00:00
.shiftFractionTowards(points.shoulderDartOutside, 0.2)
macro('title', {
at: points.titleAnchor,
nr: 2,
title: 'Outside Front',
})
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
2022-09-05 16:13:41 +02:00
if (paperless) {
2022-06-20 19:40:41 +00:00
let pLeft = paths.princessSeam.edge('left')
macro('hd', {
from: points.waistDartRight,
to: points.armholeOutsidePitchCp1,
2022-09-05 16:13:41 +02:00
y: points.sideHemInitial.y + sa + 35,
2022-06-19 23:23:10 +00:00
})
2022-06-20 19:40:41 +00:00
macro('hd', {
from: points.waistDartRight,
to: points.sideHemInitial,
2022-09-05 16:13:41 +02:00
y: points.sideHemInitial.y + sa + 25,
2022-06-19 23:23:10 +00:00
})
2022-06-20 19:40:41 +00:00
macro('hd', {
from: pLeft,
to: points.sideHemInitial,
2022-09-05 16:13:41 +02:00
y: points.sideHemInitial.y + sa + 15,
2022-06-19 23:23:10 +00:00
})
2022-06-20 19:40:41 +00:00
2022-06-19 23:23:10 +00:00
macro('vd', {
2022-06-20 19:40:41 +00:00
from: points.armholeOutsidePitchCp1,
to: points.sideHemInitial,
2022-09-05 16:13:41 +02:00
x: points.sideHemInitial.x + sa + 15,
2022-06-19 23:23:10 +00:00
})
macro('vd', {
2022-06-20 19:40:41 +00:00
from: points.waistDartRight,
to: pLeft,
2022-09-05 16:13:41 +02:00
x: pLeft.x - sa - 15,
2022-06-19 23:23:10 +00:00
})
2022-06-20 19:40:41 +00:00
2022-09-05 16:13:41 +02:00
if (options.dartPosition == 'shoulder') {
2022-06-20 19:40:41 +00:00
macro('hd', {
from: points.shoulderDartOutside,
to: points.shoulder,
2022-09-05 16:13:41 +02:00
y: points.shoulderDartOutside.y - sa - 15,
2022-06-20 19:40:41 +00:00
})
macro('hd', {
from: points.snippet,
to: points.shoulder,
2022-09-05 16:13:41 +02:00
y: points.shoulderDartOutside.y - sa - 25,
2022-06-20 19:40:41 +00:00
})
macro('hd', {
from: pLeft,
to: points.shoulder,
2022-09-05 16:13:41 +02:00
y: points.shoulderDartOutside.y - sa - 35,
2022-06-20 19:40:41 +00:00
})
macro('hd', {
from: points.waistDartRight,
to: points.shoulder,
2022-09-05 16:13:41 +02:00
y: points.sideHemInitial.y + sa + 45,
2022-06-20 19:40:41 +00:00
})
macro('vd', {
from: points.shoulder,
to: points.sideHemInitial,
2022-09-05 16:13:41 +02:00
x: points.shoulder.x, //+sa + 15,
2022-06-20 19:40:41 +00:00
})
macro('vd', {
from: points.shoulderDartOutside,
to: points.sideHemInitial,
2022-09-05 16:13:41 +02:00
x: points.shoulder.x + sa + 15,
2022-06-20 19:40:41 +00:00
})
macro('vd', {
from: points.waistDartRight,
to: points.shoulderDartOutside,
2022-09-05 16:13:41 +02:00
x: pLeft.x - sa - 25,
2022-06-20 19:40:41 +00:00
})
macro('vd', {
from: points.snippet,
to: points.shoulderDartOutside,
2022-09-05 16:13:41 +02:00
x: pLeft.x - sa - 15,
2022-06-20 19:40:41 +00:00
})
2022-07-12 20:09:17 +02:00
2022-06-20 19:40:41 +00:00
let pArmholeLeft = paths.armhole.edge('left')
macro('hd', {
from: points.waistDartRight,
to: pArmholeLeft,
2022-09-05 16:13:41 +02:00
y: points.sideHemInitial.y + sa + 5,
2022-06-20 19:40:41 +00:00
})
macro('vd', {
from: pArmholeLeft,
to: points.sideHemInitial,
2022-09-05 16:13:41 +02:00
x: points.sideHemInitial.x + sa + 25,
2022-06-20 19:40:41 +00:00
})
} else {
2022-06-20 21:25:06 +00:00
let pTop = paths.princessSeam.edge('top')
macro('hd', {
2022-06-20 19:40:41 +00:00
from: pLeft,
to: points.armholeOutsidePitchCp1,
2022-09-05 16:13:41 +02:00
y: pTop.y - sa - 35,
2022-06-20 19:40:41 +00:00
})
2022-06-20 21:25:06 +00:00
macro('hd', {
2022-06-20 19:40:41 +00:00
from: pLeft,
to: points.armholeDartOutside,
2022-09-05 16:13:41 +02:00
y: pTop.y - sa - 25,
2022-06-20 19:40:41 +00:00
})
2022-06-20 21:25:06 +00:00
macro('hd', {
2022-06-20 19:40:41 +00:00
from: pLeft,
to: pTop,
2022-09-05 16:13:41 +02:00
y: pTop.y - sa - 15,
2022-06-20 19:40:41 +00:00
})
macro('vd', {
from: points.waistDartRight,
to: pTop,
2022-09-05 16:13:41 +02:00
x: pLeft.x - sa - 25,
2022-06-20 19:40:41 +00:00
})
macro('vd', {
from: points.snippet,
to: pTop,
2022-09-05 16:13:41 +02:00
x: pLeft.x - sa - 15,
2022-06-20 19:40:41 +00:00
})
macro('vd', {
from: points.armholeDartOutside,
to: points.sideHemInitial,
2022-09-05 16:13:41 +02:00
x: points.sideHemInitial.x + sa + 25,
2022-06-20 19:40:41 +00:00
})
macro('vd', {
from: pTop,
to: points.sideHemInitial,
2022-09-05 16:13:41 +02:00
x: points.sideHemInitial.x + sa + 35,
2022-06-20 19:40:41 +00:00
})
}
}
2022-06-19 23:23:10 +00:00
}
2022-06-20 19:40:41 +00:00
2022-06-19 23:23:10 +00:00
return part
}
2022-09-05 16:13:41 +02:00
export const frontOutside = {
name: 'noble.frontOutside',
from: frontPoints,
after: frontInside,
draft: nobleFrontOutside,
}