1
0
Fork 0
freesewing/designs/carlton/src/front.mjs

511 lines
17 KiB
JavaScript
Raw Normal View History

2022-09-04 11:37:23 -07:00
import { front as bentFront } from '@freesewing/bent'
import { calculateRatios } from './shared.mjs'
2019-03-25 18:20:15 +01:00
2022-09-04 11:37:23 -07:00
function draftCarltonFront (part) {
2019-08-03 15:03:33 +02:00
let {
paperless,
sa,
snippets,
Snippet,
utils,
store,
complete,
points,
measurements,
options,
macro,
Point,
paths,
2021-04-24 10:16:31 +02:00
Path,
2019-08-03 15:03:33 +02:00
} = part.shorthand()
calculateRatios(part)
2019-03-25 18:20:15 +01:00
// Waist shaping
2019-08-03 15:03:33 +02:00
points.waist = points.cfWaist.shift(0, store.get('chest') / 4 - store.get('waistReduction') / 8)
points.waistCp1 = points.waist.shift(-90, points.waist.dy(points.hips) / 2)
points.waistCp2 = points.waist.shift(90, points.armhole.dy(points.waist) / 2)
2019-03-25 18:20:15 +01:00
// Seat shaping
points.cfSeat = points.cfWaist.shift(-90, measurements.waistToSeat)
2019-08-03 15:03:33 +02:00
points.seat = points.cfSeat.shift(0, store.get('seat') / 4)
points.seatCp2 = points.seat.shift(90, points.waist.dy(points.seat) / 3)
2019-03-25 18:20:15 +01:00
// Hem length
points.cfHem = points.cfWaist.shift(-90, measurements.waistToFloor * options.length)
2019-08-03 15:03:33 +02:00
points.hem = new Point(points.seat.x, points.cfHem.y)
store.set('waistToHem', points.cfHem.y - points.waist.y)
2019-03-25 18:20:15 +01:00
// Buttonline
2019-08-03 15:03:33 +02:00
let buttonW = points.waist.x * options.buttonSpacingHorizontal
let buttonH = points.waist.dy(points.hips) / 1.5
points.button1Left = points.cfHips.shift(180, buttonW / 2)
points.button1Right = points.cfHips.shift(0, buttonW / 2)
points.button2Left = points.button1Left.shift(90, buttonH)
points.button2Right = points.button2Left.shift(0, buttonW)
points.button3Left = points.button2Left.shift(90, buttonH)
points.button3Right = points.button3Left.shift(0, buttonW)
2019-03-25 18:20:15 +01:00
// Front closure edge
points.collarEdge = new Point(
points.button1Left.x - measurements.waist * options.frontOverlap,
2019-03-25 18:20:15 +01:00
points.cfNeck.y
2019-08-03 15:03:33 +02:00
)
points.hemEdge = new Point(points.collarEdge.x, points.hem.y)
2019-03-25 18:20:15 +01:00
// Collar
2019-08-03 15:03:33 +02:00
points.collarTip = points.collarEdge.shiftFractionTowards(points.cfNeck, options.lapelReduction)
points.lapelStraightEnd = new Point(points.collarEdge.x, points.armhole.y)
points.lapelStraightEndCp1 = points.lapelStraightEnd.shiftFractionTowards(points.collarEdge, 0.7)
2019-03-25 18:20:15 +01:00
// Pocket
points.pocketTopLeft = new Point(
points.button1Right.x + points.button1Right.dx(points.hips) * options.pocketPlacementHorizontal,
2019-08-03 15:03:33 +02:00
points.button1Right.y +
points.button1Right.dy(points.button3Right) * options.pocketPlacementVertical
)
let pocketWidth = points.button1Right.dx(points.hips) * options.pocketWidth
let pocketHeight = pocketWidth * (1 + options.pocketHeight)
points.pocketTopRight = points.pocketTopLeft.shift(0, pocketWidth)
points.pocketBottomLeft = points.pocketTopLeft.shift(-90, pocketHeight)
points.pocketBottomRight = points.pocketTopRight.shift(-90, pocketHeight)
2019-03-25 18:20:15 +01:00
if (options.pocketRadius > 0) {
2019-08-03 15:03:33 +02:00
let radius = pocketWidth * options.pocketRadius
macro('round', {
2019-03-25 18:20:15 +01:00
from: points.pocketTopLeft,
to: points.pocketBottomRight,
via: points.pocketBottomLeft,
2019-08-03 15:03:33 +02:00
prefix: 'pocketRoundLeft',
2021-04-24 10:16:31 +02:00
radius,
2019-08-03 15:03:33 +02:00
})
macro('round', {
2019-03-25 18:20:15 +01:00
from: points.pocketBottomLeft,
to: points.pocketTopRight,
via: points.pocketBottomRight,
2019-08-03 15:03:33 +02:00
prefix: 'pocketRoundRight',
2021-04-24 10:16:31 +02:00
radius,
2019-08-03 15:03:33 +02:00
})
store.set('pocketRadius', radius)
2019-03-25 18:20:15 +01:00
}
2019-08-03 15:03:33 +02:00
store.set('pocketWidth', pocketWidth)
store.set('pocketHeight', pocketHeight)
2019-03-25 18:20:15 +01:00
// Pocket flap
2019-08-03 15:03:33 +02:00
points.pocketFlapMid = points.pocketTopLeft.shift(0, pocketWidth / 2)
let pocketFlapHeight = pocketHeight * 0.3
store.set('pocketFlapHeight', pocketFlapHeight)
2019-03-25 18:20:15 +01:00
points.pocketFlapTopLeft = new Point(
points.pocketTopLeft.x - pocketWidth * 0.005,
points.pocketTopLeft.y - pocketFlapHeight / 4
2019-08-03 15:03:33 +02:00
)
2019-03-25 18:20:15 +01:00
points.pocketFlapBottomLeft = new Point(
points.pocketFlapTopLeft.x,
points.pocketTopLeft.y + pocketFlapHeight * 0.75
2019-08-03 15:03:33 +02:00
)
points.pocketFlapTopRight = points.pocketFlapTopLeft.flipX(points.pocketFlapMid)
points.pocketFlapBottomRight = points.pocketFlapBottomLeft.flipX(points.pocketFlapMid)
2019-03-25 18:20:15 +01:00
if (options.pocketFlapRadius > 0) {
2019-08-03 15:03:33 +02:00
let radius = pocketWidth * options.pocketFlapRadius
macro('round', {
2019-03-25 18:20:15 +01:00
from: points.pocketFlapTopLeft,
to: points.pocketFlapBottomRight,
via: points.pocketFlapBottomLeft,
2019-08-03 15:03:33 +02:00
prefix: 'pocketFlapRoundLeft',
2021-04-24 10:16:31 +02:00
radius,
2019-08-03 15:03:33 +02:00
})
macro('round', {
2019-03-25 18:20:15 +01:00
from: points.pocketFlapBottomLeft,
to: points.pocketFlapTopRight,
via: points.pocketFlapBottomRight,
2019-08-03 15:03:33 +02:00
prefix: 'pocketFlapRoundRight',
2021-04-24 10:16:31 +02:00
radius,
2019-08-03 15:03:33 +02:00
})
store.set('pocketFlapRadius', radius)
2019-03-25 18:20:15 +01:00
}
// Chest pocket
points.chestPocketAnchor = new Point(
points.waist.x * options.chestPocketPlacement,
points.button2Right.shiftFractionTowards(points.button3Right, 0.2).y
2019-08-03 15:03:33 +02:00
)
let chestPocketHeight = points.armhole.dy(points.chestPocketAnchor) * options.chestPocketHeight
let chestPocketWidth = chestPocketHeight * options.chestPocketWidth
store.set('chestPocketHeight', chestPocketHeight)
store.set('chestPocketWidth', chestPocketWidth)
points.chestPocketBottomLeft = points.chestPocketAnchor.shift(180, chestPocketWidth / 2)
points.chestPocketTopLeft = points.chestPocketBottomLeft.shift(90, chestPocketHeight)
points.chestPocketBottomRight = points.chestPocketBottomLeft.flipX(points.chestPocketAnchor)
points.chestPocketTopRight = points.chestPocketTopLeft.flipX(points.chestPocketAnchor)
2019-03-25 18:20:15 +01:00
for (let i of [
2019-08-03 15:03:33 +02:00
'chestPocketTopLeft',
'chestPocketBottomLeft',
'chestPocketTopRight',
2021-04-24 10:16:31 +02:00
'chestPocketBottomRight',
2019-08-03 15:03:33 +02:00
])
points[i] = points[i].rotate(options.chestPocketAngle, points.chestPocketAnchor)
store.set('chestPocketBagDepth', points.button3Left.dx(points.chestPocketBottomLeft))
2019-03-25 18:20:15 +01:00
// Inner pocket
points.innerPocketAnchor = new Point(
points.waist.x * options.innerPocketPlacement,
points.button2Right.shiftFractionTowards(points.button3Right, 1.5).y
2019-08-03 15:03:33 +02:00
)
let innerPocketWidth = points.waist.x * options.innerPocketWidth
let weltHeight = innerPocketWidth * options.innerPocketWeltHeight
store.set('innerPocketWeltHeight', weltHeight)
store.set('innerPocketWidth', innerPocketWidth)
points.innerPocketTop = points.innerPocketAnchor.shift(90, weltHeight)
points.innerPocketBottom = points.innerPocketAnchor.shift(-90, weltHeight)
points.innerPocketLeft = points.innerPocketAnchor.shift(180, innerPocketWidth / 2)
points.innerPocketRight = points.innerPocketLeft.flipX(points.innerPocketAnchor)
points.innerPocketTopLeft = points.innerPocketLeft.shift(90, weltHeight)
points.innerPocketTopRight = points.innerPocketTopLeft.flipX(points.innerPocketAnchor)
points.innerPocketBottomLeft = points.innerPocketLeft.shift(-90, weltHeight)
points.innerPocketBottomRight = points.innerPocketBottomLeft.flipX(points.innerPocketAnchor)
2019-03-25 18:20:15 +01:00
// Roll line
2019-08-03 15:03:33 +02:00
points.rollLineEdge = points.shoulder.shiftFractionTowards(points.neck, 1.15)
points.rollLineStart = new Point(points.collarEdge.x, points.button3Left.y)
2019-03-25 18:20:15 +01:00
points.rollLineEnd = utils.lineIntersectsCurve(
points.rollLineStart,
points.rollLineEdge,
points.cfNeck,
points.cfNeckCp1,
points.neckCp2Front,
points.neck
2019-08-03 15:03:33 +02:00
)
2019-03-25 18:20:15 +01:00
// Facing/Lining border (flb)
2019-08-03 15:03:33 +02:00
points.flbX = points.button1Right.shift(0, points.button1Right.dx(points.pocketTopLeft) / 2)
points.flbHem = new Point(points.flbX.x, points.hemEdge.y)
if (points.flbHem.x <= points.cfNeck.x) points.flbTop = new Point(points.flbX.x, points.cfNeck.y)
2019-03-25 18:20:15 +01:00
else if (points.flbHem.x < points.neck.x)
points.flbTop = utils.lineIntersectsCurve(
points.flbHem,
2019-08-03 15:03:33 +02:00
points.flbX.shift(90, points.flbHem.y * 2),
2019-03-25 18:20:15 +01:00
points.cfNeck,
points.cfNeckCp1,
points.neckCp2Front,
points.neck
2019-08-03 15:03:33 +02:00
)
2019-03-25 18:20:15 +01:00
else if (points.flbHem.x < points.shoulder.x)
2019-08-03 15:03:33 +02:00
points.flbTop = utils.beamsIntersect(points.flbHem, points.flbX, points.neck, points.shoulder)
else throw new Error('Could not find intersection of facing/lining boundary with neckline')
2019-03-25 18:20:15 +01:00
// Store collar length
store.set(
2019-08-03 15:03:33 +02:00
'frontCollarLength',
2019-03-25 18:20:15 +01:00
new Path()
.move(points.cfNeck)
.curve(points.cfNeckCp1, points.neckCp2Front, points.neck)
.length()
2019-08-03 15:03:33 +02:00
)
2019-03-25 18:20:15 +01:00
// Clean up
2021-06-13 14:31:15 +02:00
for (let i in paths) {
2021-08-30 11:40:16 +02:00
if (['frontArmhole', 'frontCollar'].indexOf(i) === -1) delete paths[i]
2021-06-13 14:31:15 +02:00
}
2019-03-25 18:20:15 +01:00
for (let i in snippets) delete snippets[i]
// Paths
2019-03-27 07:47:36 +01:00
paths.saBase = new Path()
.move(points.hem)
2019-03-25 18:20:15 +01:00
.line(points.seat)
.curve(points.seatCp2, points.waistCp1, points.waist)
.curve_(points.waistCp2, points.armhole)
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
2021-06-13 14:31:15 +02:00
.join(paths.frontArmhole)
.line(points.s3CollarSplit)
.join(paths.frontCollar)
2019-03-25 18:20:15 +01:00
.line(points.collarTip)
2019-03-27 07:47:36 +01:00
._curve(points.lapelStraightEndCp1, points.lapelStraightEnd)
.line(points.hemEdge)
2019-08-03 15:03:33 +02:00
.line(points.flbHem)
paths.hemBase = new Path().move(points.flbHem).line(points.hem)
paths.saBase.render = false
paths.hemBase.render = false
paths.seam = paths.saBase.join(paths.hemBase).close().attr('class', 'fabric')
2019-03-25 18:20:15 +01:00
paths.rollLine = new Path()
.move(points.rollLineStart)
.line(points.rollLineEnd)
2019-08-03 15:03:33 +02:00
.attr('class', 'lashed')
2019-03-25 18:20:15 +01:00
paths.chestPiece = new Path()
.move(points.rollLineStart)
.curve(points.button3Right, points.waistCp2, points.armhole)
2019-08-03 15:03:33 +02:00
.attr('class', 'canvas lashed')
2019-03-25 18:20:15 +01:00
paths.flb = new Path().move(points.flbHem).line(points.flbTop).attr('class', 'lining lashed')
2019-03-25 18:20:15 +01:00
2019-08-03 15:03:33 +02:00
paths.pocket = new Path().move(points.pocketTopLeft)
2019-03-25 18:20:15 +01:00
if (options.pocketRadius > 0) {
paths.pocket = paths.pocket
.line(points.pocketRoundLeftStart)
.curve(points.pocketRoundLeftCp1, points.pocketRoundLeftCp2, points.pocketRoundLeftEnd)
.line(points.pocketRoundRightStart)
.curve(points.pocketRoundRightCp1, points.pocketRoundRightCp2, points.pocketRoundRightEnd)
} else {
2019-08-03 15:03:33 +02:00
paths.pocket = paths.pocket.line(points.pocketBottomLeft).line(points.pocketBottomRight)
2019-03-25 18:20:15 +01:00
}
paths.pocket = paths.pocket
.line(points.pocketTopRight)
.line(points.pocketTopLeft)
.close()
2019-08-03 15:03:33 +02:00
.attr('class', 'fabric help')
2019-03-25 18:20:15 +01:00
2019-08-03 15:03:33 +02:00
paths.pocketFlap = new Path().move(points.pocketFlapTopLeft)
2019-03-25 18:20:15 +01:00
if (options.pocketFlapRadius > 0) {
paths.pocketFlap = paths.pocketFlap
.line(points.pocketFlapRoundLeftStart)
2019-08-03 15:03:33 +02:00
.curve(
points.pocketFlapRoundLeftCp1,
points.pocketFlapRoundLeftCp2,
points.pocketFlapRoundLeftEnd
)
2019-03-25 18:20:15 +01:00
.line(points.pocketFlapRoundRightStart)
2019-08-03 15:03:33 +02:00
.curve(
points.pocketFlapRoundRightCp1,
points.pocketFlapRoundRightCp2,
points.pocketFlapRoundRightEnd
)
2019-03-25 18:20:15 +01:00
} else {
paths.pocketFlap = paths.pocketFlap
.line(points.pocketFlapBottomLeft)
2019-08-03 15:03:33 +02:00
.line(points.pocketFlapBottomRight)
2019-03-25 18:20:15 +01:00
}
paths.pocketFlap = paths.pocketFlap
.line(points.pocketFlapTopRight)
.line(points.pocketFlapTopLeft)
.close()
2019-08-03 15:03:33 +02:00
.attr('class', 'fabric help')
2019-03-25 18:20:15 +01:00
paths.chestPocket = new Path()
.move(points.chestPocketTopLeft)
.line(points.chestPocketBottomLeft)
.line(points.chestPocketBottomRight)
.line(points.chestPocketTopRight)
.line(points.chestPocketTopLeft)
.close()
2019-08-03 15:03:33 +02:00
.attr('class', 'fabric help')
2019-03-25 18:20:15 +01:00
2019-03-30 14:38:31 +01:00
paths.innerPocket = new Path()
.move(points.innerPocketTopLeft)
.line(points.innerPocketBottomLeft)
.line(points.innerPocketBottomRight)
.line(points.innerPocketTopRight)
.line(points.innerPocketTopLeft)
.close()
2019-08-03 15:03:33 +02:00
.attr('class', 'fabric help')
2019-03-30 14:38:31 +01:00
2019-03-25 18:20:15 +01:00
if (complete) {
2019-08-03 15:03:33 +02:00
snippets.button1Left = new Snippet('button', points.button1Left).attr('data-scale', 2)
snippets.button1Right = new Snippet('button', points.button1Right).attr('data-scale', 2)
snippets.button2Left = new Snippet('button', points.button2Left).attr('data-scale', 2)
snippets.button2Right = new Snippet('button', points.button2Right).attr('data-scale', 2)
snippets.button3Left = new Snippet('button', points.button3Left).attr('data-scale', 2)
snippets.button3Right = new Snippet('button', points.button3Right).attr('data-scale', 2)
macro('sprinkle', {
snippet: 'notch',
2021-04-24 10:16:31 +02:00
on: ['shoulder', 'cfNeck', 'rollLineStart', 'waist', 'seat'],
2019-08-03 15:03:33 +02:00
})
points.logo = new Point(points.chestPocketTopRight.x, points.armhole.y)
snippets.logo = new Snippet('logo', points.logo)
macro('grainline', {
2019-03-27 07:47:36 +01:00
from: points.cfHem,
2021-04-24 10:16:31 +02:00
to: points.cfNeck,
2019-08-03 15:03:33 +02:00
})
2019-03-27 07:47:36 +01:00
if (sa) {
paths.sa = paths.saBase
.offset(sa)
2019-08-03 15:03:33 +02:00
.join(paths.hemBase.offset(sa * 3))
2019-03-27 07:47:36 +01:00
.close()
2019-08-03 15:03:33 +02:00
.attr('class', 'fabric sa')
2019-03-27 07:47:36 +01:00
}
if (paperless) {
2019-08-03 15:03:33 +02:00
macro('ld', {
2019-03-27 07:47:36 +01:00
from: points.hemEdge,
to: points.flbHem,
2021-04-24 10:16:31 +02:00
d: 15,
2019-08-03 15:03:33 +02:00
})
macro('ld', {
2019-03-27 07:47:36 +01:00
from: points.flbHem,
to: points.hem,
2021-04-24 10:16:31 +02:00
d: 15,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-27 07:47:36 +01:00
from: points.hemEdge,
to: points.hem,
2021-04-24 10:16:31 +02:00
y: points.hem.y + 15 + 3 * sa,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-27 07:47:36 +01:00
from: points.rollLineStart,
to: points.pocketTopLeft,
2021-04-24 10:16:31 +02:00
y: points.pocketFlapBottomLeft.y,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.pocketFlapTopRight,
to: points.waist,
2021-04-24 10:16:31 +02:00
x: points.pocketTopRight.x - 15,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.pocketTopRight,
to: points.waist,
2021-04-24 10:16:31 +02:00
x: points.pocketTopRight.x - 30,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.chestPocketBottomLeft,
to: points.waist,
2021-04-24 10:16:31 +02:00
x: points.chestPocketBottomLeft.x - 15,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-27 07:47:36 +01:00
from: points.rollLineStart,
to: points.chestPocketBottomLeft,
2021-04-24 10:16:31 +02:00
y: points.chestPocketBottomLeft.y + 15,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-27 07:47:36 +01:00
from: points.rollLineStart,
to: points.button3Left,
2021-04-24 10:16:31 +02:00
y: points.button3Left.y + 15,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-27 07:47:36 +01:00
from: points.button3Left,
to: points.button3Right,
2021-04-24 10:16:31 +02:00
y: points.button3Left.y + 15,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.hem,
to: points.seat,
2021-04-24 10:16:31 +02:00
x: points.hem.x + sa + 15,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.hem,
to: points.waist,
2021-04-24 10:16:31 +02:00
x: points.hem.x + sa + 30,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.hem,
to: points.armhole,
2021-04-24 10:16:31 +02:00
x: points.hem.x + sa + 45,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.armhole,
to: points.armholePitch,
2021-04-24 10:16:31 +02:00
x: points.armhole.x + sa + 15,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.armhole,
2021-06-13 14:31:15 +02:00
to: points.s3ArmholeSplit,
2021-04-24 10:16:31 +02:00
x: points.armhole.x + sa + 30,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.armhole,
2021-06-13 14:31:15 +02:00
to: points.s3CollarSplit,
2021-04-24 10:16:31 +02:00
x: points.armhole.x + sa + 45,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.rollLineStart,
to: points.collarTip,
2021-04-24 10:16:31 +02:00
x: points.rollLineStart.x - sa - 15,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.button2Left,
to: points.rollLineStart,
2021-04-24 10:16:31 +02:00
x: points.rollLineStart.x - sa - 15,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.button1Left,
to: points.button2Left,
2021-04-24 10:16:31 +02:00
x: points.rollLineStart.x - sa - 15,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.hemEdge,
to: points.collarTip,
2021-04-24 10:16:31 +02:00
x: points.rollLineStart.x - sa - 30,
2019-08-03 15:03:33 +02:00
})
macro('vd', {
2019-03-27 07:47:36 +01:00
from: points.hemEdge,
2021-06-13 14:31:15 +02:00
to: points.s3CollarSplit,
2021-04-24 10:16:31 +02:00
x: points.rollLineStart.x - sa - 45,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-27 07:47:36 +01:00
from: points.lapelStraightEnd,
to: points.collarTip,
2021-04-24 10:16:31 +02:00
y: points.collarTip.y - sa - 15,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-27 07:47:36 +01:00
from: points.lapelStraightEnd,
to: points.cfNeck,
2021-04-24 10:16:31 +02:00
y: points.collarTip.y - sa - 30,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-27 07:47:36 +01:00
from: points.lapelStraightEnd,
to: points.rollLineEnd,
2021-04-24 10:16:31 +02:00
y: points.collarTip.y - sa - 45,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-27 07:47:36 +01:00
from: points.lapelStraightEnd,
to: points.neck,
2021-06-13 14:31:15 +02:00
y: points.s3CollarSplit.y - sa - 15,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-27 07:47:36 +01:00
from: points.lapelStraightEnd,
to: points.armholePitch,
2021-06-13 14:31:15 +02:00
y: points.s3CollarSplit.y - sa - 30,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-27 07:47:36 +01:00
from: points.lapelStraightEnd,
2021-06-13 14:31:15 +02:00
to: points.s3ArmholeSplit,
y: points.s3CollarSplit.y - sa - 45,
2019-08-03 15:03:33 +02:00
})
macro('hd', {
2019-03-27 07:47:36 +01:00
from: points.lapelStraightEnd,
to: points.armhole,
2021-06-13 14:31:15 +02:00
y: points.s3CollarSplit.y - sa - 60,
2019-08-03 15:03:33 +02:00
})
2019-03-27 07:47:36 +01:00
}
2019-03-25 18:20:15 +01:00
}
2019-08-03 15:03:33 +02:00
return part
2019-03-25 18:20:15 +01:00
}
2022-09-04 11:37:23 -07:00
export const front = {
name: 'carlton.front',
from: bentFront,
hideDependencies: true,
measurements: [
'waist',
'waistToFloor',
'waistToSeat',
],
options: {
chestEase: { pct: 10, min: 5, max: 20, menu: 'fit' },
buttonSpacingHorizontal: { pct: 43.5, min: 15, max: 60, menu: 'style' },
length: { pct: 69, min: 35, max: 100, menu: 'style' },
lapelReduction: { pct: 5, min: 0, max: 10, menu: 'advanced' },
frontOverlap: { pct: 1.5, min: 1, max: 2, menu: 'advanced' },
pocketPlacementHorizontal: { pct: 11, min: 5, max: 60, menu: 'pockets' },
pocketPlacementVertical: { pct: 6, min: 5, max: 60, menu: 'pockets' },
pocketWidth: { pct: 95, min: 70, max: 120, menu: 'pockets' },
pocketHeight: { pct: 15, min: 0, max: 40, menu: 'pockets' },
pocketRadius: { pct: 20, min: 0, max: 50, menu: 'pockets' },
pocketFlapRadius: { pct: 15, min: 0, max: 50, menu: 'pockets' },
chestPocketPlacement: { pct: 55, min: 30, max: 65, menu: 'pockets' },
chestPocketAngle: { deg: 4, min: 0, max: 6, menu: 'pockets' },
chestPocketHeight: { pct: 60, min: 40, max: 80, menu: 'pockets' },
chestPocketWidth: { pct: 25, min: 15, max: 50, menu: 'pockets' },
innerPocketPlacement: { pct: 53, min: 42, max: 62, menu: 'pockets' },
innerPocketWidth: { pct: 50, min: 45, max: 65, menu: 'pockets' },
waistEase: { pct: 14, min: 8, max: 25, menu: 'fit' },
seatEase: { pct: 14, min: 8, max: 25, menu: 'fit' },
innerPocketWeltHeight: { pct: 3.5, min: 2.5, max: 5, menu: 'pockets' },
},
draft: draftCarltonFront,
}