chore(lucy): Prettier run
This commit is contained in:
parent
39712ce70b
commit
67e1a6befd
2 changed files with 91 additions and 100 deletions
|
@ -22,7 +22,7 @@ export default {
|
||||||
'sewing pattern',
|
'sewing pattern',
|
||||||
],
|
],
|
||||||
optionGroups: {
|
optionGroups: {
|
||||||
style: ['width', 'length', 'edge' ],
|
style: ['width', 'length', 'edge'],
|
||||||
},
|
},
|
||||||
measurements: [],
|
measurements: [],
|
||||||
dependencies: {},
|
dependencies: {},
|
||||||
|
@ -31,7 +31,7 @@ export default {
|
||||||
parts: ['pocket'],
|
parts: ['pocket'],
|
||||||
options: {
|
options: {
|
||||||
width: { pct: 50, min: 30, max: 100 },
|
width: { pct: 50, min: 30, max: 100 },
|
||||||
length: {pct: 50, min: 30, max:100},
|
length: { pct: 50, min: 30, max: 100 },
|
||||||
edge: { pct: 25, min: 20, max: 50 },
|
edge: { pct: 25, min: 20, max: 50 },
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,42 +2,35 @@ export default function (part) {
|
||||||
const { options, Point, Path, points, paths, Snippet, snippets, complete, sa, paperless, macro } =
|
const { options, Point, Path, points, paths, Snippet, snippets, complete, sa, paperless, macro } =
|
||||||
part.shorthand()
|
part.shorthand()
|
||||||
|
|
||||||
|
// Pocket seams here
|
||||||
//pocket seams here
|
const pocketLength = 800 * options.length
|
||||||
let pocketLength = 800 * options.length
|
const pocketWidth = 500 * options.width
|
||||||
let pocketWidth = 500 * options.width
|
const pocketEdge = options.edge
|
||||||
let pocketEdge = options.edge
|
|
||||||
|
|
||||||
|
|
||||||
points.topLeft = new Point(0, 0)
|
points.topLeft = new Point(0, 0)
|
||||||
points.topRight = new Point(pocketWidth, 0)
|
points.topRight = new Point(pocketWidth, 0)
|
||||||
points.bottomLeft = new Point(0, pocketLength)
|
points.bottomLeft = new Point(0, pocketLength)
|
||||||
points.bottomRight = new Point(pocketWidth, pocketLength)
|
points.bottomRight = new Point(pocketWidth, pocketLength)
|
||||||
|
|
||||||
//center point
|
// Center point
|
||||||
points.center = new Point((pocketWidth / 2), 0)
|
points.center = new Point(pocketWidth / 2, 0)
|
||||||
|
|
||||||
//slit end
|
// Slit end
|
||||||
points.middle = points.center.shift(270,(pocketLength*0.525))
|
points.middle = points.center.shift(270, pocketLength * 0.525)
|
||||||
|
|
||||||
//top
|
// Top
|
||||||
|
points.centerRight = points.center.shift(0, pocketWidth * pocketEdge)
|
||||||
points.centerRight = points.center.shift(0, (pocketWidth * pocketEdge))
|
points.centerLeft = points.center.shift(180, pocketWidth * pocketEdge)
|
||||||
points.centerLeft = points.center.shift(180, (pocketWidth * pocketEdge))
|
|
||||||
|
|
||||||
//taper point
|
|
||||||
points.taperRight = new Point(pocketWidth, (pocketLength * 0.4375))
|
|
||||||
points.taperLeft = new Point(0, (pocketLength * 0.4375))
|
|
||||||
|
|
||||||
//control points curve
|
|
||||||
|
|
||||||
points.leftCp1 = points.bottomLeft.shiftFractionTowards(points.taperLeft, 2 / 7)
|
|
||||||
points.leftCp2 = points.bottomLeft.shiftFractionTowards(points.bottomRight, 0.2)
|
|
||||||
|
|
||||||
points.rightCp1 = points.bottomRight.shiftFractionTowards(points.taperRight, 2 / 7)
|
|
||||||
points.rightCp2 = points.bottomRight.shiftFractionTowards(points.bottomLeft, 0.2)
|
|
||||||
|
|
||||||
|
// Taper point
|
||||||
|
points.taperRight = new Point(pocketWidth, pocketLength * 0.4375)
|
||||||
|
points.taperLeft = new Point(0, pocketLength * 0.4375)
|
||||||
|
|
||||||
|
// Control points curve
|
||||||
|
points.leftCp1 = points.bottomLeft.shiftFractionTowards(points.taperLeft, 2 / 7)
|
||||||
|
points.leftCp2 = points.bottomLeft.shiftFractionTowards(points.bottomRight, 0.2)
|
||||||
|
points.rightCp1 = points.bottomRight.shiftFractionTowards(points.taperRight, 2 / 7)
|
||||||
|
points.rightCp2 = points.bottomRight.shiftFractionTowards(points.bottomLeft, 0.2)
|
||||||
|
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
.move(points.centerLeft)
|
.move(points.centerLeft)
|
||||||
|
@ -52,18 +45,16 @@ export default function (part) {
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
|
paths.slit = new Path()
|
||||||
paths.slit = new Path()
|
.move(points.center)
|
||||||
.move(points.center)
|
.line(points.middle)
|
||||||
.line(points.middle)
|
.attr('class', 'path fabric dashed')
|
||||||
.attr("class", "path fabric dashed")
|
|
||||||
|
|
||||||
points.logo = points.center.shiftOutwards(points.middle, pocketWidth / 5)
|
points.logo = points.center.shiftOutwards(points.middle, pocketWidth / 5)
|
||||||
snippets.logo = new Snippet('logo', points.logo)
|
snippets.logo = new Snippet('logo', points.logo)
|
||||||
|
|
||||||
points.scalebox = points.logo
|
points.scalebox = points.logo.shift(270, pocketWidth / 5)
|
||||||
.shift(270, pocketWidth / 5)
|
macro('scalebox', { at: points.scalebox })
|
||||||
macro("scalebox", { at: points.scalebox })
|
|
||||||
|
|
||||||
if (sa) {
|
if (sa) {
|
||||||
paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue