1
0
Fork 0

eyelets and info

This commit is contained in:
woutervdub 2023-11-09 05:57:21 +00:00
parent a5c5a7f862
commit a2c934a089
4 changed files with 37 additions and 7 deletions

View file

@ -18,6 +18,18 @@ export const backInside = {
.curve_(points.cbCutCp2, points.waistCenter)
.line(points.lacingWaist)
.setClass('note dashed')
const lacingDistance = points.lacingWaist.y - points.lacingCut.y
if (lacingDistance > 15 * 5) {
const numberOfEyelets = Math.floor(lacingDistance / 15)
const eyeletDistance = lacingDistance / (numberOfEyelets + 1)
const pEyelets = new Path().move(points.lacingCut).line(points.lacingWaist).offset(-10)
for (let i = 1; i <= numberOfEyelets; i++) {
points['eyelet' + i] = pEyelets.shiftAlong(i * eyeletDistance)
snippets['eyelet' + i] = new Snippet('eyelet', points['eyelet' + i])
}
}
} else {
paths.cut.curve_(points.cbCutCp2, points.waistCenter)
}

View file

@ -31,11 +31,8 @@ export const backOutside = {
title: 'backOutside',
})
points.grainlineFrom = new Point(
Math.max(points.shoulderDart.x, points.dartBottomRight.x),
points.waistSide.y - (points.waistSide.y - points.shoulder.y) * 0.7
)
points.grainlineTo = new Point(points.grainlineFrom.x, points.dartBottomRight.y * 0.95)
points.grainlineTo = new Point(points.dartBottomRight.x * 1.1, points.dartBottomRight.y * 0.95)
points.grainlineFrom = new Point(points.grainlineTo.x, points.dartTip.y)
macro('grainline', {
from: points.grainlineFrom,

View file

@ -73,6 +73,18 @@ export const frontInside = {
to: points.lacingHem.shift(45, 10),
grainline: true,
})
const lacingDistance = points.lacingHem.y - points.lacingCut.y
if (lacingDistance > 15 * 5) {
const numberOfEyelets = Math.floor(lacingDistance / 15)
const eyeletDistance = lacingDistance / (numberOfEyelets + 1)
for (let i = 0; i < numberOfEyelets; i++) {
points['eyelet' + i] = new Point(
points.lacingCut.x + 10,
points.lacingCut.y + i * eyeletDistance + eyeletDistance
)
snippets['eyelet' + i] = new Snippet('eyelet', points['eyelet' + i])
}
}
} else {
if ('front' == options.zipperLocation) {
store.cutlist.addCut({ cut: 2, from: 'fabric' })
@ -82,7 +94,7 @@ export const frontInside = {
grainline: true,
})
} else {
// store.cutlist.addCut({ cut: 1, from: 'fabric' })
store.cutlist.addCut({ cut: 1, from: 'fabric' })
macro('cutonfold', {
from: points.cfCut,
to: points.cfHem,

View file

@ -54,7 +54,7 @@ export const frontPoints = {
menu: (settings, mergedOptions) => (mergedOptions.lacing === false ? false : 'options'),
},
},
draft: ({ points, Path, paths, snippets, options, macro, store, part }) => {
draft: ({ points, Path, paths, snippets, options, macro, store, units, part }) => {
const lacing = true == options.lacing && 'front' == options.lacingLocation
// Hide Noble paths
@ -77,6 +77,15 @@ export const frontPoints = {
}
store.set('strapWidth', strapWidth)
if (strapWidth != (shoulderWidthInside + shoulderWidthOutside) * options.strapWidth) {
store.flag.info({
msg: 'tristan:strapWidthAdjusted',
replace: {
width: units(strapWidth),
},
})
}
points.strapInside = points.shoulderDartInside.shiftTowards(points.hps, strapWidth / 2)
points.strapOutside = points.shoulderDartOutside.shiftTowards(points.shoulder, strapWidth / 2)