1
0
Fork 0

chore(waralee): Port to v3 stage 2

This commit is contained in:
Benjamin F 2022-09-11 07:38:22 -07:00
parent 1812f70f3f
commit 120b1b2ba0
8 changed files with 109 additions and 71 deletions

View file

@ -1,20 +1,20 @@
import { pantsProto } from './pantsproto.mjs' import { pantsProto } from './pantsproto.mjs'
function waraleeBackPocket(part) { function waraleeBackPocket({
const { options,
options, measurements,
measurements, Point,
Point, Path,
Path, points,
points, paths,
paths, Snippet,
Snippet, snippets,
snippets, complete,
complete, paperless,
paperless, macro,
macro, sa,
sa, part,
} = part.shorthand() }) {
if (false == options.backPocket) { if (false == options.backPocket) {
return part return part

View file

@ -1,8 +1,18 @@
import { pantsProto } from './pantsproto.mjs' import { pantsProto } from './pantsproto.mjs'
function waraleeCutout(part) { function waraleeCutout({
const { options, Path, points, paths, Snippet, snippets, complete, sa, paperless, macro } = options,
part.shorthand() Path,
points,
paths,
Snippet,
snippets,
complete,
sa,
paperless,
macro,
part,
}) {
let separateWaistband = options.separateWaistband let separateWaistband = options.separateWaistband
if ('waistband' == options.frontPocketStyle) { if ('waistband' == options.frontPocketStyle) {

View file

@ -1,20 +1,20 @@
import { pantsProto } from './pantsproto.mjs' import { pantsProto } from './pantsproto.mjs'
function waraleeFacings(part) { function waraleeFacings({
const { options,
options, measurements,
measurements, Point,
Point, Path,
Path, points,
points, paths,
paths, Snippet,
Snippet, snippets,
snippets, complete,
complete, paperless,
paperless, macro,
macro, sa,
sa, part,
} = part.shorthand() }) {
let frontPocketSize = let frontPocketSize =
options.frontPocketSize * measurements.crotchDepth /*- measurements.waistToHips*/ options.frontPocketSize * measurements.crotchDepth /*- measurements.waistToHips*/

View file

@ -4,8 +4,17 @@ import { pantsProto } from './pantsproto.mjs'
// To keep you from printing it completely, you could print this part in paperless mode // To keep you from printing it completely, you could print this part in paperless mode
// and only have a single sheet with all the dimensions on it. // and only have a single sheet with all the dimensions on it.
function waraleeMini(part) { function waraleeMini({
const { options, Path, points, paths, complete, sa, macro, store } = part.shorthand() options,
Path,
points,
paths,
complete,
sa,
macro,
store,
part,
}) {
let mini = options.minimizer let mini = options.minimizer
let separateWaistband = options.separateWaistband let separateWaistband = options.separateWaistband

View file

@ -1,8 +1,19 @@
import { pantsProto } from './pantsproto.mjs' import { pantsProto } from './pantsproto.mjs'
function waraleePants(part) { function waraleePants({
const { options, points, Path, paths, Snippet, snippets, complete, sa, paperless, macro, store } = options,
part.shorthand() points,
Path,
paths,
Snippet,
snippets,
complete,
sa,
paperless,
macro,
store,
part,
}) {
let separateWaistband = options.separateWaistband let separateWaistband = options.separateWaistband
if ('waistband' == options.frontPocketStyle) { if ('waistband' == options.frontPocketStyle) {

View file

@ -1,8 +1,16 @@
import { pluginBundle } from '@freesewing/plugin-bundle' import { pluginBundle } from '@freesewing/plugin-bundle'
import * as options from './options.mjs' import * as options from './options.mjs'
function waraleePantsProto(part) { function waraleePantsProto({
const { options, measurements, Point, Path, points, paths, store } = part.shorthand() options,
measurements,
Point,
Path,
points,
paths,
store,
part,
}) {
let seatDepth = let seatDepth =
measurements.crotchDepth /* - measurements.waistToHips */ * measurements.crotchDepth /* - measurements.waistToHips */ *

View file

@ -1,20 +1,20 @@
import { pantsProto } from './pantsproto.mjs' import { pantsProto } from './pantsproto.mjs'
function waraleePocket(part) { function waraleePocket({
const { options,
options, measurements,
measurements, Point,
Point, Path,
Path, points,
points, paths,
paths, Snippet,
Snippet, snippets,
snippets, complete,
complete, sa,
sa, paperless,
paperless, macro,
macro, part,
} = part.shorthand() }) {
if (false == options.frontPocket) { if (false == options.frontPocket) {
return part return part

View file

@ -1,21 +1,21 @@
import { pantsProto } from './pantsproto.mjs' import { pantsProto } from './pantsproto.mjs'
function waraleeWaistband(type, part) { function waraleeWaistband(type, {
const { options,
options, measurements,
measurements, Point,
Point, Path,
Path, points,
points, paths,
paths, Snippet,
Snippet, snippets,
snippets, complete,
complete, paperless,
paperless, macro,
macro, sa,
sa, store,
store, part,
} = part.shorthand() }) {
const WidthReduction = 6 const WidthReduction = 6
let waistBand = store.get('waistBand') let waistBand = store.get('waistBand')