1
0
Fork 0

Merge pull request #2507 from freesewing/octoplushie

Merging this as these issues with the docs are not relevant
This commit is contained in:
Joost De Cock 2022-07-31 16:06:19 +02:00 committed by GitHub
commit 39fbdd477f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
43 changed files with 5208 additions and 2 deletions

4
.gitignore vendored
View file

@ -134,3 +134,7 @@ scripts/verdaccio.sh
!markdown/dev/reference/api/point/dist
.test-failures.log
core.7268
.gitignore
sites/lab/package.json
sites/lab/core.873

View file

@ -95,6 +95,8 @@ packageJson:
noble:
author: woutervdub (https://github.com/woutervdub)
octoplushy:
author: woutervdub (https://github.com/woutervdub)
plugin-gore:
author: AlfaLyr (https://github.com/alfalyr)
prettier-config:

View file

@ -7,6 +7,7 @@
"hi": "A FreeSewing pattern for a shark plush toy",
"holmes": "A FreeSewing pattern for a Sherlock Holmes hat",
"hortensia": "A FreeSewing pattern for a handbag",
"octoplushy": "A FreeSewing pattern for an octopus plushy toy",
"trayvon": "A FreeSewing pattern for a tie"
},
"blocks": {
@ -58,4 +59,4 @@
"rendertest": "A FreeSewing pattern to test (y)our render engine our CSS",
"tutorial": "A FreeSewing pattern for a baby bib that's used in our tutorial"
}
}
}

View file

@ -0,0 +1,9 @@
# Change log for: @freesewing/octoplushy
This is the **initial release**, and the start of this change log.
> Prior to version 2, FreeSewing was not a JavaScript project.
> As such, that history is out of scope for this change log.

View file

