2018-12-21 18:19:21 +01:00
|
|
|
import freesewing from "freesewing";
|
|
|
|
import Brian from "@freesewing/brian";
|
2018-12-22 15:15:49 +01:00
|
|
|
import plugins from "@freesewing/plugin-bundle";
|
|
|
|
import flipPlugin from "@freesewing/plugin-flip";
|
|
|
|
import buttonPlugin from "@freesewing/plugin-buttons";
|
2018-12-29 12:28:09 +01:00
|
|
|
import config from "../config";
|
2018-12-21 18:19:21 +01:00
|
|
|
// Parts
|
|
|
|
import draftBack from "./back";
|
2018-12-21 19:38:05 +01:00
|
|
|
import draftFront from "./front";
|
2018-12-22 15:15:49 +01:00
|
|
|
import draftFrontRight from "./frontright";
|
2018-12-22 17:30:12 +01:00
|
|
|
import draftButtonPlacket from "./buttonplacket";
|
2018-12-23 12:13:37 +01:00
|
|
|
import draftFrontLeft from "./frontleft";
|
2018-12-23 13:57:40 +01:00
|
|
|
import draftButtonholePlacket from "./buttonholeplacket";
|
2018-12-23 14:54:34 +01:00
|
|
|
import draftYoke from "./yoke";
|
2018-12-23 17:25:53 +01:00
|
|
|
import draftSleeve from "./sleeve";
|
2018-12-24 14:17:55 +01:00
|
|
|
import draftCollarStand from "./collarstand";
|
2018-12-24 15:53:34 +01:00
|
|
|
import draftCollar from "./collar";
|
2018-12-24 17:35:06 +01:00
|
|
|
import draftSleevePlacketUnderlap from "./sleeveplacket-underlap";
|
|
|
|
import draftSleevePlacketOverlap from "./sleeveplacket-overlap";
|
2018-12-27 13:08:30 +01:00
|
|
|
import draftCuff from "./cuff";
|
2018-12-21 18:19:21 +01:00
|
|
|
|
2019-02-09 13:50:57 +01:00
|
|
|
// Create pattern
|
|
|
|
const Simon = freesewing.create(config, [plugins, flipPlugin, buttonPlugin]);
|
2018-12-21 18:19:21 +01:00
|
|
|
|
|
|
|
// Attach per-part draft methods to prototype
|
2018-12-22 15:15:49 +01:00
|
|
|
Simon.prototype.draftBase = function(part) {
|
2018-12-21 18:19:21 +01:00
|
|
|
return new Brian(this.settings).draftBase(part);
|
2018-12-22 15:15:49 +01:00
|
|
|
};
|
|
|
|
Simon.prototype.draftFrontBase = function(part) {
|
2018-12-21 18:19:21 +01:00
|
|
|
return new Brian(this.settings).draftFront(part);
|
2018-12-22 15:15:49 +01:00
|
|
|
};
|
|
|
|
Simon.prototype.draftBackBase = function(part) {
|
2018-12-21 18:19:21 +01:00
|
|
|
return new Brian(this.settings).draftBack(part);
|
2018-12-22 15:15:49 +01:00
|
|
|
};
|
2018-12-23 17:25:53 +01:00
|
|
|
Simon.prototype.draftSleeveBase = function(part) {
|
|
|
|
let brian = new Brian(this.settings);
|
|
|
|
return brian.draftSleeve(brian.draftSleevecap(part));
|
|
|
|
};
|
2018-12-21 18:19:21 +01:00
|
|
|
Simon.prototype.draftBack = draftBack;
|
2018-12-21 19:38:05 +01:00
|
|
|
Simon.prototype.draftFront = draftFront;
|
2018-12-22 15:15:49 +01:00
|
|
|
Simon.prototype.draftFrontRight = draftFrontRight;
|
2018-12-22 17:30:12 +01:00
|
|
|
Simon.prototype.draftButtonPlacket = draftButtonPlacket;
|
2018-12-23 12:13:37 +01:00
|
|
|
Simon.prototype.draftFrontLeft = draftFrontLeft;
|
2018-12-23 13:57:40 +01:00
|
|
|
Simon.prototype.draftButtonholePlacket = draftButtonholePlacket;
|
2018-12-23 14:54:34 +01:00
|
|
|
Simon.prototype.draftYoke = draftYoke;
|
2018-12-23 17:25:53 +01:00
|
|
|
Simon.prototype.draftSleeve = draftSleeve;
|
2018-12-24 14:17:55 +01:00
|
|
|
Simon.prototype.draftCollarStand = draftCollarStand;
|
2018-12-24 15:53:34 +01:00
|
|
|
Simon.prototype.draftCollar = draftCollar;
|
2018-12-24 17:35:06 +01:00
|
|
|
Simon.prototype.draftSleevePlacketUnderlap = draftSleevePlacketUnderlap;
|
|
|
|
Simon.prototype.draftSleevePlacketOverlap = draftSleevePlacketOverlap;
|
2018-12-27 13:08:30 +01:00
|
|
|
Simon.prototype.draftCuff = draftCuff;
|
2018-12-21 18:19:21 +01:00
|
|
|
|
|
|
|
export default Simon;
|