1
0
Fork 0

Merge branch 'develop' of github.com:freesewing/freesewing into develop

This commit is contained in:
Joost De Cock 2022-09-28 19:22:32 +02:00
commit 539e7ecd89
145 changed files with 1554 additions and 1964 deletions

View file

@ -1,5 +1,11 @@
*.gif
*.jpg
*.jpeg
*.png
*.sh
.git .git
coverage coverage
dist
node_modules node_modules
yarn.lock yarn.lock
package.json package.json

113
.eslintrc.cjs Normal file
View file

@ -0,0 +1,113 @@
const nodeFiles = [
'**/build.dflt.{js,mjs,cjs}',
'**/build.{js,mjs,cjs}',
'**/config/**',
'**/prebuild.{js,mjs,cjs}',
'**/prebuild/**',
'**/scripts/**',
'packages/new-design/lib/**',
'sites/backend/**',
'sites/*/mdx/**',
'sites/*/themes/**',
]
const frontendFiles = [
'**/components/**',
'**/hooks/**',
'**/pages/**',
'**/page-templates/**',
'packages/i18n/**/*.md/*.js',
]
module.exports = {
extends: 'eslint:recommended',
env: {
es2021: true,
},
// Required when using experimental EcmaScript features
parser: '@babel/eslint-parser',
parserOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
// Options specific to the Babel parser
requireConfigFile: false,
babelOptions: {
plugins: ['@babel/plugin-syntax-import-assertions'],
},
},
rules: {},
overrides: [
// Partitioned JavaScript files
{
files: nodeFiles,
env: {
node: true,
},
rules: {
'no-console': 'off',
},
},
{
files: frontendFiles,
excludedFiles: nodeFiles,
extends: ['next/core-web-vitals'],
env: {
// We can be stricter than 'next/core-web-vitals' is
node: false,
},
},
{
files: ['**'],
excludedFiles: [].concat(nodeFiles, frontendFiles),
env: {
'shared-node-browser': true,
},
},
// Additional globals for JavaScript files that happen to be CommonJS.
// Only allowed in *.cjs files, not *.js files, because we probably want to move towards
// a `"type": "module"` future where any CommonJS files would have to have .cjs extensions.
{
files: ['**/*.cjs'],
env: {
commonjs: true,
},
},
// Additional globals for JavaScript files that happen to contain Mocha tests
{
files: ['**/tests/**', '**/*.test.mjs'],
env: {
mocha: true,
},
},
// JSON files
{
files: ['*.json', '*.json5', '*.jsonc'],
extends: ['plugin:jsonc/recommended-with-jsonc'],
parser: 'jsonc-eslint-parser',
},
// YAML files
{
files: ['**/*.yaml', '**/*.yml'],
plugins: ['yaml'],
extends: ['plugin:yaml/recommended'],
},
// Markdown files
{
files: ['**/markdown/**', '**/*.md'],
plugins: ['markdown'],
processor: 'markdown/markdown',
},
{
files: ['**/*.md/*.js'],
rules: {
'no-console': 'off',
'no-empty': 'off',
'no-undef': 'off',
'no-unused-labels': 'off',
'no-unused-vars': 'off',
},
},
],
}

View file

@ -1,21 +1,15 @@
name: ESLint name: ESLint All Files
on: on:
push: push:
branches: branches:
- develop - develop
paths:
- '**'
- '!**/README.md'
pull_request: pull_request:
branches: branches:
- develop - develop
paths:
- '**'
- '!**/README.md'
jobs: jobs:
test: lint:
runs-on: ubuntu-latest runs-on: ubuntu-latest

52
.github/workflows/lint.diff.yml vendored Normal file
View file

@ -0,0 +1,52 @@
# In the event that lint is broken in mainline (e.g. `develop`, the only mainline branch that has linting code right now),
# this workflow is expected to pass even if lint.all.yml fails.
name: ESLint Changed Files
on:
pull_request:
branches:
- develop
jobs:
lint:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
steps:
- name: Fetch PR base ref
uses: actions/checkout@v2
with:
ref: ${{ github.base_ref }}
- name: Checkout PR merge ref
uses: actions/checkout@v2
with:
ref: ${{ github.ref }}
- name: Setup Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: npx lerna bootstrap
env:
CI: true
- name: Build all
run: npm run buildall
- name: Run eslint
run: |
changed_files="$(git diff --name-only origin/${{ github.base_ref }})"
if (( $? )); then
echo "Failed diff against origin/${{ github.base_ref }}"
exit 1
else
echo "Changed files:"
echo "$changed_files"
echo
echo "Running eslint"
echo
npx eslint --no-error-on-unmatched-pattern $changed_files
fi

View file

@ -649,6 +649,12 @@
- Migrated from Rollup to Esbuild for all builds - Migrated from Rollup to Esbuild for all builds
### unice
#### Added
- Unice is an underwear pattern
### ursula ### ursula
#### Changed #### Changed

View file

