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,24 +1,23 @@
import { pluginBust } from '@freesewing/plugin-bust'
import { front as carltonFront } from '@freesewing/carlton'
function draftCarlitaFront (part) {
let {
paperless,
sa,
snippets,
Snippet,
utils,
store,
complete,
points,
measurements,
options,
macro,
Point,
paths,
Path,
} = part.shorthand()
function draftCarlitaFront({
paperless,
sa,
snippets,
Snippet,
utils,
store,
complete,
points,
measurements,
options,
macro,
Point,
paths,
Path,
part,
}) {
/**
* 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
@ -503,12 +502,8 @@ export const front = {
name: 'carlita.front',
from: carltonFront,
hideDependencies: true,
measurements: [
'highBust',
'bustSpan',
'hpsToBust',
],
plugins: [ pluginBust ],
measurements: ['highBust', 'bustSpan', 'hpsToBust'],
plugins: [pluginBust],
options: {
draftForHighBust: { bool: true, hide: () => true },
contour: { pct: 50, min: 25, max: 75, menu: 'advanced' },

View file

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

View file

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