1
0
Fork 0

Added the Simone pattern

This commit is contained in:
Joost De Cock 2019-09-25 18:02:05 +02:00
parent 9262e19910
commit 9a839e415c
21 changed files with 11838 additions and 0 deletions

View file

@ -140,6 +140,13 @@ simon:
"@freesewing/brian": "^{{version}}" "@freesewing/brian": "^{{version}}"
"@freesewing/plugin-buttons": "^{{version}}" "@freesewing/plugin-buttons": "^{{version}}"
"@freesewing/plugin-flip": "^{{version}}" "@freesewing/plugin-flip": "^{{version}}"
simone:
peer:
"@freesewing/brian": "^{{version}}"
"@freesewing/simon": "^{{version}}"
"@freesewing/plugin-buttons": "^{{version}}"
"@freesewing/plugin-flip": "^{{version}}"
"@freesewing/plugin-bust": "^{{version}}"
utils: utils:
peer: peer:
"tlds": "^0.203.1" "tlds": "^0.203.1"

View file

@ -1,6 +1,7 @@
import brian from './brian.yml' import brian from './brian.yml'
import aaron from './aaron.yml' import aaron from './aaron.yml'
import simon from './simon.yml' import simon from './simon.yml'
import simone from './simone.yml'
import sven from './sven.yml' import sven from './sven.yml'
import wahid from './wahid.yml' import wahid from './wahid.yml'
import bent from './bent.yml' import bent from './bent.yml'
@ -27,6 +28,7 @@ let patterns = {
brian, brian,
aaron, aaron,
simon, simon,
simone,
sven, sven,
wahid, wahid,
bent, bent,

View file

@ -1,3 +1,15 @@
backDarts:
tile: Back darts
description: Whether or not to include back darts
options:
auto: Automatic
always: Always
never: Never
backDartShaping:
title: Back dart shaping
description: The amount of shaping that is done by the back darts
barrelCuffNarrowButton: barrelCuffNarrowButton:
title: Cuff narrow button title: Cuff narrow button
description: Whether to include a button to tie the cuffs more narrow. This option is only relevant for barrel cuffs. description: Whether to include a button to tie the cuffs more narrow. This option is only relevant for barrel cuffs.

View file

@ -0,0 +1,11 @@
bustDartAngle:
title: Bust dart angle
description: Controls the angle by which the (side) bust dart slopes downward
bustDartLength:
title: Bust dart length
description: Controls how close the bust dart approaches the bust point
contour:
title: Contour
description: Controls how fast the extra room for your bust is reduced below the bust line.

View file

@ -0,0 +1,36 @@
# Change log for: @freesewing/simone
## Unreleased
**Note:** Version bump only for package simone
## 2.0.4 (2019-09-27)
**Note:** Version bump only for package simone
## 2.0.3 (2019-09-15)
**Note:** Version bump only for package simone
## 2.0.2 (2019-09-06)
**Note:** Version bump only for package simone
## 2.0.1 (2019-09-01)
**Note:** Version bump only for package simone
## 2.0.0 (2019-08-25)
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.

102
packages/simone/README.md Normal file
View file

@ -0,0 +1,102 @@
<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>
<br>
<a href="https://freesewing.org/">FreeSewing v2</a>
</p>
<p align="center">An open source platform for made-to-measure sewing patterns</p>
<p align='center'><a
href="https://www.npmjs.com/package/@freesewing/simone"
title="@freesewing/simone on NPM"
><img src="https://img.shields.io/npm/v/@freesewing/simone.svg"
alt="@freesewing/simone on NPM"/>
</a><a
href="https://opensource.org/licenses/MIT"
title="License: MIT"
><img src="https://img.shields.io/npm/l/@freesewing/simone.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%3Asimone"
title="Open issues tagged pkg:simone"
><img src="https://img.shields.io/github/issues/freesewing/freesewing/pkg:simone.svg?label=Issues"
alt="Open issues tagged pkg:simone"/>
</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/chat"
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/simone
A FreeSewing pattern for a button down shirt (Simone &#x3D; Simon for people with breasts)
## 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/chat)
- 🐦 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/freesewing/chat) 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).

View file