@ -284,6 +284,13 @@
"difficulty": 1, "difficulty": 1,
"tags": [ "tops", "historic" ] "tags": [ "tops", "historic" ]
}, },
"unice": {
"description": "A FreeSewing pattern for a basic, highly-customizable underwear pattern",
"code": [ "Anna Puk", "Natalia Sayang" ],
"design": [ "Anna Puk", "Natalia Sayang" ],
"difficulty": 1,
"tags": [ "bottoms", "underwear" ]
},
"ursula": { "ursula": {
"description": "A FreeSewing pattern for a basic, highly-customizable underwear pattern", "description": "A FreeSewing pattern for a basic, highly-customizable underwear pattern",
"code": "Natalia Sayang", "code": "Natalia Sayang",

View file

@ -1,8 +1,8 @@
import { version } from './package.json' assert { type: 'json' } import pkg from './package.json' assert { type: 'json' }
export default { export default {
name: '{{name}}', name: '{{name}}',
version, version: pkg.version,
design: '{{author}}', design: '{{author}}',
code: '{{author}}', code: '{{author}}',
department: '{{department}}', department: '{{department}}',

View file

@ -1,5 +0,0 @@
{
"env": {
"jest": true
}
}

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,5 +0,0 @@
{
"env": {
"jest": true
}
}

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -27,7 +27,7 @@ function draftCharlieFlyExtension({ points, paths, Path, complete, macro, sa, pa
.line(points.styleWaistIn) .line(points.styleWaistIn)
.line(points.flyTop) .line(points.flyTop)
.hide() .hide()
paths.seam = paths.saBase.clone().line(points.flyCorner).close().hide().attr('class', 'fabric') paths.seam = paths.saBase.clone().line(points.flyCorner).close().unhide().attr('class', 'fabric')
if (complete) { if (complete) {
macro('cutonfold', { macro('cutonfold', {

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -409,7 +409,6 @@ function draftHiBody({
.curve(points.body02cp1, points.body03cp2, points.body03) .curve(points.body02cp1, points.body03cp2, points.body03)
.join(paths.allButDart) .join(paths.allButDart)
.close() .close()
.hide()
let gillPath = new Path() let gillPath = new Path()
.move(points.body17) .move(points.body17)

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,23 +0,0 @@
{
"parser": "babel-eslint",
"extends": [
"standard",
"standard-react"
],
"env": {
"es6": true
},
"plugins": [
"react"
],
"parserOptions": {
"sourceType": "module"
},
"rules": {
// don't force es6 functions to include space before paren
"space-before-function-paren": 0,
// allow specifying true explicitly for boolean props
"react/jsx-boolean-value": 0
}
}

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,9 +0,0 @@
{
"presets": [
["@babel/preset-env", {
"modules": false
}],
"@babel/preset-react"
],
"plugins": ["@babel/plugin-proposal-class-properties"]
}

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -61,7 +61,7 @@ function lunetiusLacerna({
.line(points.bottom) .line(points.bottom)
.hide() .hide()
paths.saBase = new Path().move(points.top).line(points.topLeft).hide() paths.saBase = new Path().move(points.top).line(points.topLeft).hide()
paths.seam = paths.saBase.join(paths.hem).join(paths.fold).attr('class', 'fabric').hide() paths.seam = paths.saBase.join(paths.hem).join(paths.fold).attr('class', 'fabric')
// Complete? // Complete?
if (complete) { if (complete) {

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,5 +0,0 @@
{
"env": {
"jest": true
}
}

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,9 +0,0 @@
{
"presets": [
["@babel/preset-env", {
"modules": false
}],
"@babel/preset-react"
],
"plugins": ["@babel/plugin-proposal-class-properties"]
}

View file

@ -1,23 +0,0 @@
{
"parser": "babel-eslint",
"extends": [
"standard",
"standard-react"
],
"env": {
"es6": true
},
"plugins": [
"react"
],
"parserOptions": {
"sourceType": "module"
},
"rules": {
// don't force es6 functions to include space before paren
"space-before-function-paren": 0,
// allow specifying true explicitly for boolean props
"react/jsx-boolean-value": 0
}
}

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,5 +0,0 @@
{
"env": {
"jest": true
}
}

View file

@ -0,0 +1,15 @@
# Change log for: @freesewing/unice
## 2.21.0 (2022-06-27)
### Added
- Unice is an underwear pattern
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.

290
designs/unice/README.md Normal file
View file

@ -0,0 +1,290 @@
![FreeSewing](https://static.freesewing.org/banner.png)
<p align='center'><a
href="https://www.npmjs.com/package/@freesewing/unice"
title="@freesewing/unice on NPM"
><img src="https://img.shields.io/npm/v/@freesewing/unice.svg"
alt="@freesewing/unice on NPM"/>
</a><a
href="https://opensource.org/licenses/MIT"
title="License: MIT"
><img src="https://img.shields.io/npm/l/@freesewing/unice.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%3Aunice"
title="Open issues tagged pkg:unice"
><img src="https://img.shields.io/github/issues/freesewing/freesewing/pkg:unice.svg?label=Issues"
alt="Open issues tagged pkg:unice"/>
</a><a
href="#contributors-"
title="All Contributors"
><img src="https://img.shields.io/badge/all_contributors-100-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/unice
A FreeSewing pattern for a basic, highly-customizable underwear pattern
> #### Note: Version 3 is a work in progress
>
> We are working on a new major version (v3) but it is not ready for prime-time.
> For production use, please refer to our v2 packages (the `latest` on NPM)
> or [the `v2` branch in our monorepo](https://github.com/freesewing/freesewing/tree/v2).
## What am I looking at? 🤔
This repository is our *monorepo* holding all our NPM designs, plugins, other NPM packages, and (web)sites.
This folder holds: @freesewing/unice
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>
<tbody>
<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/Bart-PXL"><img src="https://avatars.githubusercontent.com/u/45118788?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Bart</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=Bart-PXL" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/BenJamesBen"><img src="https://avatars.githubusercontent.com/u/109869956?v=4?s=100" width="100px;" alt=""/><br /><sub><b>BenJamesBen</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=BenJamesBen" title="Code">💻</a> <a href="https://github.com/freesewing/freesewing/commits?author=BenJamesBen" title="Documentation">📖</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>
</tr>
<tr>
<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>
<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>
</tr>
<tr>
<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>
<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://greg.technology/"><img src="https://avatars.githubusercontent.com/u/1017304?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Greg Sadetsky</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=gregsadetsky" 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>
</tr>
<tr>
<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>
<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="http://jeroenhoek.nl"><img src="https://avatars.githubusercontent.com/u/683699?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Jeroen Hoek</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=jdhoek" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/joeschofield0"><img src="https://avatars.githubusercontent.com/u/47668691?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Joe Schofield</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=joeschofield0" title="Documentation">📖</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>
</tr>
<tr>
<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>
<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>
</tr>
<tr>
<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>
<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>
</tr>
<tr>
<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://github.com/nchilada"><img src="https://avatars.githubusercontent.com/u/692925?v=4?s=100" width="100px;" alt=""/><br /><sub><b>Nikhil Chelliah</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=nchilada" title="Documentation">📖</a></td>
<td align="center"><a href="https://github.com/OysteinHoiby"><img src="https://avatars.githubusercontent.com/u/49735055?v=4?s=100" width="100px;" alt=""/><br /><sub><b>OysteinHoiby</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/commits?author=OysteinHoiby" title="Code">💻</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://github.com/SimonbJohnson"><img src="https://avatars.githubusercontent.com/u/2110742?v=4?s=100" width="100px;" alt=""/><br /><sub><b>SimonbJohnson</b></sub></a><br /><a href="https://github.com/freesewing/freesewing/issues?q=author%3ASimonbJohnson" title="Bug reports">🐛</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>
</tr>
<tr>
<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>
<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>
</tr>
<tr>
<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>
<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>
</tr>
<tr>
<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>
<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>
</tr>
<tr>
<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>
<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>
</tr>
<tr>
<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>
<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>
</tbody>
</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!

36
designs/unice/build.mjs Normal file
View file

@ -0,0 +1,36 @@
/* This script will build the package with esbuild */
import esbuild from 'esbuild'
import pkg from './package.json' assert { type: '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.mjs'],
format: 'esm',
outfile: 'dist/index.mjs',
external: ["@freesewing"],
metafile: process.env.VERBOSE ? true : false,
minify: process.env.NO_MINIFY ? false : true,
sourcemap: true,
}
// Let esbuild generate the build
let result
(async () => {
result = await esbuild.build(options).catch(() => process.exit(1))
if (process.env.VERBOSE) {
const info = await esbuild.analyzeMetafile(result.metafile)
console.log(info)
}
})()

4
designs/unice/data.mjs Normal file
View file

@ -0,0 +1,4 @@
// This file is auto-generated | All changes you make will be overwritten.
export const name = "@freesewing/unice"
export const version = "3.0.0-alpha.0"
export const data = { name, version }

View file

@ -0,0 +1,68 @@
{
"name": "@freesewing/unice",
"version": "3.0.0-alpha.0",
"description": "A FreeSewing pattern for a basic, highly-customizable underwear pattern",
"author": "Anna Puk (https://github.com/anna-puk)",
"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"
],
"type": "module",
"module": "dist/index.mjs",
"exports": {
".": "./dist/index.mjs"
},
"scripts": {
"build": "node build.mjs",
"clean": "rimraf dist",
"mbuild": "NO_MINIFY=1 node build.mjs",
"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.mjs",
"lab": "cd ../../sites/lab && yarn start",
"tips": "node ../../scripts/help.mjs",
"lint": "npx eslint 'src/**' 'tests/*.mjs'",
"prettier": "npx prettier --write 'src/*.mjs' 'tests/*.mjs'",
"testci": "npx mocha tests/*.test.mjs --reporter ../../tests/reporters/terse.js",
"cibuild_step5": "node build.mjs"
},
"peerDependencies": {
"@freesewing/core": "^3.0.0-alpha.0",
"@freesewing/plugin-bundle": "^3.0.0-alpha.0",
"@freesewing/config-helpers": "^3.0.0-alpha.0"
},
"dependencies": {},
"devDependencies": {
"mocha": "^10.0.0",
"chai": "^4.2.0"
},
"files": [
"dist/*",
"README.md"
],
"publishConfig": {
"access": "public",
"tag": "next"
},
"engines": {
"node": ">=16.0.0",
"npm": ">=8"
}
}

308
designs/unice/src/back.mjs Normal file
View file

@ -0,0 +1,308 @@
import { front } from './front.mjs'
export const back = {
name: 'unice.back',
measurements: ['waist', 'seat', 'waistToSeat', 'waistToUpperLeg', 'hips', 'waistToHips'],
optionalMeasurements: ['crossSeam', 'crossSeamFront'],
options: {
backToFrontLength: 1.15, // Maybe include this in advanced options?
backToFrontWidth: 1.1, // Maybe include this in advanced options?
gussetRatio: 0.7, // Relationship between front and back gusset widths
backDip: { pct: 2.5, min: -5, max: 15, menu: 'style' },
backExposure: { pct: 20, min: -30, max: 90, menu: 'style' },
},
after: front,
draft: ({
utils,
store,
sa,
Point,
points,
Path,
paths,
options,
measurements,
complete,
paperless,
macro,
part,
}) => {
// Design pattern here
// Create points
points.backWaistMid = new Point(measurements.seat / 4, 0)
points.backWaistBandLeft = new Point(
store.get('sideSeamWaist').x / options.backToFrontWidth,
store.get('sideSeamWaist').y
)
points.backLegOpeningLeft = new Point(
store.get('sideSeamHip').x / options.backToFrontWidth,
store.get('sideSeamHip').y
)
// back height is given by (estimated) cross seam, minus front and gusset lengths
// this does not account for vertical stretch yet
const backHeight =
store.get('crossSeam') - store.get('frontHeight') - options.gussetLength * measurements.seat
// calculate the actual back height, using yScale above and yScaleReduced below leg opening
const backHeightAbove = store.get('frontHeightAbove') // part above has same height front and back
let backHeightBelow
backHeightBelow =
store.get('yScale') * (backHeight - backHeightAbove / store.get('yScaleReduced'))
const backHeightReduced = backHeightBelow + backHeightAbove
points.backGussetLeft = new Point(
measurements.seat / 4 -
((measurements.waist * options.gussetWidth * store.get('xScale')) / options.gussetRatio) *
options.backToFrontWidth,
backHeightReduced
)
points.backGussetMid = new Point(measurements.seat / 4, backHeightReduced)
points.backGussetRight = points.backGussetLeft.flipX(points.backWaistMid)
points.backLegOpeningRight = points.backLegOpeningLeft.flipX(points.backWaistMid)
points.backWaistBandRight = points.backWaistBandLeft.flipX(points.backWaistMid)
points.backWaistBandMid = points.backWaistBandLeft
.shiftFractionTowards(points.backWaistBandRight, 0.5)
.shift(270, measurements.waistToUpperLeg * options.backDip)
/* Middle point for label */
points.backMidMid = points.backLegOpeningLeft.shiftFractionTowards(
points.backLegOpeningRight,
0.5
)
// Create control points
/* Control point for waistband dip */
points.backWaistBandLeftCp1 = points.backWaistBandMid.shift(
0,
points.backWaistBandMid.dx(points.backWaistBandLeft) / 3
)
/* Flip points to right side */
points.backWaistBandRightCp1 = points.backWaistBandLeftCp1.flipX(points.backWaistMid)
// Shape back coverage
/* Only have to do this on one side */
points.backLegOpeningCorner = utils.beamsIntersect(
points.backLegOpeningLeft,
points.backLegOpeningLeft.shift(180, points.backGussetLeft.dy(points.backLegOpeningLeft)),
points.backGussetLeft,
points.backGussetLeft.shift(270, points.backGussetLeft.dy(points.backLegOpeningLeft))
)
if (options.backExposure >= 0) {
/* If back exposure is high, like a thong style */
/* This controls the hip bit */
points.backLegOpeningLeftCp1 = points.backLegOpeningLeft.shiftFractionTowards(
points.backLegOpeningCorner,
options.backExposure
)
/* This controls the center bit */
points.backGussetLeftCp1 = points.backGussetLeft.shiftFractionTowards(
points.backWaistBandMid,
options.backExposure
)
points.backGussetLeft = points.backGussetLeft.shiftFractionTowards(
points.backGussetMid,
options.backExposure
) // This narrows the back of the gusset
points.backGussetRight = points.backGussetLeft.flipX(points.backWaistMid)
} else {
/* If back exposure is low and flares out to cover more */
store.set('adjustedBackExposure', options.backExposure * store.get('adjustedLegOpening')) // flare depends on leg opening
/* This controls the hip bit */
points.backLegOpeningLeftCp1 = points.backLegOpeningLeft.shift(
-45,
store.get('adjustedBackExposure') * points.backWaistBandMid.dx(points.backWaistBandLeft)
)
/* This controls the taper to gusset */
points.backGussetLeftCp1 = points.backGussetLeft.shift(
115,
store.get('adjustedBackExposure') * points.backWaistBandMid.dx(points.backWaistBandLeft)
)
/* center of the flare and its control points are on a line parallel to the backGussetLeft to backLegOpeningLeft line
* first, define the points on that line */
points.backFlare = points.backGussetLeft.shiftFractionTowards(points.backLegOpeningLeft, 0.5)
// points.backFlareCp1 = points.backGussetLeft.shiftFractionTowards(points.backLegOpeningLeft, 0.5 - store.get('adjustedBackExposure'))
points.backFlareCp1 = points.backGussetLeft.shiftFractionTowards(
points.backLegOpeningLeft,
0.7
)
points.backFlareCp2 = points.backGussetLeft.shiftFractionTowards(
points.backLegOpeningLeft,
0.3
)
/* then shift all three points outward */
points.backFlareLeft = points.backFlare.shift(
215,
points.backWaistBandMid.dx(points.backWaistBandLeft) * store.get('adjustedBackExposure') * 2
)
points.backFlareLeftCp1 = points.backFlareCp1.shift(
215,
points.backWaistBandMid.dx(points.backWaistBandLeft) * store.get('adjustedBackExposure') * 2
)
points.backFlareLeftCp2 = points.backFlareCp2.shift(
215,
points.backWaistBandMid.dx(points.backWaistBandLeft) * store.get('adjustedBackExposure') * 2
)
/* Flip points to the right */
points.backFlareRight = points.backFlareLeft.flipX(points.backWaistBandMid)
points.backFlareRightCp1 = points.backFlareLeftCp1.flipX(points.backWaistMid)
points.backFlareRightCp2 = points.backFlareLeftCp2.flipX(points.backWaistMid)
}
/* Flip points to the right */
points.backLegOpeningRightCp1 = points.backLegOpeningLeftCp1.flipX(points.backWaistMid)
points.backGussetRightCp1 = points.backGussetLeftCp1.flipX(points.backWaistMid)
// Draw paths
if (options.backExposure >= 0) {
paths.seam = new Path()
.move(points.backWaistBandMid)
.curve(points.backWaistBandLeftCp1, points.backWaistBandLeft, points.backWaistBandLeft) // Waist band dip
.line(points.backLegOpeningLeft)
.curve(points.backLegOpeningLeftCp1, points.backGussetLeftCp1, points.backGussetLeft)
.line(points.backGussetMid)
.line(points.backGussetRight)
.curve(points.backGussetRightCp1, points.backLegOpeningRightCp1, points.backLegOpeningRight)
.line(points.backWaistBandRight)
.curve(points.backWaistBandRight, points.backWaistBandRightCp1, points.backWaistBandMid) // Waist band dip
.close()
.attr('class', 'fabric')
} else {
paths.seam = new Path()
.move(points.backWaistBandMid)
.curve(points.backWaistBandLeftCp1, points.backWaistBandLeft, points.backWaistBandLeft) // Waist band dip
.line(points.backLegOpeningLeft)
.curve(points.backLegOpeningLeftCp1, points.backFlareLeftCp1, points.backFlareLeft)
.curve(points.backFlareLeftCp2, points.backGussetLeftCp1, points.backGussetLeft)
.line(points.backGussetMid)
.line(points.backGussetRight)
.curve(points.backGussetRightCp1, points.backFlareRightCp2, points.backFlareRight)
.curve(points.backFlareRightCp1, points.backLegOpeningRightCp1, points.backLegOpeningRight)
.line(points.backWaistBandRight)
.curve(points.backWaistBandRight, points.backWaistBandRightCp1, points.backWaistBandMid) // Waist band dip
.close()
.attr('class', 'fabric')
}
// Store points for use in other parts
/* Store gusset points for use in gusset */
store.set('backGussetLeft', points.backGussetLeft)
store.set('backGussetRight', points.backGussetRight)
/* Store lengths for use in elastic */
paths.backLegOpening =
options.backExposure >= 0
? new Path()
.move(points.backGussetRight)
.curve(
points.backGussetRightCp1,
points.backLegOpeningRightCp1,
points.backLegOpeningRight
)
.setHidden(true)
: new Path()
.move(points.backGussetRight)
.curve(points.backGussetRightCp1, points.backFlareRightCp2, points.backFlareRight)
.curve(
points.backFlareRightCp1,
points.backLegOpeningRightCp1,
points.backLegOpeningRight
)
.setHidden(true)
store.set('backLegOpeningLength', paths.backLegOpening.length())
paths.backWaistBand = new Path()
.move(points.backWaistBandRight)
.curve(points.backWaistBandRightCp1, points.backWaistBandLeftCp1, points.backWaistBandLeft)
.setHidden(true)
store.set('backWaistBandLength', paths.backWaistBand.length())
// Complete?
if (complete) {
if (sa) {
paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
}
}
macro('title', {
at: points.backMidMid,
nr: 2,
title: 'back',
})
macro('grainline', {
from: points.backGussetMid,
to: points.backGussetMid.shiftFractionTowards(points.backWaistBandMid, 0.4),
})
points.scaleboxAnchor = points.scalebox = points.backMidMid.shift(90, -50)
macro('miniscale', { at: points.scalebox })
// Paperless?
if (paperless) {
macro('hd', {
from: points.backWaistBandRight,
to: points.backWaistBandLeft,
y: points.backWaistBandRight.y + sa - 15,
})
macro('hd', {
from: points.backLegOpeningRight,
to: points.backLegOpeningLeft,
y: points.backLegOpeningRight.y + sa - 15,
})
macro('hd', {
from: points.backGussetLeft,
to: points.backGussetRight,
y: points.backGussetLeft.y + sa + 15,
})
macro('vd', {
from: points.backWaistBandMid,
to: points.backGussetMid,
x: points.backWaistBandMid.x + sa + 15,
})
if (options.backExposure >= 0) {
macro('pd', {
path: new Path()
.move(points.backGussetRight)
.curve(
points.backGussetRightCp1,
points.backLegOpeningRightCp1,
points.backLegOpeningRight
),
d: 15,
})
} else {
macro('pd', {
path: new Path()
.move(points.backGussetRight)
.curve(points.backGussetRightCp1, points.backFlareRightCp2, points.backFlareRight)
.curve(
points.backFlareRightCp1,
points.backLegOpeningRightCp1,
points.backLegOpeningRight
),
d: 15,
})
}
}
return part
},
}

View file

@ -0,0 +1,39 @@
import { gusset } from './gusset.mjs'
export const elastic = {
name: 'unice.elastic',
options: {
elasticStretch: { pct: 8, min: 5, max: 15, menu: 'fit' },
},
after: gusset,
draft: ({ options, Point, points, Path, paths, store, utils, units, sa, part }) => {
// Stretch utility method
store.set('elasticScale', utils.stretchToScale(options.elasticStretch))
// Design pattern here
const legOpeningLength =
store.get('frontLegOpeningLength') +
store.get('backLegOpeningLength') +
store.get('gussetSideLength')
const waistBandLength = store.get('frontWaistBandLength') + store.get('backWaistBandLength')
points.elasticInfo = new Point(0, 0)
.attr('data-text', 'cutTwoPiecesOfElasticToFinishTheLegOpenings')
.attr('data-text', ':')
.attr('data-text', units(legOpeningLength * store.get('elasticScale') + 2 * sa))
.attr('data-text', '\n')
.attr('data-text', 'cutOnePieceOfElasticToFinishTheWaistBand')
.attr('data-text', ':')
.attr('data-text', units(waistBandLength * store.get('elasticScale') + 2 * sa))
// Draw a box around the text, so the part shows up correctly.
paths.box = new Path()
.move(new Point(-10, -10))
.line(new Point(-10, 15))
.line(new Point(200, 15))
.line(new Point(200, -10))
.close()
return part
},
}

340
designs/unice/src/front.mjs Normal file
View file

@ -0,0 +1,340 @@
import { pluginBundle } from '@freesewing/plugin-bundle'
export const front = {
name: 'unice.front',
measurements: ['waist', 'seat', 'waistToSeat', 'waistToUpperLeg', 'hips', 'waistToHips'],
optionalMeasurements: ['crossSeam', 'crossSeamFront'],
options: {
gussetShift: 0.015, // fraction of seat circumference - could be an advanced option?
gussetWidth: { pct: 7.2, min: 2, max: 12, menu: 'fit' }, // Gusset width in relation to waist-to-upperleg
gussetLength: { pct: 12.7, min: 10, max: 16, menu: 'fit' }, // Gusset length in relation to seat
fabricStretchX: { pct: 15, min: 0, max: 100, menu: 'fit' }, // horizontal stretch (range set wide for beta testing)
fabricStretchY: { pct: 0, min: 0, max: 100, menu: 'fit' }, // vertical stretch (range set wide for beta testing)
rise: { pct: 60, min: 30, max: 100, menu: 'style' }, // extending rise beyond 100% would require adapting paths.sideLeft!
legOpening: { pct: 45, min: 5, max: 85, menu: 'style' },
frontDip: { pct: 5.0, min: -5, max: 15, menu: 'style' },
taperToGusset: { pct: 70, min: 5, max: 100, menu: 'style' },
// booleans
useCrossSeam: { bool: true, menu: 'fit' },
adjustStretch: { bool: true, menu: 'fit' }, // to not stretch fabric to the limits
},
plugins: [pluginBundle],
draft: ({
utils,
store,
sa,
Point,
points,
Path,
paths,
options,
measurements,
complete,
paperless,
macro,
part,
}) => {
// Stretch utility method
// Use stretch inputs to calculate four different scale factors: horizontal/vertical and 'regular'/'reduced', depending on direction of the tension
// xScale: for parts that go across the body (= stretched horizontally)
// xScaleReduced: parts that are not under (horizontal) tension, e.g. the gusset
// yScale: for parts which are stretched vertically but not horizontally (anything below leg opening)
// yScaleReduced: parts which are already under horizontal stretch, which limits vertical stretch
if (options.adjustStretch) {
// roughly 15% of stretch is reserved for comfort
// horizontal: first, 'regular' stretch (for parts that go across the body)
if (options.fabricStretchX < 0.30) {
// subtract 15, but never go below 0
store.set('xScale', utils.stretchToScale(Math.max(0, options.fabricStretchX - 0.15)))
} else {
store.set('xScale', utils.stretchToScale(options.fabricStretchX / 2))
// rough approximation of rule of thumb quoted in Sanne's July 29, 2021 showcase
}
// use half of whatever the regular stretch is (no util available, convert from stretch to fraction manually
store.set('xScaleReduced', (1 + store.get('xScale')) / 2)
// vertical:
if (options.fabricStretchY < 0.30) {
// subtract 15, but never go below 0
store.set('yScale', utils.stretchToScale(Math.max(0, options.fabricStretchY - 0.15)))
} else {
store.set('yScale', utils.stretchToScale(options.fabricStretchY / 2))
// rough approximation of rule of thumb quoted in Sanne's July 29, 2021 showcase
}
// reduced vertical stretch calculated below, same as for non-adjusted case
} else {
// in order: regular, then reduced horizontal stretch, followed by regular vertical stretch
store.set('xScale', utils.stretchToScale(options.fabricStretchX))
store.set('xScaleReduced', utils.stretchToScale(options.fabricStretchX / 2))
store.set('yScale', utils.stretchToScale(options.fabricStretchY))
}
if (options.fabricStretchY < 0.20) {
store.set('yScaleReduced', 1)
} else {
// reduced yScale gradually increases from equivalent of stretch 0 to 5%, then cuts off (uses third-order polynomial)
// function to approximate Sanne's guidelines given in Discord (roughly 2.5% for stretch 30-40%, 5% above that)
store.set(
'yScaleReduced',
utils.stretchToScale(Math.min(0.05, 6.25 * Math.pow(options.fabricStretchY - 0.2, 3)))
)
}
// // temporarily overrule yScale and yScaleReduced
// store.set('yScale',1)
// store.set('yScaleReduced',1)
// // Part definition starts here
// determine height of front part: use cross seam (and cross seam front) if selected and available
// NOTE: neither crossSeam not frontHeight are adjusted for (vertical) stretch
if (options.useCrossSeam && measurements.crossSeam) {
store.set('crossSeam', measurements.crossSeam)
} else {
// use original approximation: front and back are roughly waistToUpperLeg high, plus gusset length
store.set(
'crossSeam',
measurements.waistToUpperLeg * (1 + options.backToFrontLength) +
options.gussetLength * measurements.seat
)
}
// optionally use crossSeamFront to determine relative length of front and back
// this does not account for vertical stretch yet
if (options.useCrossSeam && measurements.crossSeamFront) {
// subtract half the gusset length from cross seam front, and an additional 3.5% of the seat circumference to move the gusset upward (to match commercial panties)
store.set(
'frontHeight',
measurements.crossSeamFront -
measurements.seat * (0.5 * options.gussetLength + options.gussetShift)
)
} else {
// subtract gusset length, divide by roughly 2
store.set(
'frontHeight',
(store.get('crossSeam') - options.gussetLength * measurements.seat) /
(1 + options.backToFrontLength)
)
}
// Create points
// side seam is on a line from upper leg to seat to hips (optional?) to waist
points.frontWaistMid = new Point(measurements.seat / 4, 0)
points.frontWaistLeft = new Point(
measurements.seat / 4 - (measurements.waist / 4) * store.get('xScale'),
0
)
points.frontSeatLeft = new Point(
measurements.seat / 4 - (measurements.seat / 4) * store.get('xScale'),
measurements.waistToSeat * store.get('yScaleReduced')
)
points.frontUpperLegLeft = new Point(
measurements.seat / 4 - (measurements.seat / 4) * store.get('xScale'), // assume same circ. as seat
measurements.waistToUpperLeg * store.get('yScaleReduced')
)
points.frontHipLeft = new Point(
measurements.seat / 4 - (measurements.hips / 4) * store.get('xScale'),
measurements.waistToHips * store.get('yScaleReduced')
)
// use these points to define an invisible path
paths.sideLeft = new Path()
.move(points.frontUpperLegLeft)
.line(points.frontSeatLeft)
.line(points.frontHipLeft)
.line(points.frontWaistLeft)
.setHidden(true) // only show when debugging
/* Waist band is somewhere on the sideLeft path */
points.frontWaistBandLeft = paths.sideLeft.shiftFractionAlong(options.rise)
points.frontWaistBandRight = points.frontWaistBandLeft.flipX(points.frontWaistMid)
points.frontWaistBandMid = points.frontWaistBandLeft
.shiftFractionTowards(points.frontWaistBandRight, 0.5)
.shift(270, measurements.waistToUpperLeg * options.frontDip) /* Waist band dip */
/* Leg opening is also on the sideLeft path, and cannot be higher than rise */
/* Minimum side seam length is defined as 3.5% of the sideLeft path (which is at least waistToUpperLeg long) */
store.set('adjustedLegOpening', Math.min(options.legOpening, options.rise - 0.035)) // TODO: account for rise having a different domain
points.frontLegOpeningLeft = paths.sideLeft.shiftFractionAlong(store.get('adjustedLegOpening'))
points.frontLegOpeningRight = points.frontLegOpeningLeft.flipX(points.frontWaistMid) // Waist band low point
// calculate the actual front height, using yScale above and yScaleReduced below leg opening
store.set('frontHeightAbove', points.frontWaistLeft.dy(points.frontLegOpeningLeft))
var frontHeightBelow
frontHeightBelow =
store.get('yScale') *
(store.get('frontHeight') - store.get('frontHeightAbove') / store.get('yScaleReduced'))
var frontHeightReduced
frontHeightReduced = frontHeightBelow + store.get('frontHeightAbove')
// gusset width uses modified xScale (barely stretches) and depends on waistToUpperLeg - least sensitive to girth
points.frontGussetLeft = new Point(
measurements.seat / 4 -
measurements.waistToSeat * options.gussetWidth * store.get('xScaleReduced') * 2.2,
frontHeightReduced
)
points.frontGussetMid = new Point(measurements.seat / 4, frontHeightReduced)
/* Flip points to right side */
points.frontGussetRight = points.frontGussetLeft.flipX(points.frontWaistMid)
points.frontHipRight = points.frontSeatLeft.flipX(points.frontWaistMid)
points.frontWaistRight = points.frontWaistLeft.flipX(points.frontWaistMid)
console.log('points', points)
/* Middle point for label */
points.frontMidMid = points.frontLegOpeningLeft.shiftFractionTowards(
points.frontLegOpeningRight,
0.5
)
// Create control points
/* Control points for leg opening curves */
points.frontLegOpeningLeftCp1 = points.frontLegOpeningLeft.shift(
180,
points.frontGussetLeft.dy(points.frontLegOpeningLeft) / 3
)
/* Control point above gusset moves higher as taperToGusset (= front exposure) increases, but is limited by both the leg opening (allow minimal arching only) and the rise (leg opening must not intersect the waist band) */
points.frontGussetLeftCp1 = points.frontGussetLeft.shift(
270,
Math.max(
Math.max(
(points.frontGussetLeft.dy(points.frontWaistMid) * options.taperToGusset) / 2,
points.frontGussetLeft.dy(points.frontLegOpeningLeft) * 2
),
points.frontGussetLeft.dy(points.frontWaistBandMid)
)
)
/* Control point for waistband dip */
points.frontWaistBandLeftCp1 = points.frontWaistBandMid.shift(
0,
points.frontWaistBandMid.dx(points.frontWaistBandLeft) / 3
)
/* Flip control points to right side */
points.frontGussetRightCp1 = points.frontGussetLeftCp1.flipX(points.frontWaistMid)
points.frontLegOpeningRightCp1 = points.frontLegOpeningLeftCp1.flipX(points.frontWaistMid)
points.frontWaistBandRightCp1 = points.frontWaistBandLeftCp1.flipX(points.frontWaistMid)
// Draw paths
paths.seam = new Path()
.move(points.frontWaistBandMid)
.curve(points.frontWaistBandLeftCp1, points.frontWaistBandLeft, points.frontWaistBandLeft) // Waist band dip
.line(points.frontLegOpeningLeft)
.curve(points.frontLegOpeningLeftCp1, points.frontGussetLeftCp1, points.frontGussetLeft)
.line(points.frontGussetMid)
.line(points.frontGussetRight)
.curve(
points.frontGussetRightCp1,
points.frontLegOpeningRightCp1,
points.frontLegOpeningRight
)
.line(points.frontWaistBandRight)
.curve(points.frontWaistBandRight, points.frontWaistBandRightCp1, points.frontWaistBandMid) // Waist band dip
.close()
.attr('class', 'fabric')
// Store points for use in other parts
/* Store side seam points for use in back */
store.set('sideSeamWaist', points.frontWaistBandLeft)
store.set('sideSeamHip', points.frontLegOpeningLeft)
/* Store gusset points for use in gusset */
store.set('frontGussetLeft', points.frontGussetLeft)
store.set('frontGussetRight', points.frontGussetRight)
store.set('frontGussetMid', points.frontGussetMid)
/* Store lengths for use in elastic */
paths.frontLegOpening = new Path()
.move(points.frontGussetRight)
.curve(
points.frontGussetRightCp1,
points.frontLegOpeningRightCp1,
points.frontLegOpeningRight
)
.setHidden(true)
store.set('frontLegOpeningLength', paths.frontLegOpening.length())
paths.frontWaistBand = new Path()
.move(points.frontWaistBandRight)
.curve(points.frontWaistBandRightCp1, points.frontWaistBandLeftCp1, points.frontWaistBandLeft)
.setHidden(true)
store.set('frontWaistBandLength', paths.frontWaistBand.length())
// Complete?
if (complete) {
if (sa) {
paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
}
}
macro('title', {
at: points.frontMidMid,
nr: 1,
title: 'front',
})
macro('grainline', {
from: points.frontGussetMid,
to: points.frontGussetMid.shiftFractionTowards(points.frontWaistBandMid, 0.5),
})
// Paperless?
if (paperless) {
macro('hd', {
from: points.frontWaistBandRight,
to: points.frontWaistBandLeft,
y: points.frontWaistBandRight.y + sa - 15,
})
macro('hd', {
from: points.frontLegOpeningRight,
to: points.frontLegOpeningLeft,
y: points.frontLegOpeningRight.y + sa - 15,
})
macro('hd', {
from: points.frontGussetLeft,
to: points.frontGussetRight,
y: points.frontGussetLeft.y + sa + 15,
})
macro('vd', {
from: points.frontWaistBandMid,
to: points.frontGussetMid,
x: points.frontWaistBandMid.x + sa + 15,
})
macro('ld', {
from: points.frontWaistBandLeft,
to: points.frontLegOpeningLeft,
d: points.frontWaistBandLeft.y + sa - 15,
})
macro('pd', {
path: new Path()
.move(points.frontGussetRight)
.curve(
points.frontGussetRightCp1,
points.frontLegOpeningRightCp1,
points.frontLegOpeningRight
),
d: 15,
})
/* macro('vd', {
from: points.frontWaistBandLeft,
to: points.frontWaistBandMid,
x: points.frontWaistBandMid.x + sa + 15,
}) */
}
return part
},
}

View file

@ -0,0 +1,113 @@
import { back } from './back.mjs'
export const gusset = {
name: 'unice.gusset',
measurements: ['waist', 'seat', 'waistToSeat', 'waistToUpperLeg', 'hips', 'waistToHips'],
optionalMeasurements: ['crossSeam', 'crossSeamFront'],
options: {
gussetShift: 0.015, // fraction of seat circumference - could be an advanced option?
gussetWidth: { pct: 7.2, min: 2, max: 12, menu: 'fit' }, // Gusset width in relation to waist-to-upperleg
gussetLength: { pct: 12.7, min: 10, max: 16, menu: 'fit' }, // Gusset length in relation to seat
fabricStretch: { pct: 15, min: 0, max: 100, menu: 'fit' }, // used in Ursula
fabricStretchX: { pct: 15, min: 0, max: 100, menu: 'fit' }, // horizontal stretch (range set wide for beta testing)
fabricStretchY: { pct: 0, min: 0, max: 100, menu: 'fit' }, // vertical stretch (range set wide for beta testing)
rise: { pct: 60, min: 30, max: 100, menu: 'style' }, // extending rise beyond 100% would require adapting paths.sideLeft!
legOpening: { pct: 45, min: 5, max: 85, menu: 'style' },
frontDip: { pct: 5.0, min: -5, max: 15, menu: 'style' },
taperToGusset: { pct: 70, min: 5, max: 100, menu: 'style' },
// booleans
useCrossSeam: { bool: true, menu: 'fit' },
},
after: back,
draft: ({
store,
sa,
Point,
points,
Path,
paths,
options,
measurements,
complete,
paperless,
macro,
part,
}) => {
// Design pattern here
var yScaleDoubleLayer
yScaleDoubleLayer = (1 + store.get('yScale')) / 2 // double layer of fabric stretches half as much
// Create points
points.frontGussetLeft = new Point(store.get('frontGussetLeft').x, 0)
points.backGussetLeft = new Point(
store.get('backGussetLeft').x,
measurements.seat * options.gussetLength * yScaleDoubleLayer
)
points.frontGussetRight = new Point(store.get('frontGussetRight').x, 0)
points.backGussetRight = new Point(
store.get('backGussetRight').x,
measurements.seat * options.gussetLength * yScaleDoubleLayer
)
// Create control points
points.gussetCp1 = points.frontGussetLeft
.shiftFractionTowards(points.backGussetLeft, 0.5)
.shift(180, points.frontGussetRight.x / -15)
// Flip points to right side
points.gussetCp2 = points.gussetCp1.flipX(store.get('frontGussetMid'))
// Create point for title
points.frontMidMid = points.gussetCp1.shiftFractionTowards(points.gussetCp2, 0.5)
/* Store lengths for use in elastic */
paths.gussetLegOpening = new Path()
.move(points.backGussetRight)
.curve(points.backGussetRight, points.gussetCp2, points.frontGussetRight)
.setHidden(true)
store.set('gussetSideLength', paths.gussetLegOpening.length())
// Draw paths
paths.seam = new Path()
.move(points.frontGussetLeft)
.curve(points.gussetCp1, points.backGussetLeft, points.backGussetLeft)
.line(points.backGussetRight)
.curve(points.backGussetRight, points.gussetCp2, points.frontGussetRight)
.line(points.frontGussetLeft) // Without this, doesn't generate seam allowance
.close()
.attr('class', 'fabric')
// Complete?
if (complete) {
if (sa) {
paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa')
}
macro('title', {
at: points.frontMidMid,
nr: 3,
title: 'gusset',
})
}
// Paperless?
if (paperless) {
macro('hd', {
from: points.frontGussetLeft,
to: points.frontGussetRight,
y: points.frontGussetLeft.y + sa + 15,
})
macro('hd', {
from: points.backGussetLeft,
to: points.backGussetRight,
y: points.backGussetLeft.y + sa + 15,
})
macro('vd', {
from: points.frontGussetRight,
to: points.backGussetRight,
x: points.frontGussetRight.x + sa + 15,
})
}
return part
},
}

View file

@ -0,0 +1,15 @@
import { Design } from '@freesewing/core'
import { front } from './front.mjs'
import { back } from './back.mjs'
import { gusset } from './gusset.mjs'
import { elastic } from './elastic.mjs'
import { data } from '../data.mjs'
// Setup our new design
const Unice = new Design({
data,
parts: [front, back, gusset, elastic],
})
// Named exports
export { front, back, gusset, elastic, Unice }

View file

@ -0,0 +1,16 @@
// This file is auto-generated | Any changes you make will be overwritten.
import { Unice } from '../src/index.mjs'
// Shared tests
import { testPatternConfig } from '../../../tests/designs/config.mjs'
import { testPatternDrafting } from '../../../tests/designs/drafting.mjs'
//import { testPatternSampling } from '../../../tests/designs/sampling.mjs'
// Test config
testPatternConfig(Unice)
// Test drafting - Change the second parameter to `true` to log errors
testPatternDrafting(Unice, false)
// Test sampling - Change the second parameter to `true` to log errors
//testPatternSampling(Unice, false)

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,9 +0,0 @@
{
"presets": [
["@babel/preset-env", {
"modules": false
}],
"@babel/preset-react"
],
"plugins": ["@babel/plugin-proposal-class-properties"]
}

View file

@ -1,23 +0,0 @@
{
"parser": "babel-eslint",
"extends": [
"standard",
"standard-react"
],
"env": {
"es6": true
},
"plugins": [
"react"
],
"parserOptions": {
"sourceType": "module"
},
"rules": {
// don't force es6 functions to include space before paren
"space-before-function-paren": 0,
// allow specifying true explicitly for boolean props
"react/jsx-boolean-value": 0
}
}

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,5 +0,0 @@
{
"env": {
"jest": true
}
}

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,9 +0,0 @@
{
"presets": [
["@babel/preset-env", {
"modules": false
}],
"@babel/preset-react"
],
"plugins": ["@babel/plugin-proposal-class-properties"]
}

View file

@ -1,23 +0,0 @@
{
"parser": "babel-eslint",
"extends": [
"standard",
"standard-react"
],
"env": {
"es6": true
},
"plugins": [
"react"
],
"parserOptions": {
"sourceType": "module"
},
"rules": {
// don't force es6 functions to include space before paren
"space-before-function-paren": 0,
// allow specifying true explicitly for boolean props
"react/jsx-boolean-value": 0
}
}

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -57,6 +57,8 @@
] ]
}, },
"devDependencies": { "devDependencies": {
"@babel/eslint-parser": "^7.19.1",
"@babel/plugin-syntax-import-assertions": "^7.18.6",
"@commitlint/cli": "^17.0.2", "@commitlint/cli": "^17.0.2",
"@commitlint/config-conventional": "^17.0.2", "@commitlint/config-conventional": "^17.0.2",
"@types/express": "^4.17.13", "@types/express": "^4.17.13",
@ -74,6 +76,9 @@
"esbuild": "^0.15.3", "esbuild": "^0.15.3",
"esbuild-plugin-yaml": "^0.0.1", "esbuild-plugin-yaml": "^0.0.1",
"eslint": "^8.23.1", "eslint": "^8.23.1",
"eslint-config-next": "^12.3.1",
"eslint-plugin-jsonc": "^2.4.0",
"eslint-plugin-markdown": "^3.0.0",
"eslint-plugin-yaml": "^0.5.0", "eslint-plugin-yaml": "^0.5.0",
"esm": "^3.2.25", "esm": "^3.2.25",
"handlebars": "^4.7.7", "handlebars": "^4.7.7",

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,29 +1,23 @@
import { version } from '../package.json' assert { type: 'json' } import pkg from '../package.json' assert { type: 'json' }
import { config as bellaConfig } from '@freesewing/bella' import { config as bellaConfig } from '@freesewing/bella'
export default { export default {
name: '{{name}}', name: '{{name}}',
version, version: pkg.version,
optionGroups: { optionGroups: {
...bellaConfig.optionGroups, ...bellaConfig.optionGroups,
}, },
measurements: [ measurements: [...bellaConfig.measurements],
...bellaConfig.measurements,
],
dependencies: { dependencies: {
bellaFrontSideDart: 'bellaBack', bellaFrontSideDart: 'bellaBack',
}, },
inject: { inject: {
back: 'bellaBack', back: 'bellaBack',
front: 'bellaFrontSideDart' front: 'bellaFrontSideDart',
}, },
hide: [ hide: ['bellaBack', 'bellaFrontSideDart'],
'bellaBack',
'bellaFrontSideDart',
],
parts: [], parts: [],
options: { options: {
...bellaConfig.options, ...bellaConfig.options,
}, },
} }

View file

@ -1,15 +1,13 @@
import { version } from '../package.json' assert { type: 'json' } import pkg from '../package.json' assert { type: 'json' }
import { config as bentConfig } from '@freesewing/bent' import { config as bentConfig } from '@freesewing/bent'
export default { export default {
name: '{{name}}', name: '{{name}}',
version, version: pkg.version,
optionGroups: { optionGroups: {
...bentConfig.optionGroups, ...bentConfig.optionGroups,
}, },
measurements: [ measurements: [...bentConfig.measurements],
...bentConfig.measurements,
],
inject: { inject: {
bentBack: 'bentBase', bentBack: 'bentBase',
bentFront: 'bentBack', bentFront: 'bentBack',
@ -20,16 +18,8 @@ export default {
topSleeve: 'bentTopSleeve', topSleeve: 'bentTopSleeve',
underSleeve: 'bentUnderSleeve', underSleeve: 'bentUnderSleeve',
}, },
hide: [ hide: ['bentBase', 'bentFront', 'bentBack', 'bentSleeve', 'bentTopSleeve', 'bentUnderSleeve'],
'bentBase',
'bentFront',
'bentBack',
'bentSleeve',
'bentTopSleeve',
'bentUnderSleeve',
],
options: { options: {
...bentConfig.options, ...bentConfig.options,
}, },
} }

View file

@ -1,17 +1,14 @@
import { version } from '../package.json' assert { type: 'json' } import pkg from '../package.json' assert { type: 'json' }
import { config as breannaConfig } from '@freesewing/breanna' import { config as breannaConfig } from '@freesewing/breanna'
export default { export default {
name: '{{name}}', name: '{{name}}',
version, version: pkg.version,
optionGroups: { optionGroups: {
...breannaConfig.optionGroups, ...breannaConfig.optionGroups,
}, },
measurements: [ measurements: [...breannaConfig.measurements],
...breannaConfig.measurements, dependencies: {},
],
dependencies: {
},
inject: { inject: {
breannaBack: 'breannaBase', breannaBack: 'breannaBase',
breannaFrontBase: 'breannaBase', breannaFrontBase: 'breannaBase',
@ -34,4 +31,3 @@ export default {
...breannaConfig.options, ...breannaConfig.options,
}, },
} }

View file

@ -1,15 +1,13 @@
import { version } from '../package.json' assert { type: 'json' } import pkg from '../package.json' assert { type: 'json' }
import { config as brianConfig } from '@freesewing/brian' import { config as brianConfig } from '@freesewing/brian'
export default { export default {
name: '{{name}}', name: '{{name}}',
version, version: pkg.version,
optionGroups: { optionGroups: {
...brianConfig.optionGroups, ...brianConfig.optionGroups,
}, },
measurements: [ measurements: [...brianConfig.measurements],
...brianConfig.measurements,
],
dependencies: { dependencies: {
brianSleevecap: 'brianFront', brianSleevecap: 'brianFront',
}, },
@ -21,17 +19,9 @@ export default {
front: 'brianFront', front: 'brianFront',
sleeve: 'brianSleeve', sleeve: 'brianSleeve',
}, },
hide: [ hide: ['brianBase', 'brianFront', 'brianBack', 'brianSleevecap', 'brianSleeve', 'sleevecap'],
'brianBase',
'brianFront',
'brianBack',
'brianSleevecap',
'brianSleeve',
'sleevecap',
],
parts: [], parts: [],
options: { options: {
...brianConfig.options, ...brianConfig.options,
}, },
} }

View file

@ -1,8 +1,8 @@
import { version } from '../package.json' assert { type: 'json' } import pkg from '../package.json' assert { type: 'json' }
export default { export default {
name: '{{name}}', name: '{{name}}',
version, version: pkg.version,
optionGroups: { optionGroups: {
fit: ['size'], fit: ['size'],
}, },
@ -15,4 +15,3 @@ export default {
size: { pct: 50, min: 10, max: 100 }, size: { pct: 50, min: 10, max: 100 },
}, },
} }

View file

@ -1,15 +1,13 @@
import { version } from '../package.json' assert { type: 'json' } import pkg from '../package.json' assert { type: 'json' }
import { config as titanConfig } from '@freesewing/titan' import { config as titanConfig } from '@freesewing/titan'
export default { export default {
name: '{{name}}', name: '{{name}}',
version, version: pkg.version,
optionGroups: { optionGroups: {
...titanConfig.optionGroups, ...titanConfig.optionGroups,
}, },
measurements: [ measurements: [...titanConfig.measurements],
...titanConfig.measurements,
],
dependencies: { dependencies: {
titanFront: 'titanBack', titanFront: 'titanBack',
}, },
@ -17,12 +15,8 @@ export default {
front: 'titanFront', front: 'titanFront',
back: 'titanBack', back: 'titanBack',
}, },
hide: [ hide: ['titanFront', 'titanBack'],
'titanFront',
'titanBack',
],
options: { options: {
...titanConfig.options, ...titanConfig.options,
}, },
} }

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,18 +0,0 @@
env:
browser: true
es2021: true
extends: eslint:recommended
overrides:
- files: ["*.yaml", "*.yml"]
plugins: ["yaml"]
extends: ["plugin:yaml/recommended"]
parserOptions:
ecmaVersion: latest
sourceType: module
rules: {}
globals:
it: readonly
describe: readonly
process: readonly
__dirname: readonly

View file

@ -1,4 +0,0 @@
{
"presets": ["@babel/preset-env"]
}

Some files were not shown because too many files have changed in this diff Show more