2024-01-04 05:15:54 +00:00
|
|
|
import { shape } from './shape.mjs'
|
2023-11-12 23:43:29 +00:00
|
|
|
|
|
|
|
export const leg = {
|
|
|
|
name: 'lumina.leg',
|
2024-01-04 05:15:54 +00:00
|
|
|
from: shape,
|
2024-01-04 03:41:41 +00:00
|
|
|
draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, store, part }) => {
|
2023-12-31 23:56:24 +00:00
|
|
|
paths.front = paths.front.reverse().unhide().addText('front', 'note center').setClass('hidden')
|
|
|
|
paths.frontSplit.unhide().addText('front', 'note center').setClass('hidden')
|
|
|
|
paths.back.unhide().addText('back', 'note center').setClass('hidden')
|
|
|
|
paths.backSplit = paths.backSplit
|
|
|
|
.reverse()
|
|
|
|
.unhide()
|
|
|
|
.addText('back', 'note center')
|
|
|
|
.setClass('hidden')
|
|
|
|
|
2023-11-12 23:43:29 +00:00
|
|
|
paths.seam = new Path()
|
|
|
|
.move(points.frontSplitHem)
|
2023-12-31 23:56:24 +00:00
|
|
|
.join(paths.backSplit)
|
2023-12-26 02:08:29 +00:00
|
|
|
.join(paths.backWaistband.reverse())
|
2023-11-12 23:46:33 +00:00
|
|
|
.join(paths.back)
|
2023-12-31 23:56:24 +00:00
|
|
|
.join(paths.front)
|
2023-12-26 02:08:29 +00:00
|
|
|
.join(paths.frontWaistband)
|
2023-11-12 23:43:29 +00:00
|
|
|
.join(paths.frontSplit)
|
|
|
|
.close()
|
|
|
|
|
|
|
|
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
|
|
|
|
2023-12-31 23:56:24 +00:00
|
|
|
snippets.middle = new Snippet('notch', points.frontUpperLeg)
|
|
|
|
snippets.front0 = new Snippet('notch', paths.front.shiftFractionAlong(0.5))
|
|
|
|
snippets.front1 = new Snippet('notch', paths.frontSplit.shiftFractionAlong(0.2))
|
|
|
|
snippets.front2 = new Snippet('notch', paths.frontSplit.shiftFractionAlong(0.4))
|
|
|
|
snippets.front3 = new Snippet('notch', paths.frontSplit.shiftFractionAlong(0.6))
|
|
|
|
snippets.front4 = new Snippet('notch', paths.frontSplit.shiftFractionAlong(0.8))
|
|
|
|
snippets.back0 = new Snippet('notch', paths.back.shiftFractionAlong(0.5))
|
2024-01-04 05:15:54 +00:00
|
|
|
snippets.back1 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.25))
|
|
|
|
snippets.back2 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.5))
|
|
|
|
snippets.back3 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.75))
|
2023-12-31 23:56:24 +00:00
|
|
|
|
2023-11-12 23:43:29 +00:00
|
|
|
return part
|
|
|
|
},
|
|
|
|
}
|