diff --git a/packages/plugintest/config/index.js b/packages/plugintest/config/index.js index 3583d532981..be299db0585 100644 --- a/packages/plugintest/config/index.js +++ b/packages/plugintest/config/index.js @@ -37,6 +37,7 @@ export default { 'dimensionStartMarker', ], flip: [ 'flipAxis' ], + gore: [ 'goreRadius', 'goreGoreNumber', 'goreExtraLength' ], }, measurements: [], parts: [ @@ -46,7 +47,7 @@ export default { 'cutonfold', 'dimension', 'flip', - //'gore', + 'gore', //'grainline', //'i18n', //'logo', @@ -64,7 +65,7 @@ export default { ], options: { plugin: { - dflt: 'flip', + dflt: 'gore', list: [ 'all', 'banner', @@ -112,5 +113,10 @@ export default { dimensionStartMarker: { bool: true }, // Flip options flipAxis: { dflt: 'x', list: ['x', 'y'] }, + // Gore options + goreRadius: { count: 20, min: 10, max: 30 }, + goreGoreNumber: { count: 6, min: 4, max: 8 }, + goreExtraLength: { count: 10, min: 0, max: 20 }, + } } diff --git a/packages/plugintest/src/index.js b/packages/plugintest/src/index.js index f293dddecb5..7011b152c5c 100644 --- a/packages/plugintest/src/index.js +++ b/packages/plugintest/src/index.js @@ -7,7 +7,7 @@ import buttons from '@freesewing/plugin-buttons' import cutonfold from '@freesewing/plugin-cutonfold' import dimension from '@freesewing/plugin-dimension' import flip from '@freesewing/plugin-flip' -//import gore from '@freesewing/plugin-gore' +import gore from '@freesewing/plugin-gore' //import grainline from '@freesewing/plugin-grainline' //import i18n from '@freesewing/plugin-i18n' //import logo from '@freesewing/plugin-logo' @@ -29,7 +29,7 @@ import draftButtons from './plugin-buttons' import draftCutonfold from './plugin-cutonfold' import draftDimension from './plugin-dimension' import draftFlip from './plugin-flip' -//import draftGore from './plugin-gore' +import draftGore from './plugin-gore' //import draftGrainline from './plugin-grainline' //import draftI18n from './plugin-i18n' //import draftLogo from './plugin-logo' @@ -56,7 +56,7 @@ const plugins = [ cutonfold, dimension, flip, -// gore, + gore, // grainline, // i18n, // logo, @@ -80,7 +80,7 @@ const methods = { draftCutonfold, draftDimension, draftFlip, -// draftGore, + draftGore, // draftGrainline, // draftI18n, // draftLogo, diff --git a/packages/plugintest/src/plugin-gore.js b/packages/plugintest/src/plugin-gore.js new file mode 100644 index 00000000000..99bba1ed840 --- /dev/null +++ b/packages/plugintest/src/plugin-gore.js @@ -0,0 +1,20 @@ +const draftDimension = part => { + + const { points, Point, paths, Path, snippets, Snippet, options, macro } = part.shorthand() + + if (['gore', 'all'].indexOf(options.plugin) !== -1) { + + points.start = new Point(10,10) + macro('gore', { + from: points.start, + radius: options.goreRadius, + goreNumber: options.goreGoreNumber, + extraLength: options.goreExtraLength, + render: true, + }) + + } + return part +} + +export default draftDimension