@ -0,0 +1,272 @@
![FreeSewing](https://static.freesewing.org/banner.png)
<p align='center'><a
href="https://www.npmjs.com/package/@freesewing/octoplushy"
title="@freesewing/octoplushy on NPM"
><img src="https://img.shields.io/npm/v/@freesewing/octoplushy.svg"
alt="@freesewing/octoplushy on NPM"/>
</a><a
href="https://opensource.org/licenses/MIT"
title="License: MIT"
><img src="https://img.shields.io/npm/l/@freesewing/octoplushy.svg?label=License"
alt="License: MIT"/>
</a><a
href="https://deepscan.io/dashboard#view=project&tid=2114&pid=2993&bid=23256"
title="Code quality on DeepScan"
><img src="https://deepscan.io/api/teams/2114/projects/2993/branches/23256/badge/grade.svg"
alt="Code quality on DeepScan"/>
</a><a
href="https://github.com/freesewing/freesewing/issues?q=is%3Aissue+is%3Aopen+label%3Apkg%3Aoctoplushy"
title="Open issues tagged pkg:octoplushy"
><img src="https://img.shields.io/github/issues/freesewing/freesewing/pkg:octoplushy.svg?label=Issues"
alt="Open issues tagged pkg:octoplushy"/>
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-92-pink.svg"
alt="All Contributors"/>
</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://chat.freesewing.org"
title="Chat with us on Discord"
><img src="https://img.shields.io/discord/698854858052075530?label=Chat%20on%20Discord"
alt="Chat with us on Discord"/>
</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/octoplushy
FIXME: A FreeSewing pattern that needs a description
## What am I looking at? 🤔
This repository is our *monorepo*
holding [all our NPM packages](https://freesewing.dev/reference/packages/).
This folder holds: @freesewing/octoplushy
If you're not entirely sure what to do or how to start, type this command:
```
npm run tips
```
> If you don't want to set up a dev environment, you can run it in your browser:
>
> [![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/freesewing/freesewing)
>
> We recommend that you fork our repository and then
> put `gitpod.io/#<entire-url-of-your-fork` into a browser
> to start up a browser-based dev environment of your own.
## About FreeSewing 💀
Where the world of makers and developers collide, that's where you'll find FreeSewing.
If you're a maker, checkout [freesewing.org](https://freesewing.org/) where you can generate
our sewing patterns adapted to your measurements.
If you're a developer, our documentation is on [freesewing.dev](https://freesewing.dev/).
Our [core library](https://freesewing.dev/reference/api/) is a *batteries-included* toolbox
for parametric design of sewing patterns. But we also provide a range
of [plugins](https://freesewing.dev/reference/plugins/) that further extend the
functionality of the platform.
If you have NodeJS installed, you can try it right now by running:
```bash
npx create-freesewing-pattern
```
Or, consult our getting started guides
for [Linux](https://freesewing.dev/tutorials/getting-started-linux/),
[MacOS](https://freesewing.dev/tutorials/getting-started-mac/),
or [Windows](https://freesewing.dev/tutorials/getting-started-windows/).
We also have a [pattern design tutorial](https://freesewing.dev/tutorials/pattern-design/) that
walks you through your first parametric design,
and [a friendly community](https://freesewing.org/community/where/) with
people who can help you when you get stuck.
## 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, and you can spend a few coind without
hardship, then you should [join us and become a patron](https://freesewing.org/community/join).
## Links 👩‍💻
- 💻 Makers website: [freesewing.org](https://freesewing.org)
- 💻 Developers website: [freesewing.dev](https://freesewing.dev)
- 💬 Chat: On Discord via [discord.freesewing.org](https://discord.freesewing.org/)
- ✅ Todo list/Kanban board: On Github via [todo.freesewing.org](https://todo.freesewing.org/)
- 🐦 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 [chatrooms on Discord](https://chat.freesewing.org/) are 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).
## Contributors ✨
Thanks goes to these wonderful people ([emoji key](https://allcontributors.org/docs/en/emoji-key)):
<!-- ALL-CONTRIBUTORS-LIST:START - Do not remove or modify this section -->
<!-- prettier-ignore-start -->
<!-- markdownlint-disable -->
<table>
<tr>
<td align="center"><a href="http://adamrtomkins.github.io/"><img src="https://avatars.githubusercontent.com/u/5709603?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Adam Tomkins</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=AdamRTomkins" title="Documentation">📖</a></td>
<td align="center"><a href="http://polymerisation-des-concepts.fr/"><img src="https://avatars.githubusercontent.com/u/365999?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Alexandre Ignjatovic</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=bankair" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/AlfaLyr"><img src="https://avatars.githubusercontent.com/u/39273729?v=4?s=100" width="100px;" alt=""/><br /><sub><b>AlfaLyr</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=AlfaLyr" title="Code">💻</a> <a href="#plugin-AlfaLyr" title="Plugin/utility libraries">🔌</a> <a href="#design-AlfaLyr" title="Design">🎨</a></td>
<td align="center"><a href="http://thelettereph.com"><img src="https://avatars.githubusercontent.com/u/357684?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Andrew James</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=ephphatha" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/annekecaramin"><img src="https://avatars.githubusercontent.com/u/38046191?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anneke</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=annekecaramin" title="Documentation">📖</a> <a href="#translation-annekecaramin" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/anniekao"><img src="https://avatars.githubusercontent.com/u/1550506?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Annie Kao</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=anniekao" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/Anternative"><img src="https://avatars.githubusercontent.com/u/81079850?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anternative</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=Anternative" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/Quiltmaster"><img src="https://avatars.githubusercontent.com/u/71795777?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Anthony</b></sub></a><br /><a href="#question-Quiltmaster" title="Answering Questions">💬</a></td>
<td align="center"><a href="https://github.com/arigrayzel"><img src="https://avatars.githubusercontent.com/u/33040950?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ari Grayzel-student</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=arigrayzel" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/camerondubas"><img src="https://avatars.githubusercontent.com/u/6216460?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cameron Dubas</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=camerondubas" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/cabi"><img src="https://avatars.githubusercontent.com/u/2596253?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Carsten Biebricher</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=cabi" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/cathyzoller"><img src="https://avatars.githubusercontent.com/u/2120275?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Cathy Zoller</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=cathyzoller" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/Chantalbijoux"><img src="https://avatars.githubusercontent.com/u/39673694?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Chantal Lapointe</b></sub></a><br /><a href="#translation-Chantalbijoux" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/dpiquet"><img src="https://avatars.githubusercontent.com/u/4688628?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Damien PIQUET</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=dpiquet" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://www.darigovresearch.com/"><img src="https://avatars.githubusercontent.com/u/30328618?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Darigov Research</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=darigovresearch" title="Documentation">📖</a> <a href="#ideas-darigovresearch" title="Ideas, Planning, & Feedback">🤔</a></td>
<td align="center"><a href="https://github.com/ElenaFdR"><img src="https://avatars.githubusercontent.com/u/5113815?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Elena FdR</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=ElenaFdR" title="Documentation">📖</a> <a href="#blog-ElenaFdR" title="Blogposts">📝</a></td>
<td align="center"><a href="https://emmanuelnyachoke.com/"><img src="https://avatars.githubusercontent.com/u/1908926?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Emmanuel Nyachoke</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=enyachoke" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=enyachoke" title="Documentation">📖</a></td>
<td align="center"><a href="http://enochriese.com"><img src="https://avatars.githubusercontent.com/u/5298929?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Enoch Riese</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=eriese" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/EvEkSwed"><img src="https://avatars.githubusercontent.com/u/39723451?v=4?s=100" width="100px;" alt=""/><br /><sub><b>EvEkSwed</b></sub></a><br /><a href="#translation-EvEkSwed" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/Fantastik-Maman"><img src="https://avatars.githubusercontent.com/u/39785382?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Fantastik-Maman</b></sub></a><br /><a href="#translation-Fantastik-Maman" title="Translation">🌍</a></td>
<td align="center"><a href="https://www.forresto.com/"><img src="https://avatars.githubusercontent.com/u/395307?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Forrest O.</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=forresto" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/fmatray"><img src="https://avatars.githubusercontent.com/u/8267716?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Frédéric</b></sub></a><br /><a href="#translation-fmatray" title="Translation">🌍</a></td>
<td align="center"><a href="https://www.linkedin.com/in/glennfmatthews/"><img src="https://avatars.githubusercontent.com/u/5603551?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Glenn Matthews</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=glennmatthews" title="Documentation">📖</a></td>
<td align="center"><a href="https://kirby.zone"><img src="https://avatars.githubusercontent.com/u/75245963?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Igor Couto</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/issues?q=author%3Aiocouto" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://bandism.net/"><img src="https://avatars.githubusercontent.com/u/22633385?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Ikko Ashimine</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=eltociear" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/Irapeke"><img src="https://avatars.githubusercontent.com/u/39604334?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Irapeke</b></sub></a><br /><a href="#translation-Irapeke" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/jsawo"><img src="https://avatars.githubusercontent.com/u/1294706?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jacek Sawoszczuk</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=jsawo" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/jgfichte"><img src="https://avatars.githubusercontent.com/u/1787162?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jason Williams</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=jgfichte" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/jejacks0n"><img src="https://avatars.githubusercontent.com/u/13765?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jeremy Jackson</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=jejacks0n" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Joebidido"><img src="https://avatars.githubusercontent.com/u/39796210?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joebidido</b></sub></a><br /><a href="#translation-Joebidido" title="Translation">🌍</a></td>
<td align="center"><a href="https://joost.at/"><img src="https://avatars.githubusercontent.com/u/1708494?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joost De Cock</b></sub></a><br /><a href="#maintenance-joostdecock" title="Maintenance">🚧</a></td>
<td align="center"><a href="https://github.com/joshessman"><img src="https://avatars.githubusercontent.com/u/9941074?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Josh Essman</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=joshessman" title="Documentation">📖</a></td>
<td align="center"><a href="http://www.earth.li/~kake/"><img src="https://avatars.githubusercontent.com/u/1956810?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kake</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=KakeLP" title="Documentation">📖</a></td>
<td align="center"><a href="https://twitter.com/kapunahele"><img src="https://avatars.githubusercontent.com/u/4116963?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kapunahele Wong</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=kapunahelewong" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/tangerineshark"><img src="https://avatars.githubusercontent.com/u/70777269?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Karen</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=tangerineshark" title="Documentation">📖</a> <a href="#eventOrganizing-tangerineshark" title="Event Organizing">📋</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/mcgnly"><img src="https://avatars.githubusercontent.com/u/5653631?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Katie McGinley</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=mcgnly" title="Documentation">📖</a></td>
<td align="center"><a href="http://www.kieranklaassen.com/"><img src="https://avatars.githubusercontent.com/u/209089?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kieran Klaassen</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=kieranklaassen" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Kittycatou"><img src="https://avatars.githubusercontent.com/u/48165583?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kittycatou</b></sub></a><br /><a href="#translation-Kittycatou" title="Translation">🌍</a></td>
<td align="center"><a href="https://www.krishoward.org/"><img src="https://avatars.githubusercontent.com/u/5946286?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kris</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=web-goddess" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/kristinruben"><img src="https://avatars.githubusercontent.com/u/17237479?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Kristin Ruben</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=kristinruben" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Loudepeuter"><img src="https://avatars.githubusercontent.com/u/38081954?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Loudepeuter</b></sub></a><br /><a href="#translation-Loudepeuter" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/lucibytes"><img src="https://avatars.githubusercontent.com/u/77203781?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Lucian</b></sub></a><br /><a href="#eventOrganizing-lucibytes" title="Event Organizing">📋</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/manufakturedelweiss"><img src="https://avatars.githubusercontent.com/u/38063391?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Marcus</b></sub></a><br /><a href="#translation-manufakturedelweiss" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/martintribo"><img src="https://avatars.githubusercontent.com/u/1613442?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Martin Tribo</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=martintribo" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/nadege"><img src="https://avatars.githubusercontent.com/u/3792171?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nadege Michel</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=nadege" title="Tests">⚠️</a> <a href="https://github.com/freesewing/freesewing/commits?author=nadege" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/nataliasayang"><img src="https://avatars.githubusercontent.com/u/48160791?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Natalia</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=nataliasayang" title="Code">💻</a> <a href="#design-nataliasayang" title="Design">🎨</a> <a href="#blog-nataliasayang" title="Blogposts">📝</a></td>
<td align="center"><a href="http://yergler.net/"><img src="https://avatars.githubusercontent.com/u/510875?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nathan Yergler</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=nyergler" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/nicholasdower"><img src="https://avatars.githubusercontent.com/u/9117775?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nick Dower</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=nicholasdower" title="Documentation">📖</a> <a href="https://github.com/freesewing/freesewing/commits?author=nicholasdower" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/issues?q=author%3Anicholasdower" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://pat.forringer.com/"><img src="https://avatars.githubusercontent.com/u/136456?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Patrick Forringer</b></sub></a><br /><a href="#plugin-destos" title="Plugin/utility libraries">🔌</a></td>
</tr>
<tr>
<td align="center"><a href="http://pd75.github.io/"><img src="https://avatars.githubusercontent.com/u/10294795?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Paul</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=PD75" title="Documentation">📖</a> <a href="#blog-PD75" title="Blogposts">📝</a> <a href="#translation-PD75" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/phillipthelen"><img src="https://avatars.githubusercontent.com/u/298062?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Phillip Thelen</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=phillipthelen" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/Pixieish"><img src="https://avatars.githubusercontent.com/u/32991415?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Pixieish</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=Pixieish" title="Documentation">📖</a></td>
<td align="center"><a href="https://www.uza.be/persoon/prof-dr-sorcha-ni-dhubhghaill"><img src="https://avatars.githubusercontent.com/u/30624634?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Prof. dr. Sorcha Ní Dhubhghaill</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=sorchanidhubhghaill" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/QuentinFelix"><img src="https://avatars.githubusercontent.com/u/5288091?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Quentin FELIX</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=QuentinFelix" title="Code">💻</a> <a href="#design-QuentinFelix" title="Design">🎨</a></td>
<td align="center"><a href="https://github.com/RikHekker"><img src="https://avatars.githubusercontent.com/u/31843274?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Rik Hekker</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/issues?q=author%3ARikHekker" title="Bug reports">🐛</a></td>
<td align="center"><a href="http://resume.livingston-gray.com/faq.html"><img src="https://avatars.githubusercontent.com/u/6462?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sam Livingston-Gray</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=geeksam" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/sannek"><img src="https://avatars.githubusercontent.com/u/17491062?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sanne</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=sannek" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=sannek" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/Tyrannogina"><img src="https://avatars.githubusercontent.com/u/19556565?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Sara Latorre</b></sub></a><br /><a href="#translation-Tyrannogina" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/SeaZeeZee"><img src="https://avatars.githubusercontent.com/u/86711383?v=4?s=100" width="100px;" alt=""/><br /><sub><b>SeaZeeZee</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=SeaZeeZee" title="Documentation">📖</a> <a href="https://github.com/freesewing/freesewing/commits?author=SeaZeeZee" title="Code">💻</a></td>
<td align="center"><a href="https://www.instagram.com/celine_mge/"><img src="https://avatars.githubusercontent.com/u/57619777?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Slylele</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=Slylele" title="Documentation">📖</a> <a href="#translation-Slylele" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/Soazillon"><img src="https://avatars.githubusercontent.com/u/40845940?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Soazillon</b></sub></a><br /><a href="#translation-Soazillon" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/SoneaTheBest"><img src="https://avatars.githubusercontent.com/u/64635425?v=4?s=100" width="100px;" alt=""/><br /><sub><b>SoneaTheBest</b></sub></a><br /><a href="#translation-SoneaTheBest" title="Translation">🌍</a></td>
<td align="center"><a href="http://metafly.info/"><img src="https://avatars.githubusercontent.com/u/961256?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Stefan Sydow</b></sub></a><br /><a href="#translation-stsydow" title="Translation">🌍</a> <a href="https://github.com/freesewing/freesewing/commits?author=stsydow" title="Documentation">📖</a> <a href="https://github.com/freesewing/freesewing/commits?author=stsydow" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/TriploidTree"><img src="https://avatars.githubusercontent.com/u/4170521?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Tríona</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=TriploidTree" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/theUnmutual"><img src="https://avatars.githubusercontent.com/u/22374635?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Unmutual</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=theUnmutual" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/woutervdub"><img src="https://avatars.githubusercontent.com/u/24414629?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Wouter van Wageningen</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=woutervdub" title="Code">💻</a> <a href="#design-woutervdub" title="Design">🎨</a> <a href="#tool-woutervdub" title="Tools">🔧</a></td>
<td align="center"><a href="https://github.com/amysews"><img src="https://avatars.githubusercontent.com/u/25280778?v=4?s=100" width="100px;" alt=""/><br /><sub><b>amysews</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=amysews" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/anna-puk"><img src="https://avatars.githubusercontent.com/u/100537439?v=4?s=100" width="100px;" alt=""/><br /><sub><b>anna-puk</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=anna-puk" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/beautifulsummermoon"><img src="https://avatars.githubusercontent.com/u/40396388?v=4?s=100" width="100px;" alt=""/><br /><sub><b>beautifulsummermoon</b></sub></a><br /><a href="#translation-beautifulsummermoon" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/berce"><img src="https://avatars.githubusercontent.com/u/10439709?v=4?s=100" width="100px;" alt=""/><br /><sub><b>berce</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=berce" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/biou"><img src="https://avatars.githubusercontent.com/u/1340376?v=4?s=100" width="100px;" alt=""/><br /><sub><b>biou</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=biou" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/bobgeorgethe3rd"><img src="https://avatars.githubusercontent.com/u/16866285?v=4?s=100" width="100px;" alt=""/><br /><sub><b>bobgeorgethe3rd</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=bobgeorgethe3rd" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=bobgeorgethe3rd" title="Documentation">📖</a> <a href="#design-bobgeorgethe3rd" title="Design">🎨</a></td>
<td align="center"><a href="https://github.com/brmlyklr"><img src="https://avatars.githubusercontent.com/u/22308713?v=4?s=100" width="100px;" alt=""/><br /><sub><b>brmlyklr</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=brmlyklr" title="Documentation">📖</a></td>
<td align="center"><a href="http://www.chrisbarrett.fr"><img src="https://avatars.githubusercontent.com/u/2373249?v=4?s=100" width="100px;" alt=""/><br /><sub><b>chri5b</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=chri5b" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=chri5b" title="Tests">⚠️</a></td>
<td align="center"><a href="https://github.com/dingcycle"><img src="https://avatars.githubusercontent.com/u/1681985?v=4?s=100" width="100px;" alt=""/><br /><sub><b>dingcycle</b></sub></a><br /><a href="#translation-dingcycle" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/drowned-in-books"><img src="https://avatars.githubusercontent.com/u/100040772?v=4?s=100" width="100px;" alt=""/><br /><sub><b>drowned-in-books</b></sub></a><br /><a href="#question-drowned-in-books" title="Answering Questions">💬</a></td>
<td align="center"><a href="https://github.com/econo202"><img src="https://avatars.githubusercontent.com/u/34138153?v=4?s=100" width="100px;" alt=""/><br /><sub><b>econo202</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=econo202" title="Documentation">📖</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/ericamattos"><img src="https://avatars.githubusercontent.com/u/4341417?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ericamattos</b></sub></a><br /><a href="#translation-ericamattos" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/fightingrabbit"><img src="https://avatars.githubusercontent.com/u/25751445?v=4?s=100" width="100px;" alt=""/><br /><sub><b>fightingrabbit</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=fightingrabbit" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/DocSpencer77"><img src="https://avatars.githubusercontent.com/u/43393580?v=4?s=100" width="100px;" alt=""/><br /><sub><b>gaylyndie</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=DocSpencer77" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/grimlokason"><img src="https://avatars.githubusercontent.com/u/5112238?v=4?s=100" width="100px;" alt=""/><br /><sub><b>grimlokason</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=grimlokason" title="Code">💻</a></td>
<td align="center"><a href="https://weblog.redisdead.net"><img src="https://avatars.githubusercontent.com/u/6494414?v=4?s=100" width="100px;" alt=""/><br /><sub><b>hellgy</b></sub></a><br /><a href="#design-hellgy" title="Design">🎨</a></td>
<td align="center"><a href="https://github.com/jackseye"><img src="https://avatars.githubusercontent.com/u/27834526?v=4?s=100" width="100px;" alt=""/><br /><sub><b>jackseye</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=jackseye" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/marckiesel"><img src="https://avatars.githubusercontent.com/u/39653780?v=4?s=100" width="100px;" alt=""/><br /><sub><b>marckiesel</b></sub></a><br /><a href="#translation-marckiesel" title="Translation">🌍</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/Mesil"><img src="https://avatars.githubusercontent.com/u/14284175?v=4?s=100" width="100px;" alt=""/><br /><sub><b>mesil</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/issues?q=author%3Amesil" title="Bug reports">🐛</a></td>
<td align="center"><a href="https://github.com/starfetch"><img src="https://avatars.githubusercontent.com/u/80041179?v=4?s=100" width="100px;" alt=""/><br /><sub><b>starfetch</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=starfetch" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=starfetch" title="Documentation">📖</a> <a href="#translation-starfetch" title="Translation">🌍</a> <a href="#design-starfetch" title="Design">🎨</a></td>
<td align="center"><a href="https://github.com/ttimearl"><img src="https://avatars.githubusercontent.com/u/77916590?v=4?s=100" width="100px;" alt=""/><br /><sub><b>ttimearl</b></sub></a><br /><a href="#content-ttimearl" title="Content">🖋</a></td>
<td align="center"><a href="https://github.com/chrisgloom"><img src="https://avatars.githubusercontent.com/u/15905991?v=4?s=100" width="100px;" alt=""/><br /><sub><b>tuesgloomsday</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=chrisgloom" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/valadaptive"><img src="https://avatars.githubusercontent.com/u/79560998?v=4?s=100" width="100px;" alt=""/><br /><sub><b>valadaptive</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=valadaptive" title="Code">💻</a></td>
<td align="center"><a href="https://github.com/viocky"><img src="https://avatars.githubusercontent.com/u/39279173?v=4?s=100" width="100px;" alt=""/><br /><sub><b>viocky</b></sub></a><br /><a href="#translation-viocky" title="Translation">🌍</a></td>
<td align="center"><a href="https://github.com/woolishboy"><img src="https://avatars.githubusercontent.com/u/57816321?v=4?s=100" width="100px;" alt=""/><br /><sub><b>woolishboy</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=woolishboy" title="Code">💻</a></td>
</tr>
<tr>
<td align="center"><a href="https://github.com/cloutiy"><img src="https://avatars.githubusercontent.com/u/8433147?v=4?s=100" width="100px;" alt=""/><br /><sub><b>yc</b></sub></a><br /><a href="#translation-cloutiy" title="Translation">🌍</a></td>
</tr>
</table>
<!-- markdownlint-restore -->
<!-- prettier-ignore-end -->
<!-- ALL-CONTRIBUTORS-LIST:END -->
This project follows the [all-contributors](https://github.com/all-contributors/all-contributors) specification. Contributions of any kind welcome!

View file

@ -0,0 +1,57 @@
/* This script will build the package with esbuild */
const esbuild = require('esbuild')
const pkg = require('./package.json')
// Create banner based on package info
const banner = `/**
* ${pkg.name} | v${pkg.version}
* ${pkg.description}
* (c) ${new Date().getFullYear()} ${pkg.author}
* @license ${pkg.license}
*/`
// Shared esbuild options
const options = {
banner: { js: banner },
bundle: true,
entryPoints: ['src/index.js'],
external: ["@freesewing"],
metafile: process.env.VERBOSE ? true : false,
minify: process.env.NO_MINIFY ? false : true,
sourcemap: true,
}
// Different formats
const formats = {
cjs: "dist/index.js",
esm: "dist/index.mjs",
}
// Let esbuild generate different formats
let result
(async () => {
for (const [format, outfile] of Object.entries(formats)) {
result = await esbuild
.build({ ...options, outfile, format })
.catch(() => process.exit(1))
}
if (process.env.VERBOSE) {
const info = await esbuild.analyzeMetafile(result.metafile)
console.log(info)
}
// Also build a version that has all dependencies bundled
// This makes it easy to run tests
await esbuild
.build({
...options,
minify: false,
sourcemap: false,
outfile: 'tests/dist/index.mjs',
format: 'esm',
external: [],
})
.catch(() => process.exit(1))
})()

View file

@ -0,0 +1,47 @@
import { version } from '../package.json'
export default {
name: 'octoplushy',
version: version,
design: 'Wouter Van Wageningen',
code: 'Wouter Van Wageningen',
department: 'accessories',
type: 'pattern',
difficulty: 5,
optionGroups: {
options: ['size','type','legWidth','legLength','neckWidth','legTaper','bottomTopLegRatio','bottomLegReduction','bottomLegReductionPlushy'],
},
parts: ['headSection0', 'headSection1', 'legSection0', 'legSection1', 'eye0', 'eye1', 'eye2'],
measurements: [],
dependencies: {
eye0: 'headSection0',
eye1: 'headSection0',
eye2: 'headSection0',
legSection0: 'headSection0',
legSection1: 'headSection1',
},
inject: {},
hide: [],
options: {
sizeConstant: 200,
size: { pct: 100, min: 5, max: 500 },
type: { dflt: 'octoplushy', list: ['octoplushy', 'octopus', 'squid'] },
legWidth: { pct: 15, min: 10, max: 30 },
legLength: { pct: 200, min: 100, max: 500 },
neckWidth: { pct: 25, min: 25, max: 45 },
legTaper: { pct: 25, min: 0, max: 50 },
bottomTopLegRatio: { pct: 87, min: 75, max: 100 },
bottomLegReduction: {
pct: 90,
min: 75,
max: 125,
hide: ({ options }) => options.type == 'octoplushy',
},
bottomLegReductionPlushy: {
pct: 80,
min: 75,
max: 125,
hide: ({ options }) => options.type != 'octoplushy',
},
},
}

View file

@ -0,0 +1,64 @@
{
"name": "@freesewing/octoplushy",
"version": "2.21.3",
"description": "A FreeSewing pattern for an octopus plushy toy",
"author": "woutervdub (https://github.com/woutervdub)",
"homepage": "https://freesewing.org/",
"repository": "github:freesewing/freesewing",
"license": "MIT",
"bugs": {
"url": "https://github.com/freesewing/freesewing/issues"
},
"funding": {
"type": "individual",
"url": "https://freesewing.org/patrons/join"
},
"keywords": [
"freesewing",
"design",
"diy",
"fashion",
"made to measure",
"parametric design",
"pattern",
"sewing",
"sewing pattern"
],
"main": "dist/index.js",
"module": "dist/index.mjs",
"scripts": {
"build": "node build.js",
"clean": "rimraf dist",
"mbuild": "NO_MINIFY=1 node build.js",
"symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -",
"test": "npx mocha tests/*.test.mjs",
"vbuild": "VERBOSE=1 node build.js",
"lab": "cd ../../sites/lab && yarn start",
"tips": "node ../../scripts/help.mjs",
"prettier": "npx prettier --write 'src/*.js' 'config/*.js'",
"testci": "npx mocha tests/*.test.mjs --reporter ../../tests/reporters/terse.js",
"cibuild_step5": "node build.js"
},
"peerDependencies": {
"@freesewing/core": "^2.21.3",
"@freesewing/plugin-bundle": "^2.21.3",
"@freesewing/config-helpers": "^2.21.3"
},
"dependencies": {},
"devDependencies": {
"mocha": "^10.0.0",
"chai": "^4.2.0"
},
"files": [
"dist/*",
"README.md"
],
"publishConfig": {
"access": "public",
"tag": "latest"
},
"engines": {
"node": ">=14.0.0",
"npm": ">=6"
}
}

View file

@ -0,0 +1,129 @@
export default function (partNumber, part) {
const {
options,
Point,
Path,
points,
paths,
Snippet,
snippets,
complete,
sa,
paperless,
macro,
store,
} = part.shorthand()
if (options.type != 'squid' && options.type != 'octopus') {
return part
}
if (partNumber > (options.type == 'squid' ? 1 : 2)) {
return part
}
const c = 0.55191502449351
let sectionWidth = store.get('sectionWidth')
let eyeSize = sectionWidth / 1.5
let logoScale = 0.25
let titleScale = 0.25
if (partNumber == 1) {
eyeSize *= 0.65
logoScale = 0.15
titleScale = 0.16
}
if (partNumber < 2) {
points.top = new Point(0, -1 * (eyeSize / 2))
points.left = new Point(-1 * (eyeSize / 2), 0)
points.bottom = new Point(0, eyeSize / 2)
points.right = new Point(eyeSize / 2, 0)
points.topCp1 = points.top.shift(180, (eyeSize / 2) * c)
points.topCp2 = points.top.shift(0, (eyeSize / 2) * c)
points.leftCp1 = points.left.shift(270, (eyeSize / 2) * c)
points.leftCp2 = points.left.shift(90, (eyeSize / 2) * c)
points.bottomCp1 = points.bottom.shift(0, (eyeSize / 2) * c)
points.bottomCp2 = points.bottom.shift(180, (eyeSize / 2) * c)
points.rightCp1 = points.right.shift(90, (eyeSize / 2) * c)
points.rightCp2 = points.right.shift(270, (eyeSize / 2) * c)
paths.eye = new Path()
.move(points.top)
.curve(points.topCp1, points.leftCp2, points.left)
.curve(points.leftCp1, points.bottomCp2, points.bottom)
.curve(points.bottomCp1, points.rightCp2, points.right)
.curve(points.rightCp1, points.topCp2, points.top)
.close()
.attr('class', 'fabric')
.setRender(true)
points.logo = points.top.shiftFractionTowards(points.bottom, 0.3)
points.titleAnchor = points.bottom
.shiftFractionTowards(points.top, 0.25)
.shift(180, eyeSize / 10)
} else {
logoScale = 0.35
titleScale = 0.25
let eyeBrowWidth = eyeSize * 0.375
let eyeCirc = (eyeSize + eyeBrowWidth * 2) * Math.PI
points.tl = new Point(0, 0)
points.tr = points.tl.shift(0, eyeCirc)
points.bl = points.tl.shift(270, eyeBrowWidth * 2)
points.br = points.bl.shift(0, eyeCirc)
paths.eye = new Path()
.move(points.tl)
.line(points.bl)
.line(points.br)
.line(points.tr)
.line(points.tl)
.close()
.attr('class', 'fabric')
.setRender(true)
points.logo = points.tl
.shiftFractionTowards(points.bl, 0.5)
.shiftFractionTowards(points.br, 0.3)
points.titleAnchor = points.tr
.shiftFractionTowards(points.br, 0.5)
.shiftFractionTowards(points.bl, 0.3)
}
if (complete) {
snippets.logo = new Snippet('logo', points.logo).attr('data-scale', logoScale)
macro('title', {
at: points.titleAnchor,
nr: 3 + partNumber * 3,
title: partNumber == 2 ? 'eyebrow' : partNumber == 1 ? 'pupil' : 'eye',
scale: titleScale,
})
if (sa) {
paths.sa = paths.eye.offset(Math.min(sa, 6)).attr('class', 'fabric sa')
}
}
// Paperless?
if (paperless) {
if (partNumber < 2) {
macro('hd', {
from: points.left,
to: points.right,
y: points.top.y - sa,
})
} else {
macro('hd', {
from: points.tl,
to: points.tr,
y: points.tl.y - sa,
})
macro('vd', {
from: points.bl,
to: points.tl,
x: points.tl.x - sa,
})
}
}
return part
}

View file

@ -0,0 +1,609 @@
// import mirror from '@freesewing/plugin-mirror'
// import { PostAddSharp } from '@material-ui/icons'
// import { Store } from "@material-ui/icons";
export default function (partNumber, part) {
const {
options,
Point,
Path,
points,
paths,
Snippet,
snippets,
complete,
sa,
paperless,
macro,
utils,
store,
} = part.shorthand()
if (partNumber > (options.type == 'squid' ? 1 : 0)) {
return part
}
const c = 0.55191502449351
const w = options.sizeConstant * options.size
const h = options.sizeConstant * options.size * 0.5
const sections = options.type == 'squid' ? 10 : 8
let sectionWidth = (w * 2) / sections
let neckWidth = sectionWidth * options.neckWidth
let legWidth = (w * options.legWidth * options.bottomTopLegRatio * 3.1415) / 2
let legAdjustedWidth = legWidth * options.bottomTopLegRatio
let legLength = ((w * 2) / 3.1415) * options.legLength
if (options.type == 'octopus') {
legLength *= 2
}
if (options.type == 'squid') {
legLength *= 1.8
if (partNumber == 1) {
legLength *= 1.2
}
}
// console.log({ w: w })
// console.log({ sectionWidth: sectionWidth })
// console.log({ neckWidth: neckWidth })
// console.log({ legAdjustedWidth: w * options.legWidth * options.bottomTopLegRatio })
// console.log({ toplegWidth: legAdjustedWidth })
// console.log({ legLength: legLength })
points.topLeft = new Point(-1 * w, -1 * h)
points.topRight = new Point(w, -1 * h)
points.bottomLeft = new Point(-1 * w, h)
points.bottomRight = new Point(w, h)
points.left = new Point(-1 * w, 0)
points.right = new Point(w, 0)
points.sectionTop = new Point(0, -1 * h)
points.sectionBottom = new Point(0, h)
points.sectionLeft = new Point((-1 * sectionWidth) / 2, 0)
let sectionMid = points.sectionLeft.shiftFractionTowards(points.sectionTop, 0.5)
const sectionAngle = sectionMid.angle(points.sectionTop)
let lineEnd = sectionMid.shift(sectionAngle - 90, 1000)
points.circleCenter = utils.beamIntersectsY(sectionMid, lineEnd, 0)
const circleRadius = points.circleCenter.dist(points.sectionTop)
points.sectionLeftCp2 = points.sectionLeft.shift(90, circleRadius * c)
points.sectionLeftCp1 = points.sectionLeft.shift(270, circleRadius * c)
points.circleTop = points.circleCenter.shift(90, circleRadius)
points.sectionTopCp1 = points.circleTop.shift(180, circleRadius * c)
points.circleBottom = points.circleCenter.shift(270, circleRadius)
points.sectionBottomCp2 = points.circleBottom.shift(180, circleRadius * c)
paths.circle = new Path()
.move(points.circleTop)
.curve(points.sectionTopCp1, points.sectionLeftCp2, points.sectionLeft)
.curve(points.sectionLeftCp1, points.sectionBottomCp2, points.circleBottom)
.setRender(true)
let iteration = 0
let diff = 0
let div = 4
do {
points.lowerLeft = points.bottomLeft.shift(90, h / div)
points.lowerRight = points.bottomRight.clone()
points.sectionBottomLeft = utils.curveIntersectsY(
points.sectionLeft,
points.sectionLeftCp1,
points.sectionBottomCp2,
points.circleBottom,
points.lowerLeft.y
)
let currentNeckWidth = (points.sectionTop.x - points.sectionBottomLeft.x) * 2
diff = neckWidth - currentNeckWidth
div = div * (currentNeckWidth / neckWidth)
iteration++
} while ((diff < -1 || diff > 1) && iteration < 100)
paths.circle = new Path()
.move(points.circleTop)
.curve(points.sectionTopCp1, points.sectionLeftCp2, points.sectionLeft)
.curve(points.sectionLeftCp1, points.sectionBottomCp2, points.circleBottom)
.setRender(false)
points.sectionBottomLeft = utils.curveIntersectsY(
points.sectionLeft,
points.sectionLeftCp1,
points.sectionBottomCp2,
points.circleBottom,
points.lowerLeft.y
)
let sectionLeft = paths.circle.split(points.sectionTop)[1].split(points.sectionBottomLeft)[0]
points.sectionTop = sectionLeft.ops[0].to.clone()
points.sectionTopCp1 = sectionLeft.ops[1].cp1.clone()
points.sectionLeftCp2 = sectionLeft.ops[1].cp2.clone()
points.sectionLeft = sectionLeft.ops[1].to.clone()
points.sectionLeftCp1 = sectionLeft.ops[2].cp1.clone()
points.sectionBottomLeftCp2 = sectionLeft.ops[2].cp2.clone()
points.sectionBottomLeft = sectionLeft.ops[2].to.clone()
points.sectionBottomLeftCp1 = points.sectionBottomLeft.shiftFractionTowards(
points.sectionBottomLeftCp2,
-0.5
)
points.skirtTopMiddle = points.sectionBottomLeft.shift(0, neckWidth / 2).shift(270, neckWidth / 3)
points.skirtBottomLeft2 = points.skirtTopMiddle.shift(
270 - 360 / sections / 2,
(w * options.legWidth * options.bottomTopLegRatio) /
2 /
Math.sin(utils.deg2rad(360 / sections / 2))
)
points.skirtBottomLeft3 = new Point(
points.sectionTop.x - legAdjustedWidth / 2,
points.skirtBottomLeft2.y
)
if (options.type == 'octoplushy') {
points.skirtBottomLeft3 = points.skirtBottomLeft3.shift(
270,
(points.skirtTopMiddle.y - points.skirtBottomLeft3.y) / 2
)
}
points.skirtBottomLeft = points.skirtBottomLeft3.clone()
points.legTopLeft = utils.beamIntersectsX(
points.skirtBottomLeft,
points.skirtBottomLeft.shift(270 + 30, 100),
points.sectionTop.x - legAdjustedWidth / 2
)
points.legTopLeftCp2 = points.legTopLeft.shift(
90,
points.skirtBottomLeft.dist(points.legTopLeft) / 2
)
points.legTopLeftCp1 = points.legTopLeft.shift(270, legLength / 10)
points.legBottom = points.legTopLeft
.shift(270, legLength + legAdjustedWidth / 4)
.shift(0, legAdjustedWidth / 2)
points.legBottomLeft = points.legBottom
.shift(90, (legAdjustedWidth / 2) * (1 - options.legTaper))
.shift(180, (legAdjustedWidth / 2) * (1 - options.legTaper))
points.legBottomLeftCp2 = points.legBottomLeft.shift(90, legLength / 10)
points.legBottomLeftCp1 = points.legBottomLeft.shift(
270,
(legAdjustedWidth / 2) * (1 - options.legTaper) * c
)
points.legBottomCp2 = points.legBottom.shift(
180,
(legAdjustedWidth / 2) * (1 - options.legTaper) * c
)
if (options.type == 'octopus') {
let octopusHeadFactor = 0.7
let sectionHeight = points.sectionBottom.dist(points.sectionTop)
points.sectionTop = points.sectionTop.shift(90, sectionHeight * octopusHeadFactor)
points.sectionTopCp1 = points.sectionTopCp1.shift(90, sectionHeight * octopusHeadFactor)
points.sectionLeft = points.sectionLeft.shift(90, (sectionHeight * octopusHeadFactor) / 1.1)
points.sectionLeftCp1 = points.sectionLeftCp1.shift(
90,
(sectionHeight * octopusHeadFactor) / 1.1
)
points.sectionLeftCp2 = points.sectionLeftCp2.shift(
90,
(sectionHeight * octopusHeadFactor) / 1.1
)
let pSkirtLeft = new Path()
.move(points.skirtBottomLeft)
.curve(points.skirtBottomLeft, points.sectionBottomLeftCp1, points.sectionBottomLeft)
points.skirtBottomLeft = points.skirtBottomLeft.shift(
pSkirtLeft.shiftAlong(0.1).angle(points.skirtBottomLeft),
legWidth
)
points.legTopLeft = points.legTopLeft.shift(270, legWidth * 1.6)
points.legTopLeftCp1 = points.legTopLeft.shift(270, legWidth / 2)
points.legTopLeftCp2 = points.legTopLeft.shift(90, legWidth / 2)
}
if (options.type == 'squid') {
points.skirtBottomLeft = points.legTopLeft.clone()
points.legTopLeftCp2 = points.legTopLeft.clone()
let sectionHeight = points.sectionBottom.dist(points.sectionTop)
points.sectionTop = points.sectionTop.shift(90, sectionHeight)
points.sectionTopCp1 = points.sectionTopCp1.shift(90, sectionHeight)
points.sectionLeft = points.sectionLeft.shift(90, sectionHeight / 3)
points.sectionLeftCp1 = points.sectionLeftCp1.shift(90, sectionHeight / 3)
points.sectionLeftCp2 = points.sectionLeftCp2.shift(90, sectionHeight / 3)
points.tentacleLeft = utils.beamIntersectsX(
points.legBottomLeft,
points.legBottomLeft.shift(180 + 70, 100),
-1.2 * legAdjustedWidth
)
points.tentacleLeftCp2 = points.tentacleLeft.shift(
90,
points.legBottomLeft.dist(points.tentacleLeft) / 3
)
points.tentacleLeftCp1 = points.tentacleLeft.shift(
270,
points.legBottomLeft.dist(points.tentacleLeft) / 3
)
if (partNumber == 1) {
points.legBottomLeftCp1 = points.legBottomLeft.shift(270, legAdjustedWidth * c)
points.legBottom = points.legBottom.flipY(points.tentacleLeft)
points.legBottomCp2 = points.legBottomCp2.flipY(points.tentacleLeft)
let pLeftSection = new Path()
.move(points.sectionLeft)
.curve(points.sectionLeftCp2, points.sectionTopCp1, points.sectionTop)
points.finSection = pLeftSection.shiftFractionAlong(0.45)
let pLeftCurves = pLeftSection.split(points.finSection)
points.sectionLeftCp2 = pLeftCurves[0].ops[1].cp1.clone()
points.finSectionCp1 = pLeftCurves[0].ops[1].cp2.clone()
points.finFold = points.finSection.rotate(-20, points.sectionTop)
points.finSeam = points.finSection.rotate(-40, points.sectionTop)
let foldAngle = points.sectionTop.angle(points.finFold)
let aCp1 = points.sectionTop.angle(pLeftCurves[1].ops[1].cp1) - foldAngle
let aCp2 = points.sectionTop.angle(pLeftCurves[1].ops[1].cp2) - foldAngle
points.finSeamCp2 = points.sectionTop.shift(
foldAngle - aCp1,
points.sectionTop.dist(pLeftCurves[1].ops[1].cp1)
)
points.finTopCp1 = points.sectionTop.shift(
foldAngle - aCp2,
points.sectionTop.dist(pLeftCurves[1].ops[1].cp2)
)
}
points.sectionMidLeft = points.sectionBottomLeft.shift(90, sectionHeight / 3)
points.sectionMidLeftCp2 = points.sectionMidLeft.shift(
points.sectionBottomLeft.angle(points.sectionBottomLeftCp2),
points.sectionBottomLeft.dist(points.sectionBottomLeftCp2)
)
points.sectionMidLeftCp1 = points.sectionMidLeftCp2.flipY(points.sectionMidLeft)
}
points.sectionTopCp2 = points.sectionTopCp1.flipX(points.sectionTop)
points.sectionRightCp1 = points.sectionLeftCp2.flipX(points.sectionTop)
points.sectionRight = points.sectionLeft.flipX(points.sectionTop)
points.sectionRightCp2 = points.sectionLeftCp1.flipX(points.sectionTop)
points.sectionBottomRightCp1 = points.sectionBottomLeftCp2.flipX(points.sectionTop)
points.sectionBottomRight = points.sectionBottomLeft.flipX(points.sectionTop)
points.sectionBottomRightCp2 = points.sectionBottomLeftCp1.flipX(points.sectionTop)
points.skirtBottomRight = points.skirtBottomLeft.flipX(points.sectionTop)
points.legTopRightCp1 = points.legTopLeftCp2.flipX(points.sectionTop)
points.legTopRight = points.legTopLeft.flipX(points.sectionTop)
points.legTopRightCp2 = points.legTopLeftCp1.flipX(points.sectionTop)
points.legBottomRightCp1 = points.legBottomLeftCp2.flipX(points.sectionTop)
points.legBottomRight = points.legBottomLeft.flipX(points.sectionTop)
points.legBottomRightCp2 = points.legBottomLeftCp1.flipX(points.sectionTop)
points.legBottomCp1 = points.legBottomCp2.flipX(points.sectionTop)
if (options.type == 'squid') {
points.sectionMidRightCp1 = points.sectionMidLeftCp2.flipX(points.sectionTop)
points.sectionMidRight = points.sectionMidLeft.flipX(points.sectionTop)
points.sectionMidRightCp2 = points.sectionMidLeftCp1.flipX(points.sectionTop)
points.tentacleRight = points.tentacleLeft.flipX(points.sectionTop)
points.tentacleRightCp1 = points.tentacleLeftCp2.flipX(points.sectionTop)
points.tentacleRightCp2 = points.tentacleLeftCp1.flipX(points.sectionTop)
}
if (partNumber == 0) {
store.set('sectionWidth', sectionWidth)
store.set('legSkirtWidth', points.skirtBottomLeft.dist(points.skirtBottomRight))
store.set('legSkirtRadius', points.skirtBottomLeft.y - points.skirtTopMiddle.y)
store.set('legSkirtToTopAngle', points.skirtBottomLeft.angle(points.legTopLeft))
}
paths.legBottom = new Path()
.move(points.legBottomLeft)
.curve(points.legBottomLeftCp1, points.legBottomCp2, points.legBottom)
.curve(points.legBottomCp1, points.legBottomRightCp2, points.legBottomRight)
.setRender(false)
if (options.type == 'squid') {
paths.sectionLeft = new Path()
.move(points.sectionTop)
.curve(points.sectionTopCp1, points.sectionLeftCp2, points.sectionLeft)
.curve(points.sectionLeftCp1, points.sectionMidLeftCp2, points.sectionMidLeft)
.curve(points.sectionMidLeftCp1, points.sectionBottomLeftCp2, points.sectionBottomLeft)
.setRender(false)
paths.sectionRight = new Path()
.move(points.sectionBottomRight)
.curve(points.sectionBottomRightCp1, points.sectionMidRightCp2, points.sectionMidRight)
.curve(points.sectionMidRightCp1, points.sectionRightCp2, points.sectionRight)
.setRender(false)
paths.skirtLeft = new Path()
.move(points.sectionBottomLeft)
.curve(points.sectionBottomLeftCp1, points.legTopLeftCp2, points.legTopLeft)
.setRender(false)
paths.skirtRight = new Path()
.move(points.legTopRight)
.curve(points.legTopRightCp1, points.sectionBottomRightCp2, points.sectionBottomRight)
.setRender(false)
if (partNumber == 1) {
paths.sectionLeft = new Path()
.move(points.sectionTop)
.curve(points.finTopCp1, points.finSeamCp2, points.finSeam)
.line(points.finFold)
.line(points.finSection)
.curve(points.finSectionCp1, points.sectionLeftCp2, points.sectionLeft)
.curve(points.sectionLeftCp1, points.sectionMidLeftCp2, points.sectionMidLeft)
.curve(points.sectionMidLeftCp1, points.sectionBottomLeftCp2, points.sectionBottomLeft)
.setRender(false)
paths.legBottom = new Path()
.move(points.legBottomLeft)
.curve(points.legBottomLeftCp1, points.tentacleLeftCp2, points.tentacleLeft)
.curve(points.tentacleLeftCp1, points.legBottomCp2, points.legBottom)
.curve(points.legBottomCp1, points.tentacleRightCp2, points.tentacleRight)
.curve(points.tentacleRightCp1, points.legBottomRightCp2, points.legBottomRight)
.setRender(false)
}
} else {
paths.sectionLeft = new Path()
.move(points.sectionTop)
.curve(points.sectionTopCp1, points.sectionLeftCp2, points.sectionLeft)
.curve(points.sectionLeftCp1, points.sectionBottomLeftCp2, points.sectionBottomLeft)
.setRender(false)
paths.sectionRight = new Path()
.move(points.sectionBottomRight)
.curve(points.sectionBottomRightCp1, points.sectionRightCp2, points.sectionRight)
.setRender(false)
if (points.skirtBottomLeft.sitsRoughlyOn(points.legTopLeft)) {
paths.skirtLeft = new Path()
.move(points.sectionBottomLeft)
.curve(points.sectionBottomLeftCp1, points.skirtBottomLeft, points.skirtBottomLeft)
.setRender(false)
paths.skirtRight = new Path()
.move(points.legTopRight)
.curve(points.skirtBottomRight, points.sectionBottomRightCp2, points.sectionBottomRight)
.setRender(false)
} else {
paths.skirtLeft = new Path()
.move(points.sectionBottomLeft)
.curve(points.sectionBottomLeftCp1, points.skirtBottomLeft, points.skirtBottomLeft)
.curve(points.skirtBottomLeft, points.legTopLeftCp2, points.legTopLeft)
.setRender(false)
paths.skirtRight = new Path()
.move(points.legTopRight)
.curve(points.legTopRightCp1, points.skirtBottomRight, points.skirtBottomRight)
.curve(points.skirtBottomRight, points.sectionBottomRightCp2, points.sectionBottomRight)
.setRender(false)
}
}
paths.section = new Path()
.move(points.sectionTop)
.join(paths.sectionLeft)
.join(paths.skirtLeft)
.curve(points.legTopLeftCp1, points.legBottomLeftCp2, points.legBottomLeft)
.join(paths.legBottom)
.curve(points.legBottomRightCp1, points.legTopRightCp2, points.legTopRight)
.join(paths.skirtRight)
.join(paths.sectionRight)
.curve(points.sectionRightCp1, points.sectionTopCp2, points.sectionTop)
.close()
.attr('class', 'fabric')
// paths.box = new Path()
// .move(points.topLeft)
// .line(points.bottomLeft)
// .line(points.bottomRight)
// .line(points.topRight)
// .line(points.topLeft)
// .close()
// .attr('class', 'fabric')
// .setRender(false)
// Complete?
if (complete) {
points.logo = points.sectionTop.shiftFractionTowards(
points.sectionBottom,
options.type == 'octoplushy' ? 0.3 : 0.5
)
snippets.logo = new Snippet('logo', points.logo).attr('data-scale', 0.4)
points.titleAnchor = points.sectionBottom
.shiftFractionTowards(points.sectionTop, options.type == 'octoplushy' ? 0.3 : 0.4)
.shift(180, sectionWidth * 0.2)
macro('title', {
at: points.titleAnchor,
nr: 1 + partNumber * 3,
title: 'Head' + (partNumber == 0 ? '' : ' (a)'),
rotation: 90,
scale: options.type == 'octoplushy' ? 0.35 : 0.5,
})
if (options.type == 'octoplushy') {
points.eyeLeft = paths.sectionLeft
.shiftFractionAlong(0.465)
.attr('data-text', 'eye')
.attr('data-text-class', 'center')
points.eyeRight = points.eyeLeft
.flipX(points.sectionTop)
.attr('data-text', 'eye')
.attr('data-text-class', 'center')
snippets.eyeLeft = new Snippet('button', points.eyeLeft)
snippets.eyeRight = new Snippet('button', points.eyeRight)
points.mouthMiddle = points.sectionBottom.shiftFractionTowards(points.sectionTop, 0.45)
points.mouthLeft = points.mouthMiddle.shift(180, sectionWidth / 4)
points.mouthRight = points.mouthMiddle.shift(0, sectionWidth / 4)
points.mouthBottom = points.mouthMiddle.shift(270, sectionWidth / 4)
points.mouthLeftCp1 = points.mouthLeft.shift(270, (sectionWidth / 4) * c)
points.mouthRightCp2 = points.mouthRight.shift(270, (sectionWidth / 4) * c)
points.mouthBottomCp2 = points.mouthBottom.shift(180, (sectionWidth / 4) * c)
points.mouthBottomCp1 = points.mouthBottom.shift(0, (sectionWidth / 4) * c)
paths.mouth = new Path()
.move(points.mouthLeft)
.curve(points.mouthLeftCp1, points.mouthBottomCp2, points.mouthBottom)
.curve(points.mouthBottomCp1, points.mouthRightCp2, points.mouthRight)
.attr('data-text', 'mouth')
.attr('data-text-class', 'text-xs center')
.attr('class', 'stroke-lg')
}
if (options.type == 'squid' && partNumber == 1) {
paths.fold = new Path()
.move(points.sectionTop)
.line(points.finFold)
.attr('data-text', 'fold line')
.attr('data-text-class', 'center')
.attr('class', 'hint dotted')
}
if (options.type == 'octopus') {
points.skirtLegLeft = utils.curveIntersectsX(
points.sectionBottomLeft,
points.sectionBottomLeftCp1,
points.skirtBottomLeft,
points.skirtBottomLeft,
points.legTopLeft.x
)
points.skirtLegRight = points.skirtLegLeft.flipX(points.sectionTop)
paths.legLeftLine = new Path()
.move(points.skirtLegLeft)
.line(points.legTopLeft)
.attr('data-text', 'stitch line')
.attr('data-text-class', 'center')
.attr('class', 'hint dotted')
paths.legRightLine = new Path()
.move(points.legTopRight)
.line(points.skirtLegRight)
.attr('data-text', 'stitch line')
.attr('data-text-class', 'center')
.attr('class', 'hint dotted')
}
points.sectionTop.attr('data-text', 'A').attr('data-text-class', 'center')
points.legTopLeft.attr('data-text', 'B').attr('data-text-class', 'center')
points.legTopRight.attr('data-text', 'B').attr('data-text-class', 'center')
snippets.left = new Snippet('notch', points.sectionLeft)
snippets.right = new Snippet('notch', points.sectionRight)
snippets.bottomLeft = new Snippet('notch', points.sectionBottomLeft)
snippets.bottomRight = new Snippet('notch', points.sectionBottomRight)
for (var i = 0; i < 4; i++) {
snippets[`legLeft${i}`] = new Snippet(
'notch',
points.legTopLeft.shiftFractionTowards(points.legBottomLeft, i / 4)
)
snippets[`legRight${i}`] = new Snippet(
'notch',
points.legTopRight.shiftFractionTowards(points.legBottomRight, i / 4)
)
}
if (sa) {
paths.sa = paths.section.offset(sa).attr('class', 'fabric sa')
}
}
// Paperless?
if (paperless) {
macro('hd', {
from: points.sectionLeft,
to: points.sectionRight,
y: points.sectionTop.y - sa,
})
macro('hd', {
from: points.legTopLeft,
to: points.legTopRight,
y: points.legTopRight.y,
})
macro('hd', {
from: points.legBottomLeft,
to: points.legBottomRight,
y: points.legBottom.y + sa + 10,
})
macro('vd', {
from: points.sectionTop,
to: points.sectionRight,
x: points.skirtBottomRight.x + sa + 10,
})
macro('vd', {
from: points.sectionTop,
to: points.sectionBottomRight,
x: points.skirtBottomRight.x + sa + 20,
})
macro('vd', {
from: points.sectionTop,
to: points.skirtBottomRight,
x: points.skirtBottomRight.x + sa + 30,
})
macro('vd', {
from: points.sectionTop,
to: points.legBottom,
x: points.skirtBottomRight.x + sa + 40,
})
if (options.type == 'octopus') {
macro('hd', {
from: points.skirtBottomLeft,
to: points.skirtBottomRight,
y: points.skirtBottomRight.y,
})
macro('vd', {
from: points.skirtBottomRight,
to: points.legTopRight,
x: points.skirtBottomRight.x + sa + 30,
})
}
if (options.type == 'squid') {
macro('vd', {
from: points.legTopLeft,
to: points.sectionBottomLeft,
x: points.legTopLeft.x - sa - 10,
})
macro('vd', {
from: points.sectionBottomLeft,
to: points.sectionMidLeft,
x: points.legTopLeft.x - sa - 10,
})
if (partNumber == 1) {
macro('hd', {
from: points.tentacleLeft,
to: points.tentacleRight,
y: points.tentacleRight.y,
})
macro('hd', {
from: points.finSeam,
to: points.sectionTop,
y: points.sectionTop.y,
})
macro('hd', {
from: points.finSeam,
to: points.finSection,
y: points.finSection.y,
})
macro('hd', {
from: points.finFold,
to: points.finSection,
y: points.finFold.y,
})
macro('vd', {
from: points.legBottom,
to: points.tentacleLeft,
x: points.tentacleLeft.x - sa - 10,
})
macro('vd', {
from: points.finSeam,
to: points.sectionTop,
x: points.finSeam.x - sa,
})
macro('vd', {
from: points.finFold,
to: points.sectionTop,
x: points.finSeam.x - sa - 10,
})
macro('vd', {
from: points.finSection,
to: points.sectionTop,
x: points.finSeam.x - sa - 20,
})
}
}
}
return part
}

View file

@ -0,0 +1,27 @@
import freesewing from '@freesewing/core'
import plugins from '@freesewing/plugin-bundle'
import config from '../config'
import draftHeadSection from './headSection'
import draftLegSection from './legSection'
import draftEye from './eye'
// Create new design
const Octoplushy = new freesewing.Design(config, plugins)
// Attach the draft methods to the prototype
// Octoplushy.prototype.draftHeadSection = draftHeadSection
for (let i = 0; i < 2; i++) {
Octoplushy.prototype[`draftHeadSection${i}`] = (part) => draftHeadSection(i, part)
}
for (let i = 0; i < 2; i++) {
Octoplushy.prototype[`draftLegSection${i}`] = (part) => draftLegSection(i, part)
}
for (let i = 0; i < 3; i++) {
Octoplushy.prototype[`draftEye${i}`] = (part) => draftEye(i, part)
}
// Named exports
export { config, Octoplushy }
// Default export
export default Octoplushy

View file

@ -0,0 +1,311 @@
export default function (partNumber, part) {
const {
options,
Point,
Path,
points,
paths,
Snippet,
snippets,
complete,
sa,
paperless,
macro,
utils,
store,
} = part.shorthand()
if (partNumber > (options.type == 'squid' ? 1 : 0)) {
return part
}
const c = 0.55191502449351
const w = options.sizeConstant * options.size
const sections = options.type == 'squid' ? 10 : 8
let sectionWidth = (w * 2) / sections
let legWidth = (w * options.legWidth * options.bottomTopLegRatio * 3.1415) / 2
let legAdjustedWidth = legWidth * options.bottomTopLegRatio
let legLength = ((w * 2) / 3.1415) * options.legLength
switch (options.type) {
case 'octopus':
legLength *= 2
legLength *= 1 - (1 - options.bottomLegReduction) / 2
break
case 'squid':
legLength *= 1.8
if (partNumber == 1) {
legLength *= 1.2
}
break
case 'octoplushy':
legLength *= options.bottomLegReductionPlushy
}
points.legMiddle = new Point(0, 0)
points.skirtLeft2 = points.legMiddle.shift(
270 - 360 / sections / 2,
(w * options.legWidth * options.bottomTopLegRatio) /
2 /
Math.sin(utils.deg2rad(360 / sections / 2))
)
if (options.type == 'octoplushy') {
points.skirtLeft2 = points.skirtLeft2.shift(
90,
points.skirtLeft2.y - points.legMiddle.y - store.get('legSkirtRadius')
)
}
if (options.type == 'squid') {
points.skirtLeft2 = points.skirtLeft2.shift(90, (points.skirtLeft2.y - points.legMiddle.y) / 2)
}
points.legMiddleCp1 = points.legMiddle.shiftFractionTowards(points.skirtLeft2, c)
points.skirtLeft3 = new Point((-1 * legAdjustedWidth) / 2, points.skirtLeft2.y)
points.skirtLeft = points.skirtLeft3.clone()
let pHelper = points.skirtLeft.shift(store.get('legSkirtToTopAngle'), 10)
if (Math.round(pHelper.x * 1000) <= Math.round((legAdjustedWidth / -2) * 1000)) {
points.legTopLeft = points.skirtLeft.clone()
} else {
points.legTopLeft = utils.beamIntersectsX(
points.skirtLeft,
points.skirtLeft.shift(store.get('legSkirtToTopAngle'), 10),
legAdjustedWidth / -2
)
}
points.legTopLeftCp2 = points.legTopLeft.shift(90, (points.legTopLeft.y - points.skirtLeft.y) * c)
points.legTopLeftCp1 = points.legTopLeft.shift(270, legLength / 10)
points.legBottomLeft = points.legTopLeft.shift(270, legLength).shift(0, legAdjustedWidth / 4)
points.legBottom = points.legTopLeft
.shift(270, legLength + legAdjustedWidth / 4)
.shift(0, legAdjustedWidth / 2)
points.legBottomLeft = points.legBottom
.shift(90, (legAdjustedWidth / 2) * (1 - options.legTaper))
.shift(180, (legAdjustedWidth / 2) * (1 - options.legTaper))
points.legBottomLeftCp2 = points.legBottomLeft.shift(90, legLength / 10)
points.legBottomLeftCp1 = points.legBottomLeft.shift(
270,
(legAdjustedWidth / 2) * (1 - options.legTaper) * c
)
points.legBottomCp2 = points.legBottom.shift(
180,
(legAdjustedWidth / 2) * (1 - options.legTaper) * c
)
if (options.type == 'octopus') {
let pSkirtLeft = new Path()
.move(points.legTopLeft)
.curve(points.legTopLeftCp2, points.legMiddleCp1, points.legMiddle)
points.skirtLeft = points.legTopLeft.shift(
pSkirtLeft.shiftAlong(0.1).angle(points.legTopLeft),
legWidth
)
points.legTopLeft = points.legTopLeft.shift(270, legWidth * 1.6)
points.legTopLeftCp1 = points.legTopLeft.shift(270, legWidth / 2)
points.legTopLeftCp2 = points.legTopLeft.shift(90, legWidth / 2)
}
if (options.type == 'squid') {
points.tentacleLeft = utils.beamIntersectsX(
points.legBottomLeft,
points.legBottomLeft.shift(180 + 70, 100),
-1.2 * legAdjustedWidth
)
points.tentacleLeftCp2 = points.tentacleLeft.shift(
90,
points.legBottomLeft.dist(points.tentacleLeft) / 3
)
points.tentacleLeftCp1 = points.tentacleLeft.shift(
270,
points.legBottomLeft.dist(points.tentacleLeft) / 3
)
if (partNumber == 1) {
points.legBottomLeftCp1 = points.legBottomLeft.shift(270, legAdjustedWidth * c)
points.legBottom = points.legBottom.flipY(points.tentacleLeft)
points.legBottomCp2 = points.legBottomCp2.flipY(points.tentacleLeft)
}
}
points.legMiddleCp2 = points.legMiddleCp1.flipX(points.legMiddle)
points.skirtRight = points.skirtLeft.flipX(points.legMiddle)
points.legTopRight = points.legTopLeft.flipX(points.legMiddle)
points.legTopRightCp1 = points.legTopLeftCp2.flipX(points.legMiddle)
points.legTopRightCp2 = points.legTopLeftCp1.flipX(points.legMiddle)
points.legBottomRight = points.legBottomLeft.flipX(points.legMiddle)
points.legBottomRightCp1 = points.legBottomLeftCp2.flipX(points.legMiddle)
points.legBottomRightCp2 = points.legBottomLeftCp1.flipX(points.legMiddle)
points.legBottom = points.legBottom.flipX(points.legMiddle)
points.legBottomCp1 = points.legBottomCp2.flipX(points.legMiddle)
if (options.type == 'squid') {
points.tentacleRight = points.tentacleLeft.flipX(points.sectionTop)
points.tentacleRightCp1 = points.tentacleLeftCp2.flipX(points.sectionTop)
points.tentacleRightCp2 = points.tentacleLeftCp1.flipX(points.sectionTop)
}
paths.legBottom = new Path()
.move(points.legBottomLeft)
.curve(points.legBottomLeftCp1, points.legBottomCp2, points.legBottom)
.curve(points.legBottomCp1, points.legBottomRightCp2, points.legBottomRight)
.setRender(false)
if (options.type == 'squid') {
if (partNumber == 1) {
paths.legBottom = new Path()
.move(points.legBottomLeft)
.curve(points.legBottomLeftCp1, points.tentacleLeftCp2, points.tentacleLeft)
.curve(points.tentacleLeftCp1, points.legBottomCp2, points.legBottom)
.curve(points.legBottomCp1, points.tentacleRightCp2, points.tentacleRight)
.curve(points.tentacleRightCp1, points.legBottomRightCp2, points.legBottomRight)
.setRender(false)
}
}
if (points.skirtLeft.sitsRoughlyOn(points.legTopLeft)) {
paths.topLeft = new Path()
.move(points.legMiddle)
.curve(points.legMiddleCp1, points.skirtLeft, points.skirtLeft)
} else {
paths.topLeft = new Path()
.move(points.legMiddle)
.curve(points.legMiddleCp1, points.skirtLeft, points.skirtLeft)
.curve(points.skirtLeft, points.legTopLeftCp2, points.legTopLeft)
}
if (points.skirtRight.sitsRoughlyOn(points.legTopRight)) {
paths.topRight = new Path()
.move(points.legTopRight)
.curve(points.skirtRight, points.legMiddleCp2, points.legMiddle)
} else {
paths.topRight = new Path()
.move(points.legTopRight)
.curve(points.legTopRightCp1, points.skirtRight, points.skirtRight)
.curve(points.skirtRight, points.legMiddleCp2, points.legMiddle)
}
paths.section = new Path()
.move(points.legMiddle)
.join(paths.topLeft)
.curve(points.legTopLeftCp1, points.legBottomLeftCp2, points.legBottomLeft)
.join(paths.legBottom)
.curve(points.legBottomRightCp1, points.legTopRightCp2, points.legTopRight)
.join(paths.topRight)
.close()
// Complete?
if (complete) {
points.logo = points.legMiddle.shiftFractionTowards(points.legBottom, 0.08)
snippets.logo = new Snippet('logo', points.logo).attr('data-scale', 0.4)
points.legMiddle.attr('data-text', 'C').attr('data-text-class', 'center')
points.legTopLeft.attr('data-text', 'D').attr('data-text-class', 'center')
points.legTopRight.attr('data-text', 'D').attr('data-text-class', 'center')
points.titleAnchor = points.legMiddle
.shiftFractionTowards(points.legBottom, 0.2)
.shift(180, sectionWidth * 0.1)
macro('title', {
at: points.titleAnchor,
nr: 2 + partNumber * 3,
title: 'Leg' + (partNumber == 0 ? '' : ' (a)'),
rotation: 90,
scale: 0.3,
})
for (var i = 0; i < 4; i++) {
snippets[`legLeft${i}`] = new Snippet(
'notch',
points.legTopLeft.shiftFractionTowards(points.legBottomLeft, i / 4)
)
snippets[`legRight${i}`] = new Snippet(
'notch',
points.legTopRight.shiftFractionTowards(points.legBottomRight, i / 4)
)
}
if (options.type == 'octopus') {
points.skirtLegLeft = utils.curveIntersectsX(
points.skirtLeft,
points.skirtLeft,
points.legMiddleCp1,
points.legMiddle,
points.legTopLeft.x
)
points.skirtLegRight = points.skirtLegLeft.flipX(points.sectionTop)
paths.legLeftLine = new Path()
.move(points.skirtLegLeft)
.line(points.legTopLeft)
.attr('data-text', 'stitch line')
.attr('data-text-class', 'center')
.attr('class', 'hint dotted')
paths.legRightLine = new Path()
.move(points.legTopRight)
.line(points.skirtLegRight)
.attr('data-text', 'stitch line')
.attr('data-text-class', 'center')
.attr('class', 'hint dotted')
}
if (sa) {
paths.sa = paths.section.offset(sa).attr('class', 'fabric sa')
}
if (paperless) {
macro('hd', {
from: points.legTopLeft,
to: points.legTopRight,
y: points.legMiddle.y - sa,
})
macro('hd', {
from: points.legBottomLeft,
to: points.legBottomRight,
y: points.legBottom.y + sa + 10,
})
macro('vd', {
from: points.legBottom,
to: points.legMiddle,
x: points.skirtLeft.x - sa - 20,
})
if (options.type == 'octopus') {
macro('hd', {
from: points.skirtLeft,
to: points.skirtRight,
y: points.skirtRight.y,
})
macro('vd', {
from: points.skirtLeft,
to: points.legMiddle,
x: points.skirtLeft.x - sa - 10,
})
macro('vd', {
from: points.legTopLeft,
to: points.skirtLeft,
x: points.skirtLeft.x - sa - 10,
})
} else {
macro('vd', {
from: points.legTopLeft,
to: points.legMiddle,
x: points.skirtLeft.x - sa - 10,
})
}
if (options.type == 'squid') {
if (partNumber == 1) {
macro('hd', {
from: points.tentacleLeft,
to: points.tentacleRight,
y: points.tentacleRight.y,
})
macro('vd', {
from: points.legBottom,
to: points.tentacleLeft,
x: points.tentacleLeft.x - sa - 10,
})
}
}
}
}
return part
}

View file

@ -0,0 +1,40 @@
// This file is auto-generated.
// Changes you make will be overwritten.
import chai from 'chai'
import models from '@freesewing/models'
import patterns from '@freesewing/pattern-info'
import Pattern from './dist/index.mjs'
// Shared tests
import { testPatternConfig } from '../../../tests/patterns/config.mjs'
import { testPatternDrafting } from '../../../tests/patterns/drafting.mjs'
import { testPatternSampling } from '../../../tests/patterns/sampling.mjs'
const expect = chai.expect
// Test config
testPatternConfig(
"octoplushy",
new Pattern(),
expect,
models,
patterns
)
// Test drafting
testPatternDrafting(
"octoplushy",
Pattern,
expect,
models,
patterns
)
// Test sampling
testPatternSampling(
"octoplushy",
Pattern,
expect,
models,
patterns
)

View file

@ -0,0 +1,17 @@
---
title: "Octoplushy, the plushy octopus: Cutting Instructions"
---
- **Color 1 (Upper body, top of legs)**
- Cut **8 Part 1**
- **octopus only**
- Cut **2 Part 9**
- **squid only**
- Cut **2 Part 4**
- **Color 2 (Belly, bottom of legs)**
- Cut **8 Part 2**
- **squid only**
- Cut **2 Part 5**
- **Octopus & Squid (eyes)**
- Cut **2 Part 3 (white)**
- Cut **2 Part 6 (black)**

View file

@ -0,0 +1,5 @@
---
title: Octoplushy, the plushy octopus
---
<PatternDocs pattern='octoplushy' />

View file

@ -0,0 +1,12 @@
---
title: "Octoplushy, the plushy octopus: Fabric Options"
---
## Main and Contrast Body Fabrics (Upper body and legs, belly and underside legs)
This plush toy is intended to have two different coloured fabrics, one for the upper body and top side of the legs, one for the belly and underside of the legs.
Hi is designed for faux fur fabric, which most plush toys are made from, but you could also use polar fleece, felt, denim, corduroy, or anything moderately heavy. Lightweight or drapey fabrics may not hold Hi's shape well when stuffed. Fabrics with a two-way stretch will work better than wovens, the stretch should be perpendicular to the grainline.
## Stuffing
Since this is a plush toy, it will need to be stuffed with material. Most of the time you'll want to use polyester fiberfill (polyfill), but if you have a lot of fabric scraps, you can use shredded scrap fabric. However this may be heavier and less soft than fiberfill. It's also worth thinking about whether your Hi may be at risk of getting dirty, or want to go for a swim, as not all stuffing options are washable.

View file

@ -0,0 +1,17 @@
---
title: "Octoplushy, the plushy octopus: Sewing Instructions"
---
- Sew 4 parts 1 together, from B to A. For Squid: Sew one part 4 to each, from B to A.
- For Octoplushy: Use topstitching, or a long bar-tack, to make the mouth on one of the segments.
- For Octopus: Sew the eye part 6 (black) to part 3 (white). Sew both short ends of part 9 together, creating a ring. Sew part 9 to the circumpherence of part 3, gathering the excess as you go. Now fold the part 9 double, and sew it to part 3. You can stuff it before this step if you want more dramatic 'eyebrows'. Sew the eyes to the lower part of the sections, so that you will have two sections between them when it all come together.
- For Squid: Sew the eye parts together (3 = white, 6 = black) and finish their sides the best you can. Sew these to the section closest to the legs.
- For Squid: Sew one part 4 to each of the body parts.
- Sew both body parts together, from B to A.
- Sew 4 parts 2 together, from D to C.
- For Squid: Sew one part 5 to each, from D to C.
- Sew both leg parts together, but only along one seam from D to C. The other stays open to fill the plushy.
- Match up the leg parts with the body parts. Sew each leg from B/D to B/D. It is easiest to sew one leg almost to the next B/D part, stop sewing, pin the next leg, and start sewing again. The bottom part (2,5) is slightly shorter than the top part of a leg, so you have to ease it in while matching it up.
- Fill the plushy
- Hand sew the remaining seam

View file

@ -0,0 +1,8 @@
---
title: "Octoplushy, the plushy octopus: Required Measurements"
---
<Note>
Octoplushy does not require any measurements
</Note>

View file

@ -0,0 +1,16 @@
---
title: "Octoplushy, the plushy octopus: What You Need"
---
To make Octoplushy, you will need the following:
- [Basic sewing supplies](/docs/sewing/basic-sewing-supplies)
- About 1 meter (1.1 yards) of a suitable fabric (Upper body) ([see Octoplushy Fabric options](/docs/patterns/octoplushy/fabric/))
- About 0.75 meters (0.85 yards) of a suitable fabric (Belly) ([see Octoplushy Fabric options](/docs/patterns/octoplushy/fabric/))
- Stuffing
<Note>
This list is based on a default Octoplushy and you may need less or more fabric dependant on the [size you are making Octoplushy](/docs/patterns/octoplushy/options/size/). The Octopus version requires about 50% more fabric, and the squid version about 75% more.
</Note>

View file

@ -0,0 +1,11 @@
---
title: "Bottom Leg Reduction"
---
This setting adjusts the difference in length between the top and the bottom fabric of the legs.
The bigger the difference, the more the legs will want to curl.
## Effect of this option on the pattern
![This image shows the effect of this option by superimposing several variants that have a different value for this option](octoplushy_bottomlegreduction_sample.svg "Effect of this option on the pattern")

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -0,0 +1,11 @@
---
title: "Bottom Leg Reduction (Octoplushy)"
---
This setting adjusts the difference in length between the top and the bottom fabric of the legs.
The bigger the difference, the more the legs will want to curl.
## Effect of this option on the pattern
![This image shows the effect of this option by superimposing several variants that have a different value for this option](octoplushy_bottomlegreductionplushy_sample.svg "Effect of this option on the pattern")

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -0,0 +1,12 @@
---
title: "Bottom to Top Leg Ratio"
---
This setting adjusts the ratio between the top and the bottom of the legs.
The lower the ration, the more fabric will be associated with the top of the leg.
100% makes both the top and the bottom the same.
## Effect of this option on the pattern
![This image shows the effect of this option by superimposing several variants that have a different value for this option](octoplushy_bottomtoplegratio_sample.svg "Effect of this option on the pattern")

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -0,0 +1,5 @@
---
title: "Octoplushy, the plushy octopus: Design Options"
---
<PatternOptions pattern='octoplushy' />

View file

@ -0,0 +1,10 @@
---
title: "Leg Length"
---
The length of the legs can be adjusted.
## Effect of this option on the pattern
![This image shows the effect of this option by superimposing several variants that have a different value for this option](octoplushy_leglength_sample.svg "Effect of this option on the pattern")

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -0,0 +1,10 @@
---
title: "Leg Taper"
---
This setting changes how much the legs taper from the body down to the end.
## Effect of this option on the pattern
![This image shows the effect of this option by superimposing several variants that have a different value for this option](octoplushy_legtaper_sample.svg "Effect of this option on the pattern")

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -0,0 +1,10 @@
---
title: "Leg Width"
---
The width of the legs can be adjusted.
## Effect of this option on the pattern
![This image shows the effect of this option by superimposing several variants that have a different value for this option](octoplushy_legwidth_sample.svg "Effect of this option on the pattern")

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -0,0 +1,10 @@
---
title: "Neck Width"
---
The width of the neck can be adjusted. This is a percentage of the head.
## Effect of this option on the pattern
![This image shows the effect of this option by superimposing several variants that have a different value for this option](octoplushy_neckwidth_sample.svg "Effect of this option on the pattern")

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -0,0 +1,10 @@
---
title: "Size"
---
Octoplushy can be made in different sizes. The default has a head size of about 15cm, and 25cm long legs.
This is a percentage of this default length.
## Effect of this option on the pattern
![This image shows the effect of this option by superimposing several variants that have a different value for this option](octoplushy_size_sample.svg "Effect of this option on the pattern")

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 31 KiB

View file

@ -0,0 +1,9 @@
---
title: "Type"
---
There are three distinct Octoplushies. The original cute Octoplushy, the more authentic Octopus, and the Squid.
## Effect of this option on the pattern
![This image shows the effect of this option by superimposing several variants that have a different value for this option](octoplushy_type_sample.svg "Effect of this option on the pattern")

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 26 KiB

View file

@ -273,6 +273,7 @@ it("Should generate the part transforms", () => {
expect(part.attributes.list['transform-origin'][0]).to.equal('10.5 39')
});
it("Should add the part cut", () => {
let pattern = new freesewing.Pattern();
let part = new pattern.Part();

View file

@ -711,6 +711,7 @@ it("Should handle a list snapped option", () => {
expect(freesewing.utils.round(pattern.parts.front.paths.line_10.ops[1].to.x)).to.equal(33.72);
});
it("Should retrieve the cutList", () => {
const Test = new freesewing.Design({
name: "test",
@ -729,4 +730,3 @@ it("Should retrieve the cutList", () => {
expect(JSON.stringify(pattern.getCutList())).to.equal(list)
});

View file

@ -34,6 +34,7 @@ export const list = [
'lucy',
'lunetius',
'noble',
'octoplushy',
'paco',
'penelope',
'sandy',
@ -76,6 +77,7 @@ export const withoutBreasts = [
'jaeger',
'lucy',
'lunetius',
'octoplushy',
'paco',
'penelope',
'sandy',

View file

@ -27,6 +27,7 @@ const jaeger = require('@freesewing/jaeger').config
const lucy = require('@freesewing/lucy').config
const lunetius = require('@freesewing/lunetius').config
const noble = require('@freesewing/noble').config
const octoplushy = require('@freesewing/octoplushy').config
const paco = require('@freesewing/paco').config
const penelope = require('@freesewing/penelope').config
const sandy = require('@freesewing/sandy').config
@ -75,6 +76,7 @@ const patterns = {
lucy,
lunetius,
noble,
octoplushy,
paco,
penelope,
sandy,

View file

@ -15,6 +15,7 @@
"serve": "pm2 start npm --name 'dev' -- run start"
},
"dependencies": {
"@headlessui/react": "^1.6.6",
"@heroicons/react": "^1.0.5",
"@mdx-js/loader": "^2.0.0-rc.2",
"@mdx-js/mdx": "^2.0.0-rc.2",