fix(florent): Added missing notches. Closes #1015
This commit is contained in:
parent
c65b929e7b
commit
9365f36e15
3 changed files with 36 additions and 1 deletions
|
@ -58,6 +58,10 @@ export default function (part) {
|
||||||
from: points.outerMid,
|
from: points.outerMid,
|
||||||
to: points.innerMid,
|
to: points.innerMid,
|
||||||
})
|
})
|
||||||
|
macro('sprinkle', {
|
||||||
|
snippet: 'notch',
|
||||||
|
on: [ 'innerMid', 'outerMid' ]
|
||||||
|
})
|
||||||
|
|
||||||
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
export default function (part) {
|
export default function (part) {
|
||||||
let { paperless, sa, complete, points, macro, paths, Path, snippets, Snippet } = part.shorthand()
|
let { store, paperless, sa, complete, points, macro, paths, Path, snippets, Snippet } = part.shorthand()
|
||||||
|
|
||||||
// Clean up
|
// Clean up
|
||||||
for (let i of Object.keys(paths)) {
|
for (let i of Object.keys(paths)) {
|
||||||
|
@ -10,6 +10,7 @@ export default function (part) {
|
||||||
paths.seam.render = true
|
paths.seam.render = true
|
||||||
|
|
||||||
if (complete) {
|
if (complete) {
|
||||||
|
for (let s in snippets) delete snippets[s]
|
||||||
points.title = points.innerGuide.shiftFractionTowards(points.outerGuide, 0.5)
|
points.title = points.innerGuide.shiftFractionTowards(points.outerGuide, 0.5)
|
||||||
macro('title', {
|
macro('title', {
|
||||||
at: points.title,
|
at: points.title,
|
||||||
|
@ -24,6 +25,19 @@ export default function (part) {
|
||||||
offset: 15,
|
offset: 15,
|
||||||
grainline: true,
|
grainline: true,
|
||||||
})
|
})
|
||||||
|
points.notch1 = new Path()
|
||||||
|
.move(points.tip)
|
||||||
|
.curve(points.tipCp1, points.outerTopCp2, points.outerTop)
|
||||||
|
.shiftAlong(store.get('topDistanceToFirstNotch'))
|
||||||
|
points.notch2 = new Path()
|
||||||
|
.move(points.tip)
|
||||||
|
.curve(points.tipCp1, points.outerTopCp2, points.outerTop)
|
||||||
|
.curve(points.outerTopCp1, points.outerGuideCp2, points.outerGuide)
|
||||||
|
.shiftAlong(store.get('topDistanceToSecondNotch'))
|
||||||
|
macro('sprinkle', {
|
||||||
|
snippet: 'notch',
|
||||||
|
on: [ 'notch1', 'notch2' ]
|
||||||
|
})
|
||||||
|
|
||||||
if (sa) {
|
if (sa) {
|
||||||
paths.sa = new Path()
|
paths.sa = new Path()
|
||||||
|
|
|
@ -10,6 +10,7 @@ export default function (part) {
|
||||||
snippets,
|
snippets,
|
||||||
Snippet,
|
Snippet,
|
||||||
complete,
|
complete,
|
||||||
|
store
|
||||||
} = part.shorthand()
|
} = part.shorthand()
|
||||||
|
|
||||||
const fitCap = (part, scale) => {
|
const fitCap = (part, scale) => {
|
||||||
|
@ -151,6 +152,22 @@ export default function (part) {
|
||||||
to: points.grainlineTo,
|
to: points.grainlineTo,
|
||||||
})
|
})
|
||||||
macro('miniscale', { at: new Point(points.title.x * 0.75, points.title.y) })
|
macro('miniscale', { at: new Point(points.title.x * 0.75, points.title.y) })
|
||||||
|
macro('sprinkle', {
|
||||||
|
snippet: 'notch',
|
||||||
|
on: [ 'midMid', 'backHollow', 'midSide' ]
|
||||||
|
})
|
||||||
|
store.set('topDistanceToFirstNotch', new Path()
|
||||||
|
.move(points.backEdge)
|
||||||
|
.line(points.backSide)
|
||||||
|
.curve(points.backSideCp1, points.backHollowCp2, points.backHollow)
|
||||||
|
.length()
|
||||||
|
)
|
||||||
|
store.set('topDistanceToSecondNotch', new Path()
|
||||||
|
.move(points.backHollow)
|
||||||
|
.curve(points.backHollowCp1, points.midSideCp2, points.midSide)
|
||||||
|
.length() + store.get('topDistanceToFirstNotch')
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue