1
0
Fork 0

fire: Switched to plugin-bundle

This commit is contained in:
Joost De Cock 2018-08-11 14:13:40 +02:00
parent 9907fb371c
commit 79f27d2efa
18 changed files with 1123 additions and 238 deletions

View file

@ -2,9 +2,7 @@ import freesewing from "freesewing";
import * as shared from "./shared";
var back = {
draft: function(pattern) {
let part = new pattern.Part().copy(pattern.parts.base);
draft: function(part) {
// prettier-ignore
let {store, sa, points, Path, paths, Snippet, snippets, final, paperless, macro} = part.shorthand();

View file

@ -1,8 +1,7 @@
import freesewing from "freesewing";
var base = {
draft: function(pattern) {
let part = new pattern.Part();
draft: function(part) {
part.render = false;
// prettier-ignore

View file

@ -3,9 +3,7 @@ import base from "./base";
import * as shared from "./shared";
var front = {
draft: function(pattern) {
let part = new pattern.Part().copy(pattern.parts.back);
draft: function(part) {
// prettier-ignore
let {store, sa, Point, points, Path, paths, Snippet, snippets, options, measurements, final, paperless, macro} = part.shorthand();

View file

@ -1,9 +1,5 @@
import freesewing from "freesewing";
import pluginCutonfold from "@freesewing/plugin-cutonfold";
import pluginGrainline from "@freesewing/plugin-grainline";
import pluginDimension from "@freesewing/plugin-dimension";
import pluginLogo from "@freesewing/plugin-logo";
import pluginTitle from "@freesewing/plugin-title";
import pluginBundle from "@freesewing/plugin-bundle";
import config from "../config/config";
import { version } from "../package.json";
@ -13,39 +9,22 @@ import back from "./back";
import front from "./front";
import sleeve from "./sleeve";
var pattern = new freesewing.Pattern({ version: version, ...config })
.with(pluginCutonfold)
.with(pluginGrainline)
.with(pluginDimension)
.with(pluginLogo)
.with(pluginTitle);
var pattern = new freesewing.Pattern({ version: version, ...config }).with(
pluginBundle
);
pattern.draft = function() {
pattern.parts.base = this.draftBase();
pattern.parts.back = this.draftBack();
pattern.parts.front = this.draftFront();
pattern.parts.sleeve = this.draftSleeve();
this.parts.base = this.draftBase(new pattern.Part());
this.parts.back = this.draftBack(new pattern.Part().copy(this.parts.base));
this.parts.front = this.draftFront(new pattern.Part().copy(this.parts.back));
this.parts.sleeve = this.draftSleeve(new pattern.Part());
return pattern;
};
pattern.draftBase = function(pattern = false) {
if (pattern === false) pattern = this;
return base.draft(pattern);
};
pattern.draftBase = part => base.draft(part);
pattern.draftBack = part => back.draft(part);
pattern.draftFront = part => front.draft(part);
pattern.draftSleeve = part => sleeve.draft(part);
pattern.draftBack = function(pattern = false) {
if (pattern === false) pattern = this;
return back.draft(pattern);
};
pattern.draftFront = function(pattern = false) {
if (pattern === false) pattern = this;
return front.draft(pattern);
};
pattern.draftSleeve = function(pattern = false) {
if (pattern === false) pattern = this;
return sleeve.draft(pattern);
};
export default pattern;

View file

@ -41,22 +41,23 @@ export function shoulderToArmholePitch(points, Path) {
}
export function dimensions(macro, points, Path, sa) {
console.log("points for dimensions", points);
macro("pd", {
path: new Path()
.move(points.armhole)
.curve(points.armholeCp1, points.armholeCp1, points.armholeHollow)
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
.curve(
points.armholeHollowCp1,
points.armholeHollowCp1,
points.armholeHollowCp2,
points.armholePitchCp1,
points.armholePitch
)
.curve(points.shoulderCp1, points.shoulderCp1, points.shoulder),
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder),
d: sa + 15
});
macro("pd", {
path: new Path()
.move(points.armholePitch)
.curve(points.shoulderCp1, points.shoulderCp1, points.shoulder),
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder),
d: -15
});
macro("vd", {

View file

@ -145,8 +145,7 @@ function draftSleevecap(part, run) {
}
var sleeve = {
draft: function(pattern) {
let part = new pattern.Part();
draft: function(part) {
// prettier-ignore
let {debug, store, units, sa, measurements, options, Point, points, Path, paths, Snippet, snippets, final, paperless, macro} = part.shorthand();