@ -0,0 +1,259 @@
import { version } from '../package.json'
export default {
name: 'simone',
version,
design: 'Joost De Cock',
code: 'Joost De Cock',
department: 'womenswear',
type: 'pattern',
difficulty: 4,
tags: ['top'],
optionGroups: {
fit: [
'chestEase',
'collarEase',
'bicepsEase',
'cuffEase',
'shoulderEase',
'lengthBonus',
'sleeveLengthBonus',
'waistEase',
'hipsEase',
'yokeDart'
],
style: [
'splitYoke',
'hemStyle',
'hemCurve',
'boxPleat',
'backDarts',
'frontDarts',
{
closure: [
'extraTopButton',
'buttons',
'seperateButtonPlacket',
'buttonPlacketStyle',
'seperateButtonholePlacket',
'buttonholePlacketStyle',
'buttonPlacketWidth',
'buttonholePlacketWidth',
'buttonholePlacketFoldWidth',
'buttonFreeLength'
]
},
{
cuffs: [
'cuffStyle',
'barrelCuffNarrowButton',
'cuffButtonRows',
'sleevePlacketWidth',
'sleevePlacketLength',
'cuffDrape',
'cuffLength'
]
},
{
collar: [
'collarAngle',
'collarStandBend',
'collarStandCurve',
'collarFlare',
'collarStandWidth',
'collarBend',
'collarGap',
'collarRoll'
]
}
],
advanced: [
'acrossBackFactor',
'armholeDepthFactor',
'backNeckCutout',
'frontArmholeDeeper',
'shoulderSlopeReduction',
'sleeveWidthGuarantee',
'boxPleatWidth',
'boxPleatFold',
'backDartShaping',
'bustDartAngle',
'bustDartLength',
'frontDartLength',
{
sleevecap: [
'sleevecapEase',
'sleevecapTopFactorX',
'sleevecapTopFactorY',
'sleevecapBackFactorX',
'sleevecapBackFactorY',
'sleevecapFrontFactorX',
'sleevecapFrontFactorY',
'sleevecapQ1Offset',
'sleevecapQ2Offset',
'sleevecapQ3Offset',
'sleevecapQ4Offset',
'sleevecapQ1Spread1',
'sleevecapQ1Spread2',
'sleevecapQ2Spread1',
'sleevecapQ2Spread2',
'sleevecapQ3Spread1',
'sleevecapQ3Spread2',
'sleevecapQ4Spread1',
'sleevecapQ4Spread2'
]
}
]
},
measurements: [
'bicepsCircumference',
'bustSpan',
'centerBackNeckToWaist',
'chestCircumference',
'highBust',
'highPointShoulderToBust',
'naturalWaist',
'naturalWaistToHip',
'neckCircumference',
'shoulderSlope',
'shoulderToShoulder',
'hipsCircumference',
'shoulderToWrist',
'wristCircumference'
],
dependencies: {
sleeveBase: ['frontBase', 'backBase'],
sleeve: ['sleeveBase', 'front', 'back']
},
inject: {
frontBase: 'base',
backBase: 'base',
back: 'backBase',
front: 'frontBase',
fbaFront: 'front',
frontRight: 'fbaFront',
frontLeft: 'fbaFront',
buttonPlacket: 'fbaFront',
buttonholePlacket: 'fbaFront',
yoke: 'backBase',
sleeveBase: 'fbaFront',
sleeve: 'sleeveBase'
},
parts: ['collarStand', 'collar', 'sleevePlacketUnderlap', 'sleevePlacketOverlap', 'cuff'],
hide: ['base', 'frontBase', 'front', 'backBase', 'sleeveBase'],
options: {
// Constants
collarFactor: 5,
minimalDartShaping: 5,
brianFitSleeve: true,
cuffOverlap: 0.15,
frenchCuffRoundFactor: 0.05,
// Booleans
extraTopButton: { bool: true },
splitYoke: { bool: false },
barrelCuffNarrowButton: { bool: true },
seperateButtonPlacket: { bool: false },
seperateButtonholePlacket: { bool: false },
// Lists
hemStyle: {
list: ['straight', 'baseball', 'slashed'],
dflt: 'straight'
},
buttonPlacketStyle: {
list: ['classic', 'seamless'],
dflt: 'classic'
},
buttonholePlacketStyle: {
list: ['classic', 'seamless'],
dflt: 'seamless'
},
cuffStyle: {
list: [
'roundedBarrelCuff',
'angledBarrelCuff',
'straightBarrelCuff',
'roundedFrenchCuff',
'angledFrenchCuff',
'straightFrenchCuff'
],
dflt: 'angledBarrelCuff'
},
backDarts: {
list: ['auto', 'never', 'always'],
dflt: 'auto'
},
// Bool
boxPleat: { bool: false },
// Counters
buttons: { count: 7, min: 4, max: 12 },
cuffButtonRows: { count: 1, min: 1, max: 2 },
frontDarts: { bool: true },
// Angles
collarAngle: { deg: 85, min: 60, max: 130 },
collarStandBend: { deg: 3, min: 0, max: 5 },
collarStandCurve: { deg: 2, min: 0, max: 5 },
collarFlare: { deg: 4, min: 0, max: 10 },
bustDartAngle: { deg: 20, min: 10, max: 30 },
// Millimeter
buttonPlacketWidth: { mm: 20, min: 10, max: 30 },
buttonholePlacketWidth: { mm: 35, min: 20, max: 45 },
buttonholePlacketFoldWidth: { mm: 6, min: 3, max: 10 },
collarStandWidth: { mm: 35, min: 15, max: 60 },
sleevePlacketWidth: { mm: 25, min: 15, max: 35 },
boxPleatWidth: { mm: 35, min: 5, max: 65 },
boxPleatFold: { mm: 5, min: 1, max: 15 },
// Percentages
acrossBackFactor: { pct: 97, min: 93, max: 100 },
armholeDepthFactor: { pct: 60, min: 50, max: 70 },
backNeckCutout: { pct: 5, min: 2, max: 8 },
bicepsEase: { pct: 20, min: 10, max: 50 },
buttonFreeLength: { pct: 2, min: 0, max: 15 },
chestEase: { pct: 20, min: 10, max: 35 },
collarBend: { pct: 5, min: 0, max: 10 },
collarEase: { pct: 3.5, min: 2, max: 10 },
collarGap: { pct: 3, min: 0, max: 6 },
collarRoll: { pct: 3, min: 0, max: 6 },
cuffDrape: { pct: 5, min: 0, max: 10 },
cuffEase: { pct: 20, min: 10, max: 40 },
cuffLength: { pct: 10, min: 3, max: 15 },
frontArmholeDeeper: { pct: 0.5, min: 0, max: 1.5 },
hemCurve: { pct: 50, min: 25, max: 100 },
hipsEase: { pct: 20, min: 10, max: 40 },
lengthBonus: { pct: 25, min: -4, max: 60 },
shoulderEase: { pct: 2, min: 0, max: 15 },
shoulderSlopeReduction: { pct: 0, min: 0, max: 8 },
sleevecapEase: { pct: 1, min: 0, max: 10 },
sleevecapTopFactorX: { pct: 50, min: 25, max: 75 },
sleevecapTopFactorY: { pct: 100, min: 35, max: 165 },
sleevecapBackFactorX: { pct: 60, min: 35, max: 65 },
sleevecapBackFactorY: { pct: 33, min: 35, max: 65 },
sleevecapFrontFactorX: { pct: 55, min: 35, max: 65 },
sleevecapFrontFactorY: { pct: 33, min: 35, max: 65 },
sleevecapQ1Offset: { pct: 3, min: 0, max: 7 },
sleevecapQ2Offset: { pct: 5.5, min: 0, max: 7 },
sleevecapQ3Offset: { pct: 4.5, min: 0, max: 7 },
sleevecapQ4Offset: { pct: 1, min: 0, max: 7 },
sleevecapQ1Spread1: { pct: 6, min: 4, max: 20 },
sleevecapQ1Spread2: { pct: 15, min: 4, max: 20 },
sleevecapQ2Spread1: { pct: 15, min: 4, max: 20 },
sleevecapQ2Spread2: { pct: 10, min: 4, max: 20 },
sleevecapQ3Spread1: { pct: 10, min: 4, max: 20 },
sleevecapQ3Spread2: { pct: 8, min: 4, max: 20 },
sleevecapQ4Spread1: { pct: 7, min: 4, max: 20 },
sleevecapQ4Spread2: { pct: 7, min: 4, max: 20 },
sleeveWidthGuarantee: { pct: 90, min: 25, max: 100 },
sleeveLengthBonus: { pct: 0, min: -40, max: 10 },
sleevePlacketLength: { pct: 25, min: 15, max: 35 },
waistEase: { pct: 20, min: 10, max: 35 },
yokeDart: { pct: 0, min: 0, max: 15 },
backDartShaping: { pct: 25, min: 5, max: 75 },
bustDartLength: { pct: 80, min: 50, max: 90 },
frontDartLength: { pct: 45, min: 30, max: 60 }
}
}

