chore(paco): Port to v3 stage 2
This commit is contained in:
parent
f3313cdb57
commit
1812f70f3f
8 changed files with 104 additions and 55 deletions
|
@ -2,7 +2,20 @@ import { back as titanBack } from '@freesewing/titan'
|
||||||
import { pctBasedOn } from '@freesewing/core'
|
import { pctBasedOn } from '@freesewing/core'
|
||||||
import { elastics, smallSteps } from '@freesewing/snapseries'
|
import { elastics, smallSteps } from '@freesewing/snapseries'
|
||||||
|
|
||||||
function pacoBack(part) {
|
function pacoBack({
|
||||||
|
store,
|
||||||
|
sa,
|
||||||
|
points,
|
||||||
|
Path,
|
||||||
|
paths,
|
||||||
|
options,
|
||||||
|
measurements,
|
||||||
|
complete,
|
||||||
|
paperless,
|
||||||
|
macro,
|
||||||
|
absoluteOptions,
|
||||||
|
part,
|
||||||
|
}) {
|
||||||
/*
|
/*
|
||||||
* Helper method to draw the inseam path
|
* Helper method to draw the inseam path
|
||||||
*/
|
*/
|
||||||
|
@ -45,21 +58,6 @@ function pacoBack(part) {
|
||||||
.close()
|
.close()
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shorthand call
|
|
||||||
let {
|
|
||||||
store,
|
|
||||||
sa,
|
|
||||||
points,
|
|
||||||
Path,
|
|
||||||
paths,
|
|
||||||
options,
|
|
||||||
measurements,
|
|
||||||
complete,
|
|
||||||
paperless,
|
|
||||||
macro,
|
|
||||||
absoluteOptions,
|
|
||||||
} = part.shorthand()
|
|
||||||
|
|
||||||
// Adapt bottom leg width based on heel & heel ease
|
// Adapt bottom leg width based on heel & heel ease
|
||||||
let quarterHeel = (measurements.heel * (1 + options.heelEase) * options.legBalance) / 2
|
let quarterHeel = (measurements.heel * (1 + options.heelEase) * options.legBalance) / 2
|
||||||
points.floorOut = points.floor.shift(0, quarterHeel)
|
points.floorOut = points.floor.shift(0, quarterHeel)
|
||||||
|
|
|
@ -1,9 +1,17 @@
|
||||||
import { back } from './back.mjs'
|
import { back } from './back.mjs'
|
||||||
|
|
||||||
function pacoBackPocketBag(part) {
|
function pacoBackPocketBag({
|
||||||
const { sa, points, Path, paths, snippets, options, complete, paperless, macro } =
|
sa,
|
||||||
part.shorthand()
|
points,
|
||||||
|
Path,
|
||||||
|
paths,
|
||||||
|
snippets,
|
||||||
|
options,
|
||||||
|
complete,
|
||||||
|
paperless,
|
||||||
|
macro,
|
||||||
|
part,
|
||||||
|
}) {
|
||||||
// Don't bother of we're not drafting back pockets
|
// Don't bother of we're not drafting back pockets
|
||||||
if (!options.backPockets) {
|
if (!options.backPockets) {
|
||||||
part.render = false
|
part.render = false
|
||||||
|
|
|
@ -1,9 +1,18 @@
|
||||||
import { backPocketBag } from './backpocketbag.mjs'
|
import { backPocketBag } from './backpocketbag.mjs'
|
||||||
|
|
||||||
function pacoBackPocketWelt(part) {
|
function pacoBackPocketWelt({
|
||||||
const { sa, Point, points, Path, paths, snippets, options, complete, paperless, macro } =
|
sa,
|
||||||
part.shorthand()
|
Point,
|
||||||
|
points,
|
||||||
|
Path,
|
||||||
|
paths,
|
||||||
|
snippets,
|
||||||
|
options,
|
||||||
|
complete,
|
||||||
|
paperless,
|
||||||
|
macro,
|
||||||
|
part,
|
||||||
|
}) {
|
||||||
// Don't bother of we're not drafting back pockets
|
// Don't bother of we're not drafting back pockets
|
||||||
if (!options.backPockets) {
|
if (!options.backPockets) {
|
||||||
part.render = false
|
part.render = false
|
||||||
|
|
|
@ -1,8 +1,16 @@
|
||||||
import { backPocketWelt } from './backpocketwelt.mjs'
|
import { backPocketWelt } from './backpocketwelt.mjs'
|
||||||
|
|
||||||
function pacoBackPocketWeltInterfacing(part) {
|
function pacoBackPocketWeltInterfacing({
|
||||||
const { points, Path, paths, snippets, options, complete, paperless, macro } = part.shorthand()
|
points,
|
||||||
|
Path,
|
||||||
|
paths,
|
||||||
|
snippets,
|
||||||
|
options,
|
||||||
|
complete,
|
||||||
|
paperless,
|
||||||
|
macro,
|
||||||
|
part,
|
||||||
|
}) {
|
||||||
// Don't bother of we're not drafting back pockets
|
// Don't bother of we're not drafting back pockets
|
||||||
if (!options.backPockets) {
|
if (!options.backPockets) {
|
||||||
part.render = false
|
part.render = false
|
||||||
|
|
|
@ -1,8 +1,18 @@
|
||||||
import { front } from './front.mjs'
|
import { front } from './front.mjs'
|
||||||
|
|
||||||
function pacoCuff(part) {
|
function pacoCuff({
|
||||||
const { store, sa, Point, points, Path, paths, options, complete, paperless, macro } =
|
store,
|
||||||
part.shorthand()
|
sa,
|
||||||
|
Point,
|
||||||
|
points,
|
||||||
|
Path,
|
||||||
|
paths,
|
||||||
|
options,
|
||||||
|
complete,
|
||||||
|
paperless,
|
||||||
|
macro,
|
||||||
|
part,
|
||||||
|
}) {
|
||||||
if (!options.elasticatedHem) {
|
if (!options.elasticatedHem) {
|
||||||
part.render = false
|
part.render = false
|
||||||
return part
|
return part
|
||||||
|
|
|
@ -1,7 +1,22 @@
|
||||||
import { front as titanFront } from '@freesewing/titan'
|
import { front as titanFront } from '@freesewing/titan'
|
||||||
import { back } from './back.mjs'
|
import { back } from './back.mjs'
|
||||||
|
|
||||||
function pacoFront(part) {
|
function pacoFront({
|
||||||
|
utils,
|
||||||
|
store,
|
||||||
|
sa,
|
||||||
|
Point,
|
||||||
|
points,
|
||||||
|
Path,
|
||||||
|
paths,
|
||||||
|
options,
|
||||||
|
measurements,
|
||||||
|
complete,
|
||||||
|
paperless,
|
||||||
|
macro,
|
||||||
|
absoluteOptions,
|
||||||
|
part,
|
||||||
|
}) {
|
||||||
/*
|
/*
|
||||||
* Helper method to draw the inseam path
|
* Helper method to draw the inseam path
|
||||||
*/
|
*/
|
||||||
|
@ -54,22 +69,6 @@ function pacoFront(part) {
|
||||||
*/
|
*/
|
||||||
const outseamDelta = () => drawOutseam(true).length() - store.get('pacoOutseamBack')
|
const outseamDelta = () => drawOutseam(true).length() - store.get('pacoOutseamBack')
|
||||||
|
|
||||||
let {
|
|
||||||
utils,
|
|
||||||
store,
|
|
||||||
sa,
|
|
||||||
Point,
|
|
||||||
points,
|
|
||||||
Path,
|
|
||||||
paths,
|
|
||||||
options,
|
|
||||||
measurements,
|
|
||||||
complete,
|
|
||||||
paperless,
|
|
||||||
macro,
|
|
||||||
absoluteOptions,
|
|
||||||
} = part.shorthand()
|
|
||||||
|
|
||||||
// Adapt bottom leg based on heel and heel ease
|
// Adapt bottom leg based on heel and heel ease
|
||||||
let quarterHeel = (measurements.heel * (1 + options.heelEase) * (1 - options.legBalance)) / 2
|
let quarterHeel = (measurements.heel * (1 + options.heelEase) * (1 - options.legBalance)) / 2
|
||||||
points.floorOut = points.floor.shift(180, quarterHeel)
|
points.floorOut = points.floor.shift(180, quarterHeel)
|
||||||
|
|
|
@ -1,9 +1,17 @@
|
||||||
import { front } from './front.mjs'
|
import { front } from './front.mjs'
|
||||||
|
|
||||||
function pacoFrontPocketBag(part) {
|
function pacoFrontPocketBag({
|
||||||
const { sa, points, Path, paths, snippets, options, complete, paperless, macro } =
|
sa,
|
||||||
part.shorthand()
|
points,
|
||||||
|
Path,
|
||||||
|
paths,
|
||||||
|
snippets,
|
||||||
|
options,
|
||||||
|
complete,
|
||||||
|
paperless,
|
||||||
|
macro,
|
||||||
|
part,
|
||||||
|
}) {
|
||||||
// Don't bother of we're not drafting front pockets
|
// Don't bother of we're not drafting front pockets
|
||||||
if (!options.frontPockets) {
|
if (!options.frontPockets) {
|
||||||
part.render = false
|
part.render = false
|
||||||
|
|
|
@ -1,9 +1,18 @@
|
||||||
import { back } from './back.mjs'
|
import { back } from './back.mjs'
|
||||||
|
|
||||||
function pacoWaistband(part) {
|
function pacoWaistband({
|
||||||
const { utils, store, sa, Point, points, Path, paths, complete, paperless, macro } =
|
utils,
|
||||||
part.shorthand()
|
store,
|
||||||
|
sa,
|
||||||
|
Point,
|
||||||
|
points,
|
||||||
|
Path,
|
||||||
|
paths,
|
||||||
|
complete,
|
||||||
|
paperless,
|
||||||
|
macro,
|
||||||
|
part,
|
||||||
|
}) {
|
||||||
points.topLeft = new Point(0, 0)
|
points.topLeft = new Point(0, 0)
|
||||||
points.midLeft = new Point(0, store.get('waistbandWidth'))
|
points.midLeft = new Point(0, store.get('waistbandWidth'))
|
||||||
points.bottomLeft = new Point(0, store.get('waistbandWidth') * 2)
|
points.bottomLeft = new Point(0, store.get('waistbandWidth') * 2)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue