1
0
Fork 0

sparkles: Updates for freesewing v0.23

This commit is contained in:
Joost De Cock 2018-12-20 08:32:21 +01:00
parent 8147e10a08
commit aa16927fa5
14 changed files with 1785 additions and 2772 deletions

View file

@ -7,6 +7,25 @@ export default {
"naturalWaistToUnderbust",
"naturalWaistToHip"
],
dependencies: {
panel1: "panels",
panel2: "panels",
panel3: "panels",
panel4: "panels",
panel5: "panels",
panel6: "panels",
panels: "base"
},
inject: {
panel1: "panels",
panel2: "panels",
panel3: "panels",
panel4: "panels",
panel5: "panels",
panel6: "panels",
panels: "base"
},
hide: [ "panels", "base" ],
options: {
// Lists
panels: {

View file

@ -13,14 +13,16 @@
<script type="text/javascript" src="node_modules/@freesewing/plugin-designer/dist/browser.js"></script>
<script type="text/javascript" src="node_modules/@freesewing/plugin-debug/dist/browser.js"></script>
<script type="text/javascript" src="node_modules/@freesewing/plugin-validate/dist/browser.js"></script>
<script type="text/javascript" src="node_modules/@freesewing/plugin-i18n/dist/browser.js"></script>
<!-- <script type="text/javascript" src="node_modules/@freesewing/plugin-i18n/dist/browser.js"></script> -->
<script type="text/javascript" src="../../plugins/plugin-i18n/dist/browser.js"></script>
<script type="text/javascript" src="node_modules/@freesewing/models/dist/browser.js"></script>
<script type="text/javascript" src="node_modules/@freesewing/antman/dist/browser.js"></script>
<script>
var pattern = freesewing.patterns.cathrin
var pattern = new freesewing.patterns.cathrin;
pattern
.with(freesewing.plugins.debug)
.with(freesewing.plugins.theme)
// .with(freesewing.plugins.designer)
.with(freesewing.plugins.designer)
.with(freesewing.plugins.validate)
.with(freesewing.plugins.i18n)
;
@ -42,7 +44,7 @@
models: freesewing.models.men
}
pattern.options.panels = 13;
pattern.settings.options.panels = 13;
//pattern.settings.only = ['panels'];
//pattern.sampleOption('panels');
//pattern.sampleMeasurement('shoulderSlope');

File diff suppressed because it is too large Load diff

View file

@ -47,8 +47,8 @@
]
},
"dependencies": {
"freesewing": "^0.17",
"@freesewing/plugin-bundle": "^0.3"
"freesewing": "^0.23.2",
"@freesewing/plugin-bundle": "^0.5.1"
},
"devDependencies": {
"@babel/core": "7.0.0-beta.56",
@ -60,11 +60,11 @@
"babel-plugin-transform-object-rest-spread": "^6.26.0",
"@freesewing/antman": "^0.3",
"@freesewing/models": "^0.6",
"@freesewing/plugin-debug": "^0.1",
"@freesewing/plugin-designer": "^0.7.2",
"@freesewing/plugin-i18n": "^0.0.2",
"@freesewing/plugin-theme": "^0.13.2",
"@freesewing/plugin-validate": "^0.2",
"@freesewing/plugin-debug": "^0.5.2",
"@freesewing/plugin-designer": "^0.10",
"@freesewing/plugin-i18n": "^0.1.2",
"@freesewing/plugin-theme": "^0.18.3",
"@freesewing/plugin-validate": "^0.4.1",
"eslint": "5.3.0",
"eslint-config-prettier": "^2.9.0",
"eslint-plugin-prettier": "^2.6.2",

View file

@ -1,107 +1,110 @@
var base = {
draft: function(part) {
export default function(part) {
// prettier-ignore
let {measurements, options, store, points, snippets, paths, Point, Snippet, Path, utils, complete, debug } = part.shorthand();
// prettier-ignore
let {measurements, options, store, points, snippets, paths, Point, Snippet, Path, utils, complete, debug } = part.shorthand();
// Where to divide our corset into panels
if (options.panels === 11) store.set('gaps', [0.15,0.275,0.4,0.6,0.75]);
else store.set('gaps', [0.2,0.35,0.5,0.65,0.8]);
// Where to divide our corset into panels
if (options.panels === 11) store.set('gaps', [0.15,0.275,0.4,0.6,0.75]);
else store.set('gaps', [0.2,0.35,0.5,0.65,0.8]);
// Absolute values for some options
store.set('waistReduction', measurements.naturalWaist * options.waistReduction);
debug({
type: "info",
label: '✅ Waist reduction',
msg: utils.units(store.get('waistReduction'))
});
store.set('backOpening', measurements.underbust * options.backOpening);
debug({
type: "info",
label: '✅ Back opening',
msg: utils.units(store.get('backOpening'))
});
let len = measurements.naturalWaistToUnderbust + measurements.naturalWaistToHip;
for(let option of ['backRise', 'backDrop', 'frontRise', 'frontDrop', 'hipRise'])
store.set(option, len * options[option]);
store.set('length', len);
// Absolute values for some options
store.set('waistReduction', measurements.naturalWaist * options.waistReduction);
debug('Waist reduction is', utils.units(store.get('waistReduction')));
store.set('backOpening', measurements.underbust * options.backOpening);
debug('Back opening is', utils.units(store.get('backOpening')));
let len = measurements.naturalWaistToUnderbust + measurements.naturalWaistToHip;
for(let option of ['backRise', 'backDrop', 'frontRise', 'frontDrop', 'hipRise'])
store.set(option, len * options[option]);
store.set('length', len);
/**
* How much should we take in the corset at waist and bust
*
* I assume that the hips are larger than the underbust.
* Can I be sure? Maybe not, but a larger underbust than hip
* measurements seems very rare to say the least.
*/
store.set('width', 0.5 * (
measurements.hipsCircumference -
store.get('backOpening')
));
store.set('waistIntake', 0.5 * (
measurements.hipsCircumference -
measurements.naturalWaist +
store.get('waistReduction')
));
store.set('bustIntake', 0.5 * (
measurements.hipsCircumference -
measurements.underbust
));
/**
* How much should we take in the corset at waist and bust
*
* I assume that the hips are larger than the underbust.
* Can I be sure? Maybe not, but a larger underbust than hip
* measurements seems very rare to say the least.
*/
store.set('width', 0.5 * (
measurements.hipsCircumference -
store.get('backOpening')
));
store.set('waistIntake', 0.5 * (
measurements.hipsCircumference -
measurements.naturalWaist +
store.get('waistReduction')
));
store.set('bustIntake', 0.5 * (
measurements.hipsCircumference -
measurements.underbust
));
// Basic box (CB = Center back, CF = Center front)
let wid = store.get('width');
points.underbustCF = new Point(0,0);
points.hipsCF = new Point(0, len);
points.hipsCB = new Point(wid, len);
points.underbustCB = new Point(wid , 0);
points.topSide = points.underbustCF.shiftFractionTowards(points.underbustCB, 0.5);
points.bottomSide = points.hipsCF.shiftFractionTowards(points.hipsCB, 0.5);
points.waistCF = points.underbustCF.shift(-90, measurements.naturalWaistToUnderbust);
points.waistCB = new Point(points.hipsCB.x, points.waistCF.y);
// Basic box (CB = Center back, CF = Center front)
let wid = store.get('width');
points.underbustCF = new Point(0,0);
points.hipsCF = new Point(0, len);
points.hipsCB = new Point(wid, len);
points.underbustCB = new Point(wid , 0);
points.topSide = points.underbustCF.shiftFractionTowards(points.underbustCB, 0.5);
points.bottomSide = points.hipsCF.shiftFractionTowards(points.hipsCB, 0.5);
points.waistCF = points.underbustCF.shift(-90, measurements.naturalWaistToUnderbust);
points.waistCB = new Point(points.hipsCB.x, points.waistCF.y);
// frontRise
points.topCF = points.underbustCF.shift(90, store.get('frontRise'));
points.frontRiseStart = points.underbustCF.shift(0, wid * 0.15);
points.frontRiseStartCp2 = points.underbustCF.shift(0, wid * 0.11);
points.topCFCp1 = points.topCF.shift(0, wid * 0.11);
// frontRise
points.topCF = points.underbustCF.shift(90, store.get('frontRise'));
points.frontRiseStart = points.underbustCF.shift(0, wid * 0.15);
points.frontRiseStartCp2 = points.underbustCF.shift(0, wid * 0.11);
points.topCFCp1 = points.topCF.shift(0, wid * 0.11);
// frontDrop
points.bottomCF = points.hipsCF.shift(-90, store.get('frontDrop'));
points.bottomCFCp2 = points.bottomCF.shift(0, wid * 0.11);
// frontDrop
points.bottomCF = points.hipsCF.shift(-90, store.get('frontDrop'));
points.bottomCFCp2 = points.bottomCF.shift(0, wid * 0.11);
// hipRise
points.hipRise = points.bottomSide.shift(90, store.get('hipRise'));
points.hipRiseCp1 = points.hipRise.shift(180, wid * 0.3);
points.hipRiseCp2 = points.hipRise.shift(0, wid * 0.2);
// hipRise
points.hipRise = points.bottomSide.shift(90, store.get('hipRise'));
points.hipRiseCp1 = points.hipRise.shift(180, wid * 0.3);
points.hipRiseCp2 = points.hipRise.shift(0, wid * 0.2);
// backDrop
points.backDrop = points.hipsCB.shift(-90, store.get('backDrop'));
points.backDropCp1 = points.backDrop.shift(180, wid * 0.3);
// backDrop
points.backDrop = points.hipsCB.shift(-90, store.get('backDrop'));
points.backDropCp1 = points.backDrop.shift(180, wid * 0.3);
// backRise
points.backRise = points.underbustCB.shift(90, store.get('backRise'));
points.backRiseCp1 = points.backRise.shift(180, wid * 0.4);
points.topSideCp1 = points.topSide.shift(0, wid * 0.2);
// backRise
points.backRise = points.underbustCB.shift(90, store.get('backRise'));
points.backRiseCp1 = points.backRise.shift(180, wid * 0.4);
points.topSideCp1 = points.topSide.shift(0, wid * 0.2);
// Paths
paths.help1 = new Path()
.move(points.underbustCF)
.line(points.hipsCF)
.line(points.hipsCB)
.line(points.underbustCB)
.close();
paths.help2 = new Path()
.move(points.topSide)
.line(points.bottomSide)
.line(points.waistCF)
.line(points.waistCB);
paths.help1.render = false;
paths.help2.render = false;
// Paths
paths.help1 = new Path()
.move(points.underbustCF)
.line(points.hipsCF)
.line(points.hipsCB)
.line(points.underbustCB)
.close();
paths.help2 = new Path()
.move(points.topSide)
.line(points.bottomSide)
.line(points.waistCF)
.line(points.waistCB);
paths.help1.render = false;
paths.help2.render = false;
paths.outline = new Path()
.move(points.bottomCF)
.curve(points.bottomCFCp2, points.hipRiseCp1, points.hipRise)
.curve(points.hipRiseCp2, points.backDropCp1, points.backDrop)
.line(points.backRise)
.curve(points.backRiseCp1, points.topSideCp1, points.topSide)
.line(points.frontRiseStart)
.curve(points.frontRiseStartCp2, points.topCFCp1, points.topCF)
.line(points.bottomCF)
.close();
paths.outline = new Path()
.move(points.bottomCF)
.curve(points.bottomCFCp2, points.hipRiseCp1, points.hipRise)
.curve(points.hipRiseCp2, points.backDropCp1, points.backDrop)
.line(points.backRise)
.curve(points.backRiseCp1, points.topSideCp1, points.topSide)
.line(points.frontRiseStart)
.curve(points.frontRiseStartCp2, points.topCFCp1, points.topCF)
.line(points.bottomCF)
.close();
return part;
}
return part;
};
export default base;

View file

@ -1,57 +1,38 @@
import freesewing from "freesewing";
import pluginBundle from "@freesewing/plugin-bundle";
import config from "../config/config";
import { version } from "../package.json";
//Parts
import draftBase from "./base";
import draftPanels from "./panels";
import draftPanel1 from "./panel1";
import draftPanel2 from "./panel2";
import draftPanel3 from "./panel3";
import draftPanel4 from "./panel4";
import draftPanel5 from "./panel5";
import draftPanel6 from "./panel6";
import base from "./base";
import panels from "./panels";
// Constructor boilerplate
const Cathrin = function(settings = false) {
freesewing.Pattern.call(this, { version: version, ...config });
this.with(pluginBundle);
if (settings !== false) this.mergeSettings(settings);
import panel1 from "./panel1";
import panel2 from "./panel2";
import panel3 from "./panel3";
import panel4 from "./panel4";
import panel5 from "./panel5";
import panel6 from "./panel6";
var pattern = new freesewing.Pattern({ version: version, ...config })
.with(pluginBundle);
pattern.draft = function() {
this.parts.base = this.draftBase(new pattern.Part());
if (!this.needs("base", true)) this.parts.base.render = false;
if(this.needs("panels")) this.parts.panels = this.draftPanels(new pattern.Part().copy(this.parts.base));
if (!this.needs("panels", true)) this.parts.panels.render = false;
if (this.needs("panel1"))
this.parts.panel1 = this.draftPanel1(new pattern.Part().copy(this.parts.panels));
if (this.needs("panel2"))
this.parts.panel2 = this.draftPanel2(new pattern.Part().copy(this.parts.panels));
if (this.needs("panel3"))
this.parts.panel3 = this.draftPanel3(new pattern.Part().copy(this.parts.panels));
if (this.needs("panel4"))
this.parts.panel4 = this.draftPanel4(new pattern.Part().copy(this.parts.panels));
if (this.needs("panel5"))
this.parts.panel5 = this.draftPanel5(new pattern.Part().copy(this.parts.panels));
if (this.needs("panel6"))
this.parts.panel6 = this.draftPanel6(new pattern.Part().copy(this.parts.panels));
return pattern;
return this;
};
pattern.draftBase = part => base.draft(part);
pattern.draftPanels = part => panels.draft(part);
pattern.draftPanel1 = part => panel1.draft(part);
pattern.draftPanel2 = part => panel2.draft(part);
pattern.draftPanel3 = part => panel3.draft(part);
pattern.draftPanel4 = part => panel4.draft(part);
pattern.draftPanel5 = part => panel5.draft(part);
pattern.draftPanel6 = part => panel6.draft(part);
// Inheritance boilerplate
Cathrin.prototype = Object.create(freesewing.Pattern.prototype);
Cathrin.prototype.constructor = Cathrin;
export default pattern;
// Attach per-part draft methods to prototype
Cathrin.prototype.draftBase = draftBase;
Cathrin.prototype.draftPanels = draftPanels;
Cathrin.prototype.draftPanel1 = draftPanel1;
Cathrin.prototype.draftPanel2 = draftPanel2;
Cathrin.prototype.draftPanel3 = draftPanel3;
Cathrin.prototype.draftPanel4 = draftPanel4;
Cathrin.prototype.draftPanel5 = draftPanel5;
Cathrin.prototype.draftPanel6 = draftPanel6;
export default Cathrin;

View file

@ -1,76 +1,71 @@
import panel1ab from './panel1ab';
import draftPanel1ab from './panel1ab';
var panel1 = {
draft: function(part) {
export default function(part) {
// prettier-ignore
let {macro, sa, points, paths, Point, Path, options, complete, paperless } = part.shorthand();
// prettier-ignore
let {macro, sa, points, paths, Point, Path, options, complete, paperless } = part.shorthand();
delete paths.outline;
delete paths.panel2;
delete paths.panel3;
delete paths.panel4;
delete paths.panel5;
delete paths.panel6;
delete paths.outline;
delete paths.panel2;
delete paths.panel3;
delete paths.panel4;
delete paths.panel5;
delete paths.panel6;
if (options.panels === 13) return draftPanel1ab(part);
if (options.panels === 13) return panel1ab.draft(part);
// Complete pattern?
if(complete) {
macro('cutonfold', {
to: points.bottomCF,
from: points.topCF,
grainline: true
});
points.title = points.waistCF.shiftFractionTowards(points.underbustGap1Left, 0.5);
macro('title', {
nr: 1,
title: '',
at: points.title
});
if(sa) paths.sa = paths.panel1.offset(sa).attr('class', 'fabric sa');
}
// Paperless?
if (paperless) {
macro('vd', {
from: points.bottomCF,
to: points.waistCF,
x: points.topCF.x - sa - 15
});
macro('vd', {
from: points.waistCF,
to: points.topCF,
x: points.topCF.x - sa - 15
});
macro('vd', {
from: points.hipsGap1,
to: points.waistGap1Left,
x: points.hipsGap1.x + sa + 15
});
macro('vd', {
from: points.waistGap1Left,
to: points.underbustGap1Left,
x: points.hipsGap1.x + sa + 15
});
macro('hd', {
from: points.bottomCF,
to: points.hipsGap1,
y: points.bottomCF.y + sa + 15
});
macro('hd', {
from: points.topCF,
to: points.underbustGap1Left,
y: points.topCF.y - sa - 15
});
macro('ld', {
from: points.waistCF,
to: points.waistGap1Left
});
}
return part;
// Complete pattern?
if(complete) {
macro('cutonfold', {
to: points.bottomCF,
from: points.topCF,
grainline: true
});
points.title = points.waistCF.shiftFractionTowards(points.underbustGap1Left, 0.5);
macro('title', {
nr: 1,
title: '',
at: points.title
});
if(sa) paths.sa = paths.panel1.offset(sa).attr('class', 'fabric sa');
}
};
export default panel1;
// Paperless?
if (paperless) {
macro('vd', {
from: points.bottomCF,
to: points.waistCF,
x: points.topCF.x - sa - 15
});
macro('vd', {
from: points.waistCF,
to: points.topCF,
x: points.topCF.x - sa - 15
});
macro('vd', {
from: points.hipsGap1,
to: points.waistGap1Left,
x: points.hipsGap1.x + sa + 15
});
macro('vd', {
from: points.waistGap1Left,
to: points.underbustGap1Left,
x: points.hipsGap1.x + sa + 15
});
macro('hd', {
from: points.bottomCF,
to: points.hipsGap1,
y: points.bottomCF.y + sa + 15
});
macro('hd', {
from: points.topCF,
to: points.underbustGap1Left,
y: points.topCF.y - sa - 15
});
macro('ld', {
from: points.waistCF,
to: points.waistGap1Left
});
}
return part;
};

View file

@ -1,151 +1,146 @@
var panel1ab = {
draft: function(part) {
export default function(part) {
// prettier-ignore
let {macro, utils, sa, points, paths, Point, Path, options, complete, paperless } = part.shorthand();
// prettier-ignore
let {macro, utils, sa, points, paths, Point, Path, options, complete, paperless } = part.shorthand();
let top = new Path()
.move(points.underbustGap1Left)
.curve(points.frontRiseStartCp2, points.topCFCp1, points.topCF);
points.topABsplit = top.shiftFractionAlong(0.3);
let bottom = new Path()
.move(points.bottomCF)
.curve(paths.panel1.ops[1].cp1, paths.panel1.ops[1].cp2, paths.panel1.ops[1].to);
points.bottomABsplit = bottom.shiftFractionAlong(0.3);
let top = new Path()
.move(points.underbustGap1Left)
.curve(points.frontRiseStartCp2, points.topCFCp1, points.topCF);
points.topABsplit = top.shiftFractionAlong(0.3);
let bottom = new Path()
.move(points.bottomCF)
.curve(paths.panel1.ops[1].cp1, paths.panel1.ops[1].cp2, paths.panel1.ops[1].to);
points.bottomABsplit = bottom.shiftFractionAlong(0.3);
paths.panel1a = bottom.split(points.bottomABsplit)[0]
.line(points.topABsplit)
.join(top.split(points.topABsplit)[1])
.line(points.bottomCF)
.close()
.attr('class', 'fabric');
paths.panel1b = bottom.split(points.bottomABsplit)[1]
.curve(points.hipsGap1Cp, points.waistGap1LeftCp1, points.waistGap1Left)
.curve(points.waistGap1LeftCp2, points.underbustGap1LeftCp, points.underbustGap1Left)
.join(top.split(points.topABsplit)[0])
.line(points.bottomABsplit)
.close()
.attr('class', 'fabric');
let translation = 5;
if (sa) translation = 2*sa + 5;
paths.panel1b = paths.panel1b.translate(translation,0);
delete paths.panel1;
paths.panel1a = bottom.split(points.bottomABsplit)[0]
.line(points.topABsplit)
.join(top.split(points.topABsplit)[1])
.line(points.bottomCF)
.close()
.attr('class', 'fabric');
paths.panel1b = bottom.split(points.bottomABsplit)[1]
.curve(points.hipsGap1Cp, points.waistGap1LeftCp1, points.waistGap1Left)
.curve(points.waistGap1LeftCp2, points.underbustGap1LeftCp, points.underbustGap1Left)
.join(top.split(points.topABsplit)[0])
.line(points.bottomABsplit)
.close()
.attr('class', 'fabric');
let translation = 5;
if (sa) translation = 2*sa + 5;
paths.panel1b = paths.panel1b.translate(translation,0);
delete paths.panel1;
// Complete pattern?
if(complete) {
if (sa) {
paths.saA = paths.panel1a.offset(sa).attr('class', 'fabric sa');
paths.saB = paths.panel1b.offset(sa).attr('class', 'fabric sa');
}
macro('cutonfold', {
to: points.bottomCF,
from: points.topCF,
grainline: true
});
macro('grainline', {
to: points.topABsplit.translate(translation, 0),
from: new Point(
points.topABsplit.translate(translation, 0).x,
points.hipsGap1.translate(translation, 0).y
)
});
points.midwayAB = points.topABsplit.shiftFractionTowards(points.bottomABsplit, 0.5);
points.titleA = points.underbustCF.shiftFractionTowards(points.midwayAB, 0.5);
macro('title', {
nr: '1a',
prefix: 'panel1a',
at: points.titleA
});
points.titleB = points.hipsGap1.translate(translation, 0).shiftFractionTowards(points.midwayAB, 0.5);
macro('title', {
nr: '1b',
prefix: 'panel1b',
at: points.titleB
});
// Complete pattern?
if(complete) {
if (sa) {
paths.saA = paths.panel1a.offset(sa).attr('class', 'fabric sa');
paths.saB = paths.panel1b.offset(sa).attr('class', 'fabric sa');
}
// Paperless?
if (paperless) {
// 1a
macro('vd', {
from: points.bottomCF,
to: points.waistCF,
x: points.topCF.x - sa - 30
});
macro('vd', {
from: points.waistCF,
to: points.topCF,
x: points.topCF.x - sa - 30
});
points.waistAB = utils.beamsIntersect(
points.topABsplit,
points.bottomABsplit,
points.waistCF,
points.waistGap1
);
macro('vd', {
from: points.bottomABsplit,
to: points.waistAB,
x: points.topCF.x - sa - 15
});
macro('vd', {
from: points.waistAB,
to: points.topABsplit,
x: points.topCF.x - sa - 15
});
macro('hd', {
from: points.bottomCF,
to: points.bottomABsplit,
y: points.bottomCF.y + sa + 15
});
macro('ld', {
from: points.waistCF,
to: points.waistAB,
});
macro('hd', {
from: points.topCF,
to: points.topABsplit,
y: points.topCF.y - sa - 15
});
// 1b
macro('vd', {
from: points.hipsGap1.translate(translation, 0),
to: points.waistGap1Left.translate(translation, 0),
x: points.underbustGap1Left.translate(translation, 0).x + sa + 15
});
macro('vd', {
from: points.waistGap1Left.translate(translation, 0),
to: points.underbustGap1Left.translate(translation, 0),
x: points.underbustGap1Left.translate(translation, 0).x + sa + 15
});
macro('vd', {
from: points.bottomABsplit.translate(translation, 0),
to: points.waistAB.translate(translation, 0),
x: points.underbustGap1Left.translate(translation, 0).x + sa + 30
});
macro('vd', {
from: points.waistAB.translate(translation, 0),
to: points.topABsplit.translate(translation, 0),
x: points.underbustGap1Left.translate(translation, 0).x + sa + 30
});
macro('hd', {
from: points.bottomABsplit.translate(translation, 0),
to: points.hipsGap1.translate(translation, 0),
y: points.bottomABsplit.y + sa + 15
});
macro('ld', {
from: points.waistAB.translate(translation, 0),
to: points.waistGap1Left.translate(translation, 0)
});
macro('hd', {
from: points.topABsplit.translate(translation, 0),
to: points.underbustGap1Left.translate(translation, 0),
y: points.topABsplit.y - sa - 15
});
}
return part;
macro('cutonfold', {
to: points.bottomCF,
from: points.topCF,
grainline: true
});
macro('grainline', {
to: points.topABsplit.translate(translation, 0),
from: new Point(
points.topABsplit.translate(translation, 0).x,
points.hipsGap1.translate(translation, 0).y
)
});
points.midwayAB = points.topABsplit.shiftFractionTowards(points.bottomABsplit, 0.5);
points.titleA = points.underbustCF.shiftFractionTowards(points.midwayAB, 0.5);
macro('title', {
nr: '1a',
prefix: 'panel1a',
at: points.titleA
});
points.titleB = points.hipsGap1.translate(translation, 0).shiftFractionTowards(points.midwayAB, 0.5);
macro('title', {
nr: '1b',
prefix: 'panel1b',
at: points.titleB
});
}
};
export default panel1ab;
// Paperless?
if (paperless) {
// 1a
macro('vd', {
from: points.bottomCF,
to: points.waistCF,
x: points.topCF.x - sa - 30
});
macro('vd', {
from: points.waistCF,
to: points.topCF,
x: points.topCF.x - sa - 30
});
points.waistAB = utils.beamsIntersect(
points.topABsplit,
points.bottomABsplit,
points.waistCF,
points.waistGap1
);
macro('vd', {
from: points.bottomABsplit,
to: points.waistAB,
x: points.topCF.x - sa - 15
});
macro('vd', {
from: points.waistAB,
to: points.topABsplit,
x: points.topCF.x - sa - 15
});
macro('hd', {
from: points.bottomCF,
to: points.bottomABsplit,
y: points.bottomCF.y + sa + 15
});
macro('ld', {
from: points.waistCF,
to: points.waistAB,
});
macro('hd', {
from: points.topCF,
to: points.topABsplit,
y: points.topCF.y - sa - 15
});
// 1b
macro('vd', {
from: points.hipsGap1.translate(translation, 0),
to: points.waistGap1Left.translate(translation, 0),
x: points.underbustGap1Left.translate(translation, 0).x + sa + 15
});
macro('vd', {
from: points.waistGap1Left.translate(translation, 0),
to: points.underbustGap1Left.translate(translation, 0),
x: points.underbustGap1Left.translate(translation, 0).x + sa + 15
});
macro('vd', {
from: points.bottomABsplit.translate(translation, 0),
to: points.waistAB.translate(translation, 0),
x: points.underbustGap1Left.translate(translation, 0).x + sa + 30
});
macro('vd', {
from: points.waistAB.translate(translation, 0),
to: points.topABsplit.translate(translation, 0),
x: points.underbustGap1Left.translate(translation, 0).x + sa + 30
});
macro('hd', {
from: points.bottomABsplit.translate(translation, 0),
to: points.hipsGap1.translate(translation, 0),
y: points.bottomABsplit.y + sa + 15
});
macro('ld', {
from: points.waistAB.translate(translation, 0),
to: points.waistGap1Left.translate(translation, 0)
});
macro('hd', {
from: points.topABsplit.translate(translation, 0),
to: points.underbustGap1Left.translate(translation, 0),
y: points.topABsplit.y - sa - 15
});
}
return part;
};

View file

@ -1,79 +1,74 @@
var panel2 = {
draft: function(part) {
export default function(part) {
// prettier-ignore
let {macro, sa, points, paths, Point, complete, paperless } = part.shorthand();
// prettier-ignore
let {macro, sa, points, paths, Point, complete, paperless } = part.shorthand();
delete paths.outline;
delete paths.panel1;
delete paths.panel3;
delete paths.panel4;
delete paths.panel5;
delete paths.panel6;
delete paths.outline;
delete paths.panel1;
delete paths.panel3;
delete paths.panel4;
delete paths.panel5;
delete paths.panel6;
// Complete pattern?
if(complete) {
points.grainlineTop = new Point(
points.waistGap1Right.shiftFractionTowards(points.waistGap2Left, 0.5).x,
points.underbustGap1Right.y
);
points.grainlineBottom = new Point(
points.grainlineTop.x,
points.hipsGap2.y
);
macro('grainline', {
from: points.grainlineBottom,
to: points.grainlineTop
});
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap2Left)/2);
macro('title', {
nr: 2,
title: '',
at: points.title
});
if(sa) paths.sa = paths.panel2.offset(sa).attr('class', 'fabric sa');
}
// Paperless?
if (paperless) {
macro('hd', {
from: points.hipsGap1,
to: points.hipsGap2,
y: points.hipsGap1.y + sa + 15
});
macro('ld', {
from: points.waistGap1Right,
to: points.waistGap2Left
});
macro('hd', {
from: points.underbustGap1Right,
to: points.underbustGap2Left,
y: points.underbustGap1Right.y - sa - 15
});
macro('vd', {
from: points.hipsGap1,
to: points.waistGap1Right,
x: points.hipsGap1.x - sa - 15
});
macro('vd', {
from: points.waistGap1Right,
to: points.underbustGap1Right,
x: points.hipsGap1.x - sa - 15
});
macro('vd', {
from: points.hipsGap2,
to: points.waistGap1Right,
x: points.hipsGap2.x + sa + 15
});
macro('vd', {
from: points.waistGap1Right,
to: points.underbustGap2Left,
x: points.hipsGap2.x + sa + 15
});
}
return part;
// Complete pattern?
if(complete) {
points.grainlineTop = new Point(
points.waistGap1Right.shiftFractionTowards(points.waistGap2Left, 0.5).x,
points.underbustGap1Right.y
);
points.grainlineBottom = new Point(
points.grainlineTop.x,
points.hipsGap2.y
);
macro('grainline', {
from: points.grainlineBottom,
to: points.grainlineTop
});
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap2Left)/2);
macro('title', {
nr: 2,
title: '',
at: points.title
});
if(sa) paths.sa = paths.panel2.offset(sa).attr('class', 'fabric sa');
}
};
export default panel2;
// Paperless?
if (paperless) {
macro('hd', {
from: points.hipsGap1,
to: points.hipsGap2,
y: points.hipsGap1.y + sa + 15
});
macro('ld', {
from: points.waistGap1Right,
to: points.waistGap2Left
});
macro('hd', {
from: points.underbustGap1Right,
to: points.underbustGap2Left,
y: points.underbustGap1Right.y - sa - 15
});
macro('vd', {
from: points.hipsGap1,
to: points.waistGap1Right,
x: points.hipsGap1.x - sa - 15
});
macro('vd', {
from: points.waistGap1Right,
to: points.underbustGap1Right,
x: points.hipsGap1.x - sa - 15
});
macro('vd', {
from: points.hipsGap2,
to: points.waistGap1Right,
x: points.hipsGap2.x + sa + 15
});
macro('vd', {
from: points.waistGap1Right,
to: points.underbustGap2Left,
x: points.hipsGap2.x + sa + 15
});
}
return part;
};

View file

@ -1,79 +1,74 @@
var panel3 = {
draft: function(part) {
export default function(part) {
// prettier-ignore
let {macro, sa, points, paths, Point, complete, paperless } = part.shorthand();
// prettier-ignore
let {macro, sa, points, paths, Point, complete, paperless } = part.shorthand();
delete paths.outline;
delete paths.panel1;
delete paths.panel2;
delete paths.panel4;
delete paths.panel5;
delete paths.panel6;
delete paths.outline;
delete paths.panel1;
delete paths.panel2;
delete paths.panel4;
delete paths.panel5;
delete paths.panel6;
// Complete pattern?
if(complete) {
points.grainlineTop = new Point(
points.waistGap2Right.shiftFractionTowards(points.waistGap3Left, 0.5).x,
points.underbustGap2Right.y
);
points.grainlineBottom = new Point(
points.grainlineTop.x,
points.hipsGap3.y
);
macro('grainline', {
from: points.grainlineBottom,
to: points.grainlineTop
});
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap3Left)/2);
macro('title', {
nr: 3,
title: '',
at: points.title
});
if(sa) paths.sa = paths.panel3.offset(sa).attr('class', 'fabric sa');
}
// Paperless?
if (paperless) {
macro('hd', {
from: points.hipsGap2,
to: points.hipsGap3,
y: points.hipsGap2.y + sa + 15
});
macro('ld', {
from: points.waistGap2Right,
to: points.waistGap3Left
});
macro('hd', {
from: points.underbustGap2Right,
to: points.underbustGap3Left,
y: points.underbustGap2Right.y - sa - 15
});
macro('vd', {
from: points.hipsGap2,
to: points.waistGap2Right,
x: points.hipsGap2.x - sa - 15
});
macro('vd', {
from: points.waistGap2Right,
to: points.underbustGap2Right,
x: points.hipsGap2.x - sa - 15
});
macro('vd', {
from: points.hipsGap3,
to: points.waistGap2Right,
x: points.hipsGap3.x + sa + 15
});
macro('vd', {
from: points.waistGap2Right,
to: points.underbustGap3Left,
x: points.hipsGap3.x + sa + 15
});
}
return part;
// Complete pattern?
if(complete) {
points.grainlineTop = new Point(
points.waistGap2Right.shiftFractionTowards(points.waistGap3Left, 0.5).x,
points.underbustGap2Right.y
);
points.grainlineBottom = new Point(
points.grainlineTop.x,
points.hipsGap3.y
);
macro('grainline', {
from: points.grainlineBottom,
to: points.grainlineTop
});
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap3Left)/2);
macro('title', {
nr: 3,
title: '',
at: points.title
});
if(sa) paths.sa = paths.panel3.offset(sa).attr('class', 'fabric sa');
}
};
export default panel3;
// Paperless?
if (paperless) {
macro('hd', {
from: points.hipsGap2,
to: points.hipsGap3,
y: points.hipsGap2.y + sa + 15
});
macro('ld', {
from: points.waistGap2Right,
to: points.waistGap3Left
});
macro('hd', {
from: points.underbustGap2Right,
to: points.underbustGap3Left,
y: points.underbustGap2Right.y - sa - 15
});
macro('vd', {
from: points.hipsGap2,
to: points.waistGap2Right,
x: points.hipsGap2.x - sa - 15
});
macro('vd', {
from: points.waistGap2Right,
to: points.underbustGap2Right,
x: points.hipsGap2.x - sa - 15
});
macro('vd', {
from: points.hipsGap3,
to: points.waistGap2Right,
x: points.hipsGap3.x + sa + 15
});
macro('vd', {
from: points.waistGap2Right,
to: points.underbustGap3Left,
x: points.hipsGap3.x + sa + 15
});
}
return part;
};

View file

@ -1,6 +1,4 @@
var panel4 = {
draft: function(part) {
export default function(part) {
// prettier-ignore
let {macro, sa, snippets, Snippet, points, paths, Point, complete, paperless } = part.shorthand();
@ -76,7 +74,4 @@ var panel4 = {
}
return part;
}
};
export default panel4;

View file

@ -1,79 +1,74 @@
var panel5 = {
draft: function(part) {
export default function(part) {
// prettier-ignore
let {macro, sa, points, paths, Point, complete, paperless } = part.shorthand();
// prettier-ignore
let {macro, sa, points, paths, Point, complete, paperless } = part.shorthand();
delete paths.outline;
delete paths.panel1;
delete paths.panel2;
delete paths.panel3;
delete paths.panel4;
delete paths.panel6;
delete paths.outline;
delete paths.panel1;
delete paths.panel2;
delete paths.panel3;
delete paths.panel4;
delete paths.panel6;
// Complete pattern?
if(complete) {
points.grainlineTop = new Point(
points.waistGap4Right.shiftFractionTowards(points.waistGap5Left, 0.5).x,
points.underbustGap4Right.y
);
points.grainlineBottom = new Point(
points.grainlineTop.x,
points.hipsGap5.y
);
macro('grainline', {
from: points.grainlineBottom,
to: points.grainlineTop
});
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap5Left)/2);
macro('title', {
nr: 5,
title: '',
at: points.title
});
if(sa) paths.sa = paths.panel5.offset(sa).attr('class', 'fabric sa');
}
// Paperless?
if (paperless) {
macro('hd', {
from: points.hipsGap4,
to: points.hipsGap5,
y: points.hipsGap4.y + sa + 15
});
macro('ld', {
from: points.waistGap4Right,
to: points.waistGap5Left
});
macro('hd', {
from: points.underbustGap4Right,
to: points.underbustGap5Left,
y: points.underbustGap5Left.y - sa - 15
});
macro('vd', {
from: points.hipsGap4,
to: points.waistGap4Right,
x: points.hipsGap4.x - sa - 15
});
macro('vd', {
from: points.waistGap4Right,
to: points.underbustGap4Right,
x: points.hipsGap4.x - sa - 15
});
macro('vd', {
from: points.hipsGap5,
to: points.waistGap4Right,
x: points.hipsGap5.x + sa + 15
});
macro('vd', {
from: points.waistGap4Right,
to: points.underbustGap5Left,
x: points.hipsGap5.x + sa + 15
});
}
return part;
// Complete pattern?
if(complete) {
points.grainlineTop = new Point(
points.waistGap4Right.shiftFractionTowards(points.waistGap5Left, 0.5).x,
points.underbustGap4Right.y
);
points.grainlineBottom = new Point(
points.grainlineTop.x,
points.hipsGap5.y
);
macro('grainline', {
from: points.grainlineBottom,
to: points.grainlineTop
});
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap5Left)/2);
macro('title', {
nr: 5,
title: '',
at: points.title
});
if(sa) paths.sa = paths.panel5.offset(sa).attr('class', 'fabric sa');
}
};
export default panel5;
// Paperless?
if (paperless) {
macro('hd', {
from: points.hipsGap4,
to: points.hipsGap5,
y: points.hipsGap4.y + sa + 15
});
macro('ld', {
from: points.waistGap4Right,
to: points.waistGap5Left
});
macro('hd', {
from: points.underbustGap4Right,
to: points.underbustGap5Left,
y: points.underbustGap5Left.y - sa - 15
});
macro('vd', {
from: points.hipsGap4,
to: points.waistGap4Right,
x: points.hipsGap4.x - sa - 15
});
macro('vd', {
from: points.waistGap4Right,
to: points.underbustGap4Right,
x: points.hipsGap4.x - sa - 15
});
macro('vd', {
from: points.hipsGap5,
to: points.waistGap4Right,
x: points.hipsGap5.x + sa + 15
});
macro('vd', {
from: points.waistGap4Right,
to: points.underbustGap5Left,
x: points.hipsGap5.x + sa + 15
});
}
return part;
};

View file

@ -1,87 +1,82 @@
var panel6 = {
draft: function(part) {
export default function(part) {
// prettier-ignore
let {macro, sa, points, paths, Point, complete, paperless } = part.shorthand();
// prettier-ignore
let {macro, sa, points, paths, Point, complete, paperless } = part.shorthand();
delete paths.outline;
delete paths.panel1;
delete paths.panel2;
delete paths.panel3;
delete paths.panel4;
delete paths.panel5;
delete paths.outline;
delete paths.panel1;
delete paths.panel2;
delete paths.panel3;
delete paths.panel4;
delete paths.panel5;
// Complete pattern?
if(complete) {
points.grainlineTop = new Point(
points.waistGap5Right.shiftFractionTowards(points.waistCB, 0.5).x,
points.underbustGap5Right.y
);
points.grainlineBottom = new Point(
points.grainlineTop.x,
points.hipsGap5.y
);
macro('grainline', {
from: points.grainlineBottom,
to: points.grainlineTop
});
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap5Right)/2);
macro('title', {
nr: 6,
title: '',
at: points.title
});
points.scalebox = new Point(
points.grainlineTop.x,
points.hipsGap5.y - 55
);
macro('scalebox', {
at: points.scalebox,
rotate: 90
});
if(sa) paths.sa = paths.panel6.offset(sa).attr('class', 'fabric sa');
}
// Paperless?
if (paperless) {
macro('hd', {
from: points.hipsGap5,
to: points.backDrop,
y: points.backDrop.y + sa + 15
});
macro('ld', {
from: points.waistGap5Right,
to: points.waistCB
});
macro('hd', {
from: points.underbustGap5Right,
to: points.backRise,
y: points.backRise.y - sa - 15
});
macro('vd', {
from: points.hipsGap5,
to: points.waistGap5Right,
x: points.hipsGap5.x - sa - 15
});
macro('vd', {
from: points.waistGap5Right,
to: points.underbustGap5Right,
x: points.hipsGap5.x - sa - 15
});
macro('vd', {
from: points.backDrop,
to: points.waistCB,
x: points.backDrop.x + sa + 15
});
macro('vd', {
from: points.waistCB,
to: points.backRise,
x: points.backDrop.x + sa + 15
});
}
return part;
// Complete pattern?
if(complete) {
points.grainlineTop = new Point(
points.waistGap5Right.shiftFractionTowards(points.waistCB, 0.5).x,
points.underbustGap5Right.y
);
points.grainlineBottom = new Point(
points.grainlineTop.x,
points.hipsGap5.y
);
macro('grainline', {
from: points.grainlineBottom,
to: points.grainlineTop
});
points.title = points.grainlineTop.shift(-90, points.grainlineTop.dy(points.waistGap5Right)/2);
macro('title', {
nr: 6,
title: '',
at: points.title
});
points.scalebox = new Point(
points.grainlineTop.x,
points.hipsGap5.y - 55
);
macro('scalebox', {
at: points.scalebox,
rotate: 90
});
if(sa) paths.sa = paths.panel6.offset(sa).attr('class', 'fabric sa');
}
};
export default panel6;
// Paperless?
if (paperless) {
macro('hd', {
from: points.hipsGap5,
to: points.backDrop,
y: points.backDrop.y + sa + 15
});
macro('ld', {
from: points.waistGap5Right,
to: points.waistCB
});
macro('hd', {
from: points.underbustGap5Right,
to: points.backRise,
y: points.backRise.y - sa - 15
});
macro('vd', {
from: points.hipsGap5,
to: points.waistGap5Right,
x: points.hipsGap5.x - sa - 15
});
macro('vd', {
from: points.waistGap5Right,
to: points.underbustGap5Right,
x: points.hipsGap5.x - sa - 15
});
macro('vd', {
from: points.backDrop,
to: points.waistCB,
x: points.backDrop.x + sa + 15
});
macro('vd', {
from: points.waistCB,
to: points.backRise,
x: points.backDrop.x + sa + 15
});
}
return part;
};

View file

@ -1,116 +1,111 @@
var panels = {
draft: function(part) {
export default function(part) {
// prettier-ignore
let {measurements, options, store, points, snippets, paths, Point, Snippet, Path, utils, complete, debug } = part.shorthand();
let count = 1;
let bottom = new Path()
.move(points.bottomCF)
.curve(points.bottomCFCp2, points.hipRiseCp1, points.hipRise)
.curve(points.hipRiseCp2, points.backDropCp1, points.backDrop)
.attr('class', 'lashed various stroke-xl');
for (let gap of store.get('gaps')) {
// Underbust
points[`underbustGap${count}`] = new Point(store.get('width') * gap, 0);
points[`underbustGap${count}Right`] = points[`underbustGap${count}`].shift(0, store.get('bustIntake') * 0.1);
points[`underbustGap${count}Left`] = points[`underbustGap${count}`].shift(180, store.get('bustIntake') * 0.1);
points[`underbustGap${count}RightCp`] = points[`underbustGap${count}Right`].shift(-90, measurements.naturalWaistToUnderbust * 0.15);
points[`underbustGap${count}LeftCp`] = points[`underbustGap${count}Left`].shift(-90, measurements.naturalWaistToUnderbust * 0.15);
// prettier-ignore
let {measurements, options, store, points, snippets, paths, Point, Snippet, Path, utils, complete, debug } = part.shorthand();
let count = 1;
let bottom = new Path()
.move(points.bottomCF)
.curve(points.bottomCFCp2, points.hipRiseCp1, points.hipRise)
.curve(points.hipRiseCp2, points.backDropCp1, points.backDrop)
.attr('class', 'lashed various stroke-xl');
for (let gap of store.get('gaps')) {
// Underbust
points[`underbustGap${count}`] = new Point(store.get('width') * gap, 0);
points[`underbustGap${count}Right`] = points[`underbustGap${count}`].shift(0, store.get('bustIntake') * 0.1);
points[`underbustGap${count}Left`] = points[`underbustGap${count}`].shift(180, store.get('bustIntake') * 0.1);
points[`underbustGap${count}RightCp`] = points[`underbustGap${count}Right`].shift(-90, measurements.naturalWaistToUnderbust * 0.15);
points[`underbustGap${count}LeftCp`] = points[`underbustGap${count}Left`].shift(-90, measurements.naturalWaistToUnderbust * 0.15);
// Waist
points[`waistGap${count}`] = new Point(store.get('width') * gap, points.waistCF.y);
points[`waistGap${count}Right`] = points[`waistGap${count}`].shift(0, store.get('waistIntake') * 0.1);
points[`waistGap${count}Left`] = points[`waistGap${count}`].shift(180, store.get('waistIntake') * 0.1);
points[`waistGap${count}RightCp1`] = points[`waistGap${count}Right`].shift(90, measurements.naturalWaistToUnderbust * 0.2);
points[`waistGap${count}LeftCp2`] = points[`waistGap${count}Left`].shift(90, measurements.naturalWaistToUnderbust * 0.2);
points[`waistGap${count}RightCp2`] = points[`waistGap${count}Right`].shift(-90, measurements.naturalWaistToHip * 0.2);
points[`waistGap${count}LeftCp1`] = points[`waistGap${count}Left`].shift(-90, measurements.naturalWaistToHip * 0.2);
// Waist
points[`waistGap${count}`] = new Point(store.get('width') * gap, points.waistCF.y);
points[`waistGap${count}Right`] = points[`waistGap${count}`].shift(0, store.get('waistIntake') * 0.1);
points[`waistGap${count}Left`] = points[`waistGap${count}`].shift(180, store.get('waistIntake') * 0.1);
points[`waistGap${count}RightCp1`] = points[`waistGap${count}Right`].shift(90, measurements.naturalWaistToUnderbust * 0.2);
points[`waistGap${count}LeftCp2`] = points[`waistGap${count}Left`].shift(90, measurements.naturalWaistToUnderbust * 0.2);
points[`waistGap${count}RightCp2`] = points[`waistGap${count}Right`].shift(-90, measurements.naturalWaistToHip * 0.2);
points[`waistGap${count}LeftCp1`] = points[`waistGap${count}Left`].shift(-90, measurements.naturalWaistToHip * 0.2);
// Hips
points[`hipsGap${count}`] = new Point(store.get('width') * gap, points.hipsCF.y);
points[`hipsGap${count}`] = bottom.intersectsX(points[`waistGap${count}`].x).pop();
points[`hipsGap${count}Cp`] = points[`hipsGap${count}`].shiftFractionTowards(points[`waistGap${count}`], 0.2);
// Hips
points[`hipsGap${count}`] = new Point(store.get('width') * gap, points.hipsCF.y);
points[`hipsGap${count}`] = bottom.intersectsX(points[`waistGap${count}`].x).pop();
points[`hipsGap${count}Cp`] = points[`hipsGap${count}`].shiftFractionTowards(points[`waistGap${count}`], 0.2);
count++;
}
// Paths
paths.panel1 = bottom
.split(points.hipsGap1)[0]
.curve(points.hipsGap1Cp, points.waistGap1LeftCp1, points.waistGap1Left)
.curve(points.waistGap1LeftCp2, points.underbustGap1LeftCp, points.underbustGap1Left)
.curve(points.frontRiseStartCp2, points.topCFCp1, points.topCF)
.line(points.bottomCF)
.close()
.attr('class', 'fabric');
paths.panel2 = bottom
.split(points.hipsGap2)[0]
.split(points.hipsGap1)[1]
.curve(points.hipsGap2Cp, points.waistGap2LeftCp1, points.waistGap2Left)
.curve(points.waistGap2LeftCp2, points.underbustGap2LeftCp, points.underbustGap2Left)
.line(points.underbustGap1Right)
.curve(points.underbustGap1RightCp, points.waistGap1RightCp1, points.waistGap1Right)
.curve(points.waistGap1RightCp2, points.hipsGap1Cp, points.hipsGap1)
.close()
.attr('class', 'fabric');
let panel3 = new Path()
.move(points.bottomCF)
.curve(points.bottomCFCp2, points.hipRiseCp1, points.hipRise)
.split(points.hipsGap2)[1];
if (options.panels === 11) panel3 = panel3.split(points.hipsGap3)[0];
paths.panel3 = panel3
.curve(points.hipsGap3Cp, points.waistGap3LeftCp1, points.waistGap3Left)
.curve(points.waistGap3LeftCp2, points.underbustGap3LeftCp, points.underbustGap3Left)
.line(points.underbustGap2Right)
.curve(points.underbustGap2RightCp, points.waistGap2RightCp1, points.waistGap2Right)
.curve(points.waistGap2RightCp2, points.hipsGap2Cp, points.hipsGap2)
.close()
.attr('class', 'fabric');
let topBack = new Path()
.move(points.backRise)
.curve(points.backRiseCp1, points.topSideCp1, points.topSide);
points.underbustGap4Left = topBack.intersectsX(points.underbustGap4Left.x).pop();
paths.panel4 = new Path()
.move(points.hipRise)
.curve(points.hipRiseCp2, points.backDropCp1, points.backDrop)
.split(points.hipsGap4)[0]
.curve(points.hipsGap4Cp, points.waistGap4LeftCp1, points.waistGap4Left)
.curve(points.waistGap4LeftCp2, points.underbustGap4LeftCp, points.underbustGap4Left)
.join(topBack.split(points.underbustGap4Left)[1]);
if(options.panels === 11) paths.panel4.line(points.underbustGap3Right);
paths.panel4
.curve(points.underbustGap3RightCp, points.waistGap3RightCp1, points.waistGap3Right)
.curve(points.waistGap3RightCp2, points.hipsGap3Cp, points.hipsGap3)
.close()
.attr('class', 'fabric');
points.underbustGap4Right = topBack.intersectsX(points.underbustGap4Right.x).pop();
points.underbustGap5Left = topBack.intersectsX(points.underbustGap5Left.x).pop();
let top5 = topBack
.split(points.underbustGap5Left)[1]
.split(points.underbustGap4Right)[0];
paths.panel5 = bottom
.split(points.hipsGap5)[0]
.split(points.hipsGap4)[1]
.curve(points.hipsGap5Cp, points.waistGap5LeftCp1, points.waistGap5Left)
.curve(points.waistGap5LeftCp2, points.underbustGap5LeftCp, points.underbustGap5Left)
.curve(top5.ops[1].cp1, top5.ops[1].cp2, top5.ops[1].to)
.curve(points.underbustGap4RightCp, points.waistGap4RightCp1, points.waistGap4Right)
.curve(points.waistGap4RightCp2, points.hipsGap4Cp, points.hipsGap4)
.close()
.attr('class', 'fabric');
points.underbustGap5Right = topBack.intersectsX(points.underbustGap5Right.x).pop();
paths.panel6 = bottom
.split(points.hipsGap5)[1]
.line(points.backRise)
.join(topBack.split(points.underbustGap5Right)[0])
.curve(points.underbustGap5RightCp, points.waistGap5RightCp1, points.waistGap5Right)
.curve(points.waistGap5RightCp2, points.hipsGap5Cp, points.hipsGap5)
.close()
.attr('class', 'fabric');
paths.outline.render = false;
return part;
count++;
}
};
// Paths
paths.panel1 = bottom
.split(points.hipsGap1)[0]
.curve(points.hipsGap1Cp, points.waistGap1LeftCp1, points.waistGap1Left)
.curve(points.waistGap1LeftCp2, points.underbustGap1LeftCp, points.underbustGap1Left)
.curve(points.frontRiseStartCp2, points.topCFCp1, points.topCF)
.line(points.bottomCF)
.close()
.attr('class', 'fabric');
paths.panel2 = bottom
.split(points.hipsGap2)[0]
.split(points.hipsGap1)[1]
.curve(points.hipsGap2Cp, points.waistGap2LeftCp1, points.waistGap2Left)
.curve(points.waistGap2LeftCp2, points.underbustGap2LeftCp, points.underbustGap2Left)
.line(points.underbustGap1Right)
.curve(points.underbustGap1RightCp, points.waistGap1RightCp1, points.waistGap1Right)
.curve(points.waistGap1RightCp2, points.hipsGap1Cp, points.hipsGap1)
.close()
.attr('class', 'fabric');
let panel3 = new Path()
.move(points.bottomCF)
.curve(points.bottomCFCp2, points.hipRiseCp1, points.hipRise)
.split(points.hipsGap2)[1];
if (options.panels === 11) panel3 = panel3.split(points.hipsGap3)[0];
paths.panel3 = panel3
.curve(points.hipsGap3Cp, points.waistGap3LeftCp1, points.waistGap3Left)
.curve(points.waistGap3LeftCp2, points.underbustGap3LeftCp, points.underbustGap3Left)
.line(points.underbustGap2Right)
.curve(points.underbustGap2RightCp, points.waistGap2RightCp1, points.waistGap2Right)
.curve(points.waistGap2RightCp2, points.hipsGap2Cp, points.hipsGap2)
.close()
.attr('class', 'fabric');
let topBack = new Path()
.move(points.backRise)
.curve(points.backRiseCp1, points.topSideCp1, points.topSide);
points.underbustGap4Left = topBack.intersectsX(points.underbustGap4Left.x).pop();
paths.panel4 = new Path()
.move(points.hipRise)
.curve(points.hipRiseCp2, points.backDropCp1, points.backDrop)
.split(points.hipsGap4)[0]
.curve(points.hipsGap4Cp, points.waistGap4LeftCp1, points.waistGap4Left)
.curve(points.waistGap4LeftCp2, points.underbustGap4LeftCp, points.underbustGap4Left)
.join(topBack.split(points.underbustGap4Left)[1]);
if(options.panels === 11) paths.panel4.line(points.underbustGap3Right);
paths.panel4
.curve(points.underbustGap3RightCp, points.waistGap3RightCp1, points.waistGap3Right)
.curve(points.waistGap3RightCp2, points.hipsGap3Cp, points.hipsGap3)
.close()
.attr('class', 'fabric');
points.underbustGap4Right = topBack.intersectsX(points.underbustGap4Right.x).pop();
points.underbustGap5Left = topBack.intersectsX(points.underbustGap5Left.x).pop();
let top5 = topBack
.split(points.underbustGap5Left)[1]
.split(points.underbustGap4Right)[0];
paths.panel5 = bottom
.split(points.hipsGap5)[0]
.split(points.hipsGap4)[1]
.curve(points.hipsGap5Cp, points.waistGap5LeftCp1, points.waistGap5Left)
.curve(points.waistGap5LeftCp2, points.underbustGap5LeftCp, points.underbustGap5Left)
.curve(top5.ops[1].cp1, top5.ops[1].cp2, top5.ops[1].to)
.curve(points.underbustGap4RightCp, points.waistGap4RightCp1, points.waistGap4Right)
.curve(points.waistGap4RightCp2, points.hipsGap4Cp, points.hipsGap4)
.close()
.attr('class', 'fabric');
points.underbustGap5Right = topBack.intersectsX(points.underbustGap5Right.x).pop();
paths.panel6 = bottom
.split(points.hipsGap5)[1]
.line(points.backRise)
.join(topBack.split(points.underbustGap5Right)[0])
.curve(points.underbustGap5RightCp, points.waistGap5RightCp1, points.waistGap5Right)
.curve(points.waistGap5RightCp2, points.hipsGap5Cp, points.hipsGap5)
.close()
.attr('class', 'fabric');
export default panels;
paths.outline.render = false;
return part;
};