View file

@ -0,0 +1,10 @@
{
"plugins": [
["prismjs", {
"languages": ["javascript", "css", "markup"],
"plugins": ["line-numbers"],
"theme": "twilight",
"css": true
}]
]
}

View file

@ -0,0 +1,96 @@
<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>
<br>
<a href="https://freesewing.org/">FreeSewing v2</a>
</p>
<p align="center">A JavaScript library for made-to-measure sewing patterns</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>
# simone example
This project was bootstrapped with [Create Freesewing Pattern](https://en.freesewing.dev/create-freesewing-pattern):
```js
npm init freesewing-pattern
```
This example folder is part of the local development environment.
It is **not** part of the pattern's source code.
To run this example, follow these steps:
- In the folder above this one, run: `yarn start` (or `npm start`)
- Then, in new terminal, run the same command in this folder: `yarn start` (or `npm start`)
This will spin up the development environment, similar to [our online demo](https://simone.freesewing.dev/).
## 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).

View file

@ -0,0 +1,48 @@
{
"name": "simone-example",
"homepage": "https://freesewing.github.io/simone",
"version": "0.0.0",
"private": true,
"dependencies": {
"@freesewing/components": "latest",
"@freesewing/core": "latest",
"@freesewing/css-theme": "latest",
"@freesewing/i18n": "latest",
"@freesewing/models": "latest",
"@freesewing/mui-theme": "latest",
"@freesewing/pattern-info": "latest",
"@freesewing/plugin-bundle": "latest",
"@freesewing/plugin-theme": "latest",
"@freesewing/plugin-i18n": "latest",
"@freesewing/plugin-svgattr": "latest",
"@freesewing/utils": "latest",
"@material-ui/core": "^4.4.0",
"@material-ui/icons": "^4.2.1",
"@material-ui/lab": "^v4.0.0-alpha.25",
"pattern": "link:..",
"prismjs": "1.17.1",
"react": "^16.9",
"react-dom": "^16.9",
"react-scripts": "^3.1.1",
"file-saver": "^2.0.2",
"typeface-roboto-condensed": "latest"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject"
},
"eslintConfig": {
"extends": "react-app"
},
"browserslist": [
">0.2%",
"not dead",
"not ie <= 11",
"not op_mini all"
],
"devDependencies": {
"babel-plugin-prismjs": "1.1.1"
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 KiB

View file

@ -0,0 +1,40 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<link rel="shortcut icon" href="%PUBLIC_URL%/favicon.ico">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#000000">
<!--
manifest.json provides metadata used when your web app is added to the
homescreen on Android. See https://developers.google.com/web/fundamentals/engage-and-retain/web-app-manifest/
-->
<link rel="manifest" href="%PUBLIC_URL%/manifest.json">
<!--
Notice the use of %PUBLIC_URL% in the tags above.
It will be replaced with the URL of the `public` folder during the build.
Only files inside the `public` folder can be referenced from the HTML.
Unlike "/favicon.ico" or "favicon.ico", "%PUBLIC_URL%/favicon.ico" will
work correctly both with client-side routing and a non-root public URL.
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>simone</title>
</head>
<body>
<noscript>
You need to enable JavaScript to run this app.
</noscript>
<div id="root"></div>
<!--
This HTML file is a template.
If you open it directly in the browser, you will see an empty page.
You can add webfonts, meta tags, or analytics to this file.
The build step will place the bundled scripts into the <body> tag.
To begin the development, run `npm start` or `yarn start`.
To create a production bundle, use `npm run build` or `yarn build`.
-->
</body>
</html>

View file

@ -0,0 +1,15 @@
{
"short_name": "simone",
"name": "simone",
"icons": [
{
"src": "favicon.ico",
"sizes": "64x64 32x32 24x24 16x16",
"type": "image/x-icon"
}
],
"start_url": ".",
"display": "standalone",
"theme_color": "#000000",
"background_color": "#ffffff"
}

View file

@ -0,0 +1,15 @@
import React from 'react'
import freesewing from '@freesewing/core'
import Workbench from '@freesewing/components/Workbench'
import 'typeface-roboto-condensed'
import '@freesewing/css-theme'
import Pattern from 'pattern'
const App = props => {
let instance = new Pattern()
let config = instance.config
return <Workbench freesewing={freesewing} Pattern={Pattern} config={config} userLanguage="en" />
}
export default App

View file

@ -0,0 +1,11 @@
import React from 'react'
import ReactDOM from 'react-dom'
import App from './App'
import * as serviceWorker from './serviceWorker'
ReactDOM.render(<App />, document.getElementById('root'))
// If you want your app to work offline and load faster, you can change
// unregister() to register() below. Note this comes with some pitfalls.
// Learn more about service workers: http://bit.ly/CRA-PWA
serviceWorker.unregister()

View file

@ -0,0 +1,123 @@
// In production, we register a service worker to serve assets from local cache.
// This lets the app load faster on subsequent visits in production, and gives
// it offline capabilities. However, it also means that developers (and users)
// will only see deployed updates on the "N+1" visit to a page, since previously
// cached resources are updated in the background.
// To learn more about the benefits of this model, read https://goo.gl/KwvDNy.
// This link also includes instructions on opting out of this behavior.
const isLocalhost = Boolean(
window.location.hostname === 'localhost' ||
// [::1] is the IPv6 localhost address.
window.location.hostname === '[::1]' ||
// 127.0.0.1/8 is considered localhost for IPv4.
window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)
)
export function register(config) {
if (process.env.NODE_ENV === 'production' && 'serviceWorker' in navigator) {
// The URL constructor is available in all browsers that support SW.
const publicUrl = new URL(process.env.PUBLIC_URL, window.location)
if (publicUrl.origin !== window.location.origin) {
// Our service worker won't work if PUBLIC_URL is on a different origin
// from what our page is served on. This might happen if a CDN is used to
// serve assets; see https://github.com/facebook/create-react-app/issues/2374
return
}
window.addEventListener('load', () => {
const swUrl = `${process.env.PUBLIC_URL}/service-worker.js`
if (isLocalhost) {
// This is running on localhost. Let's check if a service worker still exists or not.
checkValidServiceWorker(swUrl, config)
// Add some additional logging to localhost, pointing developers to the
// service worker/PWA documentation.
navigator.serviceWorker.ready.then(() => {
console.log(
'This web app is being served cache-first by a service ' +
'worker. To learn more, visit https://goo.gl/SC7cgQ'
)
})
} else {
// Is not local host. Just register service worker
registerValidSW(swUrl, config)
}
})
}
}
function registerValidSW(swUrl, config) {
navigator.serviceWorker
.register(swUrl)
.then(registration => {
registration.onupdatefound = () => {
const installingWorker = registration.installing
installingWorker.onstatechange = () => {
if (installingWorker.state === 'installed') {
if (navigator.serviceWorker.controller) {
// At this point, the old content will have been purged and
// the fresh content will have been added to the cache.
// It's the perfect time to display a "New content is
// available; please refresh." message in your web app.
console.log('New content is available; please refresh.')
// Execute callback
if (config.onUpdate) {
config.onUpdate(registration)
}
} else {
// At this point, everything has been precached.
// It's the perfect time to display a
// "Content is cached for offline use." message.
console.log('Content is cached for offline use.')
// Execute callback
if (config.onSuccess) {
config.onSuccess(registration)
}
}
}
}
}
})
.catch(error => {
console.error('Error during service worker registration:', error)
})
}
function checkValidServiceWorker(swUrl, config) {
// Check if the service worker can be found. If it can't reload the page.
fetch(swUrl)
.then(response => {
// Ensure service worker exists, and that we really are getting a JS file.
if (
response.status === 404 ||
response.headers.get('content-type').indexOf('javascript') === -1
) {
// No service worker found. Probably a different app. Reload the page.
navigator.serviceWorker.ready.then(registration => {
registration.unregister().then(() => {
window.location.reload()
})
})
} else {
// Service worker found. Proceed as normal.
registerValidSW(swUrl, config)
}
})
.catch(() => {
console.log('No internet connection found. App is running in offline mode.')
})
}
export function unregister() {
if ('serviceWorker' in navigator) {
navigator.serviceWorker.ready.then(registration => {
registration.unregister()
})
}
}

File diff suppressed because it is too large Load diff

View file

@ -0,0 +1,94 @@
{
"name": "@freesewing/simone",
"version": "2.0.3",
"description": "A FreeSewing pattern for a button down shirt (Simone = Simon for people with breasts)",
"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",
"build": "npm run clean && rollup -c",
"test": "echo \"simone: No tests configured. Perhaps you'd like to do this?\" && exit 0",
"pubtest": "npm publish --registry http://localhost:6662",
"pubforce": "npm publish",
"symlink": "mkdir -p ./node_modules/@freesewing && cd ./node_modules/@freesewing && ln -s -f ../../../* . && cd -",
"start": "rollup -c -w",
"netlify": "echo \"Not configured yet\""
},
"peerDependencies": {
"@freesewing/core": "^2.0.3",
"@freesewing/plugin-bundle": "^2.0.3",
"@freesewing/brian": "^2.0.3",
"@freesewing/simon": "^2.0.3",
"@freesewing/plugin-buttons": "^2.0.3",
"@freesewing/plugin-flip": "^2.0.3",
"@freesewing/plugin-bust": "^2.0.3"
},
"dependencies": {},
"devDependencies": {
"react": "^16.8",
"react-dom": "^16.8",
"@babel/plugin-proposal-class-properties": "^7.0.0",
"babel-eslint": "10.0.1",
"eslint": "^5.16.0",
"babel-jest": "24.7.1",
"jest": "24.7.1",
"@freesewing/components": "^2.0.3",
"@freesewing/css-theme": "^2.0.3",
"@freesewing/i18n": "^2.0.3",
"@freesewing/mui-theme": "^2.0.3",
"@freesewing/plugin-bust": "^2.0.3",
"@freesewing/plugin-buttons": "^2.0.3",
"@freesewing/plugin-flip": "^2.0.3",
"@freesewing/utils": "^2.0.3",
"@svgr/rollup": "^2.4.1",
"cross-env": "^5.1.4",
"gh-pages": "^1.2.0",
"react-scripts": "^3.0.0",
"webpack": "4.29.6",
"rollup": "^0.64.1",
"rollup-plugin-babel": "^4.0.1",
"rollup-plugin-babel-minify": "^7.0.0",
"rollup-plugin-commonjs": "^9.1.3",
"rollup-plugin-json": "^3.1.0",
"rollup-plugin-node-resolve": "^3.3.0",
"rollup-plugin-peer-deps-external": "^2.2.0",
"rollup-plugin-postcss": "^1.6.2",
"rollup-plugin-url": "^1.4.0",
"@material-ui/core": "4.0.1",
"@material-ui/icons": "4.0.1",
"@material-ui/lab": "^v4.0.0-alpha.14",
"react-intl": "2.8.0",
"prop-types": "15.7.2"
},
"files": [
"dist/*",
"README.md",
"package.json"
],
"publishConfig": {
"access": "public",
"tag": "latest"
},
"engines": {
"node": ">=8.0.0",
"npm": ">=5"
}
}

View file

@ -0,0 +1,41 @@
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 peerDepsExternal from 'rollup-plugin-peer-deps-external'
import { name, version, description, author, license, main, module } from './package.json'
const output = [
{
file: main,
format: 'cjs',
sourcemap: true
}
]
if (typeof module !== 'undefined')
output.push({
file: module,
format: 'es',
sourcemap: true
})
export default {
input: 'src/index.js',
output,
plugins: [
peerDepsExternal(),
resolve({ modulesOnly: true }),
commonjs(),
json(),
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 */`
})
]
}

View file

@ -0,0 +1,311 @@
export default part => {
let {
store,
measurements,
sa,
Point,
points,
Path,
paths,
complete,
paperless,
macro,
options,
Snippet,
snippets,
utils
} = part.shorthand()
/*
* Simone is Simon with an FBA (Full Bust Adjustment)
* Which means that we draft simon with the high bust measurement instead
* of the chest circumference (full bust). This is handled auto-magically by plugin-bust
*
* Once drafted, we add the FBA, which is what happens in this file
*/
/*
* How much room to we need to create to fit the breasts?
* Note that measurements.bust is added by the bust plugin
* and that we divide by two since we add room on right and left side
*/
const FBA = (measurements.bust - measurements.highBust) / 2
/*
* Locate bust point
*/
points.bust = new Point(
measurements.bustSpan / 2,
points.neck.y + measurements.highPointShoulderToBust
)
/*
* Figure out how much do we need to open a dart to create the required FBA room
* Obviously, we don't guess, we use maths :)
*/
let one = points.armholeHollow.dist(points.bust) // We consider this to be 1
let cosBust = (points.bust.dx(points.armholeHollow) / one) * -1 // Which means this gives us the cos of the bust point
let cosRot = ((points.bust.dx(points.armholeHollow) - FBA) / one) * -1 // And this gives us the cos of the target
const FBARot = utils.rad2deg(Math.acos(cosBust)) - utils.rad2deg(Math.acos(cosRot)) // Now just acos these and subtract
/*
* We now now how much room we must create (FBA) and how big our dart will be (FBARot)
* But there's one thing that requires our attention: The bust point
* When you do an FBA on an existing pattern for womenswear, the bust point is assumed
* to be incorrect (since the pattern is drafted for smaller breasts).
* In our case, we know for a fact that the bust point is in the correct location because
* it's based on the model's measurements. (bust span and high point shoulder (HPS) to bust).
* So we need to find the bust point that would end up in the right place AFTER we do the FBA
* For this, we'll just rotate it FBARot in the other direction
*/
points.realBustPoint = points.bust.clone()
points.bust = points.bust.rotate(FBARot * -1, points.armholeHollow)
/*
* Cut to the side seam
*/
points._dartDirection = points.bust.shift(options.bustDartAngle * -1, measurements.bust / 4)
points.bustSideCut1 = utils.lineIntersectsCurve(
points.bust,
points._dartDirection,
points.waist,
points.waistCp2,
points.armhole,
points.armhole
)
/*
* Mark bust at waist and hem level
*/
points.bustWaist = new Point(points.bust.x, points.waist.y)
points.bustHem = new Point(points.bust.x, points.hem.y)
/*
* Now rotate entire side around armhole hollow to create room for FBA
*/
const rot1 = [
'bust',
'bustSideCut1',
'bustWaist',
'bustHem',
'hem',
'hips',
'hipsCp2',
'waistCp1',
'waist',
'waistCp2',
'armhole',
'armholeCp2',
'armholeHollowCp1'
]
for (let p of rot1) points[`${p}_rot1`] = points[p].rotate(FBARot, points.armholeHollow)
/*
* Help line to show the initial cut lines and first rotation
* Uncomment this if you'd like to understand what's going on
paths.fbaCut1 = new Path()
.move(points.armholeHollow)
.line(points.bust)
.line(points.bustSideCut1)
.move(points.bust)
.line(points.bustHem)
.attr('class', 'various dashed')
paths.rot1 = new Path()
.move(points.armholeHollow)
.line(points.bust_rot1)
.line(points.bustHem_rot1)
.line(points.hem_rot1)
.line(points.hips_rot1)
.curve(points.hipsCp2_rot1, points.waistCp1_rot1, points.waist_rot1)
.curve_(points.waistCp2_rot1, points.armhole_rot1)
.curve(points.armholeCp2_rot1, points.armholeHollowCp1_rot1, points.armholeHollow)
.close()
.attr('class', 'lining lashed')
*/
/*
* Split the side seam at the dart, and extrac control points from the Path object
*/
const toSplit = new Path()
.move(points.waist_rot1)
.curve_(points.waistCp2_rot1, points.armhole_rot1)
.split(points.bustSideCut1_rot1)
paths.fbaAboveDart = toSplit.pop()
paths.fbaBelowDart = toSplit.pop()
paths.fbaAboveDart.render = false
paths.fbaBelowDart.render = false
points.belowDartCpTop_rot1 = paths.fbaBelowDart.ops[1].cp2
points.belowDartCpBottom_rot1 = paths.fbaBelowDart.ops[1].cp1
points.aboveDartCpBottom_rot1 = paths.fbaAboveDart.ops[1].cp1 // (only one CP on this part
/*
* Now rotate the bottom part around the (rotated) bust point so it's straight again
*/
const rot2 = [
'bust',
'bustSideCut1',
'bustWaist',
'bustHem',
'hem',
'hips',
'hipsCp2',
'waistCp1',
'waist',
'waistCp2',
'armhole',
'armholeCp2',
'armholeHollowCp1',
'belowDartCpTop',
'belowDartCpBottom'
]
for (let p of rot2)
points[`${p}_rot2`] = points[`${p}_rot1`].rotate(FBARot * -1, points.bust_rot1)
/*
* Help line to show the second rotation
* Uncomment this if you'd like to understand what's going on
paths.fbaCut2 = new Path()
.move(points.bust_rot2)
.line(points.bustHem_rot2)
.line(points.hem_rot2)
.line(points.hips_rot2)
.curve(points.hipsCp2_rot2, points.waistCp1_rot2, points.waist_rot2)
.curve(points.belowDartCpBottom_rot2, points.belowDartCpTop_rot2, points.bustSideCut1_rot2)
.line(points.bust_rot2)
.line(points.bustSideCut1_rot1)
.curve_(points.aboveDartCpBottom_rot1, points.armhole_rot1)
.curve(points.armholeCp2_rot1, points.armholeHollowCp1_rot1, points.armholeHollow)
.line(points.bust_rot2)
.attr('class', 'interfacing lashed')
*/
/*
* Bust darts don't actually run entirely up to the bust point but stop a bit short
* How short is controlled by the bustDartLength option
* First we'll find the middle of the dart, then shift towards the bust point along it
* for as far as the bustDartLength option tells us to
*/
points.bustDartCenter = points.bustSideCut1_rot2.shiftFractionTowards(
points.bustSideCut1_rot1,
0.5
)
points.bustDartTip = points.bustDartCenter.shiftFractionTowards(
points.bust_rot2,
options.bustDartLength
)
/*
* Draw the front dart. Or if we're not adding a front dart, narrow the side from the waist down
*/
if (options.frontDarts) {
let reduce = points.waist.dx(points.waist_rot2)
points.frontDartTip = points.bustWaist_rot2.shiftFractionTowards(
points.bust_rot2,
options.frontDartLength
)
points.frontDartWaistRight = points.bustWaist_rot2.shift(0, reduce / 2)
points.frontDartWaistLeft = points.bustWaist_rot2.shift(180, reduce / 2)
points.frontDartWaistLeftCpTop = points.frontDartWaistLeft.shift(
90,
points.frontDartTip.dy(points.waist_rot2) / 2
)
points.frontDartWaistRightCpTop = points.frontDartWaistRight.shift(
90,
points.frontDartTip.dy(points.waist_rot2) / 2
)
points.frontDartHemLeft = new Point(points.frontDartWaistLeft.x, points.hem_rot2.y)
points.frontDartHemRight = new Point(points.frontDartWaistRight.x, points.hem_rot2.y)
paths.frontDart = new Path()
.move(points.frontDartHemRight)
.line(points.frontDartWaistRight)
.curve_(points.frontDartWaistRightCpTop, points.frontDartTip)
._curve(points.frontDartWaistLeftCpTop, points.frontDartWaistLeft)
.line(points.frontDartHemLeft)
.attr('class', 'fabric dotted')
} else {
let waistX = points.waist.x
let hipsX = points.hips.x
for (let p of ['waist_rot2', 'waistCp1_rot2', 'belowDartCpBottom_rot2']) points[p].x = waistX
for (let p of ['hipsCp2_rot2', 'hips_rot2', 'hem_rot2']) points[p].x = hipsX
}
/*
* Now overwrite the points that need to be adapted, and re-create the seam path.
* After that, we'll let Simon take it from here
*/
let clone1 = ['armhole', 'armholeCp2', 'armholeHollowCp1']
for (let p of clone1) points[p] = points[`${p}_rot1`].clone()
let clone2 = ['hem', 'hips', 'hipsCp2', 'waistCp1', 'waist']
for (let p of clone2) points[p] = points[`${p}_rot2`].clone()
points.cfHem = new Point(points.cfHem.x, points.bustHem_rot2.y)
points.waistCp2 = points.belowDartCpBottom_rot2.clone()
points.dartBottomCp = points.belowDartCpTop_rot2.clone()
points.dartBottom = points.bustSideCut1_rot2.clone()
points.dartTop = points.bustSideCut1_rot1.clone()
points.dartTopCp = points.aboveDartCpBottom_rot1.clone()
/*
* Recreate the base paths, and let Simon take it from here
*/
paths.saBaseFromHips = new Path()
.move(points.hips)
.curve(points.hipsCp2, points.waistCp1, points.waist)
.curve(points.belowDartCpBottom_rot2, points.dartBottomCp, points.dartBottom)
.line(points.bustDartTip)
.line(points.dartTop)
.curve_(points.dartTopCp, points.armhole)
paths.saBaseFromArmhole = new Path()
.move(points.armhole)
.curve(points.armholeCp2, points.armholeHollowCp1, points.armholeHollow)
.curve(points.armholeHollowCp2, points.armholePitchCp1, points.armholePitch)
.curve(points.armholePitchCp2, points.shoulderCp1, points.shoulder)
.line(points.neck)
.curve(points.neckCp2Front, points.cfNeckCp1, points.cfNeck)
switch (options.hemStyle) {
case 'baseball':
points.bballStart = points.cfHem.shiftFractionTowards(points.hem, 0.5)
// Don't let front dart fall into curved part of hem
if (options.frontDarts && points.bballStart.x > points.frontDartWaistRight.x) {
points.bballStart.x = points.frontDartWaistRight.x
}
points.bballEnd = points.hem.shiftFractionTowards(points.hips, options.hemCurve)
points.bballCp1 = points.bballStart.shiftFractionTowards(points.hem, 0.5)
points.bballCp2 = new Point(points.bballCp1.x, points.bballEnd.y)
paths.saBase = new Path()
.move(points.bballEnd)
.line(points.hips)
.join(paths.saBaseFromHips)
paths.hemBase = new Path()
.move(points.cfHem)
.line(points.bballStart)
.curve(points.bballCp1, points.bballCp2, points.bballEnd)
break
case 'slashed':
macro('round', {
from: points.hips,
to: points.cfHem,
via: points.hem,
radius: points.hips.dist(points.hem) * options.hemCurve,
prefix: 'slash'
})
paths.saBase = new Path().move(points.hips).join(paths.saBaseFromHips)
paths.hemBase = new Path()
.move(points.cfHem)
.line(points.slashEnd)
.curve(points.slashCp2, points.slashCp1, points.slashStart)
break
default:
paths.saBase = new Path()
.move(points.hem)
.line(points.hips)
.join(paths.saBaseFromHips)
paths.hemBase = new Path().move(points.cfHem).line(points.hem)
}
paths.seam = paths.hemBase
.join(paths.saBase)
.join(paths.saBaseFromArmhole)
.attr('class', 'fabric')
return part
}

View file

@ -0,0 +1,56 @@
import freesewing from '@freesewing/core'
import Brian from '@freesewing/brian'
import Simon from '@freesewing/simon'
import plugins from '@freesewing/plugin-bundle'
import flipPlugin from '@freesewing/plugin-flip'
import buttonPlugin from '@freesewing/plugin-buttons'
import bustPlugin from '@freesewing/plugin-bust'
import config from '../config'
// Parts
import draftFbaFront from './fba-front'
// Create design
const Pattern = new freesewing.Design(config, [plugins, flipPlugin, buttonPlugin, bustPlugin])
// Attach draft methods to prototype
Pattern.prototype.draftBase = function(part) {
return new Brian(this.settings).draftBase(part)
}
Pattern.prototype.draftFrontBase = function(part) {
return new Brian(this.settings).draftFront(part)
}
Pattern.prototype.draftBackBase = function(part) {
return new Brian(this.settings).draftBack(part)
}
Pattern.prototype.draftSleeveBase = function(part) {
let brian = new Brian(this.settings)
return brian.draftSleeve(brian.draftSleevecap(part))
}
// Attach draft methods from Simon
let simonParts = [
'Back',
'Front',
'FrontRight',
'ButtonPlacket',
'FrontLeft',
'ButtonholePlacket',
'Yoke',
'Sleeve',
'CollarStand',
'Collar',
'SleevePlacketUnderlap',
'SleevePlacketOverlap',
'Cuff'
]
for (let Part of simonParts) {
Pattern.prototype[`draft${Part}`] = function(part) {
let simon = new Simon(this.settings)
return simon[`draft${Part}`](part)
}
}
Pattern.prototype.draftFbaFront = draftFbaFront
export default Pattern