🔥 Removed benjamin because it's not close to being ready
This commit is contained in:
parent
39fffd900b
commit
223c920137
7 changed files with 0 additions and 556 deletions
|
@ -1,21 +0,0 @@
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2019 freesewing
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
|
@ -1,98 +0,0 @@
|
||||||
> **Note**: This is part of version 2 of FreeSewing.
|
|
||||||
> It is a work in progress, and not ready for prime-time yet
|
|
||||||
>
|
|
||||||
> For all questions, please come say hello in [our chatroom on Gitter](https://gitter.im/).
|
|
||||||
|
|
||||||
<p align="center"><a title="Go to freesewing.org" href="https://freesewing.org/"><img src="https://freesewing.org/img/logo/black.svg" align="center" width="150px" alt="Freesewing logo"/></a></p>
|
|
||||||
<p align="center">FreeSewing is a free and open source library for made-to-measure sewing patterns</p>
|
|
||||||
<p align='center'><a
|
|
||||||
href="https://www.npmjs.com/package/@freesewing/benjamin"
|
|
||||||
title="@freesewing/benjamin on NPM"
|
|
||||||
><img src="https://img.shields.io/npm/v/freesewing.svg"
|
|
||||||
alt="@freesewing/benjamin on NPM"/>
|
|
||||||
</a><a
|
|
||||||
href="https://opensource.org/licenses/MIT"
|
|
||||||
title="License: MIT"
|
|
||||||
><img src="https://img.shields.io/npm/l/freesewing.svg?label=License"
|
|
||||||
alt="License: MIT"/>
|
|
||||||
</a><a
|
|
||||||
href="https://github.com/freesewing/freesewing/issues?q=is%3Aissue+is%3Aopen+label%3Apkg%3Abenjamin"
|
|
||||||
title="Open issues tagged pkg:benjamin"
|
|
||||||
><img src="https://img.shields.io/github/issues/freesewing/freesewing/pkg:benjamin.svg?label=Issues"
|
|
||||||
alt="Open issues tagged pkg:benjamin"/>
|
|
||||||
</a></p><p align='center'><a
|
|
||||||
href="https://twitter.com/freesewing_org"
|
|
||||||
title="Follow @freesewing_org on Twitter"
|
|
||||||
><img src="https://img.shields.io/badge/%F3%A0%80%A0-Follow%20us-blue.svg?logo=twitter&logoColor=white&logoWidth=15"
|
|
||||||
alt="Follow @freesewing_org on Twitter"/>
|
|
||||||
</a><a
|
|
||||||
href="https://gitter.im/freesewing/freesewing"
|
|
||||||
title="Chat with us on Gitter"
|
|
||||||
><img src="https://img.shields.io/badge/%F3%A0%80%A0-Chat%20with%20us-CA0547.svg?logo=gitter&logoColor=white&logoWidth=15"
|
|
||||||
alt="Chat with us on Gitter"/>
|
|
||||||
</a><a
|
|
||||||
href="https://freesewing.org/patrons/join"
|
|
||||||
title="Become a FreeSewing Patron"
|
|
||||||
><img src="https://img.shields.io/badge/%F3%A0%80%A0-Support%20us-blueviolet.svg?logo=cash-app&logoColor=white&logoWidth=15"
|
|
||||||
alt="Become a FreeSewing Patron"/>
|
|
||||||
</a><a
|
|
||||||
href="https://instagram.com/freesewing_org"
|
|
||||||
title="Follow @freesewing_org on Twitter"
|
|
||||||
><img src="https://img.shields.io/badge/%F3%A0%80%A0-Follow%20us-E4405F.svg?logo=instagram&logoColor=white&logoWidth=15"
|
|
||||||
alt="Follow @freesewing_org on Twitter"/>
|
|
||||||
</a></p>
|
|
||||||
|
|
||||||
# @freesewing/benjamin
|
|
||||||
|
|
||||||
A FreeSewing pattern for a bow tie
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
## About FreeSewing 🤔
|
|
||||||
|
|
||||||
Where the world of makers and developers collide, that's where you'll find FreeSewing.
|
|
||||||
|
|
||||||
Our [core library](https://freesewing.dev/en/freesewing) is a *batteries-included* toolbox
|
|
||||||
for parametric design of sewing patterns. It's a modular system (check our list
|
|
||||||
of [plugins](https://freesewing.dev/en/plugins) and getting started is as simple as:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
npm init freesewing-pattern
|
|
||||||
```
|
|
||||||
|
|
||||||
The [getting started] section on [freesewing.dev](https://freesewing.dev/) is a good
|
|
||||||
entrypoint to our documentation, but you'll find a lot more there, including
|
|
||||||
our [API documentation](https://freesewing.dev/en/freesewing/api),
|
|
||||||
as well as [examples](https://freesewing.dev/en/freesewing/examples),
|
|
||||||
and [best practices](https://freesewing.dev/en/do).
|
|
||||||
|
|
||||||
If you're a maker, checkout [freesewing.org](https://freesewing/) where you can generate
|
|
||||||
our sewing patterns adapted to your measurements.
|
|
||||||
|
|
||||||
## Support FreeSewing: Become a patron 🥰
|
|
||||||
|
|
||||||
FreeSewing is an open source project run by a community,
|
|
||||||
and financially supported by our patrons.
|
|
||||||
|
|
||||||
If you feel what we do is worthwhile, you too
|
|
||||||
should [become a patron](https://freesewing.org/patrons/join).
|
|
||||||
|
|
||||||
## Links 👩💻
|
|
||||||
|
|
||||||
- 💻 Makers website: [freesewing.org](https://freesewing.org)
|
|
||||||
- 💻 Developers website: [freesewing.dev](https://freesewing.org)
|
|
||||||
- 💬 Chat: [gitter.im/freesewing](https://gitter.im/freesewing/freesewing)
|
|
||||||
- 🐦 Twitter: [@freesewing_org](https://twitter.com/freesewing_org)
|
|
||||||
- 📷 Instagram: [@freesewing_org](https://instagram.com/freesewing_org)
|
|
||||||
|
|
||||||
## License: MIT 🤓
|
|
||||||
|
|
||||||
© [Joost De Cock](https://github.com/joostdecock).
|
|
||||||
See [the license file](https://github.com/freesewing/freesewing/blob/develop/LICENSE) for details.
|
|
||||||
|
|
||||||
## Where to get help 🤯
|
|
||||||
|
|
||||||
Our [chatroom on Gitter](https://gitter.im) is the best place to ask questions,
|
|
||||||
share your feedback, or just hang out.
|
|
||||||
|
|
||||||
If you want to report a problem, please [create an issue](https://github.com/freesewing/freesewing/issues/new).
|
|
|
@ -1,32 +0,0 @@
|
||||||
<!DOCTYPE html>
|
|
||||||
<html>
|
|
||||||
<head>
|
|
||||||
<meta charset="UTF-8">
|
|
||||||
<title>Pattern Template</title>
|
|
||||||
<script type="text/javascript" src="node_modules/freesewing/dist/browser.js"></script>
|
|
||||||
<script type="text/javascript" src="node_modules/@freesewing/plugin-bundle/dist/browser.js"></script>
|
|
||||||
<script type="text/javascript" src="dist/browser.js"></script>
|
|
||||||
<script type="text/javascript" src="node_modules/@freesewing/plugin-theme/dist/browser.js"></script>
|
|
||||||
<!--
|
|
||||||
<script type="text/javascript" src="node_modules/@freesewing/plugin-designer/dist/browser.js"></script>
|
|
||||||
<script type="text/javascript" src="node_modules/@freesewing/plugin-debug/dist/browser.js"></script>
|
|
||||||
-->
|
|
||||||
<script type="text/javascript" src="node_modules/@freesewing/plugin-validate/dist/browser.js"></script>
|
|
||||||
<script type="text/javascript" src="node_modules/@freesewing/models/dist/browser.js"></script>
|
|
||||||
<script type="text/javascript" src="node_modules/@freesewing/antman/dist/browser.js"></script>
|
|
||||||
</head>
|
|
||||||
<body>
|
|
||||||
<div id="svg"></div>
|
|
||||||
<script>
|
|
||||||
// Instantiating pattern.
|
|
||||||
var pattern = new freesewing.patterns.benjamin({ margin: 10 })
|
|
||||||
//.use(freesewing.plugins.debug)
|
|
||||||
.use(freesewing.plugins.theme)
|
|
||||||
//.use(freesewing.plugins.designer)
|
|
||||||
.use(freesewing.plugins.validate);
|
|
||||||
|
|
||||||
pattern.draft();
|
|
||||||
document.getElementById("svg").innerHTML = pattern.render();
|
|
||||||
</script>
|
|
||||||
</body>
|
|
||||||
</html>
|
|
|
@ -1,51 +0,0 @@
|
||||||
{
|
|
||||||
"name": "@freesewing/benjamin",
|
|
||||||
"version": "0.32.4",
|
|
||||||
"description": "A FreeSewing pattern for a bow tie",
|
|
||||||
"author": "Joost De Cock <joost@decock.org> (https://github.com/joostdecock)",
|
|
||||||
"homepage": "https://freesewing.org/",
|
|
||||||
"repository": "github:freesewing/freesewing",
|
|
||||||
"license": "MIT",
|
|
||||||
"bugs": {
|
|
||||||
"url": "https://github.com/freesewing/freesewing/issues"
|
|
||||||
},
|
|
||||||
"keywords": [
|
|
||||||
"freesewing",
|
|
||||||
"design",
|
|
||||||
"diy",
|
|
||||||
"fashion",
|
|
||||||
"made to measure",
|
|
||||||
"parametric design",
|
|
||||||
"pattern",
|
|
||||||
"sewing",
|
|
||||||
"sewing pattern"
|
|
||||||
],
|
|
||||||
"main": "dist/index.js",
|
|
||||||
"module": "dist/index.mjs",
|
|
||||||
"scripts": {
|
|
||||||
"clean": "rimraf dist",
|
|
||||||
"nodebuild": "BABEL_ENV=production rollup -c -o dist/index.js -f cjs",
|
|
||||||
"modulebuild": "BABEL_ENV=production rollup -c -o dist/index.mjs -f es",
|
|
||||||
"build": "npm run clean && npm run nodebuild && npm run modulebuild",
|
|
||||||
"test": "echo \"benjamin: No tests configured. Perhaps you'd like to do this?\" && exit 0",
|
|
||||||
"pubtest": "npm publish --registry http://localhost:6662"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"@freesewing/core": "^0.32.4",
|
|
||||||
"@freesewing/plugin-bundle": "^0.32.4"
|
|
||||||
},
|
|
||||||
"dependencies": {},
|
|
||||||
"devDependencies": {},
|
|
||||||
"files": [
|
|
||||||
"dist/*",
|
|
||||||
"README.md",
|
|
||||||
"package.json"
|
|
||||||
],
|
|
||||||
"publishConfig": {
|
|
||||||
"access": "public"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8.0.0",
|
|
||||||
"npm": ">=5"
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,48 +0,0 @@
|
||||||
import babel from "rollup-plugin-babel";
|
|
||||||
import resolve from "rollup-plugin-node-resolve";
|
|
||||||
import commonjs from "rollup-plugin-commonjs";
|
|
||||||
import json from "rollup-plugin-json";
|
|
||||||
import minify from "rollup-plugin-babel-minify";
|
|
||||||
import yaml from "rollup-plugin-yaml";
|
|
||||||
import url from "rollup-plugin-url";
|
|
||||||
import postcss from "rollup-plugin-postcss";
|
|
||||||
import svgr from "@svgr/rollup";
|
|
||||||
import peerDepsExternal from "rollup-plugin-peer-deps-external";
|
|
||||||
import { name, version, description, author, license } from "./package.json";
|
|
||||||
|
|
||||||
export default {
|
|
||||||
input: "src/index.js",
|
|
||||||
output: [
|
|
||||||
{
|
|
||||||
file: "dist/index.js",
|
|
||||||
format: "cjs",
|
|
||||||
sourcemap: true
|
|
||||||
},
|
|
||||||
{
|
|
||||||
file: "dist/index.mjs",
|
|
||||||
format: "es",
|
|
||||||
sourcemap: true
|
|
||||||
}
|
|
||||||
],
|
|
||||||
plugins: [
|
|
||||||
peerDepsExternal(),
|
|
||||||
resolve({ modulesOnly: true }),
|
|
||||||
url(),
|
|
||||||
commonjs(),
|
|
||||||
json(),
|
|
||||||
yaml(),
|
|
||||||
svgr(),
|
|
||||||
postcss({
|
|
||||||
modules: true
|
|
||||||
}),
|
|
||||||
babel({
|
|
||||||
exclude: "node_modules/**",
|
|
||||||
plugins: ["@babel/plugin-proposal-object-rest-spread"]
|
|
||||||
}),
|
|
||||||
minify({
|
|
||||||
comments: false,
|
|
||||||
sourceMap: true,
|
|
||||||
banner: `/**\n * ${name} | v${version}\n * ${description}\n * (c) ${new Date().getFullYear()} ${author}\n * @license ${license}\n */`
|
|
||||||
})
|
|
||||||
]
|
|
||||||
};
|
|
|
@ -1,293 +0,0 @@
|
||||||
function FlipAllPointsY(points, mirror, start, end) {
|
|
||||||
for (var point in points) {
|
|
||||||
if (point.substr(0, start.length) == start) {
|
|
||||||
console.log(points[point]);
|
|
||||||
points[end + point.substr(start.length)] = points[point].flipY(mirror);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
export default function(part) {
|
|
||||||
let {
|
|
||||||
store,
|
|
||||||
sa,
|
|
||||||
Point,
|
|
||||||
points,
|
|
||||||
Path,
|
|
||||||
paths,
|
|
||||||
Snippet,
|
|
||||||
snippets,
|
|
||||||
options,
|
|
||||||
measurements,
|
|
||||||
final,
|
|
||||||
paperless,
|
|
||||||
macro
|
|
||||||
} = part.shorthand();
|
|
||||||
|
|
||||||
// Remove from here
|
|
||||||
//options.bowStyle = 'butterfly';
|
|
||||||
//options.bowStyle = 'square';
|
|
||||||
//options.bowStyle = 'widesquare';
|
|
||||||
//options.bowStyle = 'diamond';
|
|
||||||
//options.endStyle = 'straight' ;
|
|
||||||
//options.endStyle = 'rounded' ;
|
|
||||||
//options.endStyle = 'pointed' ;
|
|
||||||
|
|
||||||
//final = true;
|
|
||||||
//paperless = true;
|
|
||||||
//sa = 10;
|
|
||||||
// Remove to here
|
|
||||||
|
|
||||||
if (options.bowStyle == "square") options.tipWidth = options.knotWidth;
|
|
||||||
|
|
||||||
let backWidth = 24;
|
|
||||||
let bandLength = 70;
|
|
||||||
let transitionLength = 50;
|
|
||||||
let halfBackWidth = backWidth / 2;
|
|
||||||
let halfTipWidth = options.tipWidth / 2;
|
|
||||||
let halfBowLength = options.bowLength / 2;
|
|
||||||
let halfKnotWidth = options.knotWidth / 2;
|
|
||||||
|
|
||||||
console.log(options.bowStyle);
|
|
||||||
console.log(options.knotWidth);
|
|
||||||
|
|
||||||
let butterfly =
|
|
||||||
options.bowStyle == "butterfly" || options.bowStyle == "diamond";
|
|
||||||
|
|
||||||
let tipAdjustment = 0;
|
|
||||||
switch (options.endStyle) {
|
|
||||||
case "pointed":
|
|
||||||
tipAdjustment = halfTipWidth / 1.3;
|
|
||||||
break;
|
|
||||||
case "rounded":
|
|
||||||
tipAdjustment = halfTipWidth;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
let hhbl /*halfHalfBowLength */ = halfBowLength / 2;
|
|
||||||
let bcAdjust = options.bowStyle == "diamond" ? 10 : hhbl - 5;
|
|
||||||
|
|
||||||
let tieStart = new Path();
|
|
||||||
let tieLowKnot = new Path();
|
|
||||||
let tieTip = new Path();
|
|
||||||
let tieTopKnot = new Path();
|
|
||||||
let tieEnd = new Path();
|
|
||||||
|
|
||||||
points.Origin = new Point(0, 0);
|
|
||||||
|
|
||||||
points.LowBandEdge = points.Origin.shift(-90, halfBackWidth);
|
|
||||||
points.LowKnotEdge = points.Origin.shift(-90, halfKnotWidth);
|
|
||||||
points.LowTipEdge = points.Origin.shift(-90, halfTipWidth);
|
|
||||||
|
|
||||||
points.LowBandStart = points.LowBandEdge.clone();
|
|
||||||
points.LowBandEnd = points.LowBandEdge.shift(0, bandLength);
|
|
||||||
points.LowTransitionEnd = points.LowKnotEdge.shift(
|
|
||||||
0,
|
|
||||||
bandLength + transitionLength
|
|
||||||
);
|
|
||||||
|
|
||||||
console.log(points["LowBandEdge"].x);
|
|
||||||
|
|
||||||
tieStart
|
|
||||||
.move(points.Origin)
|
|
||||||
.line(points.LowBandStart)
|
|
||||||
.line(points.LowBandEnd)
|
|
||||||
.line(points.LowTransitionEnd);
|
|
||||||
|
|
||||||
points.LowTip = points.LowTipEdge.shift(
|
|
||||||
0,
|
|
||||||
bandLength + transitionLength + halfBowLength * 3
|
|
||||||
);
|
|
||||||
points.Tip = points.Origin.shift(
|
|
||||||
0,
|
|
||||||
bandLength + transitionLength + halfBowLength * 3 + tipAdjustment
|
|
||||||
);
|
|
||||||
|
|
||||||
if (butterfly) {
|
|
||||||
points.LowTransitionEndCp2 = points.LowBandEnd.shiftOutwards(
|
|
||||||
points.LowTransitionEnd,
|
|
||||||
bcAdjust
|
|
||||||
);
|
|
||||||
points.LowHump = points.LowTipEdge.shift(
|
|
||||||
0,
|
|
||||||
bandLength + transitionLength + halfBowLength
|
|
||||||
);
|
|
||||||
points.LowHumpCp1 = points.LowHump.shift(180, bcAdjust);
|
|
||||||
points.LowHumpCp2 = points.LowHump.shift(0, bcAdjust);
|
|
||||||
points.LowValley = points.LowKnotEdge.shift(
|
|
||||||
0,
|
|
||||||
bandLength + transitionLength + halfBowLength * 2
|
|
||||||
);
|
|
||||||
points.LowValleyCp1 = points.LowValley.shift(180, bcAdjust);
|
|
||||||
points.LowValleyCp2 = points.LowValley.shift(0, bcAdjust);
|
|
||||||
points.LowTipCp1 = points.LowTip.shift(180, bcAdjust);
|
|
||||||
}
|
|
||||||
|
|
||||||
points.LowTipCp2 = points.LowTip.shiftTowards(
|
|
||||||
points.LowTipEdge,
|
|
||||||
-tipAdjustment
|
|
||||||
);
|
|
||||||
points.TipCp1 = points.Tip.shift(-90, halfTipWidth / 4);
|
|
||||||
points.TipCp2 = points.Tip.shift(90, halfTipWidth / 4);
|
|
||||||
|
|
||||||
FlipAllPointsY(points, points.Origin, "Low", "Top");
|
|
||||||
|
|
||||||
if (options.endStyle == "rounded") {
|
|
||||||
tieTip
|
|
||||||
.move(points.LowTip)
|
|
||||||
.curve(points.LowTipCp2, points.TipCp1, points.Tip)
|
|
||||||
.curve(points.TipCp2, points.TopTipCp2, points.TopTip);
|
|
||||||
} else {
|
|
||||||
tieTip
|
|
||||||
.move(points.LowTip)
|
|
||||||
.line(points.Tip)
|
|
||||||
.line(points.TopTip);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (butterfly) {
|
|
||||||
tieLowKnot
|
|
||||||
.move(points.LowTransitionEnd)
|
|
||||||
.curve(points.LowTransitionEndCp2, points.LowHumpCp1, points.LowHump)
|
|
||||||
.curve(points.LowHumpCp2, points.LowValleyCp1, points.LowValley)
|
|
||||||
.curve(points.LowValleyCp2, points.LowTipCp1, points.LowTip);
|
|
||||||
tieTopKnot = tieTopKnot
|
|
||||||
.move(points.TopTransitionEnd)
|
|
||||||
.curve(points.TopTransitionEndCp2, points.TopHumpCp1, points.TopHump)
|
|
||||||
.curve(points.TopHumpCp2, points.TopValleyCp1, points.TopValley)
|
|
||||||
.curve(points.TopValleyCp2, points.TopTipCp1, points.TopTip)
|
|
||||||
.reverse();
|
|
||||||
}
|
|
||||||
|
|
||||||
tieEnd
|
|
||||||
.move(points.TopTransitionEnd)
|
|
||||||
.line(points.TopBandEnd)
|
|
||||||
.line(points.TopBandStart)
|
|
||||||
.line(points.Origin);
|
|
||||||
|
|
||||||
paths.tie = new Path()
|
|
||||||
.move(points.Origin)
|
|
||||||
.join(tieStart)
|
|
||||||
.join(tieLowKnot)
|
|
||||||
.join(tieTip)
|
|
||||||
.join(tieTopKnot)
|
|
||||||
.join(tieEnd)
|
|
||||||
.close()
|
|
||||||
.attr("class", "fabric");
|
|
||||||
|
|
||||||
// Final?
|
|
||||||
if (final) {
|
|
||||||
points.grainlineLeft = points.Origin.shift(0, 30);
|
|
||||||
points.grainlineRight = points.Origin.shift(
|
|
||||||
0,
|
|
||||||
bandLength + transitionLength
|
|
||||||
);
|
|
||||||
macro("grainline", {
|
|
||||||
from: points.grainlineLeft,
|
|
||||||
to: points.grainlineRight
|
|
||||||
});
|
|
||||||
|
|
||||||
points.titleAnchor = points.Origin.shift(
|
|
||||||
0,
|
|
||||||
bandLength + transitionLength + halfBowLength + 6
|
|
||||||
);
|
|
||||||
macro("title", { at: points.titleAnchor, nr: 1, title: "Bow Tie" });
|
|
||||||
|
|
||||||
if (!paperless) {
|
|
||||||
let scaleboxAnchor = points.LowTipEdge.shift(-90, 30).shift(0, 50);
|
|
||||||
macro("scalebox", { at: scaleboxAnchor });
|
|
||||||
}
|
|
||||||
|
|
||||||
let logoAnchor = points.Tip.shift(0, 40);
|
|
||||||
snippets.logo = new Snippet("logo", logoAnchor);
|
|
||||||
|
|
||||||
// Dummy line
|
|
||||||
let h1 = logoAnchor.shift(0, 50);
|
|
||||||
let h2 = h1.shift(0, 1);
|
|
||||||
|
|
||||||
paths.hidden = new Path()
|
|
||||||
.move(h1)
|
|
||||||
.line(h2)
|
|
||||||
.attr("class", "hidden");
|
|
||||||
}
|
|
||||||
|
|
||||||
if (sa) {
|
|
||||||
paths.sa = paths.tie.offset(sa).attr("class", "fabric sa");
|
|
||||||
}
|
|
||||||
|
|
||||||
// Paperless?
|
|
||||||
if (paperless) {
|
|
||||||
macro("hd", {
|
|
||||||
from: points.LowBandStart,
|
|
||||||
to: points.LowBandEnd,
|
|
||||||
y: points.LowBandEdge.y + 15
|
|
||||||
});
|
|
||||||
macro("hd", {
|
|
||||||
from: points.LowBandEnd,
|
|
||||||
to: points.LowTransitionEnd,
|
|
||||||
y: points.LowBandEdge.y + 15
|
|
||||||
});
|
|
||||||
macro("vd", {
|
|
||||||
from: points.LowBandStart,
|
|
||||||
to: points.TopBandStart,
|
|
||||||
x: points.LowBandStart.x - 15
|
|
||||||
});
|
|
||||||
macro("vd", {
|
|
||||||
from: points.LowTip,
|
|
||||||
to: points.TopTip,
|
|
||||||
x: points.Tip.x + 15
|
|
||||||
});
|
|
||||||
|
|
||||||
if (butterfly) {
|
|
||||||
macro("hd", {
|
|
||||||
from: points.LowTransitionEnd,
|
|
||||||
to: points.LowHump,
|
|
||||||
y: points.LowTip.y + 15
|
|
||||||
});
|
|
||||||
macro("hd", {
|
|
||||||
from: points.LowHump,
|
|
||||||
to: points.LowValley,
|
|
||||||
y: points.LowTip.y + 15
|
|
||||||
});
|
|
||||||
macro("hd", {
|
|
||||||
from: points.LowValley,
|
|
||||||
to: points.LowTip,
|
|
||||||
y: points.LowTip.y + 15
|
|
||||||
});
|
|
||||||
|
|
||||||
//macro('vd', { from: points.LowTransitionEnd, to: points.TopTransitionEnd, x: points.LowTransitionEnd.x });
|
|
||||||
macro("vd", {
|
|
||||||
from: points.LowHump,
|
|
||||||
to: points.TopHump,
|
|
||||||
x: points.LowHump.x
|
|
||||||
});
|
|
||||||
macro("vd", {
|
|
||||||
from: points.LowValley,
|
|
||||||
to: points.TopValley,
|
|
||||||
x: points.LowValley.x
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
if (options.bowStyle == "widesquare") {
|
|
||||||
macro("vd", {
|
|
||||||
from: points.LowTransitionEnd,
|
|
||||||
to: points.TopTransitionEnd,
|
|
||||||
x: points.LowTransitionEnd.x
|
|
||||||
});
|
|
||||||
}
|
|
||||||
macro("hd", {
|
|
||||||
from: points.LowTransitionEnd,
|
|
||||||
to: points.LowTip,
|
|
||||||
y: points.LowTip.y + 15
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
if (tipAdjustment) {
|
|
||||||
macro("hd", {
|
|
||||||
from: points.LowTip,
|
|
||||||
to: points.Tip,
|
|
||||||
y: points.LowTip.y + 15
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return part;
|
|
||||||
}
|
|
|
@ -1,13 +0,0 @@
|
||||||
import freesewing from "freesewing";
|
|
||||||
import plugins from "@freesewing/plugin-bundle";
|
|
||||||
import config from "../config";
|
|
||||||
// Parts
|
|
||||||
import draftFront from "./front";
|
|
||||||
|
|
||||||
// Create new design
|
|
||||||
const benjamin = new freesewing.Design(config, plugins);
|
|
||||||
|
|
||||||
// Attach draft methods to prototype
|
|
||||||
benjamin.prototype.draftFront = draftFront;
|
|
||||||
|
|
||||||
export default benjamin;
|
|
Loading…
Add table
Add a link
Reference in a new issue