1
0
Fork 0

chore(carlita): Port to v3 stage 2

This commit is contained in:
joostdecock 2022-09-11 12:55:02 +02:00
parent c675956e46
commit d130fd62a9
3 changed files with 68 additions and 34 deletions

View file

@ -1,8 +1,7 @@
import { pluginBust } from '@freesewing/plugin-bust' import { pluginBust } from '@freesewing/plugin-bust'
import { front as carltonFront } from '@freesewing/carlton' import { front as carltonFront } from '@freesewing/carlton'
function draftCarlitaFront (part) { function draftCarlitaFront({
let {
paperless, paperless,
sa, sa,
snippets, snippets,
@ -17,8 +16,8 @@ function draftCarlitaFront (part) {
Point, Point,
paths, paths,
Path, Path,
} = part.shorthand() part,
}) {
/** /**
* we're adding half of the proportionate amount of chest east for the bust span * we're adding half of the proportionate amount of chest east for the bust span
* Only half because this is not where ease is needed or pools * Only half because this is not where ease is needed or pools
@ -503,12 +502,8 @@ export const front = {
name: 'carlita.front', name: 'carlita.front',
from: carltonFront, from: carltonFront,
hideDependencies: true, hideDependencies: true,
measurements: [ measurements: ['highBust', 'bustSpan', 'hpsToBust'],
'highBust', plugins: [pluginBust],
'bustSpan',
'hpsToBust',
],
plugins: [ pluginBust ],
options: { options: {
draftForHighBust: { bool: true, hide: () => true }, draftForHighBust: { bool: true, hide: () => true },
contour: { pct: 50, min: 25, max: 75, menu: 'advanced' }, contour: { pct: 50, min: 25, max: 75, menu: 'advanced' },

View file

@ -25,16 +25,45 @@ import { innerPocketTab } from '@freesewing/carlton'
const Carlita = new Design({ const Carlita = new Design({
data, data,
parts: [ parts: [
front, side, back, tail, belt, topSleeve, underSleeve, collarStand, front,
collar, pocket, pocketFlap, pocketLining, chestPocketWelt, side,
chestPocketBag, innerPocketWelt, innerPocketBag, innerPocketTab, back,
tail,
belt,
topSleeve,
underSleeve,
collarStand,
collar,
pocket,
pocketFlap,
pocketLining,
chestPocketWelt,
chestPocketBag,
innerPocketWelt,
innerPocketBag,
innerPocketTab,
], ],
}) })
// Named exports // Named exports
export { export {
front, side, back, tail, belt, topSleeve, underSleeve, collarStand, front,
collar, cuffFacing, pocket, pocketFlap, pocketLining, chestPocketWelt, side,
chestPocketBag, innerPocketWelt, innerPocketBag, innerPocketTab, back,
tail,
belt,
topSleeve,
underSleeve,
collarStand,
collar,
cuffFacing,
pocket,
pocketFlap,
pocketLining,
chestPocketWelt,
chestPocketBag,
innerPocketWelt,
innerPocketBag,
innerPocketTab,
Carlita, Carlita,
} }

View file

@ -1,9 +1,19 @@
import { front } from './front.mjs' import { front } from './front.mjs'
function draftCarlitaSide (part) { function draftCarlitaSide({
let { paperless, sa, snippets, Snippet, store, complete, points, macro, Point, paths, Path } = paperless,
part.shorthand() sa,
snippets,
Snippet,
store,
complete,
points,
macro,
Point,
paths,
Path,
part,
}) {
// Give points their original names // Give points their original names
for (let i of store.get('side')) points[i] = points[i + 'Rot2'].clone() for (let i of store.get('side')) points[i] = points[i + 'Rot2'].clone()