1
0
Fork 0
freesewing/designs/lumira/src/leg.mjs

75 lines
2.2 KiB
JavaScript
Raw Normal View History

2023-11-20 05:46:10 +00:00
import { shape } from './shape.mjs'
2023-11-17 07:28:12 +00:00
2023-11-11 00:59:09 +00:00
export const leg = {
name: 'lumira.leg',
2023-11-20 05:46:10 +00:00
from: shape,
2023-11-28 06:31:40 +00:00
draft: ({ store, sa, points, Path, paths, Snippet, snippets, options, macro, part }) => {
2023-11-26 02:54:19 +00:00
if (options.frontBulge || options.cyclingChamois) {
snippets.front = new Snippet('notch', paths.front.shiftFractionAlong(0.5))
}
2023-11-15 07:13:05 +00:00
paths.front = new Path()
2023-11-24 18:57:55 +00:00
.move(points.frontWaistband)
2023-11-20 05:46:10 +00:00
.join(paths.front)
2023-11-26 02:54:19 +00:00
._curve(points.frontKneeCp2, points.frontKnee)
.curve_(points.frontKneeCp1, points.frontAnkle)
2023-11-20 05:46:10 +00:00
.hide()
2023-11-17 07:28:12 +00:00
paths.back = new Path()
2023-11-24 18:57:55 +00:00
.move(points.backWaistband)
.join(paths.back)
2023-11-20 05:46:10 +00:00
.join(paths.backCircle)
.join(paths.backGusset)
2023-11-26 02:54:19 +00:00
._curve(points.backKneeCp2, points.backKnee)
.curve_(points.backKneeCp1, points.backAnkle)
2023-11-17 07:28:12 +00:00
.hide()
2023-11-11 00:59:09 +00:00
2023-11-20 05:46:10 +00:00
paths.seam = new Path()
2023-11-24 18:57:55 +00:00
.move(points.backWaistband)
2023-11-20 05:46:10 +00:00
.join(paths.back)
.join(paths.ankle)
.join(paths.front.reverse())
.join(paths.waist)
.close()
if (sa) {
paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
}
2023-11-17 07:28:12 +00:00
2023-11-28 06:31:40 +00:00
macro('grainline', {
from: points.centerHips,
to: points.centerKnee,
})
store.cutlist.addCut({ cut: 2, from: 'fabric' })
points.gridAnchor = points.centerWaistband.clone()
points.logo = points.centerUpperLeg.shiftFractionTowards(points.frontWaistband, 0.6)
snippets.logo = new Snippet('logo', points.logo)
points.title = points.centerKnee.shiftFractionTowards(points.frontWaistband, 0.5)
macro('title', {
at: points.title,
nr: 1,
title: 'leg',
align: 'center',
})
points.scalebox = points.centerSeat
.shiftFractionTowards(points.frontWaistband, 0.5)
.shiftFractionTowards(points.title, 0.5)
macro('scalebox', {
at: points.scalebox,
})
2023-11-26 02:54:19 +00:00
snippets.circle1 = new Snippet('notch', paths.backCircle.shiftFractionAlong(0.25))
snippets.circle2 = new Snippet('notch', paths.backCircle.shiftFractionAlong(0.5))
snippets.circle3 = new Snippet('notch', paths.backCircle.shiftFractionAlong(0.75))
2023-11-28 06:31:40 +00:00
snippets.circle4 = new Snippet('notch', points.backHips)
snippets.circle5 = new Snippet('notch', points.backCircleGusset)
snippets.circle6 = new Snippet('notch', points.frontGusset)
2023-11-17 07:28:12 +00:00
2023-11-11 00:59:09 +00:00
return part
},
}