Port Carlton to v3.
This commit is contained in:
parent
08fe1d4583
commit
e8f4903148
20 changed files with 295 additions and 274 deletions
|
@ -1,176 +0,0 @@
|
||||||
import pkg from '../package.json' assert { type: 'json' }
|
|
||||||
|
|
||||||
const { version } = pkg
|
|
||||||
|
|
||||||
export default {
|
|
||||||
version,
|
|
||||||
name: 'carlton',
|
|
||||||
design: ['Anneke Caramin', 'Joost De Cock'],
|
|
||||||
code: 'Joost De Cock',
|
|
||||||
department: 'coats',
|
|
||||||
type: 'pattern',
|
|
||||||
difficulty: 5,
|
|
||||||
optionGroups: {
|
|
||||||
fit: [
|
|
||||||
'acrossBackFactor',
|
|
||||||
'armholeDepthFactor',
|
|
||||||
'bicepsEase',
|
|
||||||
'chestEase',
|
|
||||||
'cuffEase',
|
|
||||||
'shoulderEase',
|
|
||||||
'sleeveBend',
|
|
||||||
'sleeveLengthBonus',
|
|
||||||
'waistEase',
|
|
||||||
'seatEase',
|
|
||||||
'draftForHighBust',
|
|
||||||
],
|
|
||||||
advanced: [
|
|
||||||
'backNeckCutout',
|
|
||||||
'frontArmholeDeeper',
|
|
||||||
'frontOverlap',
|
|
||||||
'lapelReduction',
|
|
||||||
'shoulderSlopeReduction',
|
|
||||||
'sleevecapHeight',
|
|
||||||
'sleevecapEase',
|
|
||||||
],
|
|
||||||
pockets: [
|
|
||||||
'pocketPlacementHorizontal',
|
|
||||||
'pocketPlacementVertical',
|
|
||||||
'pocketWidth',
|
|
||||||
'pocketHeight',
|
|
||||||
'pocketRadius',
|
|
||||||
'pocketFlapRadius',
|
|
||||||
'chestPocketHeight',
|
|
||||||
'chestPocketWidth',
|
|
||||||
'chestPocketPlacement',
|
|
||||||
'chestPocketAngle',
|
|
||||||
'innerPocketPlacement',
|
|
||||||
'innerPocketWidth',
|
|
||||||
'innerPocketDepth',
|
|
||||||
'innerPocketWeltHeight',
|
|
||||||
],
|
|
||||||
style: [
|
|
||||||
'beltWidth',
|
|
||||||
'buttonSpacingHorizontal',
|
|
||||||
'cuffLength',
|
|
||||||
'length',
|
|
||||||
's3Collar',
|
|
||||||
's3Armhole',
|
|
||||||
],
|
|
||||||
collar: ['collarHeight', 'collarSpread', 'collarFlare'],
|
|
||||||
},
|
|
||||||
measurements: [
|
|
||||||
'biceps',
|
|
||||||
'chest',
|
|
||||||
'hips',
|
|
||||||
'hpsToWaistBack',
|
|
||||||
'waist',
|
|
||||||
'waistToHips',
|
|
||||||
'neck',
|
|
||||||
'shoulderSlope',
|
|
||||||
'shoulderToElbow',
|
|
||||||
'shoulderToShoulder',
|
|
||||||
'shoulderToWrist',
|
|
||||||
'wrist',
|
|
||||||
'waistToFloor',
|
|
||||||
'waistToSeat',
|
|
||||||
'seat',
|
|
||||||
],
|
|
||||||
optionalMeasurements: ['highBust'],
|
|
||||||
dependencies: {
|
|
||||||
bentBack: 'bentBase',
|
|
||||||
bentFront: 'bentBack',
|
|
||||||
bentTopSleeve: 'bentSleeve',
|
|
||||||
bentUnderSleeve: 'bentSleeve',
|
|
||||||
front: 'bentFront',
|
|
||||||
back: 'bentBack',
|
|
||||||
tail: ['front', 'back'],
|
|
||||||
topSleeve: ['bentTopSleeve', 'bentFront'],
|
|
||||||
underSleeve: ['bentUnderSleeve', 'bentFront'],
|
|
||||||
belt: 'back',
|
|
||||||
collarStand: ['front', 'back'],
|
|
||||||
collar: 'collarStand',
|
|
||||||
cuffFacing: ['topSleeve', 'underSleeve', 'bentFront'],
|
|
||||||
pocket: 'front',
|
|
||||||
pocketFlap: 'front',
|
|
||||||
pocketLining: 'pocket',
|
|
||||||
chestPocketWelt: 'front',
|
|
||||||
chestPocketBag: 'front',
|
|
||||||
innerPocketWelt: 'front',
|
|
||||||
innerPocketBag: 'front',
|
|
||||||
innerPocketTab: 'front',
|
|
||||||
},
|
|
||||||
inject: {
|
|
||||||
bentBack: 'bentBase',
|
|
||||||
bentFront: 'bentBack',
|
|
||||||
bentTopSleeve: 'bentSleeve',
|
|
||||||
bentUnderSleeve: 'bentSleeve',
|
|
||||||
front: 'bentFront',
|
|
||||||
back: 'bentBack',
|
|
||||||
topSleeve: 'bentTopSleeve',
|
|
||||||
underSleeve: 'bentUnderSleeve',
|
|
||||||
collar: 'collarStand',
|
|
||||||
pocketLining: 'pocket',
|
|
||||||
},
|
|
||||||
hide: ['bentBase', 'bentBack', 'bentFront', 'bentSleeve', 'bentTopSleeve', 'bentUnderSleeve'],
|
|
||||||
options: {
|
|
||||||
// Constants
|
|
||||||
brianFitSleeve: true,
|
|
||||||
brianFitCollar: true,
|
|
||||||
collarFactor: 4.8,
|
|
||||||
chestShapingMax: 5,
|
|
||||||
backPleat: 0.048,
|
|
||||||
lengthBonus: 0,
|
|
||||||
collarEase: 0.145,
|
|
||||||
|
|
||||||
// Options inherited from Bent
|
|
||||||
acrossBackFactor: { pct: 97, min: 93, max: 100 },
|
|
||||||
armholeDepthFactor: { pct: 65, min: 50, max: 70 },
|
|
||||||
bicepsEase: { pct: 20, min: 0, max: 50 },
|
|
||||||
chestEase: { pct: 10, min: 5, max: 20 },
|
|
||||||
cuffEase: { pct: 60, min: 30, max: 100 },
|
|
||||||
shoulderEase: { pct: 0, min: -2, max: 6 },
|
|
||||||
sleeveBend: { deg: 10, min: 0, max: 20 },
|
|
||||||
sleevecapHeight: { pct: 45, min: 40, max: 60 },
|
|
||||||
sleevecapEase: { pct: 1, min: 0, max: 10 },
|
|
||||||
sleeveLengthBonus: { pct: 7, min: 0, max: 20 },
|
|
||||||
shoulderSlopeReduction: { pct: 12, min: 0, max: 80 },
|
|
||||||
backNeckCutout: { pct: 5, min: 2, max: 8 },
|
|
||||||
frontArmholeDeeper: { pct: 0.5, min: 0, max: 1.5 },
|
|
||||||
|
|
||||||
// Carlton options
|
|
||||||
waistEase: { pct: 14, min: 8, max: 25 },
|
|
||||||
seatEase: { pct: 14, min: 8, max: 25 },
|
|
||||||
length: { pct: 69, min: 35, max: 100 },
|
|
||||||
buttonSpacingHorizontal: { pct: 43.5, min: 15, max: 60 },
|
|
||||||
frontOverlap: { pct: 1.5, min: 1, max: 2 },
|
|
||||||
lapelReduction: { pct: 5, min: 0, max: 10 },
|
|
||||||
pocketPlacementHorizontal: { pct: 11, min: 5, max: 60 },
|
|
||||||
pocketPlacementVertical: { pct: 6, min: 5, max: 60 },
|
|
||||||
pocketWidth: { pct: 95, min: 70, max: 120 },
|
|
||||||
pocketHeight: { pct: 15, min: 0, max: 40 },
|
|
||||||
pocketRadius: { pct: 20, min: 0, max: 50 },
|
|
||||||
pocketFlapRadius: { pct: 15, min: 0, max: 50 },
|
|
||||||
chestPocketHeight: { pct: 60, min: 40, max: 80 },
|
|
||||||
chestPocketWidth: { pct: 25, min: 15, max: 50 },
|
|
||||||
chestPocketPlacement: { pct: 55, min: 30, max: 65 },
|
|
||||||
chestPocketAngle: { deg: 4, min: 0, max: 6 },
|
|
||||||
|
|
||||||
innerPocketPlacement: { pct: 53, min: 42, max: 62 },
|
|
||||||
innerPocketWidth: { pct: 50, min: 45, max: 65 },
|
|
||||||
innerPocketDepth: { pct: 110, min: 75, max: 140 },
|
|
||||||
innerPocketWeltHeight: { pct: 3.5, min: 2.5, max: 5 },
|
|
||||||
|
|
||||||
beltWidth: { pct: 15, min: 10, max: 20 },
|
|
||||||
cuffLength: { pct: 15, min: 10, max: 20 },
|
|
||||||
collarHeight: { pct: 9.6, min: 8, max: 11 },
|
|
||||||
collarSpread: { deg: 4, min: 2, max: 6 },
|
|
||||||
collarFlare: { pct: 20, min: 0, max: 40 },
|
|
||||||
// s3 is short for Shoulder Seam Shift
|
|
||||||
s3Collar: { pct: 0, min: -100, max: 100 },
|
|
||||||
s3Armhole: { pct: 0, min: -100, max: 100 },
|
|
||||||
|
|
||||||
// draft for high bust
|
|
||||||
draftForHighBust: { bool: false },
|
|
||||||
},
|
|
||||||
}
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { calculateRatios } from './shared'
|
import { back as bentBack } from '@freesewing/bent'
|
||||||
|
import { calculateRatios } from './shared.mjs'
|
||||||
|
|
||||||
export default function (part) {
|
function draftCarltonBack (part) {
|
||||||
let {
|
let {
|
||||||
paperless,
|
paperless,
|
||||||
sa,
|
sa,
|
||||||
|
@ -226,3 +227,20 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const back = {
|
||||||
|
name: 'carlton.back',
|
||||||
|
from: bentBack,
|
||||||
|
hideDependencies: true,
|
||||||
|
measurements: [
|
||||||
|
'chest',
|
||||||
|
'hpsToWaistBack',
|
||||||
|
],
|
||||||
|
options: {
|
||||||
|
backPleat: 0.048,
|
||||||
|
beltWidth: { pct: 15, min: 10, max: 20, menu: 'style' },
|
||||||
|
waistEase: { pct: 14, min: 8, max: 25, menu: 'fit' },
|
||||||
|
seatEase: { pct: 14, min: 8, max: 25, menu: 'fit' },
|
||||||
|
},
|
||||||
|
draft: draftCarltonBack,
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
export default function (part) {
|
import { back } from './back.mjs'
|
||||||
|
|
||||||
|
function draftCarltonBelt (part) {
|
||||||
let { paperless, sa, snippets, Snippet, store, complete, points, macro, Point, paths, Path } =
|
let { paperless, sa, snippets, Snippet, store, complete, points, macro, Point, paths, Path } =
|
||||||
part.shorthand()
|
part.shorthand()
|
||||||
|
|
||||||
|
@ -82,3 +84,9 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const belt = {
|
||||||
|
name: 'carlton.belt',
|
||||||
|
after: back,
|
||||||
|
draft: draftCarltonBelt,
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
export default function (part) {
|
import { front } from './front.mjs'
|
||||||
|
|
||||||
|
function draftCarltonChestPocketBag (part) {
|
||||||
let { units, paperless, sa, store, complete, points, macro, Point, paths, Path } =
|
let { units, paperless, sa, store, complete, points, macro, Point, paths, Path } =
|
||||||
part.shorthand()
|
part.shorthand()
|
||||||
|
|
||||||
|
@ -65,3 +67,9 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const chestPocketBag = {
|
||||||
|
name: 'carlton.chestPocketBag',
|
||||||
|
after: front,
|
||||||
|
draft: draftCarltonChestPocketBag,
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
export default function (part) {
|
import { front } from './front.mjs'
|
||||||
|
|
||||||
|
function draftCarltonChestPocketWelt (part) {
|
||||||
let { paperless, sa, store, complete, points, macro, Point, paths, Path } = part.shorthand()
|
let { paperless, sa, store, complete, points, macro, Point, paths, Path } = part.shorthand()
|
||||||
|
|
||||||
points.topLeft = new Point(0, 0)
|
points.topLeft = new Point(0, 0)
|
||||||
|
@ -45,3 +47,9 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const chestPocketWelt = {
|
||||||
|
name: 'carlton.chestPocketWelt',
|
||||||
|
after: front,
|
||||||
|
draft: draftCarltonChestPocketWelt,
|
||||||
|
}
|
||||||
|
|
|
@ -1,10 +1,12 @@
|
||||||
|
import { collarStand } from './collarstand.mjs'
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This collar is the most difficult part about this pattern
|
* This collar is the most difficult part about this pattern
|
||||||
* That's because slash&spread is easy with paper and scissors
|
* That's because slash&spread is easy with paper and scissors
|
||||||
* but gets complicated when doing it in code.
|
* but gets complicated when doing it in code.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
export default function (part) {
|
function draftCarltonCollar (part) {
|
||||||
let { paperless, sa, complete, points, options, macro, paths, Path } = part.shorthand()
|
let { paperless, sa, complete, points, options, macro, paths, Path } = part.shorthand()
|
||||||
|
|
||||||
// We're going to slash and spread this collar. Slashing first:
|
// We're going to slash and spread this collar. Slashing first:
|
||||||
|
@ -243,3 +245,12 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const collar = {
|
||||||
|
name: 'carlton.collar',
|
||||||
|
from: collarStand,
|
||||||
|
options: {
|
||||||
|
collarSpread: { deg: 4, min: 2, max: 6, menu: 'collar' },
|
||||||
|
},
|
||||||
|
draft: draftCarltonCollar,
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
export default function (part) {
|
import { front } from './front.mjs'
|
||||||
|
import { back } from './back.mjs'
|
||||||
|
|
||||||
|
function draftCarltonCollarStand (part) {
|
||||||
let { paperless, sa, store, complete, points, measurements, options, macro, Point, paths, Path } =
|
let { paperless, sa, store, complete, points, measurements, options, macro, Point, paths, Path } =
|
||||||
part.shorthand()
|
part.shorthand()
|
||||||
|
|
||||||
|
@ -68,3 +71,13 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const collarStand = {
|
||||||
|
name: 'carlton.collarStand',
|
||||||
|
after: [ front, back ],
|
||||||
|
options: {
|
||||||
|
collarHeight: { pct: 9.6, min: 8, max: 11, menu: 'collar' },
|
||||||
|
collarFlare: { pct: 20, min: 0, max: 40, menu: 'collar' },
|
||||||
|
},
|
||||||
|
draft: draftCarltonCollarStand,
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
export default function (part) {
|
import { topSleeve } from './topsleeve.mjs'
|
||||||
|
import { underSleeve } from './undersleeve.mjs'
|
||||||
|
|
||||||
|
function draftCarltonCuffFacing (part) {
|
||||||
let { paperless, sa, store, complete, points, macro, Point, paths, Path } = part.shorthand()
|
let { paperless, sa, store, complete, points, macro, Point, paths, Path } = part.shorthand()
|
||||||
|
|
||||||
points.topLeft = new Point(0, 0)
|
points.topLeft = new Point(0, 0)
|
||||||
|
@ -75,3 +78,9 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const cuffFacing = {
|
||||||
|
name: 'carlton.cuffFacing',
|
||||||
|
after: [ topSleeve, underSleeve ],
|
||||||
|
draft: draftCarltonCuffFacing,
|
||||||
|
}
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
import { calculateRatios } from './shared'
|
import { front as bentFront } from '@freesewing/bent'
|
||||||
|
import { calculateRatios } from './shared.mjs'
|
||||||
|
|
||||||
export default function (part) {
|
function draftCarltonFront (part) {
|
||||||
let {
|
let {
|
||||||
paperless,
|
paperless,
|
||||||
sa,
|
sa,
|
||||||
|
@ -473,3 +474,37 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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,
|
||||||
|
}
|
||||||
|
|
|
@ -1,83 +1,36 @@
|
||||||
import freesewing from '@freesewing/core'
|
import { Design } from '@freesewing/core'
|
||||||
import plugins from '@freesewing/plugin-bundle'
|
import { data } from '../data.mjs'
|
||||||
import plugin from '@freesewing/plugin-bust' // Note: conditional plugin
|
|
||||||
import Bent from '@freesewing/bent'
|
|
||||||
import config from '../config'
|
|
||||||
// Parts
|
// Parts
|
||||||
import draftFront from './front'
|
import { front } from './front.mjs'
|
||||||
import draftBack from './back'
|
import { back } from './back.mjs'
|
||||||
import draftTail from './tail'
|
import { tail } from './tail.mjs'
|
||||||
import draftTopSleeve from './topsleeve'
|
import { topSleeve } from './topsleeve.mjs'
|
||||||
import draftUnderSleeve from './undersleeve'
|
import { underSleeve } from './undersleeve.mjs'
|
||||||
import draftBelt from './belt'
|
import { belt } from './belt.mjs'
|
||||||
import draftCollarStand from './collarstand'
|
import { collarStand } from './collarstand.mjs'
|
||||||
import draftCollar from './collar'
|
import { collar } from './collar.mjs'
|
||||||
import draftCuffFacing from './cufffacing'
|
import { cuffFacing } from './cufffacing.mjs'
|
||||||
import draftPocket from './pocket'
|
import { pocket } from './pocket.mjs'
|
||||||
import draftPocketFlap from './pocketflap'
|
import { pocketFlap } from './pocketflap.mjs'
|
||||||
import draftPocketLining from './pocketlining'
|
import { pocketLining } from './pocketlining.mjs'
|
||||||
import draftChestPocketWelt from './chestpocketwelt'
|
import { chestPocketWelt } from './chestpocketwelt.mjs'
|
||||||
import draftChestPocketBag from './chestpocketbag'
|
import { chestPocketBag } from './chestpocketbag.mjs'
|
||||||
import draftInnerPocketWelt from './innerpocketwelt'
|
import { innerPocketWelt } from './innerpocketwelt.mjs'
|
||||||
import draftInnerPocketBag from './innerpocketbag'
|
import { innerPocketBag } from './innerpocketbag.mjs'
|
||||||
import draftInnerPocketTab from './innerpockettab'
|
import { innerPocketTab } from './innerpockettab.mjs'
|
||||||
|
|
||||||
/* Check to see whether we should load the bust plugin
|
|
||||||
* Only of the `draftForHighBust` options is set
|
|
||||||
* AND the highBust measurement is available
|
|
||||||
*/
|
|
||||||
const condition = (settings = false) =>
|
|
||||||
settings &&
|
|
||||||
settings.options &&
|
|
||||||
settings.options.draftForHighBust &&
|
|
||||||
settings.measurements.highBust
|
|
||||||
? true
|
|
||||||
: false
|
|
||||||
|
|
||||||
// Create design
|
// Create design
|
||||||
const Carlton = new freesewing.Design(config, plugins, { plugin, condition })
|
const Carlton = new Design({
|
||||||
|
data,
|
||||||
// Attach draft methods from Bent to prototype
|
parts: [ front, back, tail, topSleeve, underSleeve, belt, collarStand,
|
||||||
Carlton.prototype.draftBentBase = function (part) {
|
collar, cuffFacing, pocket, pocketFlap, pocketLining, chestPocketWelt,
|
||||||
return new Bent(this.settings).draftBase(part)
|
chestPocketBag, innerPocketWelt, innerPocketBag, innerPocketTab, ],
|
||||||
}
|
})
|
||||||
Carlton.prototype.draftBentFront = function (part) {
|
|
||||||
return new Bent(this.settings).draftFront(part)
|
|
||||||
}
|
|
||||||
Carlton.prototype.draftBentBack = function (part) {
|
|
||||||
return new Bent(this.settings).draftBack(part)
|
|
||||||
}
|
|
||||||
Carlton.prototype.draftBentSleeve = function (part) {
|
|
||||||
return new Bent(this.settings).draftSleeve(part)
|
|
||||||
}
|
|
||||||
Carlton.prototype.draftBentTopSleeve = function (part) {
|
|
||||||
return new Bent(this.settings).draftTopSleeve(part)
|
|
||||||
}
|
|
||||||
Carlton.prototype.draftBentUnderSleeve = function (part) {
|
|
||||||
return new Bent(this.settings).draftUnderSleeve(part)
|
|
||||||
}
|
|
||||||
|
|
||||||
// Attach own draft methods to prototype
|
|
||||||
Carlton.prototype.draftFront = draftFront
|
|
||||||
Carlton.prototype.draftBack = draftBack
|
|
||||||
Carlton.prototype.draftTail = draftTail
|
|
||||||
Carlton.prototype.draftTopSleeve = draftTopSleeve
|
|
||||||
Carlton.prototype.draftUnderSleeve = draftUnderSleeve
|
|
||||||
Carlton.prototype.draftBelt = draftBelt
|
|
||||||
Carlton.prototype.draftCollarStand = draftCollarStand
|
|
||||||
Carlton.prototype.draftCollar = draftCollar
|
|
||||||
Carlton.prototype.draftCuffFacing = draftCuffFacing
|
|
||||||
Carlton.prototype.draftPocket = draftPocket
|
|
||||||
Carlton.prototype.draftPocketFlap = draftPocketFlap
|
|
||||||
Carlton.prototype.draftPocketLining = draftPocketLining
|
|
||||||
Carlton.prototype.draftChestPocketWelt = draftChestPocketWelt
|
|
||||||
Carlton.prototype.draftChestPocketBag = draftChestPocketBag
|
|
||||||
Carlton.prototype.draftInnerPocketWelt = draftInnerPocketWelt
|
|
||||||
Carlton.prototype.draftInnerPocketBag = draftInnerPocketBag
|
|
||||||
Carlton.prototype.draftInnerPocketTab = draftInnerPocketTab
|
|
||||||
|
|
||||||
// Named exports
|
// Named exports
|
||||||
export { config, Carlton }
|
export {
|
||||||
|
front, back, tail, topSleeve, underSleeve, belt, collarStand, collar,
|
||||||
// Default export
|
cuffFacing, pocket, pocketFlap, pocketLining, chestPocketWelt,
|
||||||
export default Carlton
|
chestPocketBag, innerPocketWelt, innerPocketBag, innerPocketTab,
|
||||||
|
Carlton
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
export default function (part) {
|
import { front } from './front.mjs'
|
||||||
|
|
||||||
|
function draftCarltonInnerPocketBag (part) {
|
||||||
let { units, paperless, sa, store, complete, points, options, macro, Point, paths, Path } =
|
let { units, paperless, sa, store, complete, points, options, macro, Point, paths, Path } =
|
||||||
part.shorthand()
|
part.shorthand()
|
||||||
|
|
||||||
|
@ -65,3 +67,12 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const innerPocketBag = {
|
||||||
|
name: 'carlton.innerPocketBag',
|
||||||
|
after: front,
|
||||||
|
options: {
|
||||||
|
innerPocketDepth: { pct: 110, min: 75, max: 140, menu: 'pockets' },
|
||||||
|
},
|
||||||
|
draft: draftCarltonInnerPocketBag,
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
export default function (part) {
|
import { front } from './front.mjs'
|
||||||
|
|
||||||
|
function draftCarltonInnerPocketTab (part) {
|
||||||
let { paperless, sa, store, complete, points, macro, Point, paths, Path } = part.shorthand()
|
let { paperless, sa, store, complete, points, macro, Point, paths, Path } = part.shorthand()
|
||||||
|
|
||||||
points.topLeft = new Point(0, 0)
|
points.topLeft = new Point(0, 0)
|
||||||
|
@ -55,3 +57,9 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const innerPocketTab = {
|
||||||
|
name: 'carlton.innerPocketTab',
|
||||||
|
after: front,
|
||||||
|
draft: draftCarltonInnerPocketTab,
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
export default function (part) {
|
import { front } from './front.mjs'
|
||||||
|
|
||||||
|
function draftCarltonInnerPocketWelt (part) {
|
||||||
let { paperless, sa, store, complete, points, macro, Point, paths, Path } = part.shorthand()
|
let { paperless, sa, store, complete, points, macro, Point, paths, Path } = part.shorthand()
|
||||||
|
|
||||||
points.topLeft = new Point(0, 0)
|
points.topLeft = new Point(0, 0)
|
||||||
|
@ -78,3 +80,9 @@ export default function (part) {
|
||||||
}
|
}
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const innerPocketWelt = {
|
||||||
|
name: 'carlton.innerPocketWelt',
|
||||||
|
after: front,
|
||||||
|
draft: draftCarltonInnerPocketWelt,
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
export default function (part) {
|
import { front } from './front.mjs'
|
||||||
|
|
||||||
|
function draftCarltonPocket (part) {
|
||||||
let { paperless, sa, store, complete, points, options, macro, Point, paths, Path } =
|
let { paperless, sa, store, complete, points, options, macro, Point, paths, Path } =
|
||||||
part.shorthand()
|
part.shorthand()
|
||||||
|
|
||||||
|
@ -85,3 +87,9 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const pocket = {
|
||||||
|
name: 'carlton.pocket',
|
||||||
|
after: front,
|
||||||
|
draft: draftCarltonPocket,
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
export default function (part) {
|
import { front } from './front.mjs'
|
||||||
|
|
||||||
|
function draftCarltonPocketFlap (part) {
|
||||||
let { paperless, sa, store, complete, points, options, macro, Point, paths, Path } =
|
let { paperless, sa, store, complete, points, options, macro, Point, paths, Path } =
|
||||||
part.shorthand()
|
part.shorthand()
|
||||||
|
|
||||||
|
@ -80,3 +82,9 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const pocketFlap = {
|
||||||
|
name: 'carlton.pocketFlap',
|
||||||
|
after: front,
|
||||||
|
draft: draftCarltonPocketFlap,
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,6 @@
|
||||||
export default function (part) {
|
import { pocket } from './pocket.mjs'
|
||||||
|
|
||||||
|
function draftCarltonPocketLining (part) {
|
||||||
let { paperless, sa, store, complete, points, options, macro, Point, paths, Path } =
|
let { paperless, sa, store, complete, points, options, macro, Point, paths, Path } =
|
||||||
part.shorthand()
|
part.shorthand()
|
||||||
|
|
||||||
|
@ -72,3 +74,9 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const pocketLining = {
|
||||||
|
name: 'carlton.pocketLining',
|
||||||
|
from: pocket,
|
||||||
|
draft: draftCarltonPocketLining,
|
||||||
|
}
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
/**
|
/**
|
||||||
* This calculates a bunch of helper variables and stores them
|
* This calculates a bunch of helper variables and stores them
|
||||||
*/
|
*/
|
||||||
export const calculateRatios = (part) => {
|
export function calculateRatios (part) {
|
||||||
let { store, measurements, options } = part.shorthand()
|
let { store, measurements, options } = part.shorthand()
|
||||||
|
|
||||||
// Calculate different values for reducing from chest to hips via waist
|
// Calculate different values for reducing from chest to hips via waist
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
export default function (part) {
|
import { front } from './front.mjs'
|
||||||
|
import { back } from './back.mjs'
|
||||||
|
|
||||||
|
function draftCarltonTail (part) {
|
||||||
let { units, paperless, sa, store, complete, points, macro, Point, paths, Path } =
|
let { units, paperless, sa, store, complete, points, macro, Point, paths, Path } =
|
||||||
part.shorthand()
|
part.shorthand()
|
||||||
|
|
||||||
|
@ -117,3 +120,9 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const tail = {
|
||||||
|
name: 'carlton.tail',
|
||||||
|
after: [ front, back ],
|
||||||
|
draft: draftCarltonTail,
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
export default function (part) {
|
import { topSleeve as bentTopSleeve } from '@freesewing/bent'
|
||||||
|
import { front as bentFront } from '@freesewing/bent'
|
||||||
|
|
||||||
|
function draftCarltonTopSleeve (part) {
|
||||||
let {
|
let {
|
||||||
paperless,
|
paperless,
|
||||||
sa,
|
sa,
|
||||||
|
@ -138,3 +141,37 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const topSleeve = {
|
||||||
|
name: 'carlton.topSleeve',
|
||||||
|
from: bentTopSleeve,
|
||||||
|
after: bentFront,
|
||||||
|
hideDependencies: true,
|
||||||
|
measurements: [ 'shoulderToWrist' ],
|
||||||
|
options: {
|
||||||
|
cuffLength: { pct: 15, min: 10, max: 20, menu: 'style' },
|
||||||
|
// The remainder of options are for Bent sleeves.
|
||||||
|
brianFitSleeve: true,
|
||||||
|
brianFitCollar: true,
|
||||||
|
collarFactor: 4.8,
|
||||||
|
chestShapingMax: 5,
|
||||||
|
lengthBonus: 0,
|
||||||
|
collarEase: 0.145,
|
||||||
|
acrossBackFactor: { pct: 97, min: 93, max: 100, menu: 'fit' },
|
||||||
|
armholeDepthFactor: { pct: 65, min: 50, max: 70, menu: 'fit' },
|
||||||
|
bicepsEase: { pct: 20, min: 0, max: 50, menu: 'fit' },
|
||||||
|
cuffEase: { pct: 60, min: 30, max: 100, menu: 'fit' },
|
||||||
|
shoulderEase: { pct: 0, min: -2, max: 6, menu: 'fit' },
|
||||||
|
sleeveBend: { deg: 10, min: 0, max: 20, menu: 'fit' },
|
||||||
|
sleeveLengthBonus: { pct: 7, min: 0, max: 20, menu: 'fit' },
|
||||||
|
s3Collar: { pct: 0, min: -100, max: 100, menu: 'style' },
|
||||||
|
s3Armhole: { pct: 0, min: -100, max: 100, menu: 'style' },
|
||||||
|
draftForHighBust: { bool: false, menu: 'fit' },
|
||||||
|
backNeckCutout: { pct: 5, min: 2, max: 8, menu: 'advanced' },
|
||||||
|
frontArmholeDeeper: { pct: 0.5, min: 0, max: 1.5, menu: 'advanced' },
|
||||||
|
shoulderSlopeReduction: { pct: 12, min: 0, max: 80, menu: 'advanced' },
|
||||||
|
sleevecapHeight: { pct: 45, min: 40, max: 60, menu: 'advanced' },
|
||||||
|
sleevecapEase: { pct: 1, min: 0, max: 10, menu: 'advanced' },
|
||||||
|
},
|
||||||
|
draft: draftCarltonTopSleeve,
|
||||||
|
}
|
||||||
|
|
|
@ -1,4 +1,7 @@
|
||||||
export default function (part) {
|
import { underSleeve as bentUnderSleeve } from '@freesewing/bent'
|
||||||
|
import { front as bentFront } from '@freesewing/bent'
|
||||||
|
|
||||||
|
function draftCarltonUnderSleeve (part) {
|
||||||
let { paperless, sa, store, complete, points, measurements, options, macro, Point, paths, Path } =
|
let { paperless, sa, store, complete, points, measurements, options, macro, Point, paths, Path } =
|
||||||
part.shorthand()
|
part.shorthand()
|
||||||
|
|
||||||
|
@ -105,3 +108,37 @@ export default function (part) {
|
||||||
|
|
||||||
return part
|
return part
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export const underSleeve = {
|
||||||
|
name: 'carlton.underSleeve',
|
||||||
|
from: bentUnderSleeve,
|
||||||
|
after: bentFront,
|
||||||
|
hideDependencies: true,
|
||||||
|
measurements: [ 'shoulderToWrist' ],
|
||||||
|
options: {
|
||||||
|
cuffLength: { pct: 15, min: 10, max: 20, menu: 'style' },
|
||||||
|
// The remainder of options are for Bent sleeves.
|
||||||
|
brianFitSleeve: true,
|
||||||
|
brianFitCollar: true,
|
||||||
|
collarFactor: 4.8,
|
||||||
|
chestShapingMax: 5,
|
||||||
|
lengthBonus: 0,
|
||||||
|
collarEase: 0.145,
|
||||||
|
acrossBackFactor: { pct: 97, min: 93, max: 100, menu: 'fit' },
|
||||||
|
armholeDepthFactor: { pct: 65, min: 50, max: 70, menu: 'fit' },
|
||||||
|
bicepsEase: { pct: 20, min: 0, max: 50, menu: 'fit' },
|
||||||
|
cuffEase: { pct: 60, min: 30, max: 100, menu: 'fit' },
|
||||||
|
shoulderEase: { pct: 0, min: -2, max: 6, menu: 'fit' },
|
||||||
|
sleeveBend: { deg: 10, min: 0, max: 20, menu: 'fit' },
|
||||||
|
sleeveLengthBonus: { pct: 7, min: 0, max: 20, menu: 'fit' },
|
||||||
|
s3Collar: { pct: 0, min: -100, max: 100, menu: 'style' },
|
||||||
|
s3Armhole: { pct: 0, min: -100, max: 100, menu: 'style' },
|
||||||
|
draftForHighBust: { bool: false, menu: 'fit' },
|
||||||
|
backNeckCutout: { pct: 5, min: 2, max: 8, menu: 'advanced' },
|
||||||
|
frontArmholeDeeper: { pct: 0.5, min: 0, max: 1.5, menu: 'advanced' },
|
||||||
|
shoulderSlopeReduction: { pct: 12, min: 0, max: 80, menu: 'advanced' },
|
||||||
|
sleevecapHeight: { pct: 45, min: 40, max: 60, menu: 'advanced' },
|
||||||
|
sleevecapEase: { pct: 1, min: 0, max: 10, menu: 'advanced' },
|
||||||
|
},
|
||||||
|
draft: draftCarltonUnderSleeve,
|
||||||
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue