2018-09-21 21:30:20 +02:00
|
|
|
import freesewing from "freesewing";
|
2018-12-20 11:41:35 +01:00
|
|
|
import Brian from "@freesewing/brian";
|
2018-12-22 11:49:56 +01:00
|
|
|
import plugins from "@freesewing/plugin-bundle";
|
2018-12-29 12:26:03 +01:00
|
|
|
import config from "../config";
|
2018-12-20 11:41:35 +01:00
|
|
|
// Parts
|
|
|
|
import draftBack from "./back";
|
|
|
|
import draftFront from "./front";
|
|
|
|
import draftSleeve from "./sleeve";
|
|
|
|
import draftPocket from "./pocket";
|
|
|
|
import draftPocketFacing from "./pocketfacing";
|
|
|
|
import draftHoodSide from "./hoodside";
|
|
|
|
import draftHoodCenter from "./hoodcenter";
|
|
|
|
import draftWaistband from "./waistband";
|
|
|
|
import draftCuff from "./cuff";
|
|
|
|
|
2019-02-10 11:26:24 +01:00
|
|
|
// Create pattern
|
|
|
|
const Hugo = freesewing.create(config, plugins);
|
2018-12-20 11:41:35 +01:00
|
|
|
|
|
|
|
// Attach per-part draft methods to prototype
|
|
|
|
Hugo.prototype.draftBase = function (part) {
|
|
|
|
return new Brian(this.settings).draftBase(part);
|
|
|
|
}
|
|
|
|
Hugo.prototype.draftFrontBase = function (part) {
|
|
|
|
return new Brian(this.settings).draftFront(part);
|
|
|
|
}
|
|
|
|
Hugo.prototype.draftBackBase = function (part) {
|
|
|
|
return new Brian(this.settings).draftBack(part);
|
|
|
|
}
|
|
|
|
Hugo.prototype.draftSleeveBase = function (part) {
|
|
|
|
return new Brian(this.settings).draftSleeve(part);
|
|
|
|
}
|
|
|
|
Hugo.prototype.draftSleevecap = function (part) {
|
|
|
|
return new Brian(this.settings).draftSleevecap(part);
|
|
|
|
}
|
|
|
|
Hugo.prototype.draftBack = draftBack;
|
|
|
|
Hugo.prototype.draftFront = draftFront;
|
|
|
|
Hugo.prototype.draftSleeve = draftSleeve;
|
|
|
|
Hugo.prototype.draftPocket = draftPocket;
|
|
|
|
Hugo.prototype.draftPocketFacing = draftPocketFacing;
|
|
|
|
Hugo.prototype.draftHoodSide = draftHoodSide;
|
|
|
|
Hugo.prototype.draftHoodCenter = draftHoodCenter;
|
|
|
|
Hugo.prototype.draftWaistband = draftWaistband;
|
|
|
|
Hugo.prototype.draftCuff = draftCuff;
|
|
|
|
|
|
|
|
export default Hugo;
|