Pocket Outline
This commit is contained in:
parent
9d91cfee74
commit
13848f8252
3 changed files with 24 additions and 9 deletions
|
@ -30,7 +30,6 @@ export default {
|
||||||
'waistCircumference',
|
'waistCircumference',
|
||||||
'hipsCircumference',
|
'hipsCircumference',
|
||||||
'hpsToWaistBack',
|
'hpsToWaistBack',
|
||||||
'hpsToWaistFront',
|
|
||||||
'waistToKnee'
|
'waistToKnee'
|
||||||
],
|
],
|
||||||
dependencies: {},
|
dependencies: {},
|
||||||
|
|
|
@ -16,19 +16,21 @@ export default function (part) {
|
||||||
|
|
||||||
let chestWidth = measurements.chestCircumference / 4
|
let chestWidth = measurements.chestCircumference / 4
|
||||||
let bibWidth = chestWidth * options.bibWidth
|
let bibWidth = chestWidth * options.bibWidth
|
||||||
let bibLength = measurements.hpsToWaistFront * options.bibLength
|
let bibLength = measurements.hpsToWaistBack * options.bibLength
|
||||||
let apronLength =
|
let apronLength =
|
||||||
measurements.hpsToWaistFront * options.bibLength +
|
measurements.hpsToWaistBack * options.bibLength +
|
||||||
measurements.waistToKnee * (1 + options.lengthBonus)
|
measurements.waistToKnee * (1 + options.lengthBonus)
|
||||||
let apronWidth =
|
let apronWidth =
|
||||||
Math.max(measurements.hipsCircumference, measurements.waistCircumference) *
|
Math.max(measurements.hipsCircumference, measurements.waistCircumference) *
|
||||||
(1 - options.backOpening)
|
(1 - options.backOpening)
|
||||||
let strapWidth = options.strapWidth * sa
|
let strapWidth = options.strapWidth * sa
|
||||||
let hemWidth = 3 * sa
|
let hemWidth = 3 * sa
|
||||||
|
let pocketSize = apronLength / 4
|
||||||
|
|
||||||
points.topLeft = new Point(0, 0)
|
points.topLeft = new Point(0, 0)
|
||||||
points.topLeftHem = points.topLeft.shift(270, hemWidth)
|
points.topLeftHem = points.topLeft.shift(270, hemWidth)
|
||||||
points.bottomLeftHem = points.topLeftHem.shift(270, apronLength)
|
points.bottomLeftHem = points.topLeftHem.shift(270, apronLength)
|
||||||
|
points.waistLeft = points.topLeftHem.shift(270, bibLength)
|
||||||
points.bottomLeft = points.bottomLeftHem.shift(270, hemWidth)
|
points.bottomLeft = points.bottomLeftHem.shift(270, hemWidth)
|
||||||
points.topRight = points.topLeft.shift(0, bibWidth / 2)
|
points.topRight = points.topLeft.shift(0, bibWidth / 2)
|
||||||
points.topRightHem = points.topLeftHem.shift(0, bibWidth / 2)
|
points.topRightHem = points.topLeftHem.shift(0, bibWidth / 2)
|
||||||
|
@ -38,14 +40,18 @@ export default function (part) {
|
||||||
points.topRightBackCPfront = points.topRightBack.shift(180, (apronWidth - bibWidth) / 2 / 1.5)
|
points.topRightBackCPfront = points.topRightBack.shift(180, (apronWidth - bibWidth) / 2 / 1.5)
|
||||||
points.topRightCPdown = points.topRightHem.shift(
|
points.topRightCPdown = points.topRightHem.shift(
|
||||||
270,
|
270,
|
||||||
(measurements.hpsToWaistFront * options.bibLength) / 4
|
(measurements.hpsToWaistBack * options.bibLength) / 4
|
||||||
)
|
)
|
||||||
|
|
||||||
points.topCOF = points.topLeft.shift(270, apronLength / 5)
|
points.topCOF = points.topLeft.shift(270, apronLength / 5)
|
||||||
points.bottomCOF = points.bottomLeft.shift(90, apronLength / 5)
|
points.bottomCOF = points.bottomLeft.shift(90, apronLength / 5)
|
||||||
|
|
||||||
console.log('bibLength ' + measurements.hpsToWaistFront * options.bibLength)
|
points.pocketLeftTop = points.waistLeft.copy()
|
||||||
console.log('hpsToWaistFront ' + measurements.hpsToWaistFront)
|
points.pocketRightTop = points.pocketLeftTop.shift(0, pocketSize)
|
||||||
|
points.pocketLeftBottom = points.pocketLeftTop.shift(270, pocketSize)
|
||||||
|
points.pocketRightBottom = points.pocketLeftBottom.shift(0, pocketSize)
|
||||||
|
|
||||||
|
console.log('bibLength ' + measurements.hpsToWaistBack * options.bibLength)
|
||||||
console.log('hpsToWaistBack ' + measurements.hpsToWaistBack)
|
console.log('hpsToWaistBack ' + measurements.hpsToWaistBack)
|
||||||
|
|
||||||
paths.rightHem = new Path()
|
paths.rightHem = new Path()
|
||||||
|
@ -57,6 +63,16 @@ export default function (part) {
|
||||||
.attr('data-text', 'narrow hem')
|
.attr('data-text', 'narrow hem')
|
||||||
.attr('data-text-class', 'text-xs center')
|
.attr('data-text-class', 'text-xs center')
|
||||||
|
|
||||||
|
paths.pocket = new Path()
|
||||||
|
.move(points.pocketLeftBottom)
|
||||||
|
.line(points.pocketLeftTop)
|
||||||
|
.line(points.pocketRightTop)
|
||||||
|
.line(points.pocketRightBottom)
|
||||||
|
.line(points.pocketLeftBottom)
|
||||||
|
.attr('class', 'various dashed')
|
||||||
|
.attr('data-text', 'pocket')
|
||||||
|
.attr('data-text-class', 'text-xs center')
|
||||||
|
|
||||||
paths.right = paths.rightHem.offset(sa)
|
paths.right = paths.rightHem.offset(sa)
|
||||||
|
|
||||||
paths.seam = new Path()
|
paths.seam = new Path()
|
||||||
|
@ -83,7 +99,7 @@ export default function (part) {
|
||||||
|
|
||||||
// Complete?
|
// Complete?
|
||||||
if (complete) {
|
if (complete) {
|
||||||
points.logo = points.topLeft.shiftFractionTowards(points.bottomRight, 0.5)
|
points.logo = points.topRightBack.shiftFractionTowards(points.pocketRightBottom, 0.5)
|
||||||
snippets.logo = new Snippet('logo', points.logo)
|
snippets.logo = new Snippet('logo', points.logo)
|
||||||
points.title = points.logo.shift(-90, 100)
|
points.title = points.logo.shift(-90, 100)
|
||||||
macro('title', {
|
macro('title', {
|
||||||
|
|
|
@ -25,8 +25,8 @@ export default function (part) {
|
||||||
let hSpan = backOpening / 2 + bibWidth / 2
|
let hSpan = backOpening / 2 + bibWidth / 2
|
||||||
let vSpan =
|
let vSpan =
|
||||||
measurements.hpsToWaistBack +
|
measurements.hpsToWaistBack +
|
||||||
measurements.hpsToWaistFront -
|
measurements.hpsToWaistBack -
|
||||||
measurements.hpsToWaistFront * options.bibLength
|
measurements.hpsToWaistBack * options.bibLength
|
||||||
|
|
||||||
let strapLength =
|
let strapLength =
|
||||||
Math.sqrt(hSpan * hSpan + vSpan * vSpan) + measurements.chestCircumference * options.chestDepth
|
Math.sqrt(hSpan * hSpan + vSpan * vSpan) + measurements.chestCircumference * options.chestDepth
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue