2019-08-03 15:03:33 +02:00
|
|
|
import freesewing from '@freesewing/core'
|
|
|
|
import plugins from '@freesewing/plugin-bundle'
|
|
|
|
import buttons from '@freesewing/plugin-buttons'
|
|
|
|
import Bent from '@freesewing/bent'
|
|
|
|
import config from '../config'
|
2019-03-16 11:39:06 +01:00
|
|
|
// Parts
|
2019-08-03 15:03:33 +02:00
|
|
|
import draftBackBase from './backbase'
|
|
|
|
import draftFrontBase from './frontbase'
|
|
|
|
import draftFront from './front'
|
|
|
|
import draftBack from './back'
|
|
|
|
import draftSide from './side'
|
|
|
|
import draftCollarStand from './collarstand'
|
|
|
|
import draftCollar from './collar'
|
|
|
|
import draftUnderCollar from './undercollar'
|
|
|
|
import draftPocket from './pocket'
|
|
|
|
import draftPocketLining from './pocketlining'
|
|
|
|
import draftChestPocketWelt from './chestpocketwelt'
|
|
|
|
import draftChestPocketBag from './chestpocketbag'
|
|
|
|
import draftInnerPocketWelt from './innerpocketwelt'
|
|
|
|
import draftInnerPocketBag from './innerpocketbag'
|
|
|
|
import draftTopSleeve from './topsleeve'
|
|
|
|
import draftUnderSleeve from './undersleeve'
|
2019-03-16 11:39:06 +01:00
|
|
|
|
|
|
|
// Create new design
|
2019-08-03 15:03:33 +02:00
|
|
|
const Pattern = new freesewing.Design(config, [plugins, buttons])
|
2019-03-16 11:39:06 +01:00
|
|
|
|
|
|
|
// Attach draft methods from Bent to prototype
|
2021-01-31 09:22:15 +01:00
|
|
|
Pattern.prototype.draftBentBase = function (part) {
|
2019-08-03 15:03:33 +02:00
|
|
|
return new Bent(this.settings).draftBase(part)
|
|
|
|
}
|
2021-01-31 09:22:15 +01:00
|
|
|
Pattern.prototype.draftBentFront = function (part) {
|
2019-08-03 15:03:33 +02:00
|
|
|
return new Bent(this.settings).draftFront(part)
|
|
|
|
}
|
2021-01-31 09:22:15 +01:00
|
|
|
Pattern.prototype.draftBentBack = function (part) {
|
2019-08-03 15:03:33 +02:00
|
|
|
return new Bent(this.settings).draftBack(part)
|
|
|
|
}
|
2021-01-31 09:22:15 +01:00
|
|
|
Pattern.prototype.draftBentSleeve = function (part) {
|
2019-08-03 15:03:33 +02:00
|
|
|
return new Bent(this.settings).draftSleeve(part)
|
|
|
|
}
|
2021-01-31 09:22:15 +01:00
|
|
|
Pattern.prototype.draftBentTopSleeve = function (part) {
|
2019-08-03 15:03:33 +02:00
|
|
|
return new Bent(this.settings).draftTopSleeve(part)
|
|
|
|
}
|
2021-01-31 09:22:15 +01:00
|
|
|
Pattern.prototype.draftBentUnderSleeve = function (part) {
|
2019-08-03 15:03:33 +02:00
|
|
|
return new Bent(this.settings).draftUnderSleeve(part)
|
|
|
|
}
|
2019-03-16 11:39:06 +01:00
|
|
|
|
|
|
|
// Attach own draft methods to prototype
|
2019-08-03 15:03:33 +02:00
|
|
|
Pattern.prototype.draftBackBase = draftBackBase
|
|
|
|
Pattern.prototype.draftFrontBase = draftFrontBase
|
|
|
|
Pattern.prototype.draftFront = draftFront
|
|
|
|
Pattern.prototype.draftBack = draftBack
|
|
|
|
Pattern.prototype.draftSide = draftSide
|
|
|
|
Pattern.prototype.draftCollarStand = draftCollarStand
|
|
|
|
Pattern.prototype.draftCollar = draftCollar
|
|
|
|
Pattern.prototype.draftUnderCollar = draftUnderCollar
|
|
|
|
Pattern.prototype.draftPocket = draftPocket
|
|
|
|
Pattern.prototype.draftPocketLining = draftPocketLining
|
|
|
|
Pattern.prototype.draftChestPocketWelt = draftChestPocketWelt
|
|
|
|
Pattern.prototype.draftChestPocketBag = draftChestPocketBag
|
|
|
|
Pattern.prototype.draftInnerPocketWelt = draftInnerPocketWelt
|
|
|
|
Pattern.prototype.draftInnerPocketBag = draftInnerPocketBag
|
|
|
|
Pattern.prototype.draftTopSleeve = draftTopSleeve
|
|
|
|
Pattern.prototype.draftUnderSleeve = draftUnderSleeve
|
2019-03-16 11:39:06 +01:00
|
|
|
|
2019-08-03 15:03:33 +02:00
|
|
|
export default Pattern
|