prettyfied code
This commit is contained in:
parent
0089d791c7
commit
96c5d3b5eb
9 changed files with 107 additions and 84 deletions
|
@ -43,7 +43,7 @@ export default {
|
|||
'shoulderToShoulder',
|
||||
'waist',
|
||||
],
|
||||
optionalMeasurements: [ 'highBust' ],
|
||||
optionalMeasurements: ['highBust'],
|
||||
dependencies: {
|
||||
backBlock: 'base',
|
||||
frontBlock: 'backBlock',
|
||||
|
|
|
@ -107,10 +107,10 @@ export default (part) => {
|
|||
paths.dart.render = false
|
||||
|
||||
if (complete) {
|
||||
//Grainline
|
||||
macro('grainline', {
|
||||
//Grainline
|
||||
macro('grainline', {
|
||||
from: points.cutonfoldVia1,
|
||||
to: points.cutonfoldVia2
|
||||
to: points.cutonfoldVia2,
|
||||
})
|
||||
macro('scalebox', { at: new Point(points.logo.x, points.armholePitchCp2.y) })
|
||||
if (sa) {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
import { constructMainDart, shapeSideSeam, dartPath } from './shared'
|
||||
export default (part) => {
|
||||
let {
|
||||
|
@ -197,7 +196,9 @@ export default (part) => {
|
|||
// Facing/Lining boundary (flb)
|
||||
points.flbTop = points.neck.shiftFractionTowards(points.shoulder, 0.5)
|
||||
points.flbCp = points.dartTop.shift(-90, points.armholePitch.dy(points.flbTop) / 2)
|
||||
points.flbCpTop = points.flbTop.shiftTowards(points.neck, points.flbTop.dy(points.armholePitch)).rotate(90, points.flbTop)
|
||||
points.flbCpTop = points.flbTop
|
||||
.shiftTowards(points.neck, points.flbTop.dy(points.armholePitch))
|
||||
.rotate(90, points.flbTop)
|
||||
// Seam line
|
||||
delete paths.cutonfold
|
||||
delete paths.saBase
|
||||
|
@ -264,26 +265,27 @@ export default (part) => {
|
|||
.curve(points.flbCp, points.flbCpTop, points.flbTop)
|
||||
.attr('class', 'fabric')
|
||||
paths.flbLining = paths.flbFacing.clone().attr('class', 'lining dashed')
|
||||
|
||||
// Grainline
|
||||
if (options.hemStyle === 'classic') {
|
||||
points.grainLineFromFront = new Point(points.hemTip.x, points.closureTop.y)
|
||||
points.grainLineToFront =new Point(points.hemTip.x, points.hemTip.y).shift(90,20)
|
||||
|
||||
// Grainline
|
||||
if (options.hemStyle === 'classic') {
|
||||
points.grainLineFromFront = new Point(points.hemTip.x, points.closureTop.y)
|
||||
points.grainLineToFront = new Point(points.hemTip.x, points.hemTip.y).shift(90, 20)
|
||||
}
|
||||
if (options.hemStyle === 'rounded') {
|
||||
points.grainLineFromFront = new Point(points.roundEnd.x, points.roundEnd.y).shift(90,200)
|
||||
points.grainLineToFront = new Point(points.roundEnd.x, points.roundEnd.y)
|
||||
|
||||
}
|
||||
points.grainLineFromFront = new Point(points.roundEnd.x, points.roundEnd.y).shift(90, 200)
|
||||
points.grainLineToFront = new Point(points.roundEnd.x, points.roundEnd.y)
|
||||
}
|
||||
if (options.hemStyle === 'square') {
|
||||
points.grainLineFromFront = new Point(points.cutonfoldTo.x, points.cutonfoldTo.y).shift(90,200)
|
||||
points.grainLineToFront = new Point(points.cutonfoldTo.x, points.cutonfoldTo.y)
|
||||
|
||||
}
|
||||
macro('grainline', {
|
||||
from: points.grainLineFromFront,
|
||||
to: points.grainLineToFront
|
||||
})
|
||||
points.grainLineFromFront = new Point(points.cutonfoldTo.x, points.cutonfoldTo.y).shift(
|
||||
90,
|
||||
200
|
||||
)
|
||||
points.grainLineToFront = new Point(points.cutonfoldTo.x, points.cutonfoldTo.y)
|
||||
}
|
||||
macro('grainline', {
|
||||
from: points.grainLineFromFront,
|
||||
to: points.grainLineToFront,
|
||||
})
|
||||
if (sa) {
|
||||
paths.sa = paths.saBase
|
||||
.offset(sa)
|
||||
|
|
|
@ -30,25 +30,29 @@ export default (part) => {
|
|||
if (complete) {
|
||||
// Grainline
|
||||
if (options.hemStyle === 'classic') {
|
||||
points.grainlineFromFrontFacing = new Point(points.hemTip.x, points.closureTop.y)
|
||||
points.grainlineToFrontFacing = new Point(points.hemTip.x, points.hemTip.y).shift(90,20)
|
||||
points.grainlineFromFrontFacing = new Point(points.hemTip.x, points.closureTop.y)
|
||||
points.grainlineToFrontFacing = new Point(points.hemTip.x, points.hemTip.y).shift(90, 20)
|
||||
}
|
||||
if (options.hemStyle === 'rounded') {
|
||||
points.grainlineFromFrontFacing = new Point(points.roundEnd.x, points.roundEnd.y).shift(90,200)
|
||||
points.grainlineToFrontFacing = new Point(points.roundEnd.x, points.roundEnd.y)
|
||||
|
||||
points.grainlineFromFrontFacing = new Point(points.roundEnd.x, points.roundEnd.y).shift(
|
||||
90,
|
||||
200
|
||||
)
|
||||
points.grainlineToFrontFacing = new Point(points.roundEnd.x, points.roundEnd.y)
|
||||
}
|
||||
if (options.hemStyle === 'square') {
|
||||
points.grainlineFromFrontFacing = new Point(points.cutonfoldTo.x, points.cutonfoldTo.y).shift(90,200)
|
||||
points.grainlineToFrontFacing = new Point(points.cutonfoldTo.x, points.cutonfoldTo.y)
|
||||
|
||||
}
|
||||
|
||||
macro('grainline', {
|
||||
from: points.grainlineFromFrontFacing,
|
||||
to: points.grainlineToFrontFacing
|
||||
})
|
||||
|
||||
points.grainlineFromFrontFacing = new Point(points.cutonfoldTo.x, points.cutonfoldTo.y).shift(
|
||||
90,
|
||||
200
|
||||
)
|
||||
points.grainlineToFrontFacing = new Point(points.cutonfoldTo.x, points.cutonfoldTo.y)
|
||||
}
|
||||
|
||||
macro('grainline', {
|
||||
from: points.grainlineFromFrontFacing,
|
||||
to: points.grainlineToFrontFacing,
|
||||
})
|
||||
|
||||
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
||||
points.title = new Point(points.dartWaistLeft.x / 2, points.waist.y)
|
||||
macro('title', {
|
||||
|
@ -56,9 +60,9 @@ export default (part) => {
|
|||
at: points.title,
|
||||
title: 'frontFacing',
|
||||
})
|
||||
|
||||
|
||||
points.logo = points.closureTop.shiftFractionTowards(points.dartWaistLeft, 0.5)
|
||||
snippets.logo = new Snippet('logo', points.logo)
|
||||
}
|
||||
return part
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
export default (part) => {
|
||||
let { points, Point, paths, Path, options, macro, snippets, Snippet, complete, sa } = part.shorthand()
|
||||
let { points, Point, paths, Path, options, macro, snippets, Snippet, complete, sa } =
|
||||
part.shorthand()
|
||||
// Cleanup from Brian
|
||||
for (let i of Object.keys(paths)) delete paths[i]
|
||||
for (let i of Object.keys(snippets)) delete snippets[i]
|
||||
|
@ -23,13 +23,15 @@ export default (part) => {
|
|||
} else paths.seam.line(points.hem)
|
||||
paths.seam.close()
|
||||
if (complete) {
|
||||
//Grainline
|
||||
points.grainlineFromLining = new Point(points.dartEnd.x,points.dartEnd.y).shift(90,400).shift(0,15)
|
||||
points.grainlineToLining = new Point(points.dartEnd.x,points.dartEnd.y).shift(0,15)
|
||||
//Grainline
|
||||
points.grainlineFromLining = new Point(points.dartEnd.x, points.dartEnd.y)
|
||||
.shift(90, 400)
|
||||
.shift(0, 15)
|
||||
points.grainlineToLining = new Point(points.dartEnd.x, points.dartEnd.y).shift(0, 15)
|
||||
macro('grainline', {
|
||||
from: points.grainlineFromLining,
|
||||
to: points.grainlineToLining
|
||||
})
|
||||
from: points.grainlineFromLining,
|
||||
to: points.grainlineToLining,
|
||||
})
|
||||
if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
|
||||
points.title = points.armhole.shiftFractionTowards(points.dartTop, 0.5)
|
||||
macro('title', {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
export default (part) => {
|
||||
let { points, Point, paths, Path, measurements, options, macro, complete, paperless, store } =
|
||||
part.shorthand()
|
||||
|
@ -42,13 +41,18 @@ export default (part) => {
|
|||
at: points.title,
|
||||
})
|
||||
}
|
||||
//Grainline
|
||||
points.grainlineFromPocketBag = new Point(points.topLeft.x,points.topLeft.y).shift(0,15)
|
||||
points.grainlineToPocketbag = new Point(points.topLeft.x,points.topLeft.y).shift(0,15).shift(-90,ph)
|
||||
points.grainlineToPocketbagRotated = points.grainlineToPocketbag.rotate(options.pocketAngle, points.grainlineFromPocketBag )
|
||||
macro('grainline', {
|
||||
from: points.grainlineFromPocketBag,
|
||||
to: points.grainlineToPocketbagRotated
|
||||
//Grainline
|
||||
points.grainlineFromPocketBag = new Point(points.topLeft.x, points.topLeft.y).shift(0, 15)
|
||||
points.grainlineToPocketbag = new Point(points.topLeft.x, points.topLeft.y)
|
||||
.shift(0, 15)
|
||||
.shift(-90, ph)
|
||||
points.grainlineToPocketbagRotated = points.grainlineToPocketbag.rotate(
|
||||
options.pocketAngle,
|
||||
points.grainlineFromPocketBag
|
||||
)
|
||||
macro('grainline', {
|
||||
from: points.grainlineFromPocketBag,
|
||||
to: points.grainlineToPocketbagRotated,
|
||||
})
|
||||
if (paperless) {
|
||||
macro('hd', {
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
export default (part) => {
|
||||
let { points, Point, paths, Path, measurements, options, macro, complete, paperless, store } =
|
||||
part.shorthand()
|
||||
|
@ -44,14 +43,19 @@ export default (part) => {
|
|||
title: 'pocketFacing',
|
||||
at: points.title,
|
||||
})
|
||||
//Grainline
|
||||
points.grainlineFromPocketFacing = new Point(points.topLeft.x,points.topLeft.y).shift(0,35)
|
||||
points.grainlineToPocketFacing = new Point(points.topLeft.x,points.topLeft.y).shift(0,35).shift(-90,ph)
|
||||
points.grainlineToPocketFacingRotated = points.grainlineToPocketFacing.rotate(options.pocketAngle, points.grainlineFromPocketFacing )
|
||||
macro('grainline', {
|
||||
from: points.grainlineFromPocketFacing,
|
||||
to: points.grainlineToPocketFacingRotated
|
||||
})
|
||||
//Grainline
|
||||
points.grainlineFromPocketFacing = new Point(points.topLeft.x, points.topLeft.y).shift(0, 35)
|
||||
points.grainlineToPocketFacing = new Point(points.topLeft.x, points.topLeft.y)
|
||||
.shift(0, 35)
|
||||
.shift(-90, ph)
|
||||
points.grainlineToPocketFacingRotated = points.grainlineToPocketFacing.rotate(
|
||||
options.pocketAngle,
|
||||
points.grainlineFromPocketFacing
|
||||
)
|
||||
macro('grainline', {
|
||||
from: points.grainlineFromPocketFacing,
|
||||
to: points.grainlineToPocketFacingRotated,
|
||||
})
|
||||
macro('sprinkle', {
|
||||
snippet: 'notch',
|
||||
on: ['notchLeft', 'notchRight'],
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
export default (part) => {
|
||||
let { points, Point, paths, Path, measurements, options, macro, complete, paperless } =
|
||||
part.shorthand()
|
||||
|
@ -25,14 +24,19 @@ export default (part) => {
|
|||
title: 'pocketInterfacing',
|
||||
at: points.title,
|
||||
})
|
||||
//Grainline
|
||||
points.grainlineFromInterfacing = new Point(points.topLeft.x,points.topLeft.y).shift(0,35)
|
||||
points.grainlineToInterfacing = new Point(points.topLeft.x,points.topLeft.y).shift(0,35).shift(-90,pwh+20)
|
||||
points.grainlineToInterfacingRotated = points.grainlineToInterfacing.rotate(options.pocketAngle, points.grainlineFromInterfacing )
|
||||
macro('grainline', {
|
||||
from: points.grainlineFromInterfacing,
|
||||
to: points.grainlineToInterfacingRotated
|
||||
})
|
||||
//Grainline
|
||||
points.grainlineFromInterfacing = new Point(points.topLeft.x, points.topLeft.y).shift(0, 35)
|
||||
points.grainlineToInterfacing = new Point(points.topLeft.x, points.topLeft.y)
|
||||
.shift(0, 35)
|
||||
.shift(-90, pwh + 20)
|
||||
points.grainlineToInterfacingRotated = points.grainlineToInterfacing.rotate(
|
||||
options.pocketAngle,
|
||||
points.grainlineFromInterfacing
|
||||
)
|
||||
macro('grainline', {
|
||||
from: points.grainlineFromInterfacing,
|
||||
to: points.grainlineToInterfacingRotated,
|
||||
})
|
||||
macro('sprinkle', {
|
||||
snippet: 'notch',
|
||||
on: ['notchLeft', 'notchRight'],
|
||||
|
|
|
@ -1,4 +1,3 @@
|
|||
|
||||
export default (part) => {
|
||||
let { points, Point, paths, Path, measurements, options, macro, complete, paperless } =
|
||||
part.shorthand()
|
||||
|
@ -27,16 +26,20 @@ export default (part) => {
|
|||
title: 'pocketWelt',
|
||||
at: points.title,
|
||||
})
|
||||
//Grainline
|
||||
points.grainlineFromWelt = new Point(points.topLeft.x,points.topLeft.y).shift(0,35)
|
||||
points.grainlineToWelt = new Point(points.topLeft.x,points.topLeft.y).shift(0,35).shift(-90,pwh*2+20)
|
||||
points.grainlineToWeltRotated = points.grainlineToWelt.rotate(options.pocketAngle, points.grainlineFromWelt )
|
||||
//Grainline
|
||||
points.grainlineFromWelt = new Point(points.topLeft.x, points.topLeft.y).shift(0, 35)
|
||||
points.grainlineToWelt = new Point(points.topLeft.x, points.topLeft.y)
|
||||
.shift(0, 35)
|
||||
.shift(-90, pwh * 2 + 20)
|
||||
points.grainlineToWeltRotated = points.grainlineToWelt.rotate(
|
||||
options.pocketAngle,
|
||||
points.grainlineFromWelt
|
||||
)
|
||||
|
||||
|
||||
macro('grainline', {
|
||||
from: points.grainlineFromWelt,
|
||||
to: points.grainlineToWeltRotated
|
||||
})
|
||||
macro('grainline', {
|
||||
from: points.grainlineFromWelt,
|
||||
to: points.grainlineToWeltRotated,
|
||||
})
|
||||
macro('sprinkle', {
|
||||
snippet: 'notch',
|
||||
on: ['notchLeft', 'notchRight'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue