From aae034302aea725daa17b1bcdb257fe2d95cb115 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Sun, 12 Nov 2023 23:43:29 +0000 Subject: [PATCH 01/28] waistReduction --- config/software/designs.json | 79 +++- designs/lumina/CHANGELOG.md | 17 + designs/lumina/README.md | 143 +++++++ designs/lumina/build.mjs | 35 ++ designs/lumina/data.mjs | 4 + designs/lumina/i18n/de.json | 7 + designs/lumina/i18n/en.json | 7 + designs/lumina/i18n/es.json | 7 + designs/lumina/i18n/fr.json | 7 + designs/lumina/i18n/index.mjs | 8 + designs/lumina/i18n/nl.json | 7 + designs/lumina/i18n/uk.json | 7 + designs/lumina/package.json | 73 ++++ designs/lumina/src/index.mjs | 22 ++ designs/lumina/src/ipoints.mjs | 495 +++++++++++++++++++++++ designs/lumina/src/leg.mjs | 19 + designs/lumina/src/panel.mjs | 17 + designs/lumina/src/points.mjs | 498 +++++++++++++++++++++++ designs/lumina/src/side.mjs | 52 +++ designs/lumina/src/zpoints.mjs | 565 +++++++++++++++++++++++++++ designs/lumina/tests/shared.test.mjs | 20 + sites/lab/pages/new/lumina.mjs | 41 ++ sites/shared/i18n/designs.mjs | 2 + 23 files changed, 2114 insertions(+), 18 deletions(-) create mode 100644 designs/lumina/CHANGELOG.md create mode 100644 designs/lumina/README.md create mode 100644 designs/lumina/build.mjs create mode 100644 designs/lumina/data.mjs create mode 100644 designs/lumina/i18n/de.json create mode 100644 designs/lumina/i18n/en.json create mode 100644 designs/lumina/i18n/es.json create mode 100644 designs/lumina/i18n/fr.json create mode 100644 designs/lumina/i18n/index.mjs create mode 100644 designs/lumina/i18n/nl.json create mode 100644 designs/lumina/i18n/uk.json create mode 100644 designs/lumina/package.json create mode 100644 designs/lumina/src/index.mjs create mode 100644 designs/lumina/src/ipoints.mjs create mode 100644 designs/lumina/src/leg.mjs create mode 100644 designs/lumina/src/panel.mjs create mode 100644 designs/lumina/src/points.mjs create mode 100644 designs/lumina/src/side.mjs create mode 100644 designs/lumina/src/zpoints.mjs create mode 100644 designs/lumina/tests/shared.test.mjs create mode 100644 sites/lab/pages/new/lumina.mjs diff --git a/config/software/designs.json b/config/software/designs.json index 5341adbed82..4075baf7eb1 100644 --- a/config/software/designs.json +++ b/config/software/designs.json @@ -554,14 +554,25 @@ ] }, "onyx": { - "lab": true, - "org": true, - "description": "A FreeSewing pattern for one-piece garments", "code": "Thrunic", + "description": "A FreeSewing pattern for one-piece garments", "design": "Thrunic", "difficulty": 4, - "tags": ["swimwear", "pajamas", "onePiece"], - "techniques": ["hem", "curvedSeam", "stretch", "lining", "zipper", "ribbing"] + "lab": true, + "org": true, + "tags": [ + "swimwear", + "pajamas", + "onePiece" + ], + "techniques": [ + "hem", + "curvedSeam", + "stretch", + "lining", + "zipper", + "ribbing" + ] }, "paco": { "code": "Joost De Cock", @@ -633,14 +644,22 @@ ] }, "shelly": { - "lab": true, - "org": true, - "description": "A FreeSewing pattern for a raglan shirt, perfect for swimshirts", "code": "Thrunic", + "description": "A FreeSewing pattern for a raglan shirt, perfect for swimshirts", "design": "Thrunic", "difficulty": 2, - "tags": ["tops", "swimwear"], - "techniques": ["hem", "stretch", "curvedSeam", "raglanSleeve"] + "lab": true, + "org": true, + "tags": [ + "tops", + "swimwear" + ], + "techniques": [ + "hem", + "stretch", + "curvedSeam", + "raglanSleeve" + ] }, "shin": { "code": "Joost De Cock", @@ -699,14 +718,20 @@ ] }, "skully": { - "description": "A FreeSewing pattern for skully, our logo, a plushy toy", "code": "Wouter Van Wageningen", + "description": "A FreeSewing pattern for skully, our logo, a plushy toy", "design": "Wouter Van Wageningen", "difficulty": 4, "lab": true, "org": true, - "tags": ["accessories", "toys"], - "techniques": ["curvedSeam", "precision"] + "tags": [ + "accessories", + "toys" + ], + "techniques": [ + "curvedSeam", + "precision" + ] }, "sven": { "code": "Joost De Cock", @@ -860,7 +885,11 @@ "bottoms", "trousers" ], - "techniques": ["curvedSeam", "hem", "weltPocket"] + "techniques": [ + "curvedSeam", + "hem", + "weltPocket" + ] }, "yuri": { "code": "Hellgy", @@ -880,13 +909,27 @@ ] }, "otis": { - "description": "A FreeSewing pattern for a baby romper", "code": "Wouter Van Wageningen", + "description": "A FreeSewing pattern for a baby romper", "design": "Wouter Van Wageningen", "difficulty": 2, "lab": true, "org": true, - "tags": [ ], - "techniques": [ ] + "tags": [], + "techniques": [] + }, + "lumina": { + "code": "Coder name", + "description": "A FreeSewing pattern that needs a description", + "design": "Designer name", + "difficulty": 1, + "lab": true, + "org": false, + "tags": [ + "tagname" + ], + "techniques": [ + "techname" + ] } -} +} \ No newline at end of file diff --git a/designs/lumina/CHANGELOG.md b/designs/lumina/CHANGELOG.md new file mode 100644 index 00000000000..c077f713761 --- /dev/null +++ b/designs/lumina/CHANGELOG.md @@ -0,0 +1,17 @@ +# Change log for: @freesewing/lumina + + +## 3.0.0 (2022-09-30) + +### Changed + + - All FreeSewing pacakges are now ESM only. + - All FreeSewing pacakges now use named exports. + - Dropped support for NodeJS 14. NodeJS 18 (LTS/hydrogen) or more recent is now required. + + +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. + diff --git a/designs/lumina/README.md b/designs/lumina/README.md new file mode 100644 index 00000000000..b39499c4729 --- /dev/null +++ b/designs/lumina/README.md @@ -0,0 +1,143 @@ +![FreeSewing](https://static.freesewing.org/banner.png) +

@freesewing/lumina on NPM + License: MIT + Code quality on DeepScan + Open issues tagged pkg:lumina + All Contributors +

Follow @freesewing_org on Twitter + Chat with us on Discord + Become a FreeSewing Patron + Follow @freesewing_org on Twitter +

+ +# @freesewing/lumina + +A FreeSewing pattern that needs a description + + + + +## What am I looking at? 🤔 + +This repository is the FreeSewing *monorepo* holding all FreeSewing's websites, documentation, designs, plugins, and other NPM packages. + +This folder holds: @freesewing/lumina + +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/# 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 +sewing patterns adapted to your measurements. + +If you're a developer, the FreeSewing documentation lives at [freesewing.dev](https://freesewing.dev/). +The FreeSewing [core library](https://freesewing.dev/reference/api/) is a *batteries-included* toolbox +for parametric design of sewing patterns. But FreeSewing also provides 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 +``` + +Getting started guides are available for: +- [Linux](https://freesewing.dev/tutorials/getting-started-linux/) +- [MacOS](https://freesewing.dev/tutorials/getting-started-mac/) +- [Windows](https://freesewing.dev/tutorials/getting-started-windows/) + +The [pattern design tutorial](https://freesewing.dev/tutorials/pattern-design/) will +show you how to create your first parametric design. + +## Support FreeSewing: Become a patron 🥰 + +FreeSewing is an open source project maintained by Joost De Cock and financially supported by the FreeSewing patrons. + +If you feel FreeSewing is worthwhile, and you can spend a few coins without +hardship, then you should [join us and become a patron](https://freesewing.org/community/join). + +## Links 👩‍💻 + +**Official channels** + + - 💻 Makers website: [FreeSewing.org](https://freesewing.org) + - 💻 Developers website: [FreeSewing.dev](https://freesewing.dev) + - ✅ [Support](https://github.com/freesewing/freesewing/issues/new/choose), + [Issues](https://github.com/freesewing/freesewing/issues) & + [Discussions](https://github.com/freesewing/freesewing/discussions) on + [GitHub](https://github.com/freesewing/freesewing) + +**Social media** + + - 🐦 Twitter: [@freesewing_org](https://twitter.com/freesewing_org) + - 📷 Instagram: [@freesewing_org](https://instagram.com/freesewing_org) + +**Places the FreeSewing community hangs out** + + - 💬 [Discord](https://discord.freesewing.org/) + - 💬 [Facebook](https://www.facebook.com/groups/627769821272714/) + - 💬 [Reddit](https://www.reddit.com/r/freesewing/) + +## 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 🤯 + +For [Support](https://github.com/freesewing/freesewing/issues/new/choose), +please use the [Issues](https://github.com/freesewing/freesewing/issues) & +[Discussions](https://github.com/freesewing/freesewing/discussions) on +[GitHub](https://github.com/freesewing/freesewing). + diff --git a/designs/lumina/build.mjs b/designs/lumina/build.mjs new file mode 100644 index 00000000000..99ace216bc8 --- /dev/null +++ b/designs/lumina/build.mjs @@ -0,0 +1,35 @@ +/* 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 +const build = async () => { + const result = await esbuild.build(options).catch(() => process.exit(1)) + + if (process.env.VERBOSE) { + const info = await esbuild.analyzeMetafile(result.metafile) + console.log(info) + } +} +build() diff --git a/designs/lumina/data.mjs b/designs/lumina/data.mjs new file mode 100644 index 00000000000..07613cf0741 --- /dev/null +++ b/designs/lumina/data.mjs @@ -0,0 +1,4 @@ +// This file is auto-generated | All changes you make will be overwritten. +export const name = '@freesewing/lumina' +export const version = '3.0.0' +export const data = { name, version } diff --git a/designs/lumina/i18n/de.json b/designs/lumina/i18n/de.json new file mode 100644 index 00000000000..8cf0182cebd --- /dev/null +++ b/designs/lumina/i18n/de.json @@ -0,0 +1,7 @@ +{ + "t": "Lumina", + "d": "A FreeSewing pattern that needs a description", + "p": { }, + "s": { }, + "o": { } +} diff --git a/designs/lumina/i18n/en.json b/designs/lumina/i18n/en.json new file mode 100644 index 00000000000..8cf0182cebd --- /dev/null +++ b/designs/lumina/i18n/en.json @@ -0,0 +1,7 @@ +{ + "t": "Lumina", + "d": "A FreeSewing pattern that needs a description", + "p": { }, + "s": { }, + "o": { } +} diff --git a/designs/lumina/i18n/es.json b/designs/lumina/i18n/es.json new file mode 100644 index 00000000000..8cf0182cebd --- /dev/null +++ b/designs/lumina/i18n/es.json @@ -0,0 +1,7 @@ +{ + "t": "Lumina", + "d": "A FreeSewing pattern that needs a description", + "p": { }, + "s": { }, + "o": { } +} diff --git a/designs/lumina/i18n/fr.json b/designs/lumina/i18n/fr.json new file mode 100644 index 00000000000..8cf0182cebd --- /dev/null +++ b/designs/lumina/i18n/fr.json @@ -0,0 +1,7 @@ +{ + "t": "Lumina", + "d": "A FreeSewing pattern that needs a description", + "p": { }, + "s": { }, + "o": { } +} diff --git a/designs/lumina/i18n/index.mjs b/designs/lumina/i18n/index.mjs new file mode 100644 index 00000000000..36aac928b67 --- /dev/null +++ b/designs/lumina/i18n/index.mjs @@ -0,0 +1,8 @@ +import en from './en.json' assert { type: 'json' } +import de from './de.json' assert { type: 'json' } +import es from './es.json' assert { type: 'json' } +import fr from './fr.json' assert { type: 'json' } +import nl from './nl.json' assert { type: 'json' } +import uk from './uk.json' assert { type: 'json' } + +export const i18n = { en, de, es, fr, nl, uk } diff --git a/designs/lumina/i18n/nl.json b/designs/lumina/i18n/nl.json new file mode 100644 index 00000000000..8cf0182cebd --- /dev/null +++ b/designs/lumina/i18n/nl.json @@ -0,0 +1,7 @@ +{ + "t": "Lumina", + "d": "A FreeSewing pattern that needs a description", + "p": { }, + "s": { }, + "o": { } +} diff --git a/designs/lumina/i18n/uk.json b/designs/lumina/i18n/uk.json new file mode 100644 index 00000000000..8cf0182cebd --- /dev/null +++ b/designs/lumina/i18n/uk.json @@ -0,0 +1,7 @@ +{ + "t": "Lumina", + "d": "A FreeSewing pattern that needs a description", + "p": { }, + "s": { }, + "o": { } +} diff --git a/designs/lumina/package.json b/designs/lumina/package.json new file mode 100644 index 00000000000..a9bbafb3063 --- /dev/null +++ b/designs/lumina/package.json @@ -0,0 +1,73 @@ +{ + "name": "@freesewing/lumina", + "version": "3.0.0", + "description": "A FreeSewing pattern that needs a description", + "author": "Joost De Cock (https://github.com/joostdecock)", + "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": { + ".": { + "internal": "./src/index.mjs", + "default": "./dist/index.mjs" + } + }, + "scripts": { + "build": "node build.mjs", + "build:all": "yarn build", + "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": "NODE_OPTIONS=\"--conditions=internal\" npx mocha tests/*.test.mjs --reporter ../../tests/reporters/terse.js", + "wbuild": "node build.mjs", + "wbuild:all": "yarn wbuild" + }, + "peerDependencies": { + "@freesewing/core": "3.0.0" + }, + "dependencies": {}, + "devDependencies": { + "mocha": "10.2.0", + "chai": "4.3.10", + "@freesewing/models": "3.0.0", + "@freesewing/plugin-timing": "3.0.0" + }, + "files": [ + "dist/*", + "README.md" + ], + "publishConfig": { + "access": "public", + "tag": "latest" + }, + "engines": { + "node": "18", + "npm": "9" + } +} diff --git a/designs/lumina/src/index.mjs b/designs/lumina/src/index.mjs new file mode 100644 index 00000000000..84cff6d4ddf --- /dev/null +++ b/designs/lumina/src/index.mjs @@ -0,0 +1,22 @@ +// + +import { Design } from '@freesewing/core' +import { i18n } from '../i18n/index.mjs' +import { data } from '../data.mjs' +// Parts +import { points } from './points.mjs' +import { ipoints } from './ipoints.mjs' +import { zpoints } from './zpoints.mjs' +import { panel } from './panel.mjs' +import { leg } from './leg.mjs' + +// Create new design +const Lumina = new Design({ + data, + parts: [/*zpoints, ipoints,*/ points, panel, leg], +}) + +// Named exports +export { /*zpoints, ipoints,*/ points, panel, leg, i18n, Lumina } + +// http://localhost:8000/new/lumina#view=%22inspect%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A960%2C%22waistBack%22%3A440%2C%22hips%22%3A884%2C%22seat%22%3A980%2C%22seatBack%22%3A490%2C%22inseam%22%3A790%2C%22waistToSeat%22%3A230%2C%22waistToUpperLeg%22%3A280%2C%22waistToKnee%22%3A610%2C%22waistToHips%22%3A120%2C%22waistToFloor%22%3A1090%2C%22knee%22%3A415%2C%22ankle%22%3A230%2C%22crossSeam%22%3A800%2C%22crossSeamFront%22%3A380%2C%22heel%22%3A300%2C%22upperLeg%22%3A640%7D%7D diff --git a/designs/lumina/src/ipoints.mjs b/designs/lumina/src/ipoints.mjs new file mode 100644 index 00000000000..68e13f61532 --- /dev/null +++ b/designs/lumina/src/ipoints.mjs @@ -0,0 +1,495 @@ +export const ipoints = { + name: 'lumina.ipoints', + measurements: [ + 'waist', + 'waistBack', + 'hips', + 'seat', + 'seatBack', + 'inseam', + 'waistToSeat', + 'waistToUpperLeg', + 'waistToKnee', + 'waistToHips', + 'waistToFloor', + 'knee', + 'ankle', + 'crossSeam', + 'crossSeamFront', + 'heel', + 'upperLeg', + ], + options: { + ease: { pct: -20, min: -35, max: 10, menu: 'fit' }, + crossSeamAngle: 35, + crotchToKnee: 0.4, + waistToKneeCP: 0.4, + kneeToWaistLength: 400, + crotchPointsCP: 2, + }, + draft: ({ + measurements, + options, + Point, + Path, + points, + paths, + Snippet, + snippets, + utils, + log, + complete, + sa, + paperless, + macro, + part, + }) => { + return part.hide() + + const ControlPoints = (p1, p2, p3, t) => { + let a = Math.abs(p2.angle(p1) - p2.angle(p3)) / 2 + console.log({ t: t, ap2_1: p2.angle(p1), ap2_3: p2.angle(p3), a: a }) + const t1 = p2.shift(p2.angle(p1) + a - 90, p2.dist(p1) / 3) + const t3 = p2.shift(p2.angle(p3) - a + 90, p2.dist(p3) / 3) + console.log({ t: t, ap2_t1: p2.angle(t1), ap2_t3: p2.angle(t3), a: a }) + return { + cp1: p2.shift(p2.angle(p1) + a - 90, p2.dist(p1) / 3), + cp3: p2.shift(p2.angle(p3) - a + 90, p2.dist(p3) / 3), + } + } + const CreateControlPoints = (names) => { + for (var i = 1; i < names.length - 1; i++) { + var cp = ControlPoints(points[names[i - 1]], points[names[i]], points[names[i + 1]]) + points[names[i] + 'Cp1'] = cp.cp1 + points[names[i] + 'Cp2'] = cp.cp3 + } + } + const CreatePath = (pathName, names) => { + console.log({ i: 1, n: names[1], p2: points[names[1] + 'Cp2'], p3: points[names[1]] }) + paths[pathName] = new Path() + .move(points[names[0]]) + ._curve(points[names[1] + 'Cp1'], points[names[1]]) + console.log({ s: 0, l: paths[pathName].length() }) + for (var i = 2; i < names.length - 1; i++) { + console.log({ + i: i, + n: names[i], + p1: points[names[i - 1] + 'Cp1'], + p2: points[names[i] + 'Cp2'], + p3: points[names[i]], + }) + paths[pathName].curve( + points[names[i - 1] + 'Cp2'], + points[names[i] + 'Cp1'], + points[names[i]] + ) + console.log({ + s: i - 1, + l: new Path() + .move(points[names[i - 1]]) + .curve(points[names[i - 1] + 'Cp2'], points[names[i] + 'Cp1'], points[names[i]]) + .length(), + }) + } + console.log({ i: i, n: names[i], p2: points[names[i] + 'Cp2'], p3: points[names[i]] }) + paths[pathName].curve_(points[names[i - 1] + 'Cp2'], points[names[i]]) + } + + const CreateWaistPoint = (m, options, points, utils, front) => { + const kneeTemp = points.upperleg.shiftFractionTowards(points.knee, options.crotchToKnee) + const angle = + 90 + + (front + ? options.crossSeamAngle * (m.waistBack / m.waist) + : -1 * options.crossSeamAngle * (1 - m.waistBack / m.waist)) + const crossSeam = front ? m.crossSeamFront : m.crossSeam - m.crossSeamFront + var kneeToWaist = m.waistToKnee + var ratio = 1 + var waist = kneeTemp.shift(angle, kneeToWaist * ratio) + const crossSeamCp = points.upperleg.shiftFractionTowards( + utils.beamIntersectsY(kneeTemp, waist, 0), + options.crotchPointsCP + ) + + console.log({ f: front, a: angle }) + var waistCp + var diff, + iter = 0 + do { + waist = kneeTemp.shift(angle, kneeToWaist * ratio * (ratio < 1 ? 1.05 : 0.95)) + // waistCp = waist.shiftFractionTowards(kneeTemp, options.waistToKneeCP) + waistCp = waist.shiftFractionTowards(points.knee, options.waistToKneeCP) + + const crossSeamPath = new Path().move(points.upperleg).curve(crossSeamCp, waistCp, waist) + + diff = crossSeam - crossSeamPath.length() + ratio = crossSeam / crossSeamPath.length() + // console.log({ i: iter, d: diff, r: ratio }) + } while (++iter < 100 && (diff > 1 || diff < -1)) + if (iter >= 100) { + console.log('Too many iterations trying to make it fit!') + // log.error('Too many iterations trying to make it fit!') + } + + if (front) { + points.waistFront = waist.clone() + points.waistFrontCp = waistCp.clone() + points.crossSeamFrontCp = crossSeamCp.clone() + } else { + points.waistBack = waist.clone() + points.waistBackCp = waistCp.clone() + points.crossSeamBackCp = crossSeamCp.clone() + } + } + + const m = measurements + const crotchOffset = m.waistToFloor - m.inseam + + const waistFrontBackRatio = m.waistBack / m.waist + const sideRatio = 3 / 5 + const ease = options.ease + 1 + + m['waistToAnkle'] = m.waistToFloor - m.heel / Math.PI + + console.log({ m: JSON.parse(JSON.stringify(m)) }) + console.log({ wfr: waistFrontBackRatio }) + // points.origin = new Point(0, 0) + // points.knee = points.origin.shift(270, m.inseam - (m.waistToFloor - m.waistToKnee)) + // points.ankle = points.origin.shift(270, m.inseam - (m.ankle / Math.PI)) + // points.waist = points.origin.shift(90, m.waistToFloor - m.inseam) + + points.upperlegFront = points.upperlegBack = points.upperleg = new Point(0, 0) + points.kneeFront = + points.kneeBack = + points.knee = + points.upperleg.shift(270, m.waistToKnee - crotchOffset) + points.ankleFront = + points.ankleBack = + points.ankle = + points.upperleg.shift(270, m.inseam - m.heel / Math.PI) + points.floorFront = points.floorBack = points.floor = points.upperleg.shift(270, m.inseam) + + // points.waistTemp = points.upperleg.shiftFractionTowards(points.knee,options.crotchToKnee).shift(90 + options.crossSeamAngle*(m.waistBack/m.waist), options.kneeToWaistLength) + // paths.waistTemp = new Path() + // .move(points.upperleg.shiftFractionTowards(points.knee,options.crotchToKnee)) + // .line(points.waistTemp) + // points.upperlegFrontCp = utils.beamIntersectsY(points.kneeTemp,points.waistTempFront,0) + // points.upperlegBackCp = utils.beamIntersectsY(points.kneeTemp,points.waistTempBack,0) + + CreateWaistPoint(m, options, points, utils, true) + CreateWaistPoint(m, options, points, utils, false) + + // paths.waistTempCp = new Path() + // .move(points.upperleg) + // .line(points.crossSeamFrontCp) + + console.log({ pionts: JSON.parse(JSON.stringify(points)) }) + + paths.middle = new Path().move(points.upperleg).line(points.floor) + + paths.crossSeamFront = new Path() + .move(points.upperleg) + .curve(points.crossSeamFrontCp, points.waistFrontCp, points.waistFront) + paths.crossSeamBack = new Path() + .move(points.upperleg) + .curve(points.crossSeamBackCp, points.waistBackCp, points.waistBack) + + let csFront = paths.crossSeamFront.length() + let csBack = paths.crossSeamBack.length() + + console.log({ csf: m.crossSeamFront, csFront: csFront }) + + const waistAngle = utils.rad2deg( + Math.asin((points.waistBack.y - points.waistFront.y) / (m.waist / 2)) + ) + + console.log({ + r: m.crossSeamFront / m.waistToUpperLeg, + S: m.waistToSeat * (m.crossSeamFront / m.waistToUpperLeg), + H: m.waistToHips * (m.crossSeamFront / m.waistToUpperLeg), + }) + points.seatFront = paths.crossSeamFront + .reverse() + .shiftAlong(m.waistToSeat /* * (m.crossSeamFront / m.waistToUpperLeg) */) + .addCircle(6) + points.hipsFront = paths.crossSeamFront + .reverse() + .shiftAlong(m.waistToHips /* * (m.crossSeamFront / m.waistToUpperLeg) */) + .addCircle(10) + points.seatBack = paths.crossSeamBack + .reverse() + .shiftAlong(m.waistToSeat /* * (m.waistToSeat / m.waistToUpperLeg) */) + .addCircle(6) + points.hipsBack = paths.crossSeamBack + .reverse() + .shiftAlong(m.waistToHips /* * (m.waistToSeat / m.waistToUpperLeg) */) + .addCircle(10) + + points.waistFrontSeam = points.waistFront.shift( + 180 + waistAngle, + ((m.waist - m.waistBack) * ease) / 2 + ) + points.waistBackSeam = points.waistBack.shift(waistAngle, (m.waistBack * ease) / 2) + points.seatFrontSeam = points.seatFront.shift( + 180 + waistAngle, + ((m.seat - m.seatBack) * ease) / 2 + ) + points.seatBackSeam = points.seatBack.shift(waistAngle, (m.seatBack * ease) / 2) + points.upperlegFrontSeam = points.upperleg.shift(180 + waistAngle, (m.upperLeg * ease) / 2) + points.upperlegBackSeam = points.upperleg.shift(waistAngle, (m.upperLeg * ease) / 2) + points.kneeFrontSeam = points.knee.shift(180, (m.knee * ease) / 2) + points.kneeBackSeam = points.knee.shift(0, (m.knee * ease) / 2) + points.ankleFrontSeam = points.ankle.shift(180, (m.ankle * ease) / 2) + points.ankleBackSeam = points.ankle.shift(0, (m.ankle * ease) / 2) + + const sideFixed = points.waistFrontSeam.dist( + points.waistFront.shiftFractionTowards(points.waistFrontSeam, sideRatio) + ) + + paths.front = new Path() + .move(points.ankleFrontSeam) + .line(points.kneeFrontSeam) + .line(points.upperlegFrontSeam) + .line(points.seatFrontSeam) + .line(points.waistFrontSeam) + paths.back = new Path() + .move(points.ankleBackSeam) + .line(points.kneeBackSeam) + .line(points.upperlegBackSeam) + .line(points.seatBackSeam) + .line(points.waistBackSeam) + + const ShiftPathPoints = (path, ratio, names) => { + if (names.length < 2) return + for (var i = names.length - 2; i >= 0; i--) { + console.log({ n1: names[i].toLowerCase() + path, n2: names[i + 1].toLowerCase() + path }) + console.log({ + p1: points[names[i].toLowerCase() + path], + p2: points[names[i + 1].toLowerCase() + path], + }) + console.log({ + lb: points[names[i].toLowerCase() + path].dist(points[names[i + 1].toLowerCase() + path]), + }) + points[names[i].toLowerCase() + path] = points[ + names[i].toLowerCase() + path + ].shiftFractionTowards(points[names[i + 1].toLowerCase() + path], ratio) + console.log({ + la: points[names[i].toLowerCase() + path].dist(points[names[i + 1].toLowerCase() + path]), + }) + } + } + const shiftRatio = + 1 - (m.waistToFloor - points.floorFront.dist(points.ankleFront)) / paths.front.length() + console.log({ shiftRatio: shiftRatio }) + ShiftPathPoints('FrontSeam', shiftRatio, [ + 'Waist', + /*'Hips',*/ 'Seat', + 'UpperLeg', + 'Knee', + 'Ankle', + ]) + + // points.waistFrontSplit = points.waistFront.shiftFractionTowards(points.waistFrontSeam, sideRatio) + points.waistFrontSplit = points.waistFrontSeam.shiftTowards(points.waistFront, sideFixed) + // points.waistBackSplit = points.waistBack.shiftFractionTowards(points.waistBackSeam, sideRatio) + points.waistBackSplit = points.waistBackSeam.shiftTowards(points.waistBack, sideFixed) + points.seatFrontSplit = points.seatFrontSeam.shiftTowards(points.seatFront, sideFixed) + points.seatBackSplit = points.seatBackSeam.shiftTowards(points.seatBack, sideFixed) + // points.upperlegFrontSplit = points.upperleg.shiftFractionTowards(points.upperlegFront, sideRatio) + points.upperlegFrontSplit = points.upperlegFrontSeam.shiftTowards(points.upperleg, sideFixed) + // points.upperlegBackSplit = points.upperleg.shiftFractionTowards(points.upperlegBack, sideRatio) + points.upperlegBackSplit = points.upperlegBackSeam.shiftTowards(points.upperleg, sideFixed) + points.kneeFrontSplit = points.knee.shiftFractionTowards(points.kneeFrontSeam, sideRatio) + // points.kneeFrontSplit = points.kneeFront.shiftTowards(points.knee, sideFixed) + points.kneeBackSplit = points.knee.shiftFractionTowards(points.kneeBackSeam, sideRatio) + // points.kneeBackSplit = points.kneeBack.shiftTowards(points.knee, sideFixed) + points.ankleFrontSplit = points.ankle.shiftFractionTowards(points.ankleFrontSeam, sideRatio) + // points.ankleFrontSplit = points.ankleFront.shiftTowards(points.ankle, sideFixed) + points.ankleBackSplit = points.ankle.shiftFractionTowards(points.ankleBackSeam, sideRatio) + // points.ankleBackSplit = points.ankleBack.shiftTowards(points.ankle, sideFixed) + + points.seatFrontSplit = utils + .beamsIntersect( + points.seatFront, + points.seatFrontSeam, + points.waistFrontSplit, + points.upperlegFrontSplit + ) + .addCircle(8) + + CreateControlPoints([ + 'waistFrontSplit', + 'seatFrontSplit', + 'upperlegFrontSplit', + 'kneeFrontSplit', + 'ankleFrontSplit', + ]) + + CreatePath('frontSplit', [ + 'waistFrontSplit', + 'seatFrontSplit', + 'upperlegFrontSplit', + 'kneeFrontSplit', + 'ankleFrontSplit', + ]) + + CreateControlPoints([ + 'waistBackSplit', + // 'seatBackSplit', + 'upperlegBackSplit', + 'kneeBackSplit', + 'ankleBackSplit', + ]) + + CreatePath('BackSplit', [ + 'waistBackSplit', + // 'seatBackSplit', + 'upperlegBackSplit', + 'kneeBackSplit', + 'ankleBackSplit', + ]) + + points.seatBackSplit = utils + .beamIntersectsCurve( + points.seatBack, + points.seatBackSeam, + points.waistBackSplit, + points.waistBackSplit, + points.upperlegBackSplitCp1, + points.upperlegBackSplit + ) + .addCircle(8) + + var cp = ControlPoints(points.waistFrontSplit, points.upperlegFrontSplit, points.kneeFrontSplit) + points.upperlegFrontCp1 = cp.cp1 + points.upperlegFrontCp2 = cp.cp3 + cp = ControlPoints(points.waistBackSplit, points.upperlegBackSplit, points.kneeBackSplit) + points.upperlegBackCp1 = cp.cp1 + points.upperlegBackCp2 = cp.cp3 + cp = ControlPoints(points.upperlegFrontSplit, points.kneeFrontSplit, points.ankleFrontSplit) + points.kneeFrontCp1 = cp.cp1 + points.kneeFrontCp2 = cp.cp3 + cp = ControlPoints(points.upperlegBackSplit, points.kneeBackSplit, points.ankleBackSplit) + points.kneeBackCp1 = cp.cp1 + points.kneeBackCp2 = cp.cp3 + + console.log({ pins: JSON.parse(JSON.stringify(points)) }) + + paths.frontZ = paths.front.reverse() + points.seatZ = paths.frontZ.shiftAlong(m.waistToSeat).addCircle(4) + points.hipsZ = paths.frontZ.shiftAlong(m.waistToHips).addCircle(4) + points.upperlegZ = paths.frontZ.shiftAlong(m.waistToUpperLeg).addCircle(4) + points.kneeZ = paths.frontZ.shiftAlong(m.waistToKnee).addCircle(4) + points.ankleZ = paths.frontZ + .shiftAlong(m.waistToFloor - points.floor.dist(points.ankle)) + .addCircle(4) + + paths.backZ = paths.back.reverse() + points.seatZback = paths.backZ.shiftAlong(m.waistToSeat).addCircle(4) + points.hipsZback = paths.backZ.shiftAlong(m.waistToHips).addCircle(4) + points.upperlegZback = paths.backZ.shiftAlong(m.waistToUpperLeg).addCircle(4) + points.kneeZback = paths.backZ.shiftAlong(m.waistToKnee).addCircle(4) + points.ankleZback = paths.backZ + .shiftAlong(m.waistToFloor - points.floor.dist(points.ankle)) + .addCircle(4) + + console.log({ + pf: paths.frontZ.length(), + pb: paths.backZ.length(), + m: m.waistToFloor - points.floor.dist(points.ankle), + }) + + console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) + points.kneeFrontSplit.addCircle(2).addCircle(4).addCircle(6).addCircle(8) + // console.log({kfs:paths.frontSplit.split(points.seatFrontSplit)}) + // console.log({kfs:paths.frontSplit.split(points.upperlegFrontSplit)}) + console.log('--------------------------------') + console.log({ kfs: paths.frontSplit.split(points.kneeFrontSplit) }) + // console.log({kfs:paths.frontSplit.split(points.upperlegFrontSplit)}) + + points.sideWaist = new Point(200, 0) + console.log({ p: points.sideWaist }) + points.sideWaistFront = points.sideWaist + .shift(180 - waistAngle, points.waistFrontSplit.dist(points.waistFrontSeam)) + .addCircle(10) + points.sideWaistBack = points.sideWaist.shift( + -1 * waistAngle, + points.waistBackSplit.dist(points.waistBackSeam) + ) + const mp = ['Waist', /*'Hips',*/ 'Seat', 'UpperLeg', 'Knee', 'Ankle'] + // var pathLength = [0] + for (var i = 1; i < mp.length; i++) { + // console.log({ n: 'waistTo' + mp[i], m: m['waistTo' + mp[i]], pl: pathLength[i-1] }) + // console.log({T:paths.frontSplit.split(points[mp[i].toLowerCase() + 'FrontSplit'])[0].length()}) + points['side' + mp[i]] = points.sideWaist.shift(270, m['waistTo' + mp[i]]).addCircle(3) + console.log({ + n1: 'side' + mp[i], + n2: mp[i].toLowerCase() + 'FrontSplit', + n3: mp[i].toLowerCase() + 'FrontSeam', + n4: mp[i - 1].toLowerCase() + 'Front', + n5: 'side' + mp[i - 1] + 'Front', + }) + console.log({ + p1: points['side' + mp[i]], + p2: points[mp[i].toLowerCase() + 'FrontSplit'], + p3: points[mp[i].toLowerCase() + 'FrontSeam'], + p4: points[mp[i - 1].toLowerCase() + 'Front'], + p5: points['side' + mp[i - 1] + 'Front'], + }) + // console.log({split:paths.frontSplit.split(points[mp[i].toLowerCase() + 'FrontSplit'])}) + // pathLength.push(paths.frontSplit.split(points[mp[i].toLowerCase() + 'FrontSplit'])[0].length()) + points['side' + mp[i]].addCircle( + points[mp[i].toLowerCase() + 'FrontSplit'].dist(points[mp[i].toLowerCase() + 'FrontSeam']) + ) + points['side' + mp[i]].addCircle(10) + points['side' + mp[i]].addCircle(12) + points['side' + mp[i]].addCircle(14) + points['side' + mp[i - 1] + 'Front'].addCircle( + points[mp[i].toLowerCase() + 'FrontSplit'].dist( + points[mp[i - 1].toLowerCase() + 'FrontSplit'] + ) + ) + points['side' + mp[i - 1] + 'Front'].addCircle(2) + points['side' + mp[i - 1] + 'Front'].addCircle(4) + points['side' + mp[i - 1] + 'Front'].addCircle(6) + points['side' + mp[i - 1] + 'Front'].addCircle(8) + // console.log({l1:points[mp[i].toLowerCase() + 'FrontSplit'].dist(points[mp[i].toLowerCase() + 'FrontSeam']),l2:pathLength[i]-pathLength[i-1],pl:pathLength}) + var ci = utils.circlesIntersect( + points['side' + mp[i]], + points[mp[i].toLowerCase() + 'FrontSplit'].dist(points[mp[i].toLowerCase() + 'FrontSeam']), + points['side' + mp[i - 1] + 'Front'], + points[mp[i].toLowerCase() + 'FrontSplit'].dist( + points[mp[i - 1].toLowerCase() + 'FrontSplit'] + ) + // pathLength[i]-pathLength[i-1] + ) + console.log({ ci: ci }) + if (false !== ci) { + points['side' + mp[i] + 'Front'] = ci[0].addCircle(7) + // points['ci' +mp[i] + '1' ] = ci[1].addCircle(7) + // points['side' + mp[i] +'Front'].addCircle(pathLength) + } + } + + paths.splitFront = new Path() + .move(points.waistFrontSplit) + ._curve(points.upperlegFrontCp1, points.upperlegFrontSplit) + .curve(points.upperlegFrontCp2, points.kneeFrontCp1, points.kneeFrontSplit) + .curve_(points.kneeFrontCp2, points.ankleFrontSplit) + + paths.splitBack = new Path() + .move(points.waistBackSplit) + ._curve(points.upperlegBackCp1, points.upperlegBackSplit) + .curve(points.upperlegBackCp2, points.kneeBackCp1, points.kneeBackSplit) + .curve_(points.kneeBackCp2, points.ankleBackSplit) + + console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) + console.log({ pins: JSON.parse(JSON.stringify(points)) }) + + console.log({ + Split: paths.frontSplit.length(), + M: m.waistToFloor - points.floorFront.dist(points.ankleFront), + }) + return part + }, +} diff --git a/designs/lumina/src/leg.mjs b/designs/lumina/src/leg.mjs new file mode 100644 index 00000000000..a10b36d37af --- /dev/null +++ b/designs/lumina/src/leg.mjs @@ -0,0 +1,19 @@ +import { points } from './points.mjs' + +export const leg = { + name: 'lumina.leg', + from: points, + draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, part }) => { + paths.seam = new Path() + .move(points.frontSplitHem) + .join(paths.backSplit.reverse()) + .join(paths.crossSeamBack.reverse()) + .join(paths.crossSeamFront) + .join(paths.frontSplit) + .close() + + if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') + + return part + }, +} diff --git a/designs/lumina/src/panel.mjs b/designs/lumina/src/panel.mjs new file mode 100644 index 00000000000..6a5b8be422c --- /dev/null +++ b/designs/lumina/src/panel.mjs @@ -0,0 +1,17 @@ +import { points } from './points.mjs' + +export const panel = { + name: 'lumina.panel', + from: points, + draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, part }) => { + paths.seam = new Path() + .move(points.frontPanelHem) + .join(paths.backPanel.reverse()) + .join(paths.frontPanel) + .close() + + if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') + + return part + }, +} diff --git a/designs/lumina/src/points.mjs b/designs/lumina/src/points.mjs new file mode 100644 index 00000000000..8f7d0229eaa --- /dev/null +++ b/designs/lumina/src/points.mjs @@ -0,0 +1,498 @@ +export const points = { + name: 'lumina.points', + measurements: [ + 'waist', + 'waistBack', + 'hips', + 'seat', + 'seatBack', + 'inseam', + 'waistToSeat', + 'waistToUpperLeg', + 'waistToKnee', + 'waistToHips', + 'waistToFloor', + 'knee', + 'ankle', + 'crossSeam', + 'crossSeamFront', + 'heel', + 'upperLeg', + ], + options: { + ease: { pct: -20, min: -35, max: 10, menu: 'fit' }, + length: { pct: 35, min: 10, max: 100, menu: 'fit' }, + waistReduction: { pct: 35, min: 0, max: 60, menu: 'fit' }, + sidePanel: { pct: 25, min: 10, max: 40, menu: 'style' }, + smoothing: { pct: 85, min: 50, max: 100, menu: 'advanced' }, + crossSeamAngle: 35, + crotchToKnee: 0.4, + waistToKneeCP: 0.4, + kneeToWaistLength: 400, + crotchPointsCP: 2, + }, + draft: ({ measurements, options, Point, Path, points, paths, utils, part }) => { + const ControlPoints = (p1, p2, p3, t) => { + let a = Math.abs(p2.angle(p1) - p2.angle(p3)) / 2 + const t1 = p2.shift(p2.angle(p1) + a - 90, p2.dist(p1) / 3) + const t3 = p2.shift(p2.angle(p3) - a + 90, p2.dist(p3) / 3) + return { + cp1: p2.shift(p2.angle(p1) + a - 90, p2.dist(p1) / 3), + cp3: p2.shift(p2.angle(p3) - a + 90, p2.dist(p3) / 3), + } + } + const CreateControlPoints = (names) => { + for (var i = 1; i < names.length - 1; i++) { + var cp = ControlPoints(points[names[i - 1]], points[names[i]], points[names[i + 1]]) + points[names[i] + 'Cp1'] = cp.cp1 + points[names[i] + 'Cp2'] = cp.cp3 + } + } + const CreatePath = (pathName, names) => { + paths[pathName] = new Path() + .move(points[names[0]]) + ._curve(points[names[1] + 'Cp1'], points[names[1]]) + for (var i = 2; i < names.length - 1; i++) { + paths[pathName].curve( + points[names[i - 1] + 'Cp2'], + points[names[i] + 'Cp1'], + points[names[i]] + ) + } + paths[pathName].curve_(points[names[i - 1] + 'Cp2'], points[names[i]]) + + return paths[pathName] + } + + const ReduceWaist = (pathName) => { + const newWaist = paths[pathName].shiftAlong(waistReduction) + if (newWaist.sitsRoughlyOn(points[pathName + 'Waist'])) { + return + } + points[pathName + 'Waist'] = newWaist + const pTemp = paths[pathName].split(points[pathName + 'Waist']) + if (pTemp.length != 2) { + log.info('couldNotReduceWaist') + console.log('couldNotReduceWaist') + } + paths[pathName] = pTemp[1] + } + + const CreateWaistPoint = (front) => { + const kneeTemp = points.middleCrossSeam.shiftFractionTowards( + points.middleKnee, + options.crotchToKnee + ) + const angle = + 90 + + (front + ? options.crossSeamAngle * (m.waistBack / m.waist) + : -1 * options.crossSeamAngle * (1 - m.waistBack / m.waist)) + const crossSeam = front ? m.crossSeamFront : m.crossSeamBack + var kneeToWaist = m.waistToKnee + var ratio = 1 + var waist = kneeTemp.shift(angle, kneeToWaist * ratio) + const crossSeamCp = points.middleCrossSeam.shiftFractionTowards( + utils.beamIntersectsY(kneeTemp, waist, points.middleCrossSeam.y), + options.crotchPointsCP + ) + + var waistCp + var diff, + iter = 0 + do { + waist = kneeTemp.shift(angle, kneeToWaist * ratio * (ratio < 1 ? 1.05 : 0.95)) + waistCp = waist.shiftFractionTowards(points.middleKnee, options.waistToKneeCP) + + const crossSeamPath = new Path() + .move(points.middleCrossSeam) + .curve(crossSeamCp, waistCp, waist) + + diff = crossSeam - crossSeamPath.length() + ratio = crossSeam / crossSeamPath.length() + } while (++iter < 100 && (diff > 1 || diff < -1)) + if (iter >= 100) { + log.error('Too many iterations trying to make it fit!') + } + + if (front) { + points.frontWaist = waist.clone() + points.frontWaistCp = waistCp.clone() + points.frontCrossSeamCp = crossSeamCp.clone() + } else { + points.backWaist = waist.clone() + points.backWaistCp = waistCp.clone() + points.backCrossSeamCp = crossSeamCp.clone() + } + } + + const CreateSidePoints = ( + prefix, + postfix, + names, + ratio, + ratioFixed, + ease, + distanceCompensation + ) => { + var measurement, + width, + lastGood = 0 + for (var i = 0; i < names.length; i++) { + var distance = + m['waistTo' + names[lastGood]] - + (m['waistTo' + names[i]] === undefined ? 0 : m['waistTo' + names[i]]) + switch (names[i]) { + case 'UpperLeg': + measurement = m['upperLeg'] + const intersect = utils.beamIntersectsCurve( + points[prefix + names[i]], + points[prefix + names[i]].shift(prefix == 'front' ? 180 : 0, ratioFixed * 100), + points.middleCrossSeam, + points[prefix + 'CrossSeamCp'], + points[prefix + 'WaistCp'], + points[prefix + 'Waist'] + ) + console.log({ prefix: prefix, name: names[i] }) + console.log({ intersect: intersect }) + console.log({ intersect: typeof intersect }) + console.log({ pins: JSON.parse(JSON.stringify(points)) }) + + if (false !== intersect) { + if (intersect.constructor === Array) { + measurement += intersect[0].dist(points[prefix + names[i]]) + } else { + measurement += intersect.dist(points[prefix + names[i]]) + } + } + break + case 'Waist': + measurement = prefix == 'front' ? m.waistFront : m.waistBack + case 'Seat': + measurement = prefix == 'front' ? m.seatFront : m.seatBack + distance *= distanceCompensation + break + default: + measurement = m[names[i].toLowerCase()] + } + measurement /= 2 + measurement *= ease + + width = measurement * ratio + + if (i == 0) { + points[prefix + postfix + names[i]] = points[prefix + names[i]].shift( + prefix == 'front' ? 180 : 0, + measurement - width < ratioFixed ? width : measurement - ratioFixed + ) //.addCircle(3).addCircle(6).addCircle(9) + points[prefix + names[i]] //.addCircle(width < ratioFixed ? width : ratioFixed) + } else { + var ci = utils.circlesIntersect( + points[prefix + names[i]], + measurement - width < ratioFixed ? width : measurement - ratioFixed, + points[prefix + postfix + names[lastGood]], + distance + ) + + if (false !== ci) { + points[prefix + postfix + names[i]] = ci[prefix == 'front' ? 0 : 1] //.addCircle(2).addCircle(4).addCircle(6) + lastGood = i + } else { + points[prefix + postfix + names[i]] = points[prefix + postfix + names[lastGood]].clone() //.addCircle(2).addCircle(4).addCircle(6) + + points[prefix + postfix + names[lastGood]] //.addCircle(distance) + points[prefix + names[i]] //.addCircle(width < ratioFixed ? width : ratioFixed) + // points[prefix + names[i]].addCircle(measurement - width < ratioFixed ? width : measurement - ratioFixed) + } + } + } + } + + const SmoothPoints = (prefix, postfix, names, smoothness) => { + var adjust + for (var i = 0; i < names.length - 2; i++) { + adjust = false + if (prefix == 'front') { + adjust = + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) > + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) + } else { + adjust = + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) < + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) + } + if (adjust) { + console.log({ prefix: prefix, postfix: postfix, smooth: names[i + 1] }) + const angleDiff = + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) - + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) + + points[prefix + postfix + names[i + 1]] = points[prefix + postfix + names[i]].shift( + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) + + smoothness * angleDiff, + points[prefix + postfix + names[i]].dist(points[prefix + postfix + names[i + 1]]) + ) + } + } + } + + const hideThis = false + + const m = measurements + const inseam = + m.inseam > m.waistToFloor - m.waistToUpperLeg ? m.waistToFloor - m.waistToUpperLeg : m.inseam + const crotchOffset = m.waistToFloor - inseam + const waistReduction = m.waistToHips * options.waistReduction + const waistFrontBackRatio = m.waistBack / m.waist + const sideRatio = 1 - options.sidePanel + // const sideRatio = 3 / 5 + const ease = options.ease + 1 + const waistToAnkle = m.waistToFloor - m.heel / Math.PI + + m['waistToAnkle'] = m.waistToFloor - m.heel / Math.PI + const sideFixed = (((m.waist - m.waistBack) * ease) / 2) * sideRatio + + points.middleWaist = new Point(0, 0) + points.middleHips = points.middleWaist.shift(270, m.waistToHips) + points.middleSeat = points.middleWaist.shift(270, m.waistToSeat) + points.frontCrossSeam = + points.backCrossSeam = + points.middleCrossSeam = + points.middleWaist.shift(270, crotchOffset) + points.frontUpperLeg = + points.backUpperLeg = + points.middleUpperLeg = + points.middleWaist.shift(270, m.waistToUpperLeg) + points.frontKnee = + points.backKnee = + points.middleKnee = + points.middleWaist.shift(270, m.waistToKnee) + points.frontAnkle = + points.backAnkle = + points.middleAnkle = + points.middleWaist.shift(270, waistToAnkle) + points.frontFloor = + points.backFloor = + points.middleFloor = + points.middleWaist.shift(270, m.waistToFloor) + + CreateWaistPoint(true) + CreateWaistPoint(false) + + console.log({ pionts: JSON.parse(JSON.stringify(points)) }) + + const frontCrossSeam = new Path() + .move(points.frontWaist) + .curve(points.frontWaistCp, points.frontCrossSeamCp, points.middleCrossSeam) + const backCrossSeam = new Path() + .move(points.backWaist) + .curve(points.backWaistCp, points.backCrossSeamCp, points.middleCrossSeam) + + points.frontSeat = frontCrossSeam.shiftAlong( + m.waistToSeat * (m.crossSeamFront / m.waistToUpperLeg) * 0.8 + ) + points.frontHips = frontCrossSeam.shiftAlong( + m.waistToHips * (m.crossSeamFront / m.waistToUpperLeg) + ) + + points.backSeat = backCrossSeam.shiftAlong(m.waistToSeat * (m.waistToSeat / m.waistToUpperLeg)) + points.backHips = backCrossSeam.shiftAlong(m.waistToHips * (m.waistToSeat / m.waistToUpperLeg)) + ;['front', 'back'].forEach((prefix) => { + CreateSidePoints( + prefix, + 'Side', + ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + 0, + 0.1, + ease, + 1 + ) + }) + ;['front', 'back'].forEach((prefix) => { + CreateSidePoints( + prefix, + 'Split', + ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + sideRatio, + sideFixed, + ease, + (points.frontAnkle.dist(points.frontCrossSeam) + frontCrossSeam.length()) / + (m.waistToFloor - m.heel / Math.PI) + ) + }) + + points.backHipsCp1 = points.backWaistCp.clone() + points.backWaistCp = points.backWaist.shift( + points.backWaist.angle(points.backSplitWaist) - 90, + points.backWaist.dist(points.backHips) / 3 + ) + points.backHipsCp2 = points.backSeat.shiftOutwards( + points.backHips, + points.backWaist.dist(points.backHips) / 4 + ) + points.frontHipsCp1 = points.frontWaistCp.clone() + points.frontWaistCp = points.frontWaist.shift( + points.frontWaist.angle(points.frontSplitWaist) + 90, + points.frontWaist.dist(points.frontHips) / 3 + ) + points.frontHipsCp2 = points.frontSeat.shiftOutwards( + points.frontHips, + points.frontWaist.dist(points.frontHips) / 4 + ) + + paths.front = new Path() + .move(points.frontWaist) + .curve(points.frontWaistCp, points.frontHipsCp2, points.frontHips) + .curve(points.frontHipsCp1, points.frontCrossSeamCp, points.middleCrossSeam) + .setHidden(hideThis) + paths.back = new Path() + .move(points.backWaist) + .curve(points.backWaistCp, points.backHipsCp2, points.backHips) + .curve(points.backHipsCp1, points.backCrossSeamCp, points.middleCrossSeam) + .setHidden(hideThis) + + SmoothPoints('front', 'Side', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], options.smoothing) + SmoothPoints( + 'front', + 'Split', + ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + options.smoothing + ) + SmoothPoints('back', 'Side', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], options.smoothing) + SmoothPoints('back', 'Split', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], options.smoothing) + + console.log({ pins: JSON.parse(JSON.stringify(points)) }) + + paths.middle = new Path().move(points.middleWaist).line(points.middleFloor).setHidden() + ;['front', 'back'].forEach((prefix) => { + ;['Side', 'Split'].forEach((type) => { + CreateControlPoints([ + prefix + type + 'Waist', + prefix + type + 'Seat', + prefix + type + 'UpperLeg', + prefix + type + 'Knee', + prefix + type + 'Ankle', + ]) + }) + }) + ;['front', 'back'].forEach((prefix) => { + ;['Side', 'Split'].forEach((type) => { + CreatePath(prefix + type, [ + prefix + type + 'Waist', + prefix + type + 'Seat', + prefix + type + 'UpperLeg', + prefix + type + 'Knee', + prefix + type + 'Ankle', + ]).setHidden(hideThis) + }) + }) + console.log({ phats: JSON.parse(JSON.stringify(paths)) }) + ;['front', 'back'].forEach((prefix) => { + ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { + points[prefix + 'Panel' + name] = points['middle' + name].shift( + prefix == 'front' ? 180 : 0, + points[prefix + 'Side' + name].dist(points[prefix + 'Split' + name]) + ) //.addCircle(4) + }) + }) + ;['front', 'back'].forEach((prefix) => { + CreateControlPoints([ + prefix + 'Panel' + 'Waist', + prefix + 'Panel' + 'Seat', + prefix + 'Panel' + 'UpperLeg', + prefix + 'Panel' + 'Knee', + prefix + 'Panel' + 'Ankle', + ]) + }) + ;['front', 'back'].forEach((prefix) => { + CreatePath(prefix + 'Panel', [ + prefix + 'Panel' + 'Waist', + prefix + 'Panel' + 'Seat', + prefix + 'Panel' + 'UpperLeg', + prefix + 'Panel' + 'Knee', + prefix + 'Panel' + 'Ankle', + ]).setHidden(hideThis) + }) + + while (Math.abs(paths.frontSplit.length() - paths.frontPanel.length()) > 1) { + ;['front', 'back'].forEach((prefix) => { + const diff = paths[prefix + 'Split'].length() / paths[prefix + 'Panel'].length() + const names = ['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'] + for (var i = 0; i < names.length - 1; i++) { + points[prefix + 'Panel' + names[i]] = points[ + prefix + 'Panel' + names[i + 1] + ].shiftFractionTowards(points[prefix + 'Panel' + names[i]], diff) + } + }) + ;['front', 'back'].forEach((prefix) => { + CreateControlPoints([ + prefix + 'Panel' + 'Waist', + prefix + 'Panel' + 'Seat', + prefix + 'Panel' + 'UpperLeg', + prefix + 'Panel' + 'Knee', + prefix + 'Panel' + 'Ankle', + ]) + }) + ;['front', 'back'].forEach((prefix) => { + CreatePath(prefix + 'Panel', [ + prefix + 'Panel' + 'Waist', + prefix + 'Panel' + 'Seat', + prefix + 'Panel' + 'UpperLeg', + prefix + 'Panel' + 'Knee', + prefix + 'Panel' + 'Ankle', + ]).setHidden(hideThis) + }) + } + console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) + + if (options.length < 1) { + const length = (1 - options.length) * (inseam - (m.waistToFloor - waistToAnkle)) + // console.log({i:inseam,wa:waistToAnkle,iw:(inseam/waistToAnkle),r:lengthRatio}) + ;['front', 'back'].forEach((prefix) => { + ;['Side', 'Split', 'Panel'].forEach((type) => { + console.log({ + prefix: prefix, + type: type, + path: paths[prefix + type], + r: paths[prefix + type].reverse(), + l: length, + pl: paths[prefix + type].reverse().length(), + }) + points[prefix + type + 'Hem'] = paths[prefix + type].reverse().shiftAlong(length) + paths[prefix + type] = paths[prefix + type] + .split(points[prefix + type + 'Hem'])[0] + .setHidden(hideThis) + }) + }) + } else { + ;['front', 'back'].forEach((prefix) => { + ;['Side', 'Split', 'Panel'].forEach((type) => { + points[prefix + type + 'Hem'] = points[prefix + type + 'Ankle'] + }) + }) + } + + ;['back'].forEach((prefix) => { + ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { + points[prefix + 'Split' + name] //.addCircle(3).addCircle(6) + }) + }) + + console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) + + ReduceWaist('middle') + ;['front', 'back'].forEach((prefix) => { + ;['Side', 'Split', 'Panel'].forEach((type) => { + ReduceWaist(prefix + type) + }) + ReduceWaist(prefix) + }) + + console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) + console.log({ pihts: JSON.parse(JSON.stringify(points)) }) + + return part.setHidden(hideThis) + }, +} + +//http://localhost:8000/new/luminous#view=%22inspect%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A960%2C%22waistBack%22%3A440%2C%22hips%22%3A884%2C%22seat%22%3A980%2C%22seatBack%22%3A490%2C%22inseam%22%3A790%2C%22waistToSeat%22%3A230%2C%22waistToUpperLeg%22%3A280%2C%22waistToKnee%22%3A610%2C%22waistToHips%22%3A120%2C%22waistToFloor%22%3A1090%2C%22knee%22%3A415%2C%22ankle%22%3A230%2C%22crossSeam%22%3A800%2C%22crossSeamFront%22%3A380%2C%22heel%22%3A300%2C%22upperLeg%22%3A640%7D%7D diff --git a/designs/lumina/src/side.mjs b/designs/lumina/src/side.mjs new file mode 100644 index 00000000000..dddaa5595ac --- /dev/null +++ b/designs/lumina/src/side.mjs @@ -0,0 +1,52 @@ +import { ipoints } from './ipoints.mjs' + +export const side = { + name: 'lumina.ipoints', + after: ipoints, + measurements: [ + 'waist', + 'waistBack', + 'hips', + 'seat', + 'seatBack', + 'inseam', + 'waistToSeat', + 'waistToUpperLeg', + 'waistToKnee', + 'waistToHips', + 'waistToFloor', + 'knee', + 'ankle', + 'crossSeam', + 'crossSeamFront', + 'heel', + 'upperLeg', + ], + options: { + size: { pct: 50, min: 10, max: 100, menu: 'fit' }, + crossSeamAngle: 25, + crotchToKnee: 0.5, + waistToKneeCP: 0.4, + kneeToWaistLength: 400, + }, + draft: ({ + measurements, + options, + Point, + Path, + points, + paths, + Snippet, + snippets, + utils, + log, + complete, + sa, + paperless, + macro, + part, + }) => { + points.sideWaist = new Point(0, 0) + points.sideWaistFront = points.sideWaist.shift() + }, +} diff --git a/designs/lumina/src/zpoints.mjs b/designs/lumina/src/zpoints.mjs new file mode 100644 index 00000000000..4403db74c31 --- /dev/null +++ b/designs/lumina/src/zpoints.mjs @@ -0,0 +1,565 @@ +export const zpoints = { + name: 'lumina.zpoints', + measurements: [ + 'waist', + 'waistBack', + 'hips', + 'seat', + 'seatBack', + 'inseam', + 'waistToSeat', + 'waistToUpperLeg', + 'waistToKnee', + 'waistToHips', + 'waistToFloor', + 'knee', + 'ankle', + 'crossSeam', + 'crossSeamFront', + 'heel', + 'upperLeg', + ], + options: { + ease: { pct: -20, min: -35, max: 10, menu: 'fit' }, + length: { pct: 100, min: 10, max: 100, menu: 'fit' }, + crossSeamAngle: 35, + crotchToKnee: 0.4, + waistToKneeCP: 0.4, + kneeToWaistLength: 400, + crotchPointsCP: 2, + }, + draft: ({ + measurements, + options, + Point, + Path, + points, + paths, + Snippet, + snippets, + utils, + log, + complete, + sa, + paperless, + macro, + part, + }) => { + const ControlPoints = (p1, p2, p3, t) => { + let a = Math.abs(p2.angle(p1) - p2.angle(p3)) / 2 + const t1 = p2.shift(p2.angle(p1) + a - 90, p2.dist(p1) / 3) + const t3 = p2.shift(p2.angle(p3) - a + 90, p2.dist(p3) / 3) + return { + cp1: p2.shift(p2.angle(p1) + a - 90, p2.dist(p1) / 3), + cp3: p2.shift(p2.angle(p3) - a + 90, p2.dist(p3) / 3), + } + } + const CreateControlPoints = (names) => { + for (var i = 1; i < names.length - 1; i++) { + var cp = ControlPoints(points[names[i - 1]], points[names[i]], points[names[i + 1]]) + points[names[i] + 'Cp1'] = cp.cp1 + points[names[i] + 'Cp2'] = cp.cp3 + } + } + const CreatePath = (pathName, names) => { + paths[pathName] = new Path() + .move(points[names[0]]) + ._curve(points[names[1] + 'Cp1'], points[names[1]]) + for (var i = 2; i < names.length - 1; i++) { + paths[pathName].curve( + points[names[i - 1] + 'Cp2'], + points[names[i] + 'Cp1'], + points[names[i]] + ) + } + paths[pathName].curve_(points[names[i - 1] + 'Cp2'], points[names[i]]) + + return paths[pathName] + } + + const CreateWaistPoint = (front) => { + // console.log({ + // crossSeamAngle: options.crossSeamAngle, + // crotchPointsCP: options.crotchPointsCP, + // }) + const kneeTemp = points.insideCrossSeam.shiftFractionTowards( + points.insideKnee, + options.crotchToKnee + ) + const angle = + 90 + + (front + ? options.crossSeamAngle * (m.waistBack / m.waist) + : -1 * options.crossSeamAngle * (1 - m.waistBack / m.waist)) + const crossSeam = front ? m.crossSeamFront : m.crossSeam - m.crossSeamFront + var kneeToWaist = m.waistToKnee + var ratio = 1 + var waist = kneeTemp.shift(angle, kneeToWaist * ratio) + const crossSeamCp = points.insideCrossSeam.shiftFractionTowards( + utils.beamIntersectsY(kneeTemp, waist, points.insideCrossSeam.y), + options.crotchPointsCP + ) + + // console.log({ f: front, a: angle }) + var waistCp + var diff, + iter = 0 + do { + waist = kneeTemp.shift(angle, kneeToWaist * ratio * (ratio < 1 ? 1.05 : 0.95)) + // waistCp = waist.shiftFractionTowards(kneeTemp, options.waistToKneeCP) + waistCp = waist.shiftFractionTowards(points.insideKnee, options.waistToKneeCP) + + const crossSeamPath = new Path() + .move(points.insideCrossSeam) + .curve(crossSeamCp, waistCp, waist) + + diff = crossSeam - crossSeamPath.length() + ratio = crossSeam / crossSeamPath.length() + // console.log({ i: iter, d: diff, r: ratio }) + } while (++iter < 100 && (diff > 1 || diff < -1)) + if (iter >= 100) { + console.log('Too many iterations trying to make it fit!') + // log.error('Too many iterations trying to make it fit!') + } + + if (front) { + points.frontWaist = waist.clone() + points.frontWaistCp = waistCp.clone() + points.frontCrossSeamCp = crossSeamCp.clone() + } else { + points.backWaist = waist.clone() + points.backWaistCp = waistCp.clone() + points.backCrossSeamCp = crossSeamCp.clone() + } + } + + const CreateSidePoints = ( + prefix, + postfix, + names, + ratio, + ratioFixed, + ease, + distanceCompentation + ) => { + // console.log('-----' + prefix + postfix + '----') + var measurement, + width, + lastGood = 0 + for (var i = 0; i < names.length; i++) { + var distance = + m['waistTo' + names[i - 1]] - + (m['waistTo' + names[i]] === undefined ? 0 : m['waistTo' + names[i]]) + switch (names[i]) { + case 'UpperLeg': + measurement = m['upperLeg'] + const intersect = utils.beamIntersectsCurve( + points[prefix + names[i]], + points[prefix + names[i]].shift(prefix == 'front' ? 180 : 0, ratioFixed * 3), + points.insideCrossSeam, + points[prefix + 'CrossSeamCp'], + points[prefix + 'WaistCp'], + points[prefix + 'Waist'] + ) + // console.log({ intersect: intersect }) + measurement += intersect.dist(points[prefix + names[i]]) + break + case 'Waist': + measurement = prefix == 'front' ? m.waist - m.waistBack : m.waistBack + case 'Seat': + measurement = prefix == 'front' ? m.seat - m.seatBack : m.seatBack + distance *= distanceCompentation + break + default: + measurement = m[names[i].toLowerCase()] + } + measurement /= 2 + measurement *= ease + + width = measurement * ratio + + if (i == 0) { + points[prefix + postfix + names[i]] = points[prefix + names[i]].shift( + prefix == 'front' ? 180 : 0, + measurement - width < ratioFixed ? width : measurement - ratioFixed + ) //.addCircle(3).addCircle(6).addCircle(9) + points[prefix + names[i]] //.addCircle(width < ratioFixed ? width : ratioFixed) + } else { + var ci = utils.circlesIntersect( + points[prefix + names[i]], + measurement - width < ratioFixed ? width : measurement - ratioFixed, + points[prefix + postfix + names[lastGood]], + distance + ) + + if (false !== ci) { + points[prefix + postfix + names[i]] = ci[prefix == 'front' ? 0 : 1] //.addCircle(2).addCircle(4).addCircle(6) + lastGood = i + } else { + // break + points[prefix + postfix + names[i]] = points[prefix + postfix + names[lastGood]].clone() + + points[prefix + postfix + names[lastGood]] //.addCircle(distance) + // points[prefix +names[i]].addCircle(width < ratioFixed ? width : ratioFixed) + points[prefix + names[i]] //.addCircle(measurement - width < ratioFixed ? width : measurement - ratioFixed) + } + } + } + } + + const SmoothPoints = (prefix, postfix, names) => { + var adjust + for (var i = 0; i < names.length - 2; i++) { + adjust = false + if (prefix == 'front') { + adjust = + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) > + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) + } else { + adjust = + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) < + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) + } + if (adjust) { + points[prefix + postfix + names[i + 1]] = points[ + prefix + postfix + names[i] + ].shiftTowards( + points[prefix + postfix + names[i + 2]], + points[prefix + postfix + names[i]].dist(points[prefix + postfix + names[i + 1]]) + ) + } + } + } + + const m = measurements + const crotchOffset = m.waistToFloor - m.inseam + + const waistFrontBackRatio = m.waistBack / m.waist + const sideRatio = 3 / 5 + const ease = options.ease + 1 + const waistToAnkle = m.waistToFloor - m.heel / Math.PI + + m['waistToAnkle'] = m.waistToFloor - m.heel / Math.PI + const sideFixed = (((m.waist - m.waistBack) * ease) / 2) * sideRatio + + points.insideWaist = new Point(0, 0) + points.insideHips = points.insideWaist.shift(270, m.waistToHips) + points.insideSeat = points.insideWaist.shift(270, m.waistToSeat) + points.frontCrossSeam = + points.backCrossSeam = + points.insideCrossSeam = + points.insideWaist.shift(270, crotchOffset) + points.frontUpperLeg = + points.backUpperLeg = + points.insideUpperLeg = + points.insideWaist.shift(270, m.waistToUpperLeg) + points.frontKnee = + points.backKnee = + points.insideKnee = + points.insideWaist.shift(270, m.waistToKnee) + points.frontAnkle = + points.backAnkle = + points.insideAnkle = + points.insideWaist.shift(270, waistToAnkle) + points.frontFloor = + points.backFloor = + points.insideFloor = + points.insideWaist.shift(270, m.waistToFloor) + + CreateWaistPoint(true) + CreateWaistPoint(false) + + console.log({ pionts: JSON.parse(JSON.stringify(points)) }) + + const crossSeamFront = new Path() + .move(points.frontWaist) + .curve(points.frontWaistCp, points.frontCrossSeamCp, points.insideCrossSeam) + const crossSeamBack = new Path() + .move(points.backWaist) + .curve(points.backWaistCp, points.backCrossSeamCp, points.insideCrossSeam) + + points.frontSeat = crossSeamFront.shiftAlong( + m.waistToSeat * (m.crossSeamFront / m.waistToUpperLeg) * 0.8 + ) + // .addCircle(6) + points.frontHips = crossSeamFront.shiftAlong( + m.waistToHips * (m.crossSeamFront / m.waistToUpperLeg) + ) + // .addCircle(10) + points.backSeat = crossSeamBack.shiftAlong(m.waistToSeat * (m.waistToSeat / m.waistToUpperLeg)) + // .addCircle(6) + points.backHips = crossSeamBack.shiftAlong(m.waistToHips * (m.waistToSeat / m.waistToUpperLeg)) + // .addCircle(10) + + CreateSidePoints( + 'front', + 'Side', + ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + 0, + 0.1, + ease, + 1 + ) + CreateSidePoints( + 'back', + 'Side', + ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + 0, + 0.1, + ease, + 1 + ) + + CreateSidePoints( + 'front', + 'Split', + ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + sideRatio, + sideFixed, + ease, + (points.frontAnkle.dist(points.frontCrossSeam) + crossSeamFront.length()) / + (m.waistToFloor - m.heel / Math.PI) + ) + CreateSidePoints( + 'back', + 'Split', + ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + sideRatio, + sideFixed, + ease, + (points.frontAnkle.dist(points.frontCrossSeam) + crossSeamFront.length()) / + (m.waistToFloor - m.heel / Math.PI) + ) + + points.backHipsCp1 = points.backWaistCp.clone() + points.backWaistCp = points.backWaist.shift( + points.backWaist.angle(points.backSplitWaist) - 90, + points.backWaist.dist(points.backHips) / 3 + ) + points.backHipsCp2 = points.backSeat.shiftOutwards( + points.backHips, + points.backWaist.dist(points.backHips) / 4 + ) + points.frontHipsCp1 = points.frontWaistCp.clone() + points.frontWaistCp = points.frontWaist.shift( + points.frontWaist.angle(points.frontSplitWaist) + 90, + points.frontWaist.dist(points.frontHips) / 3 + ) + points.frontHipsCp2 = points.frontSeat.shiftOutwards( + points.frontHips, + points.frontWaist.dist(points.frontHips) / 4 + ) + + paths.crossSeamFront = new Path() + .move(points.insideCrossSeam) + .curve(points.frontCrossSeamCp, points.frontHipsCp1, points.frontHips) + .curve(points.frontHipsCp2, points.frontWaistCp, points.frontWaist) + .hide() + paths.crossSeamBack = new Path() + .move(points.insideCrossSeam) + .curve(points.backCrossSeamCp, points.backHipsCp1, points.backHips) + .curve(points.backHipsCp2, points.backWaistCp, points.backWaist) + .hide() + + SmoothPoints('front', 'Side', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) + SmoothPoints('front', 'Split', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) + SmoothPoints('back', 'Side', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) + SmoothPoints('back', 'Split', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) + + console.log({ pins: JSON.parse(JSON.stringify(points)) }) + + paths.middle = new Path().move(points.insideUpperLeg).line(points.insideFloor).hide() + ;['front', 'back'].forEach((prefix) => { + ;['Side', 'Split'].forEach((type) => { + CreateControlPoints([ + prefix + type + 'Waist', + prefix + type + 'Seat', + prefix + type + 'UpperLeg', + prefix + type + 'Knee', + prefix + type + 'Ankle', + ]) + }) + }) + ;['front', 'back'].forEach((prefix) => { + ;['Side', 'Split'].forEach((type) => { + CreatePath(prefix + type, [ + prefix + type + 'Waist', + prefix + type + 'Seat', + prefix + type + 'UpperLeg', + prefix + type + 'Knee', + prefix + type + 'Ankle', + ]).hide() + }) + }) + + if (1 == 2) { + ;['front', 'back'].forEach((prefix) => { + ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { + var measurement + switch (name) { + case 'UpperLeg': + measurement = m.upperLeg + case 'Waist': + measurement = prefix == 'front' ? m.waist - m.waistBack : m.waistBack + break + case 'Seat': + measurement = prefix == 'front' ? m.seat - m.seatBack : m.seatBack + break + default: + measurement = m[name.toLowerCase()] + } + + points[prefix + 'Panel' + name] = points['inside' + name].shift( + prefix == 'front' ? 180 : 0, + measurement / 2 - points[prefix + name].dist(points[prefix + 'Split' + name]) + ) //.addCircle(4) + }) + }) + + SmoothPoints('front', 'Panel', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) + SmoothPoints('back', 'Panel', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) + paths.frontPanel = new Path() + .move(points.frontPanelAnkle) + .line(points.frontPanelKnee) + .line(points.frontPanelUpperLeg) + .line(points.frontPanelSeat) + .line(points.frontPanelWaist) + paths.backPanel = new Path() + .move(points.backPanelAnkle) + .line(points.backPanelKnee) + .line(points.backPanelUpperLeg) + .line(points.backPanelSeat) + .line(points.backPanelWaist) + } + if (1 == 1) { + ;['front', 'back'].forEach((prefix) => { + ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { + points[prefix + 'Panel' + name] = points['inside' + name].shift( + prefix == 'front' ? 180 : 0, + points[prefix + 'Side' + name].dist(points[prefix + 'Split' + name]) + ) //.addCircle(4) + }) + }) + + // SmoothPoints('front', 'Panel', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) + // SmoothPoints('back', 'Panel', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) + ;['front', 'back'].forEach((prefix) => { + CreateControlPoints([ + prefix + 'Panel' + 'Waist', + prefix + 'Panel' + 'Seat', + prefix + 'Panel' + 'UpperLeg', + prefix + 'Panel' + 'Knee', + prefix + 'Panel' + 'Ankle', + ]) + }) + ;['front', 'back'].forEach((prefix) => { + CreatePath(prefix + 'Panel', [ + prefix + 'Panel' + 'Waist', + prefix + 'Panel' + 'Seat', + prefix + 'Panel' + 'UpperLeg', + prefix + 'Panel' + 'Knee', + prefix + 'Panel' + 'Ankle', + ]).hide() + }) + + console.log({ + fsl: paths.frontSplit.length(), + fpl: paths.frontPanel.length(), + bsl: paths.backSplit.length(), + bpl: paths.backPanel.length(), + }) + ;['front', 'back'].forEach((prefix) => { + const diff = paths[prefix + 'Split'].length() / paths[prefix + 'Panel'].length() + const names = ['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'] + for (var i = 0; i < names.length - 1; i++) { + points[prefix + 'Panel' + names[i]] = points[ + prefix + 'Panel' + names[i + 1] + ].shiftFractionTowards(points[prefix + 'Panel' + names[i]], diff) + } + }) + ;['front', 'back'].forEach((prefix) => { + CreateControlPoints([ + prefix + 'Panel' + 'Waist', + prefix + 'Panel' + 'Seat', + prefix + 'Panel' + 'UpperLeg', + prefix + 'Panel' + 'Knee', + prefix + 'Panel' + 'Ankle', + ]) + }) + ;['front', 'back'].forEach((prefix) => { + CreatePath(prefix + 'Panel', [ + prefix + 'Panel' + 'Waist', + prefix + 'Panel' + 'Seat', + prefix + 'Panel' + 'UpperLeg', + prefix + 'Panel' + 'Knee', + prefix + 'Panel' + 'Ankle', + ]).hide() + }) + } + + console.log({ + fsl: paths.frontSplit.length(), + fpl: paths.frontPanel.length(), + bsl: paths.backSplit.length(), + bpl: paths.backPanel.length(), + }) + + if (options.length < 1) { + const length = (1 - options.length) * (m.inseam - (m.waistToFloor - waistToAnkle)) + console.log({ wtf: m.waistToFloor, i: m.inseam, l: length }) + // console.log({i:m.inseam,wa:waistToAnkle,iw:(m.inseam/waistToAnkle),r:lengthRatio}) + ;['front', 'back'].forEach((prefix) => { + ;['Side', 'Split', 'Panel'].forEach((type) => { + console.log({ n: prefix + type, l: paths[prefix + type].length() }) + points[prefix + type + 'Hem'] = paths[prefix + type].reverse().shiftAlong(length) + paths[prefix + type] = paths[prefix + type].split(points[prefix + type + 'Hem'])[0] //.hide() + }) + }) + } else { + ;['front', 'back'].forEach((prefix) => { + ;['Side', 'Split', 'Panel'].forEach((type) => { + points[prefix + type + 'Hem'] = points[prefix + type + 'Ankle'] + }) + }) + } + // ;['front', 'back'].forEach((prefix) => { + // ;['Side'].forEach((type) => { + // paths[prefix + type] = new Path() + // .move(points[prefix + type + 'Ankle']) + // .line(points[prefix + type + 'Knee']) + // .line(points[prefix + type + 'UpperLeg']) + // .line(points[prefix + type + 'Seat']) + // .line(points[prefix + type + 'Waist']) + // }) + // }) + // ;['front', 'back'].forEach((prefix) => { + // ;['Split'].forEach((type) => { + // paths[prefix + type +'2'] = new Path() + // .move(points[prefix + type + 'Ankle']) + // .line(points[prefix + type + 'Knee']) + // .line(points[prefix + type + 'UpperLeg']) + // .line(points[prefix + type + 'Waist']) + // }) + // }) + + // paths.frontSplit.addClass('dotted note') + // paths.backSplit.addClass('dotted note') + // paths.frontSplit2.addClass('dashed lining') + // paths.backSplit2.addClass('dashed lining') + + // console.log({d1: points.frontKnee.dist(points.frontUpperLeg),d2: points.frontSplitKnee.dist(points.frontSplitUpperLeg)}) + + console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) + console.log({ pihts: JSON.parse(JSON.stringify(points)) }) + + // paths.frontSide = new Path() + // .move(points.frontSideAnkle) + // .line(points.frontSideKnee) + // .line(points.frontSideUpperLeg) + // .line(points.frontSideSeat) + // .line(points.frontSideWaist) + return part //.hide() + }, +} + +//http://localhost:8000/new/luminous#view=%22inspect%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A960%2C%22waistBack%22%3A440%2C%22hips%22%3A884%2C%22seat%22%3A980%2C%22seatBack%22%3A490%2C%22inseam%22%3A790%2C%22waistToSeat%22%3A230%2C%22waistToUpperLeg%22%3A280%2C%22waistToKnee%22%3A610%2C%22waistToHips%22%3A120%2C%22waistToFloor%22%3A1090%2C%22knee%22%3A415%2C%22ankle%22%3A230%2C%22crossSeam%22%3A800%2C%22crossSeamFront%22%3A380%2C%22heel%22%3A300%2C%22upperLeg%22%3A640%7D%7D diff --git a/designs/lumina/tests/shared.test.mjs b/designs/lumina/tests/shared.test.mjs new file mode 100644 index 00000000000..36dafb5c605 --- /dev/null +++ b/designs/lumina/tests/shared.test.mjs @@ -0,0 +1,20 @@ +// This file is auto-generated | Any changes you make will be overwritten. +import { Lumina, i18n } from '../src/index.mjs' + +// Shared tests +import { testPatternConfig } from '../../../tests/designs/config.mjs' +import { testPatternI18n } from '../../../tests/designs/i18n.mjs' +import { testPatternDrafting } from '../../../tests/designs/drafting.mjs' +import { testPatternSampling } from '../../../tests/designs/sampling.mjs' + +// Test config +testPatternConfig(Lumina) + +// Test translation +testPatternI18n(Lumina, i18n) + +// Test drafting - Change the second parameter to `true` to log errors +testPatternDrafting(Lumina, false) + +// Test sampling - Change the second parameter to `true` to log errors +testPatternSampling(Lumina, false) diff --git a/sites/lab/pages/new/lumina.mjs b/sites/lab/pages/new/lumina.mjs new file mode 100644 index 00000000000..879bea41040 --- /dev/null +++ b/sites/lab/pages/new/lumina.mjs @@ -0,0 +1,41 @@ +/* + * This page is auto-generated. Do not edit it by hand. + */ +import { Lumina } from 'designs/lumina/src/index.mjs' +// Dependencies +import { serverSideTranslations } from 'next-i18next/serverSideTranslations' +import { nsMerge } from 'shared/utils.mjs' +// Components +import { PageWrapper, ns as pageNs } from 'shared/components/wrappers/page.mjs' +import { Workbench, ns as wbNs } from 'shared/components/workbench/new.mjs' +import { WorkbenchLayout } from 'site/components/layouts/workbench.mjs' + +// Translation namespaces used on this page +const ns = nsMerge('lumina', wbNs, pageNs) + +const NewLuminaPage = ({ page, docs }) => ( + + + +) + +export default NewLuminaPage + +export async function getStaticProps({ locale }) { + return { + props: { + ...(await serverSideTranslations(locale, ns)), + page: { + locale, + path: ['new', 'lumina'], + title: 'Lumina', + }, + }, + } +} diff --git a/sites/shared/i18n/designs.mjs b/sites/shared/i18n/designs.mjs index 943e1c08097..90f998858e7 100644 --- a/sites/shared/i18n/designs.mjs +++ b/sites/shared/i18n/designs.mjs @@ -57,6 +57,7 @@ import { i18n as walburga } from '@freesewing/walburga' import { i18n as waralee } from '@freesewing/waralee' import { i18n as yuri } from '@freesewing/yuri' import { i18n as otis } from '@freesewing/otis' +import { i18n as lumina } from '@freesewing/lumina' export const designs = { aaron, @@ -114,4 +115,5 @@ export const designs = { waralee, yuri, otis, + lumina, } From 14fca05a6258f867842da23acbe017dc4644de2d Mon Sep 17 00:00:00 2001 From: woutervdub Date: Sun, 12 Nov 2023 23:46:33 +0000 Subject: [PATCH 02/28] Waistreduction2 --- designs/lumina/src/leg.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/designs/lumina/src/leg.mjs b/designs/lumina/src/leg.mjs index a10b36d37af..ddb67c722e2 100644 --- a/designs/lumina/src/leg.mjs +++ b/designs/lumina/src/leg.mjs @@ -7,8 +7,8 @@ export const leg = { paths.seam = new Path() .move(points.frontSplitHem) .join(paths.backSplit.reverse()) - .join(paths.crossSeamBack.reverse()) - .join(paths.crossSeamFront) + .join(paths.back) + .join(paths.front.reverse()) .join(paths.frontSplit) .close() From 45ba7ec14a5f2385a29e3a4d7667f4d8224713b0 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Wed, 20 Dec 2023 16:30:31 +0000 Subject: [PATCH 03/28] designs --- config/software/designs.json | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/config/software/designs.json b/config/software/designs.json index 4075baf7eb1..e1881667bad 100644 --- a/config/software/designs.json +++ b/config/software/designs.json @@ -918,6 +918,23 @@ "tags": [], "techniques": [] }, + "lumira": { + "code": "Wouter Van Wageningen", + "description": "A FreeSewing pattern for leggings", + "design": "Wouter Van Wageningen", + "difficulty": 3, + "lab": true, + "org": false, + "tags": [ + "bottoms", + "trousers" + ], + "techniques": [ + "stretch", + "curvedSeam", + "elastic" + ] + }, "lumina": { "code": "Coder name", "description": "A FreeSewing pattern that needs a description", From ce014ecf8ba143151dc9d6d2685f9a890b65e7ab Mon Sep 17 00:00:00 2001 From: woutervdub Date: Wed, 20 Dec 2023 16:34:24 +0000 Subject: [PATCH 04/28] design --- config/software/designs.json | 14 -------------- 1 file changed, 14 deletions(-) diff --git a/config/software/designs.json b/config/software/designs.json index e1881667bad..fac30373859 100644 --- a/config/software/designs.json +++ b/config/software/designs.json @@ -934,19 +934,5 @@ "curvedSeam", "elastic" ] - }, - "lumina": { - "code": "Coder name", - "description": "A FreeSewing pattern that needs a description", - "design": "Designer name", - "difficulty": 1, - "lab": true, - "org": false, - "tags": [ - "tagname" - ], - "techniques": [ - "techname" - ] } } \ No newline at end of file From 2707a8ac1c3b033225635c4bd6fae90d8568126b Mon Sep 17 00:00:00 2001 From: woutervdub Date: Sun, 24 Dec 2023 23:36:17 +0000 Subject: [PATCH 05/28] commit! --- designs/lumina/i18n/en.json | 4 +- designs/lumina/src/index.mjs | 7 +- designs/lumina/src/points.mjs | 765 ++++++++++++++++++++----------- designs/lumina/src/waistband.mjs | 146 ++++++ designs/lumira/src/shape.mjs | 19 +- 5 files changed, 666 insertions(+), 275 deletions(-) create mode 100644 designs/lumina/src/waistband.mjs diff --git a/designs/lumina/i18n/en.json b/designs/lumina/i18n/en.json index 8cf0182cebd..9642fb245dc 100644 --- a/designs/lumina/i18n/en.json +++ b/designs/lumina/i18n/en.json @@ -2,6 +2,8 @@ "t": "Lumina", "d": "A FreeSewing pattern that needs a description", "p": { }, - "s": { }, + "s": { + "couldNoFitWaistband": "Could not fit the waistband" + }, "o": { } } diff --git a/designs/lumina/src/index.mjs b/designs/lumina/src/index.mjs index 84cff6d4ddf..222f564d730 100644 --- a/designs/lumina/src/index.mjs +++ b/designs/lumina/src/index.mjs @@ -9,14 +9,17 @@ import { ipoints } from './ipoints.mjs' import { zpoints } from './zpoints.mjs' import { panel } from './panel.mjs' import { leg } from './leg.mjs' +import { waistband } from './waistband.mjs' // Create new design const Lumina = new Design({ data, - parts: [/*zpoints, ipoints,*/ points, panel, leg], + parts: [/*zpoints, ipoints,*/ points, panel, leg, waistband], }) // Named exports -export { /*zpoints, ipoints,*/ points, panel, leg, i18n, Lumina } +export { i18n, Lumina, /*zpoints, ipoints,*/ points, panel, leg, waistband } // http://localhost:8000/new/lumina#view=%22inspect%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A960%2C%22waistBack%22%3A440%2C%22hips%22%3A884%2C%22seat%22%3A980%2C%22seatBack%22%3A490%2C%22inseam%22%3A790%2C%22waistToSeat%22%3A230%2C%22waistToUpperLeg%22%3A280%2C%22waistToKnee%22%3A610%2C%22waistToHips%22%3A120%2C%22waistToFloor%22%3A1090%2C%22knee%22%3A415%2C%22ankle%22%3A230%2C%22crossSeam%22%3A800%2C%22crossSeamFront%22%3A380%2C%22heel%22%3A300%2C%22upperLeg%22%3A640%7D%7D + +// http://localhost:8000/new/lumina#view=%22inspect%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A780%2C%22waistBack%22%3A360%2C%22hips%22%3A860%2C%22seat%22%3A980%2C%22seatBack%22%3A510%2C%22inseam%22%3A680%2C%22waistToSeat%22%3A200%2C%22waistToUpperLeg%22%3A250%2C%22waistToKnee%22%3A500%2C%22waistToHips%22%3A90%2C%22waistToFloor%22%3A890%2C%22knee%22%3A360%2C%22ankle%22%3A220%2C%22crossSeam%22%3A620%2C%22crossSeamFront%22%3A290%2C%22heel%22%3A280%2C%22upperLeg%22%3A580%7D%2C%22options%22%3A%7B%22length%22%3A1%2C%22waistreduction%22%3A0.1%2C%22waistLowering%22%3A0.012%2C%22waistlowering%22%3A0.181%7D%2C%22units%22%3A%22metric%22%7D diff --git a/designs/lumina/src/points.mjs b/designs/lumina/src/points.mjs index 8f7d0229eaa..fd027aa9ab8 100644 --- a/designs/lumina/src/points.mjs +++ b/designs/lumina/src/points.mjs @@ -1,3 +1,251 @@ +import { pctBasedOn } from '@freesewing/core' +import { extendPath, createControlPoints } from '@freesewing/lumira' + +const lowerWaist = (paths, Path, points, waistLowering, pathName, pointName) => { + console.log({ pins: JSON.parse(JSON.stringify(points)) }) + console.log({ pats: JSON.parse(JSON.stringify(paths)) }) + console.log({ + pn: pointName, + pan: pathName, + par: { path: paths[pathName], len: paths[pathName].length(), wr: waistLowering }, + }) + const newPath = extendPath(Path, paths[pathName], 100, 0) + const newWaist = newPath.shiftAlong(waistLowering + 100) + // console.log({newWaist:newWaist}) + // console.log({p:points[pathName + pointName]}) + // console.log({s:newWaist.sitsRoughlyOn(points[pathName + pointName])}) + if (newWaist.sitsRoughlyOn(points[pathName + pointName])) { + return + } + points[pathName + pointName] = newWaist + const pTemp = newPath.split(points[pathName + pointName]) + if (pTemp.length != 2) { + log.info('lumina:couldNotLowerWaist') + // console.log('couldNotLowerWaist') + } + paths[pathName] = pTemp[1].hide() +} + +const createPath = (paths, Path, points, pathName, names) => { + let i + paths[pathName] = new Path() + .move(points[names[0]]) + ._curve(points[names[1] + 'Cp2'], points[names[1]]) + for (i = 2; i < names.length - 1; i++) { + paths[pathName].curve(points[names[i - 1] + 'Cp1'], points[names[i] + 'Cp2'], points[names[i]]) + } + paths[pathName].curve_(points[names[i - 1] + 'Cp1'], points[names[i]]) + + return paths[pathName] +} + +const createWaistPoint = (options, measurements, Path, points, utils, front) => { + const kneeTemp = points.middleCrossSeam.shiftFractionTowards( + points.middleKnee, + options.crotchToKnee + ) + const angle = + 90 + + (front + ? options.crossSeamAngle * (measurements.waistBack / measurements.waist) + : -1 * options.crossSeamAngle * (1 - measurements.waistBack / measurements.waist)) + const crossSeam = front ? measurements.crossSeamFront : measurements.crossSeamBack + let kneeToWaist = measurements.waistToKnee + let ratio = 1 + let waist = kneeTemp.shift(angle, kneeToWaist * ratio) + const crossSeamCp = points.middleCrossSeam.shiftFractionTowards( + utils.beamIntersectsY(kneeTemp, waist, points.middleCrossSeam.y), + options.crotchPointsCP + ) + + let waistCp + let diff + let iter = 0 + do { + waist = kneeTemp.shift(angle, kneeToWaist * ratio * (ratio < 1 ? 1.05 : 0.95)) + waistCp = waist.shiftFractionTowards(points.middleKnee, options.waistToKneeCP) + + const crossSeamPath = new Path().move(points.middleCrossSeam).curve(crossSeamCp, waistCp, waist) + + diff = crossSeam - crossSeamPath.length() + ratio = crossSeam / crossSeamPath.length() + } while (++iter < 100 && (diff > 1 || diff < -1)) + if (iter >= 100) { + log.error('lumina:cantFitTheWaistPoint') + } + + if (front) { + points.frontWaist = waist.clone() + points.frontWaistband = waist.clone() + points.frontWaistCp = waistCp.clone() + points.frontCrossSeamCp = crossSeamCp.clone() + } else { + points.backWaist = waist.clone() + points.backWaistband = waist.clone() + points.backWaistCp = waistCp.clone() + points.backCrossSeamCp = crossSeamCp.clone() + } +} + +const createSidePoints = ( + measurements, + points, + utils, + prefix, + postfix, + names, + ratio, + ratioFixed, + ease, + waistReduction, + distanceCompensation +) => { + let measurement + let width + let lastGood = 0 + for (let i = 0; i < names.length; i++) { + let distance = + measurements['waistTo' + names[lastGood]] - + (measurements['waistTo' + names[i]] === undefined ? 0 : measurements['waistTo' + names[i]]) + switch (names[i]) { + case 'UpperLeg': + measurement = measurements['upperLeg'] + const intersect = utils.beamIntersectsCurve( + points[prefix + names[i]], + points[prefix + names[i]].shift(prefix == 'front' ? 180 : 0, ratioFixed * 100), + points.middleCrossSeam, + points[prefix + 'CrossSeamCp'], + points[prefix + 'WaistCp'], + points[prefix + 'Waist'] + ) + // console.log({ prefix: prefix, name: names[i] }) + // console.log({ intersect: intersect }) + // console.log({ intersect: typeof intersect }) + // console.log({ pins: JSON.parse(JSON.stringify(points)) }) + + if (false !== intersect) { + if (intersect.constructor === Array) { + measurement += intersect[0].dist(points[prefix + names[i]]) + } else { + measurement += intersect.dist(points[prefix + names[i]]) + } + } + break + case 'Waist': + measurement = + (prefix == 'front' ? measurements.waistFront : measurements.waistBack) - + waistReduction * 0.5 + break + case 'Seat': + measurement = prefix == 'front' ? measurements.seatFront : measurements.seatBack + distance *= distanceCompensation + break + default: + measurement = measurements[names[i].toLowerCase()] + } + measurement /= 2 + measurement *= ease + + width = measurement * ratio + + // const classes = ['lining','canvas','mark','contrast','note','interfacing','various'] + console.log({ + p: prefix + postfix, + n: names[i], + m: measurement, + w: waistReduction, + lg: lastGood, + }) + if (i == 0) { + points[prefix + postfix + names[i]] = points[prefix + names[i]].shift( + prefix == 'front' ? 180 : 0, + measurement - width < ratioFixed ? width : measurement - ratioFixed + ) + console.log({ + pr: points[prefix + names[i]].shift( + prefix == 'front' ? 180 : 0, + measurement - width < ratioFixed ? width : measurement - ratioFixed + ), + a: prefix == 'front' ? 180 : 0, + d: measurement - width < ratioFixed ? width : measurement - ratioFixed, + }) + } else { + const radius = measurement - width < ratioFixed ? width : measurement - ratioFixed + // if( (radius > points[prefix + names[i]].dist(points[prefix + postfix + names[lastGood]]) +distance) || (radius < points[prefix + names[i]].dist(points[prefix + postfix + names[lastGood]]) -distance)){ + // points[prefix + postfix + names[i]] = points[prefix + postfix + names[lastGood]] + // lastGood = i + + // } else + { + // if(prefix == 'back') { + // points[prefix + names[i] +'Temp' +i] = points[prefix + names[i]].clone().addCircle(radius, classes[i]) + // points[prefix + postfix +names[i] +'Temp' +i] = points[prefix + postfix + names[lastGood]].clone().addCircle(distance, classes[i]) + // } + let ci = utils.circlesIntersect( + points[prefix + names[i]], + radius, + points[prefix + postfix + names[lastGood]], + distance + ) + // console.log({n1:prefix + names[i],n2:prefix + postfix + names[lastGood]}) + // console.log({p1:points[prefix + names[i]],r1:radius,p2:points[prefix + postfix + names[lastGood]],r2:distance}) + console.log({ ci: ci }) + if (false !== ci) { + points[prefix + postfix + names[i]] = ci[prefix == 'front' ? 0 : 1] + console.log({ pp: points[prefix + postfix + names[i]], ppn: prefix + postfix + names[i] }) + lastGood = i + } else { + points[prefix + postfix + names[i]] = points[prefix + postfix + names[lastGood]].clone() + console.log({ + ppp: points[prefix + postfix + names[i]], + ppn: prefix + postfix + names[i], + }) + + // points[prefix + postfix + names[lastGood]] + // points[prefix + names[i]] + // points[prefix + names[i]].addCircle(measurement - width < ratioFixed ? width : measurement - ratioFixed) + } + } + } + console.log({ + p: points[prefix + names[i]], + m: measurement, + w: width, + rf: ratioFixed, + pr: points[prefix + postfix + names[i]], + }) + } + console.log({ pionts: JSON.parse(JSON.stringify(points)) }) +} + +const smoothPoints = (points, prefix, postfix, names, smoothness) => { + let adjust + for (let i = 0; i < names.length - 2; i++) { + adjust = false + if (prefix == 'front') { + adjust = + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) > + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) + } else { + adjust = + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) < + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) + } + if (adjust) { + // console.log({ prefix: prefix, postfix: postfix, smooth: names[i + 1] }) + const angleDiff = + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) - + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) + + points[prefix + postfix + names[i + 1]] = points[prefix + postfix + names[i]].shift( + points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) + + smoothness * angleDiff, + points[prefix + postfix + names[i]].dist(points[prefix + postfix + names[i + 1]]) + ) + } + } +} + export const points = { name: 'lumina.points', measurements: [ @@ -20,241 +268,117 @@ export const points = { 'upperLeg', ], options: { - ease: { pct: -20, min: -35, max: 10, menu: 'fit' }, + waistband: { bool: true, menu: 'style' }, + ease: { pct: -8, min: -25, max: 10, menu: 'fit' }, length: { pct: 35, min: 10, max: 100, menu: 'fit' }, - waistReduction: { pct: 35, min: 0, max: 60, menu: 'fit' }, + waistbandsize: { + pct: 90, + min: 0, + max: 150, + ...pctBasedOn('waistToHips'), + // eslint-disable-next-line no-unused-vars + menu: (settings, mergedOptions) => (mergedOptions?.waistband ? 'style' : false), + }, + waistlowering: { pct: 10, min: -10, max: 60, ...pctBasedOn('waistToHips'), menu: 'style' }, + waistreduction: { + pct: 4, + min: 0, + max: 10, + ...pctBasedOn('waist'), + // eslint-disable-next-line no-unused-vars + menu: (settings, mergedOptions) => (mergedOptions?.waistband ? 'style' : false), + }, + sidePanel: { pct: 25, min: 10, max: 40, menu: 'style' }, smoothing: { pct: 85, min: 50, max: 100, menu: 'advanced' }, + fixedsidepanel: { bool: false, menu: 'style' }, crossSeamAngle: 35, crotchToKnee: 0.4, waistToKneeCP: 0.4, kneeToWaistLength: 400, crotchPointsCP: 2, }, - draft: ({ measurements, options, Point, Path, points, paths, utils, part }) => { - const ControlPoints = (p1, p2, p3, t) => { - let a = Math.abs(p2.angle(p1) - p2.angle(p3)) / 2 - const t1 = p2.shift(p2.angle(p1) + a - 90, p2.dist(p1) / 3) - const t3 = p2.shift(p2.angle(p3) - a + 90, p2.dist(p3) / 3) - return { - cp1: p2.shift(p2.angle(p1) + a - 90, p2.dist(p1) / 3), - cp3: p2.shift(p2.angle(p3) - a + 90, p2.dist(p3) / 3), - } - } - const CreateControlPoints = (names) => { - for (var i = 1; i < names.length - 1; i++) { - var cp = ControlPoints(points[names[i - 1]], points[names[i]], points[names[i + 1]]) - points[names[i] + 'Cp1'] = cp.cp1 - points[names[i] + 'Cp2'] = cp.cp3 - } - } - const CreatePath = (pathName, names) => { - paths[pathName] = new Path() - .move(points[names[0]]) - ._curve(points[names[1] + 'Cp1'], points[names[1]]) - for (var i = 2; i < names.length - 1; i++) { - paths[pathName].curve( - points[names[i - 1] + 'Cp2'], - points[names[i] + 'Cp1'], - points[names[i]] - ) - } - paths[pathName].curve_(points[names[i - 1] + 'Cp2'], points[names[i]]) + draft: ({ measurements, options, Point, Path, points, paths, utils, store, part }) => { + /*const c1 = new Point(87.62444870107574, 154.32805978682666) + const c2 = new Point(260.759500228999, 267.90025949932897) + const r1 = 230, r2 = 20 + const ci = utils.circlesIntersect(c1,r1,c2,r2) - return paths[pathName] - } - const ReduceWaist = (pathName) => { - const newWaist = paths[pathName].shiftAlong(waistReduction) - if (newWaist.sitsRoughlyOn(points[pathName + 'Waist'])) { - return - } - points[pathName + 'Waist'] = newWaist - const pTemp = paths[pathName].split(points[pathName + 'Waist']) - if (pTemp.length != 2) { - log.info('couldNotReduceWaist') - console.log('couldNotReduceWaist') - } - paths[pathName] = pTemp[1] - } + console.log(ci) - const CreateWaistPoint = (front) => { - const kneeTemp = points.middleCrossSeam.shiftFractionTowards( - points.middleKnee, - options.crotchToKnee - ) - const angle = - 90 + - (front - ? options.crossSeamAngle * (m.waistBack / m.waist) - : -1 * options.crossSeamAngle * (1 - m.waistBack / m.waist)) - const crossSeam = front ? m.crossSeamFront : m.crossSeamBack - var kneeToWaist = m.waistToKnee - var ratio = 1 - var waist = kneeTemp.shift(angle, kneeToWaist * ratio) - const crossSeamCp = points.middleCrossSeam.shiftFractionTowards( - utils.beamIntersectsY(kneeTemp, waist, points.middleCrossSeam.y), - options.crotchPointsCP - ) + let dx = c1.dx(c2) + console.log({dx:dx}) + let dy = c1.dy(c2) + console.log({dy:dy}) + let dist = c1.dist(c2) + console.log({dist:dist}) + // Check for edge cases + console.log({pf1:parseFloat(r1),pf2:parseFloat(r2)}) + console.log({pfa:parseFloat(r1)+parseFloat(r2),pfb:parseFloat(r1)-parseFloat(r2)}) + console.log({g:dist > parseFloat(r1)+parseFloat(r2)}) + console.log({l:dist < parseFloat(r1)-parseFloat(r2)}) + if (dist > parseFloat(r1) + parseFloat(r2)) return false // Circles do not intersect + console.log({x:(dist < parseFloat(r2) - parseFloat(r1))}) + if (dist < Math.abs(parseFloat(r2) - parseFloat(r1))) return false // One circle is contained in the other + if (dist === 0 && r1 === r2) return false // Two circles are identical + let chorddistance = (Math.pow(r1, 2) - Math.pow(r2, 2) + Math.pow(dist, 2)) / (2 * dist) + console.log({chorddistance:chorddistance}) + + console.log({m1:Math.pow(r1, 2),m2:Math.pow(chorddistance, 2)}) + let halfchordlength = Math.sqrt(Math.abs(Math.pow(r1, 2) - Math.pow(chorddistance, 2))) + console.log({halfchordlength:halfchordlength}) + let chordmidpointx = c1.x + (chorddistance * dx) / dist + let chordmidpointy = c1.y + (chorddistance * dy) / dist + let i1 = new Point( + chordmidpointx + (halfchordlength * dy) / dist, + chordmidpointy - (halfchordlength * dx) / dist + ) + let i2 = new Point( + chordmidpointx - (halfchordlength * dy) / dist, + chordmidpointy + (halfchordlength * dx) / dist + ) + console.log({i1:i1,i2:i2}) - var waistCp - var diff, - iter = 0 - do { - waist = kneeTemp.shift(angle, kneeToWaist * ratio * (ratio < 1 ? 1.05 : 0.95)) - waistCp = waist.shiftFractionTowards(points.middleKnee, options.waistToKneeCP) + points.c1 = c1.clone().addCircle(r1) + points.c2 = c2.clone().addCircle(r2) - const crossSeamPath = new Path() - .move(points.middleCrossSeam) - .curve(crossSeamCp, waistCp, waist) + if(ci[0].x !== NaN ) {points.i0 = i1.clone()} + if(ci[1].x !== NaN ) {points.i1 = i2.clone()} - diff = crossSeam - crossSeamPath.length() - ratio = crossSeam / crossSeamPath.length() - } while (++iter < 100 && (diff > 1 || diff < -1)) - if (iter >= 100) { - log.error('Too many iterations trying to make it fit!') - } - - if (front) { - points.frontWaist = waist.clone() - points.frontWaistCp = waistCp.clone() - points.frontCrossSeamCp = crossSeamCp.clone() - } else { - points.backWaist = waist.clone() - points.backWaistCp = waistCp.clone() - points.backCrossSeamCp = crossSeamCp.clone() - } - } - - const CreateSidePoints = ( - prefix, - postfix, - names, - ratio, - ratioFixed, - ease, - distanceCompensation - ) => { - var measurement, - width, - lastGood = 0 - for (var i = 0; i < names.length; i++) { - var distance = - m['waistTo' + names[lastGood]] - - (m['waistTo' + names[i]] === undefined ? 0 : m['waistTo' + names[i]]) - switch (names[i]) { - case 'UpperLeg': - measurement = m['upperLeg'] - const intersect = utils.beamIntersectsCurve( - points[prefix + names[i]], - points[prefix + names[i]].shift(prefix == 'front' ? 180 : 0, ratioFixed * 100), - points.middleCrossSeam, - points[prefix + 'CrossSeamCp'], - points[prefix + 'WaistCp'], - points[prefix + 'Waist'] - ) - console.log({ prefix: prefix, name: names[i] }) - console.log({ intersect: intersect }) - console.log({ intersect: typeof intersect }) - console.log({ pins: JSON.parse(JSON.stringify(points)) }) - - if (false !== intersect) { - if (intersect.constructor === Array) { - measurement += intersect[0].dist(points[prefix + names[i]]) - } else { - measurement += intersect.dist(points[prefix + names[i]]) - } - } - break - case 'Waist': - measurement = prefix == 'front' ? m.waistFront : m.waistBack - case 'Seat': - measurement = prefix == 'front' ? m.seatFront : m.seatBack - distance *= distanceCompensation - break - default: - measurement = m[names[i].toLowerCase()] - } - measurement /= 2 - measurement *= ease - - width = measurement * ratio - - if (i == 0) { - points[prefix + postfix + names[i]] = points[prefix + names[i]].shift( - prefix == 'front' ? 180 : 0, - measurement - width < ratioFixed ? width : measurement - ratioFixed - ) //.addCircle(3).addCircle(6).addCircle(9) - points[prefix + names[i]] //.addCircle(width < ratioFixed ? width : ratioFixed) - } else { - var ci = utils.circlesIntersect( - points[prefix + names[i]], - measurement - width < ratioFixed ? width : measurement - ratioFixed, - points[prefix + postfix + names[lastGood]], - distance - ) - - if (false !== ci) { - points[prefix + postfix + names[i]] = ci[prefix == 'front' ? 0 : 1] //.addCircle(2).addCircle(4).addCircle(6) - lastGood = i - } else { - points[prefix + postfix + names[i]] = points[prefix + postfix + names[lastGood]].clone() //.addCircle(2).addCircle(4).addCircle(6) - - points[prefix + postfix + names[lastGood]] //.addCircle(distance) - points[prefix + names[i]] //.addCircle(width < ratioFixed ? width : ratioFixed) - // points[prefix + names[i]].addCircle(measurement - width < ratioFixed ? width : measurement - ratioFixed) - } - } - } - } - - const SmoothPoints = (prefix, postfix, names, smoothness) => { - var adjust - for (var i = 0; i < names.length - 2; i++) { - adjust = false - if (prefix == 'front') { - adjust = - points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) > - points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) - } else { - adjust = - points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) < - points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) - } - if (adjust) { - console.log({ prefix: prefix, postfix: postfix, smooth: names[i + 1] }) - const angleDiff = - points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) - - points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) - - points[prefix + postfix + names[i + 1]] = points[prefix + postfix + names[i]].shift( - points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) + - smoothness * angleDiff, - points[prefix + postfix + names[i]].dist(points[prefix + postfix + names[i + 1]]) - ) - } - } - } + console.log({ pionts: JSON.parse(JSON.stringify(points)) }) + return part +*/ const hideThis = false - const m = measurements const inseam = - m.inseam > m.waistToFloor - m.waistToUpperLeg ? m.waistToFloor - m.waistToUpperLeg : m.inseam - const crotchOffset = m.waistToFloor - inseam - const waistReduction = m.waistToHips * options.waistReduction - const waistFrontBackRatio = m.waistBack / m.waist + measurements.inseam > measurements.waistToFloor - measurements.waistToUpperLeg + ? measurements.waistToFloor - measurements.waistToUpperLeg + : measurements.inseam + const crotchOffset = measurements.waistToFloor - inseam + const waistLowering = measurements.waistToHips * options.waistlowering + const waistReduction = options.waistband ? measurements.waist * options.waistreduction : 0 + const waistbandSize = options.waistband + ? measurements.waistToHips * + (options.waistlowering + options.waistbandsize > 1.5 + ? 1.5 - options.waistlowering + : options.waistbandsize) + : 0 + const waistFrontBackRatio = measurements.waistBack / measurements.waist const sideRatio = 1 - options.sidePanel // const sideRatio = 3 / 5 const ease = options.ease + 1 - const waistToAnkle = m.waistToFloor - m.heel / Math.PI + const waistToAnkle = measurements.waistToFloor - measurements.heel / Math.PI - m['waistToAnkle'] = m.waistToFloor - m.heel / Math.PI - const sideFixed = (((m.waist - m.waistBack) * ease) / 2) * sideRatio + store.set('waistbandSize', waistbandSize) + + measurements['waistToAnkle'] = measurements.waistToFloor - measurements.heel / Math.PI + const sideFixed = (((measurements.waist - measurements.waistBack) * ease) / 2) * sideRatio points.middleWaist = new Point(0, 0) - points.middleHips = points.middleWaist.shift(270, m.waistToHips) - points.middleSeat = points.middleWaist.shift(270, m.waistToSeat) + points.middleHips = points.middleWaist.shift(270, measurements.waistToHips) + points.middleSeat = points.middleWaist.shift(270, measurements.waistToSeat) points.frontCrossSeam = points.backCrossSeam = points.middleCrossSeam = @@ -262,11 +386,11 @@ export const points = { points.frontUpperLeg = points.backUpperLeg = points.middleUpperLeg = - points.middleWaist.shift(270, m.waistToUpperLeg) + points.middleWaist.shift(270, measurements.waistToUpperLeg) points.frontKnee = points.backKnee = points.middleKnee = - points.middleWaist.shift(270, m.waistToKnee) + points.middleWaist.shift(270, measurements.waistToKnee) points.frontAnkle = points.backAnkle = points.middleAnkle = @@ -274,12 +398,12 @@ export const points = { points.frontFloor = points.backFloor = points.middleFloor = - points.middleWaist.shift(270, m.waistToFloor) + points.middleWaist.shift(270, measurements.waistToFloor) - CreateWaistPoint(true) - CreateWaistPoint(false) + createWaistPoint(options, measurements, Path, points, utils, true) + createWaistPoint(options, measurements, Path, points, utils, false) - console.log({ pionts: JSON.parse(JSON.stringify(points)) }) + // console.log({ pionts: JSON.parse(JSON.stringify(points)) }) const frontCrossSeam = new Path() .move(points.frontWaist) @@ -289,36 +413,78 @@ export const points = { .curve(points.backWaistCp, points.backCrossSeamCp, points.middleCrossSeam) points.frontSeat = frontCrossSeam.shiftAlong( - m.waistToSeat * (m.crossSeamFront / m.waistToUpperLeg) * 0.8 + measurements.waistToSeat * (measurements.crossSeamFront / measurements.waistToUpperLeg) * 0.8 ) points.frontHips = frontCrossSeam.shiftAlong( - m.waistToHips * (m.crossSeamFront / m.waistToUpperLeg) + measurements.waistToHips * (measurements.crossSeamFront / measurements.waistToUpperLeg) ) - points.backSeat = backCrossSeam.shiftAlong(m.waistToSeat * (m.waistToSeat / m.waistToUpperLeg)) - points.backHips = backCrossSeam.shiftAlong(m.waistToHips * (m.waistToSeat / m.waistToUpperLeg)) + points.backSeat = backCrossSeam.shiftAlong( + measurements.waistToSeat * (measurements.waistToSeat / measurements.waistToUpperLeg) + ) + points.backHips = backCrossSeam.shiftAlong( + measurements.waistToHips * (measurements.waistToSeat / measurements.waistToUpperLeg) + ) ;['front', 'back'].forEach((prefix) => { - CreateSidePoints( + createSidePoints( + measurements, + points, + utils, prefix, 'Side', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], 0, 0.1, ease, + waistReduction, 1 ) + points[prefix + 'SideWaistband'] = points[prefix + 'SideWaist'].clone() }) + console.log({ pionts: JSON.parse(JSON.stringify(points)) }) + + // return part + console.log({ wb1: points.backSideWaist }) ;['front', 'back'].forEach((prefix) => { - CreateSidePoints( - prefix, - 'Split', - ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], - sideRatio, - sideFixed, - ease, - (points.frontAnkle.dist(points.frontCrossSeam) + frontCrossSeam.length()) / - (m.waistToFloor - m.heel / Math.PI) - ) + ;['Ankle', 'Knee', 'UpperLeg', 'Seat'].forEach((point) => { + const n = point == 'UpperLeg' ? 'upperLeg' : point.toLowerCase() + const m = measurements[n] * ease * (point == 'Seat' ? 0.25 : 0.5) + // console.log({n:prefix+point,m:m,d:points[prefix+'Side' +point].dist(points[prefix+point])-m}) + }) + }) + points.middleWaistband = points.middleWaist.clone() + ;['front', 'back'].forEach((prefix) => { + if (options.fixedsidepanel) { + createSidePoints( + measurements, + points, + utils, + prefix, + 'Split', + ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + sideFixed, + ease, + waistReduction, + (points.frontAnkle.dist(points.frontCrossSeam) + frontCrossSeam.length()) / + (measurements.waistToFloor - measurements.heel / Math.PI) + ) + } else { + createSidePoints( + measurements, + points, + utils, + prefix, + 'Split', + ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + sideRatio, + sideFixed, + ease, + waistReduction, + (points.frontAnkle.dist(points.frontCrossSeam) + frontCrossSeam.length()) / + (measurements.waistToFloor - measurements.heel / Math.PI) + ) + } + points[prefix + 'SplitWaistband'] = points[prefix + 'SplitWaist'].clone() }) points.backHipsCp1 = points.backWaistCp.clone() @@ -351,22 +517,42 @@ export const points = { .curve(points.backHipsCp1, points.backCrossSeamCp, points.middleCrossSeam) .setHidden(hideThis) - SmoothPoints('front', 'Side', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], options.smoothing) - SmoothPoints( + smoothPoints( + points, + 'front', + 'Side', + ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + options.smoothing + ) + smoothPoints( + points, 'front', 'Split', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], options.smoothing ) - SmoothPoints('back', 'Side', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], options.smoothing) - SmoothPoints('back', 'Split', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], options.smoothing) + smoothPoints( + points, + 'back', + 'Side', + ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + options.smoothing + ) + smoothPoints( + points, + 'back', + 'Split', + ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + options.smoothing + ) + console.log({ wb2: points.backSideWaist }) - console.log({ pins: JSON.parse(JSON.stringify(points)) }) + // console.log({ pins: JSON.parse(JSON.stringify(points)) }) paths.middle = new Path().move(points.middleWaist).line(points.middleFloor).setHidden() ;['front', 'back'].forEach((prefix) => { ;['Side', 'Split'].forEach((type) => { - CreateControlPoints([ + createControlPoints(points, 3, [ prefix + type + 'Waist', prefix + type + 'Seat', prefix + type + 'UpperLeg', @@ -377,7 +563,7 @@ export const points = { }) ;['front', 'back'].forEach((prefix) => { ;['Side', 'Split'].forEach((type) => { - CreatePath(prefix + type, [ + createPath(paths, Path, points, prefix + type, [ prefix + type + 'Waist', prefix + type + 'Seat', prefix + type + 'UpperLeg', @@ -386,17 +572,21 @@ export const points = { ]).setHidden(hideThis) }) }) - console.log({ phats: JSON.parse(JSON.stringify(paths)) }) + console.log({ wb3: points.backSideWaist }) + + // console.log({ phats: JSON.parse(JSON.stringify(paths)) }) + console.log({ points: JSON.parse(JSON.stringify(points)) }) ;['front', 'back'].forEach((prefix) => { - ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { + ;['Waist', 'Waistband', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { + console.log({ n: prefix + 'Side' + name }) points[prefix + 'Panel' + name] = points['middle' + name].shift( prefix == 'front' ? 180 : 0, points[prefix + 'Side' + name].dist(points[prefix + 'Split' + name]) - ) //.addCircle(4) + ) }) }) ;['front', 'back'].forEach((prefix) => { - CreateControlPoints([ + createControlPoints(points, 3, [ prefix + 'Panel' + 'Waist', prefix + 'Panel' + 'Seat', prefix + 'Panel' + 'UpperLeg', @@ -405,7 +595,7 @@ export const points = { ]) }) ;['front', 'back'].forEach((prefix) => { - CreatePath(prefix + 'Panel', [ + createPath(paths, Path, points, prefix + 'Panel', [ prefix + 'Panel' + 'Waist', prefix + 'Panel' + 'Seat', prefix + 'Panel' + 'UpperLeg', @@ -413,19 +603,20 @@ export const points = { prefix + 'Panel' + 'Ankle', ]).setHidden(hideThis) }) + console.log({ wb4: points.backSideWaist }) while (Math.abs(paths.frontSplit.length() - paths.frontPanel.length()) > 1) { ;['front', 'back'].forEach((prefix) => { const diff = paths[prefix + 'Split'].length() / paths[prefix + 'Panel'].length() const names = ['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'] - for (var i = 0; i < names.length - 1; i++) { + for (let i = 0; i < names.length - 1; i++) { points[prefix + 'Panel' + names[i]] = points[ prefix + 'Panel' + names[i + 1] ].shiftFractionTowards(points[prefix + 'Panel' + names[i]], diff) } }) ;['front', 'back'].forEach((prefix) => { - CreateControlPoints([ + createControlPoints(points, 3, [ prefix + 'Panel' + 'Waist', prefix + 'Panel' + 'Seat', prefix + 'Panel' + 'UpperLeg', @@ -434,7 +625,7 @@ export const points = { ]) }) ;['front', 'back'].forEach((prefix) => { - CreatePath(prefix + 'Panel', [ + createPath(paths, Path, points, prefix + 'Panel', [ prefix + 'Panel' + 'Waist', prefix + 'Panel' + 'Seat', prefix + 'Panel' + 'UpperLeg', @@ -443,21 +634,24 @@ export const points = { ]).setHidden(hideThis) }) } - console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) + console.log({ wb5: points.backSideWaist }) + // console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) if (options.length < 1) { - const length = (1 - options.length) * (inseam - (m.waistToFloor - waistToAnkle)) + const length = (1 - options.length) * (inseam - (measurements.waistToFloor - waistToAnkle)) // console.log({i:inseam,wa:waistToAnkle,iw:(inseam/waistToAnkle),r:lengthRatio}) ;['front', 'back'].forEach((prefix) => { ;['Side', 'Split', 'Panel'].forEach((type) => { - console.log({ - prefix: prefix, - type: type, - path: paths[prefix + type], - r: paths[prefix + type].reverse(), - l: length, - pl: paths[prefix + type].reverse().length(), - }) + // console.log({ + // prefix: prefix, + // type: type, + // path: paths[prefix + type], + // r: paths[prefix + type].reverse(), + // l: length, + // pl: paths[prefix + type].reverse().length(), + // }) + // console.log({ points: JSON.parse(JSON.stringify(points)) }) + // console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) points[prefix + type + 'Hem'] = paths[prefix + type].reverse().shiftAlong(length) paths[prefix + type] = paths[prefix + type] .split(points[prefix + type + 'Hem'])[0] @@ -471,26 +665,71 @@ export const points = { }) }) } - + console.log({ wb6: points.backSideWaist }) ;['back'].forEach((prefix) => { ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { - points[prefix + 'Split' + name] //.addCircle(3).addCircle(6) + points[prefix + 'Split' + name] }) }) - console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) - - ReduceWaist('middle') + // console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) + lowerWaist(paths, Path, points, waistLowering, 'middle', 'Waist') ;['front', 'back'].forEach((prefix) => { ;['Side', 'Split', 'Panel'].forEach((type) => { - ReduceWaist(prefix + type) + lowerWaist(paths, Path, points, waistLowering, prefix + type, 'Waist') }) - ReduceWaist(prefix) + lowerWaist(paths, Path, points, waistLowering, prefix, 'Waist') }) + ;['front', 'back'].forEach((prefix) => { + ;['Side', 'Split', 'Panel'].forEach((type) => { + lowerWaist(paths, Path, points, waistbandSize, prefix + type, 'Waistband') + }) + lowerWaist(paths, Path, points, waistbandSize, prefix, 'Waistband') + }) + + console.log({ wb7: points.backSideWaist }) + // Lower the back a little more to get a V-shape in the back + lowerWaist(paths, Path, points, waistLowering * 0.5, 'back', 'Waistband') + console.log({ wb8: points.backSideWaist }) + ;['front', 'back'].forEach((prefix) => { + ;['Side', 'Split', 'Panel'].forEach((type) => { + ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { + points[prefix + type + name] + }) + points[prefix + type + 'Waistband'] + }) + points[prefix + 'Waist'] + points[prefix + 'Waistband'] + }) + ;['front', 'back'].forEach((prefix) => { + ;['Side', 'Split', 'Panel'].forEach((type) => { + ;['Seat', 'UpperLeg', 'Knee'].forEach((name) => { + points[prefix + type + name + 'Cp1'] + points[prefix + type + name + 'Cp2'] + }) + }) + }) + console.log({ wb9: points.backSideWaist }) + + points.middleWaistband + points.middleWaist console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) console.log({ pihts: JSON.parse(JSON.stringify(points)) }) + store.set( + 'waistLength', + points.backWaist.dist(points.backSideWaist) + points.frontWaist.dist(points.frontSideWaist) + ) + store.set( + 'waistbandLength', + points.backWaistband.dist(points.backSideWaistband) + + points.frontWaistband.dist(points.frontSideWaistband) + ) + + // paths.back.unhide() + // paths.middle.unhide() + return part.setHidden(hideThis) }, } diff --git a/designs/lumina/src/waistband.mjs b/designs/lumina/src/waistband.mjs new file mode 100644 index 00000000000..b454d238db6 --- /dev/null +++ b/designs/lumina/src/waistband.mjs @@ -0,0 +1,146 @@ +import { cbqc } from '@freesewing/core' +import { points } from './points.mjs' + +export const waistband = { + name: 'lumina.waistband', + after: points, + draft: ({ + store, + sa, + Point, + points, + Path, + paths, + Snippet, + snippets, + options, + measurements, + macro, + log, + utils, + part, + }) => { + if (false === options.waistband) { + return part.hide() + } + + const waistLength = store.get('waistLength') + const waistbandLength = store.get('waistbandLength') + const waistbandSize = store.get('waistbandSize') + if (waistbandSize <= 0) { + return part.hide() + } + + console.log({ store: JSON.parse(JSON.stringify(store)) }) + + points.origin = new Point(0, 0) //.addCircle(3) + + const angleRad = Math.asin((Math.abs(waistbandLength - waistLength) * 0.5) / waistbandSize) + const radius = (waistLength * 0.5) / Math.sin(angleRad) + const baseAngle = waistLength < waistbandLength ? 270 : 90 + console.log({ baseAngle: baseAngle }) + let angle = utils.rad2deg(angleRad) + + let diff = 0 + let iter = 0 + let segments, cpDistance + do { + angle += diff * 0.025 + segments = 360 / angle + + cpDistance = (4 / 3) * Math.tan(Math.PI / (segments * 2)) * radius + + points.waistFront = points.origin.shift(baseAngle + angle, radius).addCircle(2) + points.waistBack = points.origin.shift(baseAngle - angle, radius).addCircle(2) + points.waistFrontCP = points.waistFront.shift(baseAngle - 90 + angle, cpDistance).addCircle(5) + points.waistBackCP = points.waistBack.shift(baseAngle + 90 - angle, cpDistance).addCircle(5) + + paths.waist = new Path() + .move(points.waistBack) + .curve(points.waistBackCP, points.waistFrontCP, points.waistFront) + + diff = waistLength - paths.waist.length() + console.log({ i: iter, d: diff, a: angle }) + } while (iter++ < 100 && (diff < -0.5 || diff > 0.5)) + if (iter >= 100) { + log.info('lumina:couldNoFitWaistband') + return part.hide() + } + + points.waistbandFront = points.waistFront.shift(270 + angle, waistbandSize) + points.waistbandBack = points.waistBack.shift(270 - angle, waistbandSize) + + cpDistance = + (4 / 3) * + Math.tan(Math.PI / (segments * 2)) * + (radius + waistbandSize * (waistLength < waistbandLength ? 1 : -1)) + points.waistbandFrontCP = points.waistbandFront + .shift(baseAngle - 90 + angle, cpDistance) + .addCircle(5) + points.waistbandBackCP = points.waistbandBack + .shift(baseAngle + 90 - angle, cpDistance) + .addCircle(5) + + paths.waistband = new Path() + .move(points.waistbandBack) + .curve(points.waistbandBackCP, points.waistbandFrontCP, points.waistbandFront) + + diff = waistbandLength - paths.waistband.length() + console.log({ d: diff, a: angle }) + console.log({ + wl: waistLength, + wpl: paths.waist.length(), + wbl: waistbandLength, + wbpl: paths.waistband.length(), + }) + + return part + + points.frontTop = new Point(0, 0).addCircle(3) + points.frontBottom = points.frontTop.shift(270, waistbandSize).addCircle(5) + + let rotateAngle = 180 * 5 + do { + points.backTop = points.frontTop.shift(rotateAngle * 0.2, waistLength).addCircle(7) + points.backBottom = points.frontBottom.shift(rotateAngle * 0.2, waistbandLength).addCircle(9) + rotateAngle++ + + const angle = points.backTop.angle(points.backBottom) + points.backTopCp = points.backTop.shift(angle + 90, waistLength * cbqc).addCircle(10) + points.backBottomCp = points.backBottom.shift(angle + 90, waistbandLength * cbqc) + } while (points.backTopCp.y < 0) + + diff = 0 + iter = 0 + const direction = waistLength > waistbandLength ? -1 : 1 + + console.log({ wl: waistLength, wbl: waistbandLength }) + do { + points.frontTopCp = points.frontTop.shift(180, waistLength * cbqc) + points.frontBottomCp = points.frontBottom.shift(180, waistbandLength * cbqc) + + const angle = points.backTop.angle(points.backBottom) + + points.backTop = points.backTop.shift(angle, diff) + points.backBottom = points.backBottom.shift(angle, diff) + + points.backTopCp = points.backTop.shift(angle + 90, waistLength * cbqc).addCircle(10) + points.backBottomCp = points.backBottom.shift(angle + 90, waistbandLength * cbqc) + + paths.top = new Path() + .move(points.frontTop) + .curve(points.frontTopCp, points.backTopCp, points.backTop) + paths.bottom = new Path() + .move(points.frontBottom) + .curve(points.frontBottomCp, points.backBottomCp, points.backBottom) + + diff = paths.top.length() - waistLength + if (diff > -1 && diff < 1) { + diff = paths.bottom.length() - waistbandLength + } + + console.log({ i: iter, d: diff, t: paths.top.length(), b: paths.bottom.length() }) + } while (iter++ < 1 && (diff < -1 || diff > 1)) + return part + }, +} diff --git a/designs/lumira/src/shape.mjs b/designs/lumira/src/shape.mjs index a3ff366da28..15aa0c06812 100644 --- a/designs/lumira/src/shape.mjs +++ b/designs/lumira/src/shape.mjs @@ -20,16 +20,17 @@ export const controlPoints = (p1, p2, p3, cpDistanceDivider) => { } else { angle = Math.abs(p2.angle(p1) - p2.angle(p3)) / 2 } - return { - cp1: - p3 !== undefined - ? p2.shift(p2.angle(p3) - angle + 90, p2.dist(p3) / cpDistanceDivider) - : null, - cp2: - p1 !== undefined - ? p2.shift(p2.angle(p1) + angle - 90, p2.dist(p1) / cpDistanceDivider) - : null, + let cp1 = + p3 !== undefined ? p2.shift(p2.angle(p3) - angle + 90, p2.dist(p3) / cpDistanceDivider) : null + let cp2 = + p1 !== undefined ? p2.shift(p2.angle(p1) + angle - 90, p2.dist(p1) / cpDistanceDivider) : null + if (p1 !== undefined && p2.sitsRoughlyOn(p1)) { + return { cp1: p1.clone(), cp2: cp2 } } + if (p3 !== undefined && p2.sitsRoughlyOn(p3)) { + return { cp1: cp1.clone(), cp2: p3.clone() } + } + return { cp1: cp1, cp2: cp2 } } export const createControlPoints = (points, cpDistanceDivider, names) => { for (let i = 0; i < names.length; i++) { From 6748a765ecc325f218a8d35594521779f4585d24 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Tue, 26 Dec 2023 02:08:29 +0000 Subject: [PATCH 06/28] fix for waistband --- designs/lumina/src/leg.mjs | 6 ++++ designs/lumina/src/points.mjs | 54 +++++++++++++++++++++++++++++------ 2 files changed, 52 insertions(+), 8 deletions(-) diff --git a/designs/lumina/src/leg.mjs b/designs/lumina/src/leg.mjs index ddb67c722e2..4fd059c4c69 100644 --- a/designs/lumina/src/leg.mjs +++ b/designs/lumina/src/leg.mjs @@ -7,11 +7,17 @@ export const leg = { paths.seam = new Path() .move(points.frontSplitHem) .join(paths.backSplit.reverse()) + .join(paths.backWaistband.reverse()) .join(paths.back) .join(paths.front.reverse()) + .join(paths.frontWaistband) .join(paths.frontSplit) .close() + // paths.backSplit.addClass('lining').unhide() + // paths.back.addClass('note').unhide() + // paths.front.addClass('mark').unhide() + // paths.frontSplit.addClass('contrast').unhide() if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') return part diff --git a/designs/lumina/src/points.mjs b/designs/lumina/src/points.mjs index fd027aa9ab8..30a1e5eeeb8 100644 --- a/designs/lumina/src/points.mjs +++ b/designs/lumina/src/points.mjs @@ -269,6 +269,7 @@ export const points = { ], options: { waistband: { bool: true, menu: 'style' }, + Lowerwaistbandback: { bool: true, menu: 'style' }, ease: { pct: -8, min: -25, max: 10, menu: 'fit' }, length: { pct: 35, min: 10, max: 100, menu: 'fit' }, waistbandsize: { @@ -688,9 +689,6 @@ export const points = { }) console.log({ wb7: points.backSideWaist }) - // Lower the back a little more to get a V-shape in the back - lowerWaist(paths, Path, points, waistLowering * 0.5, 'back', 'Waistband') - console.log({ wb8: points.backSideWaist }) ;['front', 'back'].forEach((prefix) => { ;['Side', 'Split', 'Panel'].forEach((type) => { ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { @@ -721,14 +719,54 @@ export const points = { 'waistLength', points.backWaist.dist(points.backSideWaist) + points.frontWaist.dist(points.frontSideWaist) ) - store.set( - 'waistbandLength', - points.backWaistband.dist(points.backSideWaistband) + - points.frontWaistband.dist(points.frontSideWaistband) - ) // paths.back.unhide() // paths.middle.unhide() + ;['front', 'back'].forEach((prefix) => { + const waistbandLength = points[prefix + 'Waistband'].dist(points[prefix + 'SplitWaistband']) + const direction = prefix == 'front' ? 90 : -90 + let angle = paths[prefix].shiftAlong(1).angle(points[prefix + 'Waistband']) + points[prefix + 'WaistbandCp'] = points[prefix + 'Waistband'].shift( + angle + direction, + waistbandLength * 0.35 + ) + angle = paths[prefix + 'Split'].shiftAlong(1).angle(points[prefix + 'SplitWaistband']) + points[prefix + 'SplitWaistbandCp'] = points[prefix + 'SplitWaistband'].shift( + angle + direction * -1, + waistbandLength * 0.35 + ) + paths[prefix + 'Waistband'] = new Path() + .move(points[prefix + 'Waistband']) + .curve( + points[prefix + 'WaistbandCp'], + points[prefix + 'SplitWaistbandCp'], + points[prefix + 'SplitWaistband'] + ) + .hide() + }) + + if (options.Lowerwaistbandback) { + // Lower the back a little more to get a V-shape in the back + lowerWaist(paths, Path, points, waistLowering * 0.5, 'back', 'Waistband') + console.log({ wb8: points.backSideWaist }) + paths.backWaistband = new Path() + .move(points.backWaistband) + ._curve(points.backSplitWaistbandCp, points.backSplitWaistband) + .hide() + } + + store.set( + 'waistbandLength', + paths.backWaistband.length() + + paths.frontWaistband.length() + + points.frontPanelWaistband.dist(points.backPanelWaistband) + ) + console.log({ + waistbandLengthBack: paths.backWaistband.length(), + waistbandLengthFront: paths.frontWaistband.length(), + }) + + console.log({ back: paths.back, front: paths.front }) return part.setHidden(hideThis) }, From b2ee0e23fc5c36f83e27dab036044f3f99526b06 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Tue, 26 Dec 2023 17:36:18 +0000 Subject: [PATCH 07/28] More waistband --- designs/lumina/src/points.mjs | 28 +++++++---- designs/lumina/src/waistband.mjs | 82 ++++++++++++++++---------------- 2 files changed, 58 insertions(+), 52 deletions(-) diff --git a/designs/lumina/src/points.mjs b/designs/lumina/src/points.mjs index 30a1e5eeeb8..439df0b6114 100644 --- a/designs/lumina/src/points.mjs +++ b/designs/lumina/src/points.mjs @@ -373,6 +373,7 @@ export const points = { const waistToAnkle = measurements.waistToFloor - measurements.heel / Math.PI store.set('waistbandSize', waistbandSize) + store.set('waistLowering', waistLowering) measurements['waistToAnkle'] = measurements.waistToFloor - measurements.heel / Math.PI const sideFixed = (((measurements.waist - measurements.waistBack) * ease) / 2) * sideRatio @@ -423,9 +424,11 @@ export const points = { points.backSeat = backCrossSeam.shiftAlong( measurements.waistToSeat * (measurements.waistToSeat / measurements.waistToUpperLeg) ) - points.backHips = backCrossSeam.shiftAlong( - measurements.waistToHips * (measurements.waistToSeat / measurements.waistToUpperLeg) - ) + points.backHips = backCrossSeam + .shiftAlong( + measurements.waistToHips * (measurements.waistToSeat / measurements.waistToUpperLeg) + ) + .addCircle(4) ;['front', 'back'].forEach((prefix) => { createSidePoints( measurements, @@ -745,9 +748,17 @@ export const points = { .hide() }) + store.set( + 'waistbandLength', + paths.backWaistband.length() + + paths.frontWaistband.length() + + points.frontPanelWaistband.dist(points.backPanelWaistband) + ) + if (options.Lowerwaistbandback) { // Lower the back a little more to get a V-shape in the back - lowerWaist(paths, Path, points, waistLowering * 0.5, 'back', 'Waistband') + // lowerWaist(paths, Path, points, waistLowering * 0.5, 'back', 'Waistband') + lowerWaist(paths, Path, points, (waistLowering + waistbandSize) * 0.5, 'back', 'Waistband') console.log({ wb8: points.backSideWaist }) paths.backWaistband = new Path() .move(points.backWaistband) @@ -755,12 +766,9 @@ export const points = { .hide() } - store.set( - 'waistbandLength', - paths.backWaistband.length() + - paths.frontWaistband.length() + - points.frontPanelWaistband.dist(points.backPanelWaistband) - ) + store.set('waistbandBackLength', paths.backWaistband.length()) + store.set('waistbandFrontLength', paths.frontWaistband.length()) + store.set('waistbandPanelLength', points.frontPanelWaistband.dist(points.backPanelWaistband)) console.log({ waistbandLengthBack: paths.backWaistband.length(), waistbandLengthFront: paths.frontWaistband.length(), diff --git a/designs/lumina/src/waistband.mjs b/designs/lumina/src/waistband.mjs index b454d238db6..6fd81f1d972 100644 --- a/designs/lumina/src/waistband.mjs +++ b/designs/lumina/src/waistband.mjs @@ -25,8 +25,12 @@ export const waistband = { } const waistLength = store.get('waistLength') + const waistbandBackLength = store.get('waistbandBackLength') + const waistbandFrontLength = store.get('waistbandFrontLength') + const waistbandPanelLength = store.get('waistbandPanelLength') const waistbandLength = store.get('waistbandLength') const waistbandSize = store.get('waistbandSize') + const waistLowering = store.get('waistLowering') if (waistbandSize <= 0) { return part.hide() } @@ -94,53 +98,47 @@ export const waistband = { wbpl: paths.waistband.length(), }) - return part + const rWaistband = paths.waistband.reverse() + points.snippetPanelBack = rWaistband.shiftAlong(waistbandFrontLength + waistbandPanelLength) + snippets.panelBack = new Snippet('notch', points.snippetPanelBack) + points.snippetPanelFront = rWaistband.shiftAlong(waistbandFrontLength) + snippets.panelFront = new Snippet('notch', points.snippetPanelFront) - points.frontTop = new Point(0, 0).addCircle(3) - points.frontBottom = points.frontTop.shift(270, waistbandSize).addCircle(5) + if (options.Lowerwaistbandback) { + paths.waistband = rWaistband.split(points.snippetPanelBack)[0] + points.waistbandBackPanel = points.snippetPanelBack.copy() + points.waistbandBackPanelCP = points.snippetPanelFront.shiftFractionTowards( + points.waistbandBackPanel, + 1.3 + ) + points.waistbandBack = points.waistBack + .shiftOutwards(points.waistbandBack, (waistLowering + waistbandSize) * 0.5) + .addCircle(3) + paths.waistband = new Path() + .move(points.waistbandBack) + ._curve(points.waistbandBackPanelCP, points.waistbandBackPanel) + .join(paths.waistband.reverse()) + } - let rotateAngle = 180 * 5 - do { - points.backTop = points.frontTop.shift(rotateAngle * 0.2, waistLength).addCircle(7) - points.backBottom = points.frontBottom.shift(rotateAngle * 0.2, waistbandLength).addCircle(9) - rotateAngle++ + paths.seamSA = new Path() + .move(points.waistFront) + .join(paths.waist.reverse()) + .line(points.waistbandBack) + .join(paths.waistband) + .hide() - const angle = points.backTop.angle(points.backBottom) - points.backTopCp = points.backTop.shift(angle + 90, waistLength * cbqc).addCircle(10) - points.backBottomCp = points.backBottom.shift(angle + 90, waistbandLength * cbqc) - } while (points.backTopCp.y < 0) + paths.seam = new Path().move(points.waistbandFront).line(points.waistFront).join(paths.seamSA) - diff = 0 - iter = 0 - const direction = waistLength > waistbandLength ? -1 : 1 + if (sa) { + const seamSA = paths.seamSA.offset(sa) + paths.sa = new Path() + .move(points.waistFront) + .line(seamSA.start()) + .join(seamSA) + .line(points.waistbandFront) + .attr('class', 'fabric sa') + } - console.log({ wl: waistLength, wbl: waistbandLength }) - do { - points.frontTopCp = points.frontTop.shift(180, waistLength * cbqc) - points.frontBottomCp = points.frontBottom.shift(180, waistbandLength * cbqc) - - const angle = points.backTop.angle(points.backBottom) - - points.backTop = points.backTop.shift(angle, diff) - points.backBottom = points.backBottom.shift(angle, diff) - - points.backTopCp = points.backTop.shift(angle + 90, waistLength * cbqc).addCircle(10) - points.backBottomCp = points.backBottom.shift(angle + 90, waistbandLength * cbqc) - - paths.top = new Path() - .move(points.frontTop) - .curve(points.frontTopCp, points.backTopCp, points.backTop) - paths.bottom = new Path() - .move(points.frontBottom) - .curve(points.frontBottomCp, points.backBottomCp, points.backBottom) - - diff = paths.top.length() - waistLength - if (diff > -1 && diff < 1) { - diff = paths.bottom.length() - waistbandLength - } - - console.log({ i: iter, d: diff, t: paths.top.length(), b: paths.bottom.length() }) - } while (iter++ < 1 && (diff < -1 || diff > 1)) return part }, } From 54dd8185f12cc859c0b12598e993c3b415e3ba9c Mon Sep 17 00:00:00 2001 From: woutervdub Date: Sat, 30 Dec 2023 18:19:31 +0000 Subject: [PATCH 08/28] remove debug --- designs/lumina/src/index.mjs | 2 + designs/lumina/src/points.mjs | 257 ++++++------------------------- designs/lumina/src/waistband.mjs | 2 +- 3 files changed, 49 insertions(+), 212 deletions(-) diff --git a/designs/lumina/src/index.mjs b/designs/lumina/src/index.mjs index 222f564d730..1077513304f 100644 --- a/designs/lumina/src/index.mjs +++ b/designs/lumina/src/index.mjs @@ -20,6 +20,8 @@ const Lumina = new Design({ // Named exports export { i18n, Lumina, /*zpoints, ipoints,*/ points, panel, leg, waistband } +// const classes = ['lining','canvas','mark','contrast','note','interfacing','various'] + // http://localhost:8000/new/lumina#view=%22inspect%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A960%2C%22waistBack%22%3A440%2C%22hips%22%3A884%2C%22seat%22%3A980%2C%22seatBack%22%3A490%2C%22inseam%22%3A790%2C%22waistToSeat%22%3A230%2C%22waistToUpperLeg%22%3A280%2C%22waistToKnee%22%3A610%2C%22waistToHips%22%3A120%2C%22waistToFloor%22%3A1090%2C%22knee%22%3A415%2C%22ankle%22%3A230%2C%22crossSeam%22%3A800%2C%22crossSeamFront%22%3A380%2C%22heel%22%3A300%2C%22upperLeg%22%3A640%7D%7D // http://localhost:8000/new/lumina#view=%22inspect%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A780%2C%22waistBack%22%3A360%2C%22hips%22%3A860%2C%22seat%22%3A980%2C%22seatBack%22%3A510%2C%22inseam%22%3A680%2C%22waistToSeat%22%3A200%2C%22waistToUpperLeg%22%3A250%2C%22waistToKnee%22%3A500%2C%22waistToHips%22%3A90%2C%22waistToFloor%22%3A890%2C%22knee%22%3A360%2C%22ankle%22%3A220%2C%22crossSeam%22%3A620%2C%22crossSeamFront%22%3A290%2C%22heel%22%3A280%2C%22upperLeg%22%3A580%7D%2C%22options%22%3A%7B%22length%22%3A1%2C%22waistreduction%22%3A0.1%2C%22waistLowering%22%3A0.012%2C%22waistlowering%22%3A0.181%7D%2C%22units%22%3A%22metric%22%7D diff --git a/designs/lumina/src/points.mjs b/designs/lumina/src/points.mjs index 439df0b6114..bb558781c85 100644 --- a/designs/lumina/src/points.mjs +++ b/designs/lumina/src/points.mjs @@ -1,32 +1,7 @@ import { pctBasedOn } from '@freesewing/core' import { extendPath, createControlPoints } from '@freesewing/lumira' -const lowerWaist = (paths, Path, points, waistLowering, pathName, pointName) => { - console.log({ pins: JSON.parse(JSON.stringify(points)) }) - console.log({ pats: JSON.parse(JSON.stringify(paths)) }) - console.log({ - pn: pointName, - pan: pathName, - par: { path: paths[pathName], len: paths[pathName].length(), wr: waistLowering }, - }) - const newPath = extendPath(Path, paths[pathName], 100, 0) - const newWaist = newPath.shiftAlong(waistLowering + 100) - // console.log({newWaist:newWaist}) - // console.log({p:points[pathName + pointName]}) - // console.log({s:newWaist.sitsRoughlyOn(points[pathName + pointName])}) - if (newWaist.sitsRoughlyOn(points[pathName + pointName])) { - return - } - points[pathName + pointName] = newWaist - const pTemp = newPath.split(points[pathName + pointName]) - if (pTemp.length != 2) { - log.info('lumina:couldNotLowerWaist') - // console.log('couldNotLowerWaist') - } - paths[pathName] = pTemp[1].hide() -} - -const createPath = (paths, Path, points, pathName, names) => { +export const createPath = (paths, Path, points, pathName, names) => { let i paths[pathName] = new Path() .move(points[names[0]]) @@ -39,6 +14,20 @@ const createPath = (paths, Path, points, pathName, names) => { return paths[pathName] } +const lowerWaist = (paths, Path, points, waistLowering, pathName, pointName) => { + const newPath = extendPath(Path, paths[pathName], 100, 0) + const newWaist = newPath.shiftAlong(waistLowering + 100) + if (newWaist.sitsRoughlyOn(points[pathName + pointName])) { + return + } + points[pathName + pointName] = newWaist + const pTemp = newPath.split(points[pathName + pointName]) + if (pTemp.length != 2) { + log.info('lumina:couldNotLowerWaist') + } + paths[pathName] = pTemp[1].hide() +} + const createWaistPoint = (options, measurements, Path, points, utils, front) => { const kneeTemp = points.middleCrossSeam.shiftFractionTowards( points.middleKnee, @@ -118,10 +107,6 @@ const createSidePoints = ( points[prefix + 'WaistCp'], points[prefix + 'Waist'] ) - // console.log({ prefix: prefix, name: names[i] }) - // console.log({ intersect: intersect }) - // console.log({ intersect: typeof intersect }) - // console.log({ pins: JSON.parse(JSON.stringify(points)) }) if (false !== intersect) { if (intersect.constructor === Array) { @@ -148,74 +133,27 @@ const createSidePoints = ( width = measurement * ratio - // const classes = ['lining','canvas','mark','contrast','note','interfacing','various'] - console.log({ - p: prefix + postfix, - n: names[i], - m: measurement, - w: waistReduction, - lg: lastGood, - }) if (i == 0) { points[prefix + postfix + names[i]] = points[prefix + names[i]].shift( prefix == 'front' ? 180 : 0, measurement - width < ratioFixed ? width : measurement - ratioFixed ) - console.log({ - pr: points[prefix + names[i]].shift( - prefix == 'front' ? 180 : 0, - measurement - width < ratioFixed ? width : measurement - ratioFixed - ), - a: prefix == 'front' ? 180 : 0, - d: measurement - width < ratioFixed ? width : measurement - ratioFixed, - }) } else { const radius = measurement - width < ratioFixed ? width : measurement - ratioFixed - // if( (radius > points[prefix + names[i]].dist(points[prefix + postfix + names[lastGood]]) +distance) || (radius < points[prefix + names[i]].dist(points[prefix + postfix + names[lastGood]]) -distance)){ - // points[prefix + postfix + names[i]] = points[prefix + postfix + names[lastGood]] - // lastGood = i - - // } else - { - // if(prefix == 'back') { - // points[prefix + names[i] +'Temp' +i] = points[prefix + names[i]].clone().addCircle(radius, classes[i]) - // points[prefix + postfix +names[i] +'Temp' +i] = points[prefix + postfix + names[lastGood]].clone().addCircle(distance, classes[i]) - // } - let ci = utils.circlesIntersect( - points[prefix + names[i]], - radius, - points[prefix + postfix + names[lastGood]], - distance - ) - // console.log({n1:prefix + names[i],n2:prefix + postfix + names[lastGood]}) - // console.log({p1:points[prefix + names[i]],r1:radius,p2:points[prefix + postfix + names[lastGood]],r2:distance}) - console.log({ ci: ci }) - if (false !== ci) { - points[prefix + postfix + names[i]] = ci[prefix == 'front' ? 0 : 1] - console.log({ pp: points[prefix + postfix + names[i]], ppn: prefix + postfix + names[i] }) - lastGood = i - } else { - points[prefix + postfix + names[i]] = points[prefix + postfix + names[lastGood]].clone() - console.log({ - ppp: points[prefix + postfix + names[i]], - ppn: prefix + postfix + names[i], - }) - - // points[prefix + postfix + names[lastGood]] - // points[prefix + names[i]] - // points[prefix + names[i]].addCircle(measurement - width < ratioFixed ? width : measurement - ratioFixed) - } + let ci = utils.circlesIntersect( + points[prefix + names[i]], + radius, + points[prefix + postfix + names[lastGood]], + distance + ) + if (false !== ci) { + points[prefix + postfix + names[i]] = ci[prefix == 'front' ? 0 : 1] + lastGood = i + } else { + points[prefix + postfix + names[i]] = points[prefix + postfix + names[lastGood]].clone() } } - console.log({ - p: points[prefix + names[i]], - m: measurement, - w: width, - rf: ratioFixed, - pr: points[prefix + postfix + names[i]], - }) } - console.log({ pionts: JSON.parse(JSON.stringify(points)) }) } const smoothPoints = (points, prefix, postfix, names, smoothness) => { @@ -232,7 +170,6 @@ const smoothPoints = (points, prefix, postfix, names, smoothness) => { points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) } if (adjust) { - // console.log({ prefix: prefix, postfix: postfix, smooth: names[i + 1] }) const angleDiff = points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) - points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) @@ -300,59 +237,6 @@ export const points = { crotchPointsCP: 2, }, draft: ({ measurements, options, Point, Path, points, paths, utils, store, part }) => { - /*const c1 = new Point(87.62444870107574, 154.32805978682666) - const c2 = new Point(260.759500228999, 267.90025949932897) - const r1 = 230, r2 = 20 - const ci = utils.circlesIntersect(c1,r1,c2,r2) - - - console.log(ci) - - let dx = c1.dx(c2) - console.log({dx:dx}) - let dy = c1.dy(c2) - console.log({dy:dy}) - let dist = c1.dist(c2) - console.log({dist:dist}) - // Check for edge cases - console.log({pf1:parseFloat(r1),pf2:parseFloat(r2)}) - console.log({pfa:parseFloat(r1)+parseFloat(r2),pfb:parseFloat(r1)-parseFloat(r2)}) - console.log({g:dist > parseFloat(r1)+parseFloat(r2)}) - console.log({l:dist < parseFloat(r1)-parseFloat(r2)}) - if (dist > parseFloat(r1) + parseFloat(r2)) return false // Circles do not intersect - console.log({x:(dist < parseFloat(r2) - parseFloat(r1))}) - if (dist < Math.abs(parseFloat(r2) - parseFloat(r1))) return false // One circle is contained in the other - if (dist === 0 && r1 === r2) return false // Two circles are identical - let chorddistance = (Math.pow(r1, 2) - Math.pow(r2, 2) + Math.pow(dist, 2)) / (2 * dist) - console.log({chorddistance:chorddistance}) - - console.log({m1:Math.pow(r1, 2),m2:Math.pow(chorddistance, 2)}) - let halfchordlength = Math.sqrt(Math.abs(Math.pow(r1, 2) - Math.pow(chorddistance, 2))) - console.log({halfchordlength:halfchordlength}) - let chordmidpointx = c1.x + (chorddistance * dx) / dist - let chordmidpointy = c1.y + (chorddistance * dy) / dist - let i1 = new Point( - chordmidpointx + (halfchordlength * dy) / dist, - chordmidpointy - (halfchordlength * dx) / dist - ) - let i2 = new Point( - chordmidpointx - (halfchordlength * dy) / dist, - chordmidpointy + (halfchordlength * dx) / dist - ) - console.log({i1:i1,i2:i2}) - - points.c1 = c1.clone().addCircle(r1) - points.c2 = c2.clone().addCircle(r2) - - if(ci[0].x !== NaN ) {points.i0 = i1.clone()} - if(ci[1].x !== NaN ) {points.i1 = i2.clone()} - - console.log({ pionts: JSON.parse(JSON.stringify(points)) }) - - return part -*/ - const hideThis = false - const inseam = measurements.inseam > measurements.waistToFloor - measurements.waistToUpperLeg ? measurements.waistToFloor - measurements.waistToUpperLeg @@ -405,8 +289,6 @@ export const points = { createWaistPoint(options, measurements, Path, points, utils, true) createWaistPoint(options, measurements, Path, points, utils, false) - // console.log({ pionts: JSON.parse(JSON.stringify(points)) }) - const frontCrossSeam = new Path() .move(points.frontWaist) .curve(points.frontWaistCp, points.frontCrossSeamCp, points.middleCrossSeam) @@ -424,11 +306,9 @@ export const points = { points.backSeat = backCrossSeam.shiftAlong( measurements.waistToSeat * (measurements.waistToSeat / measurements.waistToUpperLeg) ) - points.backHips = backCrossSeam - .shiftAlong( - measurements.waistToHips * (measurements.waistToSeat / measurements.waistToUpperLeg) - ) - .addCircle(4) + points.backHips = backCrossSeam.shiftAlong( + measurements.waistToHips * (measurements.waistToSeat / measurements.waistToUpperLeg) + ) ;['front', 'back'].forEach((prefix) => { createSidePoints( measurements, @@ -445,17 +325,15 @@ export const points = { ) points[prefix + 'SideWaistband'] = points[prefix + 'SideWaist'].clone() }) - console.log({ pionts: JSON.parse(JSON.stringify(points)) }) - // return part - console.log({ wb1: points.backSideWaist }) - ;['front', 'back'].forEach((prefix) => { - ;['Ankle', 'Knee', 'UpperLeg', 'Seat'].forEach((point) => { - const n = point == 'UpperLeg' ? 'upperLeg' : point.toLowerCase() - const m = measurements[n] * ease * (point == 'Seat' ? 0.25 : 0.5) - // console.log({n:prefix+point,m:m,d:points[prefix+'Side' +point].dist(points[prefix+point])-m}) - }) - }) + // ;['front', 'back'].forEach((prefix) => { + // ;['Ankle', 'Knee', 'UpperLeg', 'Seat'].forEach((point) => { + // const n = point == 'UpperLeg' ? 'upperLeg' : point.toLowerCase() + // const m = measurements[n] * ease * (point == 'Seat' ? 0.25 : 0.5) + // // console.log({n:prefix+point,m:m,d:points[prefix+'Side' +point].dist(points[prefix+point])-m}) + // }) + // }) + points.middleWaistband = points.middleWaist.clone() ;['front', 'back'].forEach((prefix) => { if (options.fixedsidepanel) { @@ -514,12 +392,10 @@ export const points = { .move(points.frontWaist) .curve(points.frontWaistCp, points.frontHipsCp2, points.frontHips) .curve(points.frontHipsCp1, points.frontCrossSeamCp, points.middleCrossSeam) - .setHidden(hideThis) paths.back = new Path() .move(points.backWaist) .curve(points.backWaistCp, points.backHipsCp2, points.backHips) .curve(points.backHipsCp1, points.backCrossSeamCp, points.middleCrossSeam) - .setHidden(hideThis) smoothPoints( points, @@ -549,9 +425,6 @@ export const points = { ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], options.smoothing ) - console.log({ wb2: points.backSideWaist }) - - // console.log({ pins: JSON.parse(JSON.stringify(points)) }) paths.middle = new Path().move(points.middleWaist).line(points.middleFloor).setHidden() ;['front', 'back'].forEach((prefix) => { @@ -573,16 +446,14 @@ export const points = { prefix + type + 'UpperLeg', prefix + type + 'Knee', prefix + type + 'Ankle', - ]).setHidden(hideThis) + ]) }) }) - console.log({ wb3: points.backSideWaist }) - // console.log({ phats: JSON.parse(JSON.stringify(paths)) }) - console.log({ points: JSON.parse(JSON.stringify(points)) }) + // store.set('frontSplitLength',paths.frontSplit.length()) + // store.set('backSplitLength',paths.backSplit.length()) ;['front', 'back'].forEach((prefix) => { ;['Waist', 'Waistband', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { - console.log({ n: prefix + 'Side' + name }) points[prefix + 'Panel' + name] = points['middle' + name].shift( prefix == 'front' ? 180 : 0, points[prefix + 'Side' + name].dist(points[prefix + 'Split' + name]) @@ -605,11 +476,11 @@ export const points = { prefix + 'Panel' + 'UpperLeg', prefix + 'Panel' + 'Knee', prefix + 'Panel' + 'Ankle', - ]).setHidden(hideThis) + ]) }) - console.log({ wb4: points.backSideWaist }) - while (Math.abs(paths.frontSplit.length() - paths.frontPanel.length()) > 1) { + const frontSplitlength = paths.frontSplit.length() + while (Math.abs(frontSplitlength - paths.frontPanel.length()) > 1) { ;['front', 'back'].forEach((prefix) => { const diff = paths[prefix + 'Split'].length() / paths[prefix + 'Panel'].length() const names = ['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'] @@ -635,31 +506,16 @@ export const points = { prefix + 'Panel' + 'UpperLeg', prefix + 'Panel' + 'Knee', prefix + 'Panel' + 'Ankle', - ]).setHidden(hideThis) + ]) }) } - console.log({ wb5: points.backSideWaist }) - // console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) if (options.length < 1) { const length = (1 - options.length) * (inseam - (measurements.waistToFloor - waistToAnkle)) - // console.log({i:inseam,wa:waistToAnkle,iw:(inseam/waistToAnkle),r:lengthRatio}) ;['front', 'back'].forEach((prefix) => { ;['Side', 'Split', 'Panel'].forEach((type) => { - // console.log({ - // prefix: prefix, - // type: type, - // path: paths[prefix + type], - // r: paths[prefix + type].reverse(), - // l: length, - // pl: paths[prefix + type].reverse().length(), - // }) - // console.log({ points: JSON.parse(JSON.stringify(points)) }) - // console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) points[prefix + type + 'Hem'] = paths[prefix + type].reverse().shiftAlong(length) - paths[prefix + type] = paths[prefix + type] - .split(points[prefix + type + 'Hem'])[0] - .setHidden(hideThis) + paths[prefix + type] = paths[prefix + type].split(points[prefix + type + 'Hem'])[0] }) }) } else { @@ -669,14 +525,12 @@ export const points = { }) }) } - console.log({ wb6: points.backSideWaist }) ;['back'].forEach((prefix) => { ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { points[prefix + 'Split' + name] }) }) - // console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) lowerWaist(paths, Path, points, waistLowering, 'middle', 'Waist') ;['front', 'back'].forEach((prefix) => { ;['Side', 'Split', 'Panel'].forEach((type) => { @@ -690,8 +544,6 @@ export const points = { }) lowerWaist(paths, Path, points, waistbandSize, prefix, 'Waistband') }) - - console.log({ wb7: points.backSideWaist }) ;['front', 'back'].forEach((prefix) => { ;['Side', 'Split', 'Panel'].forEach((type) => { ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { @@ -710,21 +562,11 @@ export const points = { }) }) }) - console.log({ wb9: points.backSideWaist }) - - points.middleWaistband - points.middleWaist - - console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) - console.log({ pihts: JSON.parse(JSON.stringify(points)) }) store.set( 'waistLength', points.backWaist.dist(points.backSideWaist) + points.frontWaist.dist(points.frontSideWaist) ) - - // paths.back.unhide() - // paths.middle.unhide() ;['front', 'back'].forEach((prefix) => { const waistbandLength = points[prefix + 'Waistband'].dist(points[prefix + 'SplitWaistband']) const direction = prefix == 'front' ? 90 : -90 @@ -759,7 +601,6 @@ export const points = { // Lower the back a little more to get a V-shape in the back // lowerWaist(paths, Path, points, waistLowering * 0.5, 'back', 'Waistband') lowerWaist(paths, Path, points, (waistLowering + waistbandSize) * 0.5, 'back', 'Waistband') - console.log({ wb8: points.backSideWaist }) paths.backWaistband = new Path() .move(points.backWaistband) ._curve(points.backSplitWaistbandCp, points.backSplitWaistband) @@ -769,14 +610,8 @@ export const points = { store.set('waistbandBackLength', paths.backWaistband.length()) store.set('waistbandFrontLength', paths.frontWaistband.length()) store.set('waistbandPanelLength', points.frontPanelWaistband.dist(points.backPanelWaistband)) - console.log({ - waistbandLengthBack: paths.backWaistband.length(), - waistbandLengthFront: paths.frontWaistband.length(), - }) - console.log({ back: paths.back, front: paths.front }) - - return part.setHidden(hideThis) + return part.hide() }, } diff --git a/designs/lumina/src/waistband.mjs b/designs/lumina/src/waistband.mjs index 6fd81f1d972..e63c052c5cd 100644 --- a/designs/lumina/src/waistband.mjs +++ b/designs/lumina/src/waistband.mjs @@ -109,7 +109,7 @@ export const waistband = { points.waistbandBackPanel = points.snippetPanelBack.copy() points.waistbandBackPanelCP = points.snippetPanelFront.shiftFractionTowards( points.waistbandBackPanel, - 1.3 + 1.4 ) points.waistbandBack = points.waistBack .shiftOutwards(points.waistbandBack, (waistLowering + waistbandSize) * 0.5) From 0bdd604401a0eca232c870f8cac2e505f6120384 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Sun, 31 Dec 2023 00:49:36 +0000 Subject: [PATCH 09/28] Fixed panel width --- designs/lumina/src/points.mjs | 127 +++++++++++++++++-------------- designs/lumina/src/waistband.mjs | 9 --- 2 files changed, 70 insertions(+), 66 deletions(-) diff --git a/designs/lumina/src/points.mjs b/designs/lumina/src/points.mjs index bb558781c85..613c40ae8bd 100644 --- a/designs/lumina/src/points.mjs +++ b/designs/lumina/src/points.mjs @@ -15,6 +15,7 @@ export const createPath = (paths, Path, points, pathName, names) => { } const lowerWaist = (paths, Path, points, waistLowering, pathName, pointName) => { + console.log({ pn: pathName, p: paths[pathName] }) const newPath = extendPath(Path, paths[pathName], 100, 0) const newWaist = newPath.shiftAlong(waistLowering + 100) if (newWaist.sitsRoughlyOn(points[pathName + pointName])) { @@ -76,7 +77,7 @@ const createWaistPoint = (options, measurements, Path, points, utils, front) => } } -const createSidePoints = ( +const createSidePoints = ({ measurements, points, utils, @@ -87,11 +88,22 @@ const createSidePoints = ( ratioFixed, ease, waistReduction, - distanceCompensation -) => { + distanceCompensation, + fixedSidePanel, +}) => { let measurement - let width + // let width let lastGood = 0 + console.log({ + prefix: prefix, + postfix: postfix, + ratio: ratio, + ratioFixed: ratioFixed, + ease: ease, + waistReduction: waistReduction, + distanceCompensation: distanceCompensation, + fixedSidePanel: fixedSidePanel, + }) for (let i = 0; i < names.length; i++) { let distance = measurements['waistTo' + names[lastGood]] - @@ -131,18 +143,28 @@ const createSidePoints = ( measurement /= 2 measurement *= ease - width = measurement * ratio - + const width = measurement * ratio + // const reduction = (measurement - width) < ratioFixed ? width : measurement - ratioFixed + const reduction = + ratio == 0 + ? measurement + : fixedSidePanel > 0 + ? width < measurement - fixedSidePanel + ? measurement - fixedSidePanel + : width + : width + // const reduction = ratio == 0 ? measurement : width + console.log({ i: i, p: prefix + postfix + names[i], f: fixedSidePanel }) + console.log({ m: measurement, w: width, mw: measurement - width, rf: ratioFixed }) if (i == 0) { points[prefix + postfix + names[i]] = points[prefix + names[i]].shift( prefix == 'front' ? 180 : 0, - measurement - width < ratioFixed ? width : measurement - ratioFixed + reduction ) } else { - const radius = measurement - width < ratioFixed ? width : measurement - ratioFixed let ci = utils.circlesIntersect( points[prefix + names[i]], - radius, + reduction, points[prefix + postfix + names[lastGood]], distance ) @@ -210,7 +232,7 @@ export const points = { ease: { pct: -8, min: -25, max: 10, menu: 'fit' }, length: { pct: 35, min: 10, max: 100, menu: 'fit' }, waistbandsize: { - pct: 90, + pct: 50, min: 0, max: 150, ...pctBasedOn('waistToHips'), @@ -261,6 +283,9 @@ export const points = { measurements['waistToAnkle'] = measurements.waistToFloor - measurements.heel / Math.PI const sideFixed = (((measurements.waist - measurements.waistBack) * ease) / 2) * sideRatio + const fixedSidePanel = + (((measurements.waist - measurements.waistBack - waistReduction) * ease) / 2) * + options.sidePanel points.middleWaist = new Point(0, 0) points.middleHips = points.middleWaist.shift(270, measurements.waistToHips) @@ -310,19 +335,20 @@ export const points = { measurements.waistToHips * (measurements.waistToSeat / measurements.waistToUpperLeg) ) ;['front', 'back'].forEach((prefix) => { - createSidePoints( - measurements, - points, - utils, - prefix, - 'Side', - ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], - 0, - 0.1, - ease, - waistReduction, - 1 - ) + createSidePoints({ + measurements: measurements, + points: points, + utils: utils, + prefix: prefix, + postfix: 'Side', + names: ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + ratio: 0, + ratioFixed: 0.1, + ease: ease, + waistReduction: waistReduction, + distanceCompensation: 1, + fixedSidePanel: 0, + }) points[prefix + 'SideWaistband'] = points[prefix + 'SideWaist'].clone() }) @@ -336,36 +362,23 @@ export const points = { points.middleWaistband = points.middleWaist.clone() ;['front', 'back'].forEach((prefix) => { - if (options.fixedsidepanel) { - createSidePoints( - measurements, - points, - utils, - prefix, - 'Split', - ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], - sideFixed, - ease, - waistReduction, + createSidePoints({ + measurements: measurements, + points: points, + utils: utils, + prefix: prefix, + postfix: 'Split', + names: ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + ratio: sideRatio, + // ratio: 0.1, + ratioFixed: sideFixed, + ease: ease, + waistReduction: waistReduction, + distanceCompensation: (points.frontAnkle.dist(points.frontCrossSeam) + frontCrossSeam.length()) / - (measurements.waistToFloor - measurements.heel / Math.PI) - ) - } else { - createSidePoints( - measurements, - points, - utils, - prefix, - 'Split', - ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], - sideRatio, - sideFixed, - ease, - waistReduction, - (points.frontAnkle.dist(points.frontCrossSeam) + frontCrossSeam.length()) / - (measurements.waistToFloor - measurements.heel / Math.PI) - ) - } + (measurements.waistToFloor - measurements.heel / Math.PI), + fixedSidePanel: options.fixedsidepanel ? fixedSidePanel : 0, + }) points[prefix + 'SplitWaistband'] = points[prefix + 'SplitWaist'].clone() }) @@ -525,11 +538,11 @@ export const points = { }) }) } - ;['back'].forEach((prefix) => { - ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { - points[prefix + 'Split' + name] - }) - }) + // ;['back'].forEach((prefix) => { + // ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { + // points[prefix + 'Split' + name] + // }) + // }) lowerWaist(paths, Path, points, waistLowering, 'middle', 'Waist') ;['front', 'back'].forEach((prefix) => { diff --git a/designs/lumina/src/waistband.mjs b/designs/lumina/src/waistband.mjs index e63c052c5cd..f06e85f0c83 100644 --- a/designs/lumina/src/waistband.mjs +++ b/designs/lumina/src/waistband.mjs @@ -64,7 +64,6 @@ export const waistband = { .curve(points.waistBackCP, points.waistFrontCP, points.waistFront) diff = waistLength - paths.waist.length() - console.log({ i: iter, d: diff, a: angle }) } while (iter++ < 100 && (diff < -0.5 || diff > 0.5)) if (iter >= 100) { log.info('lumina:couldNoFitWaistband') @@ -90,14 +89,6 @@ export const waistband = { .curve(points.waistbandBackCP, points.waistbandFrontCP, points.waistbandFront) diff = waistbandLength - paths.waistband.length() - console.log({ d: diff, a: angle }) - console.log({ - wl: waistLength, - wpl: paths.waist.length(), - wbl: waistbandLength, - wbpl: paths.waistband.length(), - }) - const rWaistband = paths.waistband.reverse() points.snippetPanelBack = rWaistband.shiftAlong(waistbandFrontLength + waistbandPanelLength) snippets.panelBack = new Snippet('notch', points.snippetPanelBack) From 9a170982c851dfdb723124b122158f8ffe3c6a9f Mon Sep 17 00:00:00 2001 From: woutervdub Date: Sun, 31 Dec 2023 23:56:24 +0000 Subject: [PATCH 10/28] Snippets and annotations. --- designs/lumina/src/leg.mjs | 25 +++++++++++++++++++++++-- designs/lumina/src/panel.mjs | 30 +++++++++++++++++++++++++++++- designs/lumina/src/points.mjs | 4 ++-- designs/lumina/src/waistband.mjs | 27 +++++++++++---------------- 4 files changed, 65 insertions(+), 21 deletions(-) diff --git a/designs/lumina/src/leg.mjs b/designs/lumina/src/leg.mjs index 4fd059c4c69..23446ddc11c 100644 --- a/designs/lumina/src/leg.mjs +++ b/designs/lumina/src/leg.mjs @@ -4,12 +4,21 @@ export const leg = { name: 'lumina.leg', from: points, draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, part }) => { + paths.front = paths.front.reverse().unhide().addText('front', 'note center').setClass('hidden') + paths.frontSplit.unhide().addText('front', 'note center').setClass('hidden') + paths.back.unhide().addText('back', 'note center').setClass('hidden') + paths.backSplit = paths.backSplit + .reverse() + .unhide() + .addText('back', 'note center') + .setClass('hidden') + paths.seam = new Path() .move(points.frontSplitHem) - .join(paths.backSplit.reverse()) + .join(paths.backSplit) .join(paths.backWaistband.reverse()) .join(paths.back) - .join(paths.front.reverse()) + .join(paths.front) .join(paths.frontWaistband) .join(paths.frontSplit) .close() @@ -20,6 +29,18 @@ export const leg = { // paths.frontSplit.addClass('contrast').unhide() if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') + snippets.middle = new Snippet('notch', points.frontUpperLeg) + snippets.front0 = new Snippet('notch', paths.front.shiftFractionAlong(0.5)) + snippets.front1 = new Snippet('notch', paths.frontSplit.shiftFractionAlong(0.2)) + snippets.front2 = new Snippet('notch', paths.frontSplit.shiftFractionAlong(0.4)) + snippets.front3 = new Snippet('notch', paths.frontSplit.shiftFractionAlong(0.6)) + snippets.front4 = new Snippet('notch', paths.frontSplit.shiftFractionAlong(0.8)) + snippets.back0 = new Snippet('notch', paths.back.shiftFractionAlong(0.5)) + snippets.back1 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.2)) + snippets.back2 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.4)) + snippets.back3 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.6)) + snippets.back4 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.8)) + return part }, } diff --git a/designs/lumina/src/panel.mjs b/designs/lumina/src/panel.mjs index 6a5b8be422c..12b7a57074e 100644 --- a/designs/lumina/src/panel.mjs +++ b/designs/lumina/src/panel.mjs @@ -4,14 +4,42 @@ export const panel = { name: 'lumina.panel', from: points, draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, part }) => { + paths.panelWaistband = new Path() + .move(points.backPanelWaistband) + .line(points.frontPanelWaistband) + .addText('top', 'note center') + .setClass('hidden') + paths.panelHem = new Path() + .move(points.frontPanelHem) + .line(points.backPanelHem) + .addText('bottom', 'note center') + .setClass('hidden') + paths.frontPanel.unhide().addText('front', 'note center').setClass('hidden') + paths.backPanel = paths.backPanel + .reverse() + .unhide() + .addText('back', 'note center') + .setClass('hidden') + paths.seam = new Path() .move(points.frontPanelHem) - .join(paths.backPanel.reverse()) + .join(paths.panelHem) + .join(paths.backPanel) + .join(paths.panelWaistband) .join(paths.frontPanel) .close() if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') + snippets.front1 = new Snippet('notch', paths.frontPanel.shiftFractionAlong(0.2)) + snippets.front2 = new Snippet('notch', paths.frontPanel.shiftFractionAlong(0.4)) + snippets.front3 = new Snippet('notch', paths.frontPanel.shiftFractionAlong(0.6)) + snippets.front4 = new Snippet('notch', paths.frontPanel.shiftFractionAlong(0.8)) + snippets.back1 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.2)) + snippets.back2 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.4)) + snippets.back3 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.6)) + snippets.back4 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.8)) + return part }, } diff --git a/designs/lumina/src/points.mjs b/designs/lumina/src/points.mjs index 613c40ae8bd..613a2a5b54e 100644 --- a/designs/lumina/src/points.mjs +++ b/designs/lumina/src/points.mjs @@ -230,14 +230,14 @@ export const points = { waistband: { bool: true, menu: 'style' }, Lowerwaistbandback: { bool: true, menu: 'style' }, ease: { pct: -8, min: -25, max: 10, menu: 'fit' }, - length: { pct: 35, min: 10, max: 100, menu: 'fit' }, + length: { pct: 35, min: 10, max: 100, menu: 'style' }, waistbandsize: { pct: 50, min: 0, max: 150, ...pctBasedOn('waistToHips'), // eslint-disable-next-line no-unused-vars - menu: (settings, mergedOptions) => (mergedOptions?.waistband ? 'style' : false), + menu: (settings, mergedOptions) => (mergedOptions?.waistband ? 'fit' : false), }, waistlowering: { pct: 10, min: -10, max: 60, ...pctBasedOn('waistToHips'), menu: 'style' }, waistreduction: { diff --git a/designs/lumina/src/waistband.mjs b/designs/lumina/src/waistband.mjs index f06e85f0c83..9a0942c98bf 100644 --- a/designs/lumina/src/waistband.mjs +++ b/designs/lumina/src/waistband.mjs @@ -35,14 +35,11 @@ export const waistband = { return part.hide() } - console.log({ store: JSON.parse(JSON.stringify(store)) }) - points.origin = new Point(0, 0) //.addCircle(3) const angleRad = Math.asin((Math.abs(waistbandLength - waistLength) * 0.5) / waistbandSize) const radius = (waistLength * 0.5) / Math.sin(angleRad) const baseAngle = waistLength < waistbandLength ? 270 : 90 - console.log({ baseAngle: baseAngle }) let angle = utils.rad2deg(angleRad) let diff = 0 @@ -54,10 +51,10 @@ export const waistband = { cpDistance = (4 / 3) * Math.tan(Math.PI / (segments * 2)) * radius - points.waistFront = points.origin.shift(baseAngle + angle, radius).addCircle(2) - points.waistBack = points.origin.shift(baseAngle - angle, radius).addCircle(2) - points.waistFrontCP = points.waistFront.shift(baseAngle - 90 + angle, cpDistance).addCircle(5) - points.waistBackCP = points.waistBack.shift(baseAngle + 90 - angle, cpDistance).addCircle(5) + points.waistFront = points.origin.shift(baseAngle + angle, radius) + points.waistBack = points.origin.shift(baseAngle - angle, radius) + points.waistFrontCP = points.waistFront.shift(baseAngle - 90 + angle, cpDistance) + points.waistBackCP = points.waistBack.shift(baseAngle + 90 - angle, cpDistance) paths.waist = new Path() .move(points.waistBack) @@ -77,12 +74,8 @@ export const waistband = { (4 / 3) * Math.tan(Math.PI / (segments * 2)) * (radius + waistbandSize * (waistLength < waistbandLength ? 1 : -1)) - points.waistbandFrontCP = points.waistbandFront - .shift(baseAngle - 90 + angle, cpDistance) - .addCircle(5) - points.waistbandBackCP = points.waistbandBack - .shift(baseAngle + 90 - angle, cpDistance) - .addCircle(5) + points.waistbandFrontCP = points.waistbandFront.shift(baseAngle - 90 + angle, cpDistance) + points.waistbandBackCP = points.waistbandBack.shift(baseAngle + 90 - angle, cpDistance) paths.waistband = new Path() .move(points.waistbandBack) @@ -102,9 +95,10 @@ export const waistband = { points.waistbandBackPanel, 1.4 ) - points.waistbandBack = points.waistBack - .shiftOutwards(points.waistbandBack, (waistLowering + waistbandSize) * 0.5) - .addCircle(3) + points.waistbandBack = points.waistBack.shiftOutwards( + points.waistbandBack, + (waistLowering + waistbandSize) * 0.5 + ) paths.waistband = new Path() .move(points.waistbandBack) ._curve(points.waistbandBackPanelCP, points.waistbandBackPanel) @@ -116,6 +110,7 @@ export const waistband = { .join(paths.waist.reverse()) .line(points.waistbandBack) .join(paths.waistband) + .reverse() .hide() paths.seam = new Path().move(points.waistbandFront).line(points.waistFront).join(paths.seamSA) From d9158efb29add071dd64a237c4895283d57748e8 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Thu, 4 Jan 2024 03:41:41 +0000 Subject: [PATCH 11/28] pocket --- designs/lumina/src/index.mjs | 5 +- designs/lumina/src/leg.mjs | 2 +- designs/lumina/src/panel.mjs | 7 ++- designs/lumina/src/pocket.mjs | 88 ++++++++++++++++++++++++++++++++ designs/lumina/src/points.mjs | 10 ++-- designs/lumina/src/waistband.mjs | 2 +- 6 files changed, 106 insertions(+), 8 deletions(-) create mode 100644 designs/lumina/src/pocket.mjs diff --git a/designs/lumina/src/index.mjs b/designs/lumina/src/index.mjs index 1077513304f..703d7037cd3 100644 --- a/designs/lumina/src/index.mjs +++ b/designs/lumina/src/index.mjs @@ -9,16 +9,17 @@ import { ipoints } from './ipoints.mjs' import { zpoints } from './zpoints.mjs' import { panel } from './panel.mjs' import { leg } from './leg.mjs' +import { pocket } from './pocket.mjs' import { waistband } from './waistband.mjs' // Create new design const Lumina = new Design({ data, - parts: [/*zpoints, ipoints,*/ points, panel, leg, waistband], + parts: [/*zpoints, ipoints,*/ points, panel, leg, waistband, pocket], }) // Named exports -export { i18n, Lumina, /*zpoints, ipoints,*/ points, panel, leg, waistband } +export { i18n, Lumina, /*zpoints, ipoints,*/ points, panel, leg, waistband, pocket } // const classes = ['lining','canvas','mark','contrast','note','interfacing','various'] diff --git a/designs/lumina/src/leg.mjs b/designs/lumina/src/leg.mjs index 23446ddc11c..ee92065fb83 100644 --- a/designs/lumina/src/leg.mjs +++ b/designs/lumina/src/leg.mjs @@ -3,7 +3,7 @@ import { points } from './points.mjs' export const leg = { name: 'lumina.leg', from: points, - draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, part }) => { + draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, store, part }) => { paths.front = paths.front.reverse().unhide().addText('front', 'note center').setClass('hidden') paths.frontSplit.unhide().addText('front', 'note center').setClass('hidden') paths.back.unhide().addText('back', 'note center').setClass('hidden') diff --git a/designs/lumina/src/panel.mjs b/designs/lumina/src/panel.mjs index 12b7a57074e..710c292ff7f 100644 --- a/designs/lumina/src/panel.mjs +++ b/designs/lumina/src/panel.mjs @@ -3,7 +3,7 @@ import { points } from './points.mjs' export const panel = { name: 'lumina.panel', from: points, - draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, part }) => { + draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, store, part }) => { paths.panelWaistband = new Path() .move(points.backPanelWaistband) .line(points.frontPanelWaistband) @@ -40,6 +40,11 @@ export const panel = { snippets.back3 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.6)) snippets.back4 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.8)) + store.set('pocket', { + paths: paths, + points: points, + }) + return part }, } diff --git a/designs/lumina/src/pocket.mjs b/designs/lumina/src/pocket.mjs new file mode 100644 index 00000000000..1cc4df1ab67 --- /dev/null +++ b/designs/lumina/src/pocket.mjs @@ -0,0 +1,88 @@ +import { pctBasedOn } from '@freesewing/core' +import { panel } from './panel.mjs' +import { points } from './points.mjs' + +export const pocket = { + name: 'lumina.pocket', + // from: panel, + // after: panel, + // hide: hidePresets.HIDE_TREE, + from: points, + options: { + pocket: { bool: true, menu: 'style' }, + pocketdepth: { + pct: 80, + min: 0, + max: 100, + ...pctBasedOn('waistToSeat'), + // eslint-disable-next-line no-unused-vars + menu: (settings, mergedOptions) => (mergedOptions?.pocket ? 'style' : false), + }, + }, + draft: ({ + measurements, + sa, + Point, + points, + Path, + paths, + Snippet, + snippets, + options, + macro, + store, + part, + }) => { + // const p = store.get('pocket') + // paths = p.paths + // points = p.points + + if (!options.pocket) { + return part.hide() + } + + console.log({ s: JSON.parse(JSON.stringify(store)) }) + console.log({ + points: JSON.parse(JSON.stringify(points)), + paths: JSON.parse(JSON.stringify(paths)), + }) + + const pocketDepth = measurements.waistToSeat * options.pocketdepth + + paths.pocketWaistband = new Path() + .move(points.backPanelWaistband) + .line(points.frontPanelWaistband) + .addText('top', 'note center') + .setClass('hidden') + points.frontPocketHem = paths.frontPanel.shiftAlong(pocketDepth) + points.backPocketHem = paths.backPanel.shiftAlong(pocketDepth) + paths.pocketHem = new Path() + .move(points.frontPocketHem) + .line(points.backPocketHem) + .addText('bottom', 'note center') + .setClass('hidden') + paths.frontPocket = paths.frontPanel + .split(points.frontPocketHem)[0] + .unhide() + .addText('front', 'note center') + .setClass('hidden') + paths.backPocket = paths.backPanel + .split(points.backPocketHem)[0] + .unhide() + .reverse() + .addText('back', 'note center') + .setClass('hidden') + + paths.seam = new Path() + .move(points.frontPocketHem) + .join(paths.pocketHem) + .join(paths.backPocket) + .join(paths.pocketWaistband) + .join(paths.frontPocket) + .close() + + if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') + + return part + }, +} diff --git a/designs/lumina/src/points.mjs b/designs/lumina/src/points.mjs index 613a2a5b54e..4086f00a188 100644 --- a/designs/lumina/src/points.mjs +++ b/designs/lumina/src/points.mjs @@ -228,7 +228,11 @@ export const points = { ], options: { waistband: { bool: true, menu: 'style' }, - Lowerwaistbandback: { bool: true, menu: 'style' }, + lowerwaistbandback: { + bool: true, + // eslint-disable-next-line no-unused-vars + menu: (settings, mergedOptions) => (mergedOptions?.waistband ? 'style' : false), + }, ease: { pct: -8, min: -25, max: 10, menu: 'fit' }, length: { pct: 35, min: 10, max: 100, menu: 'style' }, waistbandsize: { @@ -239,7 +243,7 @@ export const points = { // eslint-disable-next-line no-unused-vars menu: (settings, mergedOptions) => (mergedOptions?.waistband ? 'fit' : false), }, - waistlowering: { pct: 10, min: -10, max: 60, ...pctBasedOn('waistToHips'), menu: 'style' }, + waistlowering: { pct: 35, min: -10, max: 60, ...pctBasedOn('waistToHips'), menu: 'style' }, waistreduction: { pct: 4, min: 0, @@ -610,7 +614,7 @@ export const points = { points.frontPanelWaistband.dist(points.backPanelWaistband) ) - if (options.Lowerwaistbandback) { + if (options.waistband && options.lowerwaistbandback) { // Lower the back a little more to get a V-shape in the back // lowerWaist(paths, Path, points, waistLowering * 0.5, 'back', 'Waistband') lowerWaist(paths, Path, points, (waistLowering + waistbandSize) * 0.5, 'back', 'Waistband') diff --git a/designs/lumina/src/waistband.mjs b/designs/lumina/src/waistband.mjs index 9a0942c98bf..9fbc3196948 100644 --- a/designs/lumina/src/waistband.mjs +++ b/designs/lumina/src/waistband.mjs @@ -88,7 +88,7 @@ export const waistband = { points.snippetPanelFront = rWaistband.shiftAlong(waistbandFrontLength) snippets.panelFront = new Snippet('notch', points.snippetPanelFront) - if (options.Lowerwaistbandback) { + if (options.lowerwaistbandback) { paths.waistband = rWaistband.split(points.snippetPanelBack)[0] points.waistbandBackPanel = points.snippetPanelBack.copy() points.waistbandBackPanelCP = points.snippetPanelFront.shiftFractionTowards( From ad37fed4fed9e1caf6d0ee636f73aa8364597f97 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Thu, 4 Jan 2024 05:15:54 +0000 Subject: [PATCH 12/28] cleanup 1 --- designs/lumina/src/index.mjs | 8 +- designs/lumina/src/ipoints.mjs | 495 ---------------- designs/lumina/src/leg.mjs | 15 +- designs/lumina/src/panel.mjs | 16 +- designs/lumina/src/pocket.mjs | 62 +- designs/lumina/src/{points.mjs => shape.mjs} | 76 +-- designs/lumina/src/waistband.mjs | 6 +- designs/lumina/src/zpoints.mjs | 565 ------------------- 8 files changed, 66 insertions(+), 1177 deletions(-) delete mode 100644 designs/lumina/src/ipoints.mjs rename designs/lumina/src/{points.mjs => shape.mjs} (90%) delete mode 100644 designs/lumina/src/zpoints.mjs diff --git a/designs/lumina/src/index.mjs b/designs/lumina/src/index.mjs index 703d7037cd3..6a8ec4c0016 100644 --- a/designs/lumina/src/index.mjs +++ b/designs/lumina/src/index.mjs @@ -4,9 +4,7 @@ import { Design } from '@freesewing/core' import { i18n } from '../i18n/index.mjs' import { data } from '../data.mjs' // Parts -import { points } from './points.mjs' -import { ipoints } from './ipoints.mjs' -import { zpoints } from './zpoints.mjs' +import { shape } from './shape.mjs' import { panel } from './panel.mjs' import { leg } from './leg.mjs' import { pocket } from './pocket.mjs' @@ -15,11 +13,11 @@ import { waistband } from './waistband.mjs' // Create new design const Lumina = new Design({ data, - parts: [/*zpoints, ipoints,*/ points, panel, leg, waistband, pocket], + parts: [shape, panel, leg, waistband, pocket], }) // Named exports -export { i18n, Lumina, /*zpoints, ipoints,*/ points, panel, leg, waistband, pocket } +export { i18n, Lumina, shape, panel, leg, waistband, pocket } // const classes = ['lining','canvas','mark','contrast','note','interfacing','various'] diff --git a/designs/lumina/src/ipoints.mjs b/designs/lumina/src/ipoints.mjs deleted file mode 100644 index 68e13f61532..00000000000 --- a/designs/lumina/src/ipoints.mjs +++ /dev/null @@ -1,495 +0,0 @@ -export const ipoints = { - name: 'lumina.ipoints', - measurements: [ - 'waist', - 'waistBack', - 'hips', - 'seat', - 'seatBack', - 'inseam', - 'waistToSeat', - 'waistToUpperLeg', - 'waistToKnee', - 'waistToHips', - 'waistToFloor', - 'knee', - 'ankle', - 'crossSeam', - 'crossSeamFront', - 'heel', - 'upperLeg', - ], - options: { - ease: { pct: -20, min: -35, max: 10, menu: 'fit' }, - crossSeamAngle: 35, - crotchToKnee: 0.4, - waistToKneeCP: 0.4, - kneeToWaistLength: 400, - crotchPointsCP: 2, - }, - draft: ({ - measurements, - options, - Point, - Path, - points, - paths, - Snippet, - snippets, - utils, - log, - complete, - sa, - paperless, - macro, - part, - }) => { - return part.hide() - - const ControlPoints = (p1, p2, p3, t) => { - let a = Math.abs(p2.angle(p1) - p2.angle(p3)) / 2 - console.log({ t: t, ap2_1: p2.angle(p1), ap2_3: p2.angle(p3), a: a }) - const t1 = p2.shift(p2.angle(p1) + a - 90, p2.dist(p1) / 3) - const t3 = p2.shift(p2.angle(p3) - a + 90, p2.dist(p3) / 3) - console.log({ t: t, ap2_t1: p2.angle(t1), ap2_t3: p2.angle(t3), a: a }) - return { - cp1: p2.shift(p2.angle(p1) + a - 90, p2.dist(p1) / 3), - cp3: p2.shift(p2.angle(p3) - a + 90, p2.dist(p3) / 3), - } - } - const CreateControlPoints = (names) => { - for (var i = 1; i < names.length - 1; i++) { - var cp = ControlPoints(points[names[i - 1]], points[names[i]], points[names[i + 1]]) - points[names[i] + 'Cp1'] = cp.cp1 - points[names[i] + 'Cp2'] = cp.cp3 - } - } - const CreatePath = (pathName, names) => { - console.log({ i: 1, n: names[1], p2: points[names[1] + 'Cp2'], p3: points[names[1]] }) - paths[pathName] = new Path() - .move(points[names[0]]) - ._curve(points[names[1] + 'Cp1'], points[names[1]]) - console.log({ s: 0, l: paths[pathName].length() }) - for (var i = 2; i < names.length - 1; i++) { - console.log({ - i: i, - n: names[i], - p1: points[names[i - 1] + 'Cp1'], - p2: points[names[i] + 'Cp2'], - p3: points[names[i]], - }) - paths[pathName].curve( - points[names[i - 1] + 'Cp2'], - points[names[i] + 'Cp1'], - points[names[i]] - ) - console.log({ - s: i - 1, - l: new Path() - .move(points[names[i - 1]]) - .curve(points[names[i - 1] + 'Cp2'], points[names[i] + 'Cp1'], points[names[i]]) - .length(), - }) - } - console.log({ i: i, n: names[i], p2: points[names[i] + 'Cp2'], p3: points[names[i]] }) - paths[pathName].curve_(points[names[i - 1] + 'Cp2'], points[names[i]]) - } - - const CreateWaistPoint = (m, options, points, utils, front) => { - const kneeTemp = points.upperleg.shiftFractionTowards(points.knee, options.crotchToKnee) - const angle = - 90 + - (front - ? options.crossSeamAngle * (m.waistBack / m.waist) - : -1 * options.crossSeamAngle * (1 - m.waistBack / m.waist)) - const crossSeam = front ? m.crossSeamFront : m.crossSeam - m.crossSeamFront - var kneeToWaist = m.waistToKnee - var ratio = 1 - var waist = kneeTemp.shift(angle, kneeToWaist * ratio) - const crossSeamCp = points.upperleg.shiftFractionTowards( - utils.beamIntersectsY(kneeTemp, waist, 0), - options.crotchPointsCP - ) - - console.log({ f: front, a: angle }) - var waistCp - var diff, - iter = 0 - do { - waist = kneeTemp.shift(angle, kneeToWaist * ratio * (ratio < 1 ? 1.05 : 0.95)) - // waistCp = waist.shiftFractionTowards(kneeTemp, options.waistToKneeCP) - waistCp = waist.shiftFractionTowards(points.knee, options.waistToKneeCP) - - const crossSeamPath = new Path().move(points.upperleg).curve(crossSeamCp, waistCp, waist) - - diff = crossSeam - crossSeamPath.length() - ratio = crossSeam / crossSeamPath.length() - // console.log({ i: iter, d: diff, r: ratio }) - } while (++iter < 100 && (diff > 1 || diff < -1)) - if (iter >= 100) { - console.log('Too many iterations trying to make it fit!') - // log.error('Too many iterations trying to make it fit!') - } - - if (front) { - points.waistFront = waist.clone() - points.waistFrontCp = waistCp.clone() - points.crossSeamFrontCp = crossSeamCp.clone() - } else { - points.waistBack = waist.clone() - points.waistBackCp = waistCp.clone() - points.crossSeamBackCp = crossSeamCp.clone() - } - } - - const m = measurements - const crotchOffset = m.waistToFloor - m.inseam - - const waistFrontBackRatio = m.waistBack / m.waist - const sideRatio = 3 / 5 - const ease = options.ease + 1 - - m['waistToAnkle'] = m.waistToFloor - m.heel / Math.PI - - console.log({ m: JSON.parse(JSON.stringify(m)) }) - console.log({ wfr: waistFrontBackRatio }) - // points.origin = new Point(0, 0) - // points.knee = points.origin.shift(270, m.inseam - (m.waistToFloor - m.waistToKnee)) - // points.ankle = points.origin.shift(270, m.inseam - (m.ankle / Math.PI)) - // points.waist = points.origin.shift(90, m.waistToFloor - m.inseam) - - points.upperlegFront = points.upperlegBack = points.upperleg = new Point(0, 0) - points.kneeFront = - points.kneeBack = - points.knee = - points.upperleg.shift(270, m.waistToKnee - crotchOffset) - points.ankleFront = - points.ankleBack = - points.ankle = - points.upperleg.shift(270, m.inseam - m.heel / Math.PI) - points.floorFront = points.floorBack = points.floor = points.upperleg.shift(270, m.inseam) - - // points.waistTemp = points.upperleg.shiftFractionTowards(points.knee,options.crotchToKnee).shift(90 + options.crossSeamAngle*(m.waistBack/m.waist), options.kneeToWaistLength) - // paths.waistTemp = new Path() - // .move(points.upperleg.shiftFractionTowards(points.knee,options.crotchToKnee)) - // .line(points.waistTemp) - // points.upperlegFrontCp = utils.beamIntersectsY(points.kneeTemp,points.waistTempFront,0) - // points.upperlegBackCp = utils.beamIntersectsY(points.kneeTemp,points.waistTempBack,0) - - CreateWaistPoint(m, options, points, utils, true) - CreateWaistPoint(m, options, points, utils, false) - - // paths.waistTempCp = new Path() - // .move(points.upperleg) - // .line(points.crossSeamFrontCp) - - console.log({ pionts: JSON.parse(JSON.stringify(points)) }) - - paths.middle = new Path().move(points.upperleg).line(points.floor) - - paths.crossSeamFront = new Path() - .move(points.upperleg) - .curve(points.crossSeamFrontCp, points.waistFrontCp, points.waistFront) - paths.crossSeamBack = new Path() - .move(points.upperleg) - .curve(points.crossSeamBackCp, points.waistBackCp, points.waistBack) - - let csFront = paths.crossSeamFront.length() - let csBack = paths.crossSeamBack.length() - - console.log({ csf: m.crossSeamFront, csFront: csFront }) - - const waistAngle = utils.rad2deg( - Math.asin((points.waistBack.y - points.waistFront.y) / (m.waist / 2)) - ) - - console.log({ - r: m.crossSeamFront / m.waistToUpperLeg, - S: m.waistToSeat * (m.crossSeamFront / m.waistToUpperLeg), - H: m.waistToHips * (m.crossSeamFront / m.waistToUpperLeg), - }) - points.seatFront = paths.crossSeamFront - .reverse() - .shiftAlong(m.waistToSeat /* * (m.crossSeamFront / m.waistToUpperLeg) */) - .addCircle(6) - points.hipsFront = paths.crossSeamFront - .reverse() - .shiftAlong(m.waistToHips /* * (m.crossSeamFront / m.waistToUpperLeg) */) - .addCircle(10) - points.seatBack = paths.crossSeamBack - .reverse() - .shiftAlong(m.waistToSeat /* * (m.waistToSeat / m.waistToUpperLeg) */) - .addCircle(6) - points.hipsBack = paths.crossSeamBack - .reverse() - .shiftAlong(m.waistToHips /* * (m.waistToSeat / m.waistToUpperLeg) */) - .addCircle(10) - - points.waistFrontSeam = points.waistFront.shift( - 180 + waistAngle, - ((m.waist - m.waistBack) * ease) / 2 - ) - points.waistBackSeam = points.waistBack.shift(waistAngle, (m.waistBack * ease) / 2) - points.seatFrontSeam = points.seatFront.shift( - 180 + waistAngle, - ((m.seat - m.seatBack) * ease) / 2 - ) - points.seatBackSeam = points.seatBack.shift(waistAngle, (m.seatBack * ease) / 2) - points.upperlegFrontSeam = points.upperleg.shift(180 + waistAngle, (m.upperLeg * ease) / 2) - points.upperlegBackSeam = points.upperleg.shift(waistAngle, (m.upperLeg * ease) / 2) - points.kneeFrontSeam = points.knee.shift(180, (m.knee * ease) / 2) - points.kneeBackSeam = points.knee.shift(0, (m.knee * ease) / 2) - points.ankleFrontSeam = points.ankle.shift(180, (m.ankle * ease) / 2) - points.ankleBackSeam = points.ankle.shift(0, (m.ankle * ease) / 2) - - const sideFixed = points.waistFrontSeam.dist( - points.waistFront.shiftFractionTowards(points.waistFrontSeam, sideRatio) - ) - - paths.front = new Path() - .move(points.ankleFrontSeam) - .line(points.kneeFrontSeam) - .line(points.upperlegFrontSeam) - .line(points.seatFrontSeam) - .line(points.waistFrontSeam) - paths.back = new Path() - .move(points.ankleBackSeam) - .line(points.kneeBackSeam) - .line(points.upperlegBackSeam) - .line(points.seatBackSeam) - .line(points.waistBackSeam) - - const ShiftPathPoints = (path, ratio, names) => { - if (names.length < 2) return - for (var i = names.length - 2; i >= 0; i--) { - console.log({ n1: names[i].toLowerCase() + path, n2: names[i + 1].toLowerCase() + path }) - console.log({ - p1: points[names[i].toLowerCase() + path], - p2: points[names[i + 1].toLowerCase() + path], - }) - console.log({ - lb: points[names[i].toLowerCase() + path].dist(points[names[i + 1].toLowerCase() + path]), - }) - points[names[i].toLowerCase() + path] = points[ - names[i].toLowerCase() + path - ].shiftFractionTowards(points[names[i + 1].toLowerCase() + path], ratio) - console.log({ - la: points[names[i].toLowerCase() + path].dist(points[names[i + 1].toLowerCase() + path]), - }) - } - } - const shiftRatio = - 1 - (m.waistToFloor - points.floorFront.dist(points.ankleFront)) / paths.front.length() - console.log({ shiftRatio: shiftRatio }) - ShiftPathPoints('FrontSeam', shiftRatio, [ - 'Waist', - /*'Hips',*/ 'Seat', - 'UpperLeg', - 'Knee', - 'Ankle', - ]) - - // points.waistFrontSplit = points.waistFront.shiftFractionTowards(points.waistFrontSeam, sideRatio) - points.waistFrontSplit = points.waistFrontSeam.shiftTowards(points.waistFront, sideFixed) - // points.waistBackSplit = points.waistBack.shiftFractionTowards(points.waistBackSeam, sideRatio) - points.waistBackSplit = points.waistBackSeam.shiftTowards(points.waistBack, sideFixed) - points.seatFrontSplit = points.seatFrontSeam.shiftTowards(points.seatFront, sideFixed) - points.seatBackSplit = points.seatBackSeam.shiftTowards(points.seatBack, sideFixed) - // points.upperlegFrontSplit = points.upperleg.shiftFractionTowards(points.upperlegFront, sideRatio) - points.upperlegFrontSplit = points.upperlegFrontSeam.shiftTowards(points.upperleg, sideFixed) - // points.upperlegBackSplit = points.upperleg.shiftFractionTowards(points.upperlegBack, sideRatio) - points.upperlegBackSplit = points.upperlegBackSeam.shiftTowards(points.upperleg, sideFixed) - points.kneeFrontSplit = points.knee.shiftFractionTowards(points.kneeFrontSeam, sideRatio) - // points.kneeFrontSplit = points.kneeFront.shiftTowards(points.knee, sideFixed) - points.kneeBackSplit = points.knee.shiftFractionTowards(points.kneeBackSeam, sideRatio) - // points.kneeBackSplit = points.kneeBack.shiftTowards(points.knee, sideFixed) - points.ankleFrontSplit = points.ankle.shiftFractionTowards(points.ankleFrontSeam, sideRatio) - // points.ankleFrontSplit = points.ankleFront.shiftTowards(points.ankle, sideFixed) - points.ankleBackSplit = points.ankle.shiftFractionTowards(points.ankleBackSeam, sideRatio) - // points.ankleBackSplit = points.ankleBack.shiftTowards(points.ankle, sideFixed) - - points.seatFrontSplit = utils - .beamsIntersect( - points.seatFront, - points.seatFrontSeam, - points.waistFrontSplit, - points.upperlegFrontSplit - ) - .addCircle(8) - - CreateControlPoints([ - 'waistFrontSplit', - 'seatFrontSplit', - 'upperlegFrontSplit', - 'kneeFrontSplit', - 'ankleFrontSplit', - ]) - - CreatePath('frontSplit', [ - 'waistFrontSplit', - 'seatFrontSplit', - 'upperlegFrontSplit', - 'kneeFrontSplit', - 'ankleFrontSplit', - ]) - - CreateControlPoints([ - 'waistBackSplit', - // 'seatBackSplit', - 'upperlegBackSplit', - 'kneeBackSplit', - 'ankleBackSplit', - ]) - - CreatePath('BackSplit', [ - 'waistBackSplit', - // 'seatBackSplit', - 'upperlegBackSplit', - 'kneeBackSplit', - 'ankleBackSplit', - ]) - - points.seatBackSplit = utils - .beamIntersectsCurve( - points.seatBack, - points.seatBackSeam, - points.waistBackSplit, - points.waistBackSplit, - points.upperlegBackSplitCp1, - points.upperlegBackSplit - ) - .addCircle(8) - - var cp = ControlPoints(points.waistFrontSplit, points.upperlegFrontSplit, points.kneeFrontSplit) - points.upperlegFrontCp1 = cp.cp1 - points.upperlegFrontCp2 = cp.cp3 - cp = ControlPoints(points.waistBackSplit, points.upperlegBackSplit, points.kneeBackSplit) - points.upperlegBackCp1 = cp.cp1 - points.upperlegBackCp2 = cp.cp3 - cp = ControlPoints(points.upperlegFrontSplit, points.kneeFrontSplit, points.ankleFrontSplit) - points.kneeFrontCp1 = cp.cp1 - points.kneeFrontCp2 = cp.cp3 - cp = ControlPoints(points.upperlegBackSplit, points.kneeBackSplit, points.ankleBackSplit) - points.kneeBackCp1 = cp.cp1 - points.kneeBackCp2 = cp.cp3 - - console.log({ pins: JSON.parse(JSON.stringify(points)) }) - - paths.frontZ = paths.front.reverse() - points.seatZ = paths.frontZ.shiftAlong(m.waistToSeat).addCircle(4) - points.hipsZ = paths.frontZ.shiftAlong(m.waistToHips).addCircle(4) - points.upperlegZ = paths.frontZ.shiftAlong(m.waistToUpperLeg).addCircle(4) - points.kneeZ = paths.frontZ.shiftAlong(m.waistToKnee).addCircle(4) - points.ankleZ = paths.frontZ - .shiftAlong(m.waistToFloor - points.floor.dist(points.ankle)) - .addCircle(4) - - paths.backZ = paths.back.reverse() - points.seatZback = paths.backZ.shiftAlong(m.waistToSeat).addCircle(4) - points.hipsZback = paths.backZ.shiftAlong(m.waistToHips).addCircle(4) - points.upperlegZback = paths.backZ.shiftAlong(m.waistToUpperLeg).addCircle(4) - points.kneeZback = paths.backZ.shiftAlong(m.waistToKnee).addCircle(4) - points.ankleZback = paths.backZ - .shiftAlong(m.waistToFloor - points.floor.dist(points.ankle)) - .addCircle(4) - - console.log({ - pf: paths.frontZ.length(), - pb: paths.backZ.length(), - m: m.waistToFloor - points.floor.dist(points.ankle), - }) - - console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) - points.kneeFrontSplit.addCircle(2).addCircle(4).addCircle(6).addCircle(8) - // console.log({kfs:paths.frontSplit.split(points.seatFrontSplit)}) - // console.log({kfs:paths.frontSplit.split(points.upperlegFrontSplit)}) - console.log('--------------------------------') - console.log({ kfs: paths.frontSplit.split(points.kneeFrontSplit) }) - // console.log({kfs:paths.frontSplit.split(points.upperlegFrontSplit)}) - - points.sideWaist = new Point(200, 0) - console.log({ p: points.sideWaist }) - points.sideWaistFront = points.sideWaist - .shift(180 - waistAngle, points.waistFrontSplit.dist(points.waistFrontSeam)) - .addCircle(10) - points.sideWaistBack = points.sideWaist.shift( - -1 * waistAngle, - points.waistBackSplit.dist(points.waistBackSeam) - ) - const mp = ['Waist', /*'Hips',*/ 'Seat', 'UpperLeg', 'Knee', 'Ankle'] - // var pathLength = [0] - for (var i = 1; i < mp.length; i++) { - // console.log({ n: 'waistTo' + mp[i], m: m['waistTo' + mp[i]], pl: pathLength[i-1] }) - // console.log({T:paths.frontSplit.split(points[mp[i].toLowerCase() + 'FrontSplit'])[0].length()}) - points['side' + mp[i]] = points.sideWaist.shift(270, m['waistTo' + mp[i]]).addCircle(3) - console.log({ - n1: 'side' + mp[i], - n2: mp[i].toLowerCase() + 'FrontSplit', - n3: mp[i].toLowerCase() + 'FrontSeam', - n4: mp[i - 1].toLowerCase() + 'Front', - n5: 'side' + mp[i - 1] + 'Front', - }) - console.log({ - p1: points['side' + mp[i]], - p2: points[mp[i].toLowerCase() + 'FrontSplit'], - p3: points[mp[i].toLowerCase() + 'FrontSeam'], - p4: points[mp[i - 1].toLowerCase() + 'Front'], - p5: points['side' + mp[i - 1] + 'Front'], - }) - // console.log({split:paths.frontSplit.split(points[mp[i].toLowerCase() + 'FrontSplit'])}) - // pathLength.push(paths.frontSplit.split(points[mp[i].toLowerCase() + 'FrontSplit'])[0].length()) - points['side' + mp[i]].addCircle( - points[mp[i].toLowerCase() + 'FrontSplit'].dist(points[mp[i].toLowerCase() + 'FrontSeam']) - ) - points['side' + mp[i]].addCircle(10) - points['side' + mp[i]].addCircle(12) - points['side' + mp[i]].addCircle(14) - points['side' + mp[i - 1] + 'Front'].addCircle( - points[mp[i].toLowerCase() + 'FrontSplit'].dist( - points[mp[i - 1].toLowerCase() + 'FrontSplit'] - ) - ) - points['side' + mp[i - 1] + 'Front'].addCircle(2) - points['side' + mp[i - 1] + 'Front'].addCircle(4) - points['side' + mp[i - 1] + 'Front'].addCircle(6) - points['side' + mp[i - 1] + 'Front'].addCircle(8) - // console.log({l1:points[mp[i].toLowerCase() + 'FrontSplit'].dist(points[mp[i].toLowerCase() + 'FrontSeam']),l2:pathLength[i]-pathLength[i-1],pl:pathLength}) - var ci = utils.circlesIntersect( - points['side' + mp[i]], - points[mp[i].toLowerCase() + 'FrontSplit'].dist(points[mp[i].toLowerCase() + 'FrontSeam']), - points['side' + mp[i - 1] + 'Front'], - points[mp[i].toLowerCase() + 'FrontSplit'].dist( - points[mp[i - 1].toLowerCase() + 'FrontSplit'] - ) - // pathLength[i]-pathLength[i-1] - ) - console.log({ ci: ci }) - if (false !== ci) { - points['side' + mp[i] + 'Front'] = ci[0].addCircle(7) - // points['ci' +mp[i] + '1' ] = ci[1].addCircle(7) - // points['side' + mp[i] +'Front'].addCircle(pathLength) - } - } - - paths.splitFront = new Path() - .move(points.waistFrontSplit) - ._curve(points.upperlegFrontCp1, points.upperlegFrontSplit) - .curve(points.upperlegFrontCp2, points.kneeFrontCp1, points.kneeFrontSplit) - .curve_(points.kneeFrontCp2, points.ankleFrontSplit) - - paths.splitBack = new Path() - .move(points.waistBackSplit) - ._curve(points.upperlegBackCp1, points.upperlegBackSplit) - .curve(points.upperlegBackCp2, points.kneeBackCp1, points.kneeBackSplit) - .curve_(points.kneeBackCp2, points.ankleBackSplit) - - console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) - console.log({ pins: JSON.parse(JSON.stringify(points)) }) - - console.log({ - Split: paths.frontSplit.length(), - M: m.waistToFloor - points.floorFront.dist(points.ankleFront), - }) - return part - }, -} diff --git a/designs/lumina/src/leg.mjs b/designs/lumina/src/leg.mjs index ee92065fb83..ff4ff6d7492 100644 --- a/designs/lumina/src/leg.mjs +++ b/designs/lumina/src/leg.mjs @@ -1,8 +1,8 @@ -import { points } from './points.mjs' +import { shape } from './shape.mjs' export const leg = { name: 'lumina.leg', - from: points, + from: shape, draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, store, part }) => { paths.front = paths.front.reverse().unhide().addText('front', 'note center').setClass('hidden') paths.frontSplit.unhide().addText('front', 'note center').setClass('hidden') @@ -23,10 +23,6 @@ export const leg = { .join(paths.frontSplit) .close() - // paths.backSplit.addClass('lining').unhide() - // paths.back.addClass('note').unhide() - // paths.front.addClass('mark').unhide() - // paths.frontSplit.addClass('contrast').unhide() if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') snippets.middle = new Snippet('notch', points.frontUpperLeg) @@ -36,10 +32,9 @@ export const leg = { snippets.front3 = new Snippet('notch', paths.frontSplit.shiftFractionAlong(0.6)) snippets.front4 = new Snippet('notch', paths.frontSplit.shiftFractionAlong(0.8)) snippets.back0 = new Snippet('notch', paths.back.shiftFractionAlong(0.5)) - snippets.back1 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.2)) - snippets.back2 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.4)) - snippets.back3 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.6)) - snippets.back4 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.8)) + snippets.back1 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.25)) + snippets.back2 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.5)) + snippets.back3 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.75)) return part }, diff --git a/designs/lumina/src/panel.mjs b/designs/lumina/src/panel.mjs index 710c292ff7f..5652724b4f5 100644 --- a/designs/lumina/src/panel.mjs +++ b/designs/lumina/src/panel.mjs @@ -1,8 +1,8 @@ -import { points } from './points.mjs' +import { shape } from './shape.mjs' export const panel = { name: 'lumina.panel', - from: points, + from: shape, draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, store, part }) => { paths.panelWaistband = new Path() .move(points.backPanelWaistband) @@ -35,15 +35,9 @@ export const panel = { snippets.front2 = new Snippet('notch', paths.frontPanel.shiftFractionAlong(0.4)) snippets.front3 = new Snippet('notch', paths.frontPanel.shiftFractionAlong(0.6)) snippets.front4 = new Snippet('notch', paths.frontPanel.shiftFractionAlong(0.8)) - snippets.back1 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.2)) - snippets.back2 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.4)) - snippets.back3 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.6)) - snippets.back4 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.8)) - - store.set('pocket', { - paths: paths, - points: points, - }) + snippets.back1 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.25)) + snippets.back2 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.5)) + snippets.back3 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.75)) return part }, diff --git a/designs/lumina/src/pocket.mjs b/designs/lumina/src/pocket.mjs index 1cc4df1ab67..225ba6d1700 100644 --- a/designs/lumina/src/pocket.mjs +++ b/designs/lumina/src/pocket.mjs @@ -1,19 +1,17 @@ import { pctBasedOn } from '@freesewing/core' import { panel } from './panel.mjs' -import { points } from './points.mjs' +import { shape } from './shape.mjs' export const pocket = { name: 'lumina.pocket', - // from: panel, - // after: panel, - // hide: hidePresets.HIDE_TREE, - from: points, + after: panel, + from: shape, options: { pocket: { bool: true, menu: 'style' }, pocketdepth: { - pct: 80, - min: 0, - max: 100, + pct: 90, + min: 20, + max: 120, ...pctBasedOn('waistToSeat'), // eslint-disable-next-line no-unused-vars menu: (settings, mergedOptions) => (mergedOptions?.pocket ? 'style' : false), @@ -41,12 +39,6 @@ export const pocket = { return part.hide() } - console.log({ s: JSON.parse(JSON.stringify(store)) }) - console.log({ - points: JSON.parse(JSON.stringify(points)), - paths: JSON.parse(JSON.stringify(paths)), - }) - const pocketDepth = measurements.waistToSeat * options.pocketdepth paths.pocketWaistband = new Path() @@ -61,17 +53,27 @@ export const pocket = { .line(points.backPocketHem) .addText('bottom', 'note center') .setClass('hidden') - paths.frontPocket = paths.frontPanel - .split(points.frontPocketHem)[0] - .unhide() - .addText('front', 'note center') - .setClass('hidden') - paths.backPocket = paths.backPanel - .split(points.backPocketHem)[0] - .unhide() - .reverse() - .addText('back', 'note center') - .setClass('hidden') + const frontPocketSplit = paths.frontPanel.split(points.frontPocketHem) + if (frontPocketSplit) { + paths.frontPocket = frontPocketSplit[0] + .unhide() + .addText('front', 'note center') + .setClass('hidden') + } else { + log.info('lumina:couldNotCreatePocket') + return part.hide() + } + const backPocketSplit = paths.backPanel.split(points.backPocketHem) + if (backPocketSplit) { + paths.backPocket = backPocketSplit[0] + .unhide() + .reverse() + .addText('back', 'note center') + .setClass('hidden') + } else { + log.info('lumina:couldNotCreatePocket') + return part.hide() + } paths.seam = new Path() .move(points.frontPocketHem) @@ -83,6 +85,16 @@ export const pocket = { if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') + for (var i = 1; i < 4; i++) { + if (paths.frontPanel.length() * (0.2 * i) < pocketDepth) { + snippets['front' + i] = new Snippet('notch', paths.frontPanel.shiftFractionAlong(0.2 * i)) + } + + if (paths.backPanel.length() * (0.25 * i) < pocketDepth) { + snippets['back' + i] = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.25 * i)) + } + } + return part }, } diff --git a/designs/lumina/src/points.mjs b/designs/lumina/src/shape.mjs similarity index 90% rename from designs/lumina/src/points.mjs rename to designs/lumina/src/shape.mjs index 4086f00a188..01081437d13 100644 --- a/designs/lumina/src/points.mjs +++ b/designs/lumina/src/shape.mjs @@ -153,9 +153,6 @@ const createSidePoints = ({ ? measurement - fixedSidePanel : width : width - // const reduction = ratio == 0 ? measurement : width - console.log({ i: i, p: prefix + postfix + names[i], f: fixedSidePanel }) - console.log({ m: measurement, w: width, mw: measurement - width, rf: ratioFixed }) if (i == 0) { points[prefix + postfix + names[i]] = points[prefix + names[i]].shift( prefix == 'front' ? 180 : 0, @@ -205,8 +202,8 @@ const smoothPoints = (points, prefix, postfix, names, smoothness) => { } } -export const points = { - name: 'lumina.points', +export const shape = { + name: 'lumina.shape', measurements: [ 'waist', 'waistBack', @@ -413,35 +410,17 @@ export const points = { .move(points.backWaist) .curve(points.backWaistCp, points.backHipsCp2, points.backHips) .curve(points.backHipsCp1, points.backCrossSeamCp, points.middleCrossSeam) - - smoothPoints( - points, - 'front', - 'Side', - ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], - options.smoothing - ) - smoothPoints( - points, - 'front', - 'Split', - ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], - options.smoothing - ) - smoothPoints( - points, - 'back', - 'Side', - ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], - options.smoothing - ) - smoothPoints( - points, - 'back', - 'Split', - ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], - options.smoothing - ) + ;['front', 'back'].forEach((prefix) => { + ;['Side', 'Split'].forEach((type) => { + smoothPoints( + points, + prefix, + type, + ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], + options.smoothing + ) + }) + }) paths.middle = new Path().move(points.middleWaist).line(points.middleFloor).setHidden() ;['front', 'back'].forEach((prefix) => { @@ -466,9 +445,6 @@ export const points = { ]) }) }) - - // store.set('frontSplitLength',paths.frontSplit.length()) - // store.set('backSplitLength',paths.backSplit.length()) ;['front', 'back'].forEach((prefix) => { ;['Waist', 'Waistband', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { points[prefix + 'Panel' + name] = points['middle' + name].shift( @@ -497,6 +473,7 @@ export const points = { }) const frontSplitlength = paths.frontSplit.length() + while (Math.abs(frontSplitlength - paths.frontPanel.length()) > 1) { ;['front', 'back'].forEach((prefix) => { const diff = paths[prefix + 'Split'].length() / paths[prefix + 'Panel'].length() @@ -542,11 +519,6 @@ export const points = { }) }) } - // ;['back'].forEach((prefix) => { - // ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { - // points[prefix + 'Split' + name] - // }) - // }) lowerWaist(paths, Path, points, waistLowering, 'middle', 'Waist') ;['front', 'back'].forEach((prefix) => { @@ -561,24 +533,6 @@ export const points = { }) lowerWaist(paths, Path, points, waistbandSize, prefix, 'Waistband') }) - ;['front', 'back'].forEach((prefix) => { - ;['Side', 'Split', 'Panel'].forEach((type) => { - ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { - points[prefix + type + name] - }) - points[prefix + type + 'Waistband'] - }) - points[prefix + 'Waist'] - points[prefix + 'Waistband'] - }) - ;['front', 'back'].forEach((prefix) => { - ;['Side', 'Split', 'Panel'].forEach((type) => { - ;['Seat', 'UpperLeg', 'Knee'].forEach((name) => { - points[prefix + type + name + 'Cp1'] - points[prefix + type + name + 'Cp2'] - }) - }) - }) store.set( 'waistLength', @@ -631,5 +585,3 @@ export const points = { return part.hide() }, } - -//http://localhost:8000/new/luminous#view=%22inspect%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A960%2C%22waistBack%22%3A440%2C%22hips%22%3A884%2C%22seat%22%3A980%2C%22seatBack%22%3A490%2C%22inseam%22%3A790%2C%22waistToSeat%22%3A230%2C%22waistToUpperLeg%22%3A280%2C%22waistToKnee%22%3A610%2C%22waistToHips%22%3A120%2C%22waistToFloor%22%3A1090%2C%22knee%22%3A415%2C%22ankle%22%3A230%2C%22crossSeam%22%3A800%2C%22crossSeamFront%22%3A380%2C%22heel%22%3A300%2C%22upperLeg%22%3A640%7D%7D diff --git a/designs/lumina/src/waistband.mjs b/designs/lumina/src/waistband.mjs index 9fbc3196948..8e6c5808c22 100644 --- a/designs/lumina/src/waistband.mjs +++ b/designs/lumina/src/waistband.mjs @@ -1,9 +1,8 @@ -import { cbqc } from '@freesewing/core' -import { points } from './points.mjs' +import { shape } from './shape.mjs' export const waistband = { name: 'lumina.waistband', - after: points, + after: shape, draft: ({ store, sa, @@ -110,7 +109,6 @@ export const waistband = { .join(paths.waist.reverse()) .line(points.waistbandBack) .join(paths.waistband) - .reverse() .hide() paths.seam = new Path().move(points.waistbandFront).line(points.waistFront).join(paths.seamSA) diff --git a/designs/lumina/src/zpoints.mjs b/designs/lumina/src/zpoints.mjs deleted file mode 100644 index 4403db74c31..00000000000 --- a/designs/lumina/src/zpoints.mjs +++ /dev/null @@ -1,565 +0,0 @@ -export const zpoints = { - name: 'lumina.zpoints', - measurements: [ - 'waist', - 'waistBack', - 'hips', - 'seat', - 'seatBack', - 'inseam', - 'waistToSeat', - 'waistToUpperLeg', - 'waistToKnee', - 'waistToHips', - 'waistToFloor', - 'knee', - 'ankle', - 'crossSeam', - 'crossSeamFront', - 'heel', - 'upperLeg', - ], - options: { - ease: { pct: -20, min: -35, max: 10, menu: 'fit' }, - length: { pct: 100, min: 10, max: 100, menu: 'fit' }, - crossSeamAngle: 35, - crotchToKnee: 0.4, - waistToKneeCP: 0.4, - kneeToWaistLength: 400, - crotchPointsCP: 2, - }, - draft: ({ - measurements, - options, - Point, - Path, - points, - paths, - Snippet, - snippets, - utils, - log, - complete, - sa, - paperless, - macro, - part, - }) => { - const ControlPoints = (p1, p2, p3, t) => { - let a = Math.abs(p2.angle(p1) - p2.angle(p3)) / 2 - const t1 = p2.shift(p2.angle(p1) + a - 90, p2.dist(p1) / 3) - const t3 = p2.shift(p2.angle(p3) - a + 90, p2.dist(p3) / 3) - return { - cp1: p2.shift(p2.angle(p1) + a - 90, p2.dist(p1) / 3), - cp3: p2.shift(p2.angle(p3) - a + 90, p2.dist(p3) / 3), - } - } - const CreateControlPoints = (names) => { - for (var i = 1; i < names.length - 1; i++) { - var cp = ControlPoints(points[names[i - 1]], points[names[i]], points[names[i + 1]]) - points[names[i] + 'Cp1'] = cp.cp1 - points[names[i] + 'Cp2'] = cp.cp3 - } - } - const CreatePath = (pathName, names) => { - paths[pathName] = new Path() - .move(points[names[0]]) - ._curve(points[names[1] + 'Cp1'], points[names[1]]) - for (var i = 2; i < names.length - 1; i++) { - paths[pathName].curve( - points[names[i - 1] + 'Cp2'], - points[names[i] + 'Cp1'], - points[names[i]] - ) - } - paths[pathName].curve_(points[names[i - 1] + 'Cp2'], points[names[i]]) - - return paths[pathName] - } - - const CreateWaistPoint = (front) => { - // console.log({ - // crossSeamAngle: options.crossSeamAngle, - // crotchPointsCP: options.crotchPointsCP, - // }) - const kneeTemp = points.insideCrossSeam.shiftFractionTowards( - points.insideKnee, - options.crotchToKnee - ) - const angle = - 90 + - (front - ? options.crossSeamAngle * (m.waistBack / m.waist) - : -1 * options.crossSeamAngle * (1 - m.waistBack / m.waist)) - const crossSeam = front ? m.crossSeamFront : m.crossSeam - m.crossSeamFront - var kneeToWaist = m.waistToKnee - var ratio = 1 - var waist = kneeTemp.shift(angle, kneeToWaist * ratio) - const crossSeamCp = points.insideCrossSeam.shiftFractionTowards( - utils.beamIntersectsY(kneeTemp, waist, points.insideCrossSeam.y), - options.crotchPointsCP - ) - - // console.log({ f: front, a: angle }) - var waistCp - var diff, - iter = 0 - do { - waist = kneeTemp.shift(angle, kneeToWaist * ratio * (ratio < 1 ? 1.05 : 0.95)) - // waistCp = waist.shiftFractionTowards(kneeTemp, options.waistToKneeCP) - waistCp = waist.shiftFractionTowards(points.insideKnee, options.waistToKneeCP) - - const crossSeamPath = new Path() - .move(points.insideCrossSeam) - .curve(crossSeamCp, waistCp, waist) - - diff = crossSeam - crossSeamPath.length() - ratio = crossSeam / crossSeamPath.length() - // console.log({ i: iter, d: diff, r: ratio }) - } while (++iter < 100 && (diff > 1 || diff < -1)) - if (iter >= 100) { - console.log('Too many iterations trying to make it fit!') - // log.error('Too many iterations trying to make it fit!') - } - - if (front) { - points.frontWaist = waist.clone() - points.frontWaistCp = waistCp.clone() - points.frontCrossSeamCp = crossSeamCp.clone() - } else { - points.backWaist = waist.clone() - points.backWaistCp = waistCp.clone() - points.backCrossSeamCp = crossSeamCp.clone() - } - } - - const CreateSidePoints = ( - prefix, - postfix, - names, - ratio, - ratioFixed, - ease, - distanceCompentation - ) => { - // console.log('-----' + prefix + postfix + '----') - var measurement, - width, - lastGood = 0 - for (var i = 0; i < names.length; i++) { - var distance = - m['waistTo' + names[i - 1]] - - (m['waistTo' + names[i]] === undefined ? 0 : m['waistTo' + names[i]]) - switch (names[i]) { - case 'UpperLeg': - measurement = m['upperLeg'] - const intersect = utils.beamIntersectsCurve( - points[prefix + names[i]], - points[prefix + names[i]].shift(prefix == 'front' ? 180 : 0, ratioFixed * 3), - points.insideCrossSeam, - points[prefix + 'CrossSeamCp'], - points[prefix + 'WaistCp'], - points[prefix + 'Waist'] - ) - // console.log({ intersect: intersect }) - measurement += intersect.dist(points[prefix + names[i]]) - break - case 'Waist': - measurement = prefix == 'front' ? m.waist - m.waistBack : m.waistBack - case 'Seat': - measurement = prefix == 'front' ? m.seat - m.seatBack : m.seatBack - distance *= distanceCompentation - break - default: - measurement = m[names[i].toLowerCase()] - } - measurement /= 2 - measurement *= ease - - width = measurement * ratio - - if (i == 0) { - points[prefix + postfix + names[i]] = points[prefix + names[i]].shift( - prefix == 'front' ? 180 : 0, - measurement - width < ratioFixed ? width : measurement - ratioFixed - ) //.addCircle(3).addCircle(6).addCircle(9) - points[prefix + names[i]] //.addCircle(width < ratioFixed ? width : ratioFixed) - } else { - var ci = utils.circlesIntersect( - points[prefix + names[i]], - measurement - width < ratioFixed ? width : measurement - ratioFixed, - points[prefix + postfix + names[lastGood]], - distance - ) - - if (false !== ci) { - points[prefix + postfix + names[i]] = ci[prefix == 'front' ? 0 : 1] //.addCircle(2).addCircle(4).addCircle(6) - lastGood = i - } else { - // break - points[prefix + postfix + names[i]] = points[prefix + postfix + names[lastGood]].clone() - - points[prefix + postfix + names[lastGood]] //.addCircle(distance) - // points[prefix +names[i]].addCircle(width < ratioFixed ? width : ratioFixed) - points[prefix + names[i]] //.addCircle(measurement - width < ratioFixed ? width : measurement - ratioFixed) - } - } - } - } - - const SmoothPoints = (prefix, postfix, names) => { - var adjust - for (var i = 0; i < names.length - 2; i++) { - adjust = false - if (prefix == 'front') { - adjust = - points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) > - points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) - } else { - adjust = - points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 1]]) < - points[prefix + postfix + names[i]].angle(points[prefix + postfix + names[i + 2]]) - } - if (adjust) { - points[prefix + postfix + names[i + 1]] = points[ - prefix + postfix + names[i] - ].shiftTowards( - points[prefix + postfix + names[i + 2]], - points[prefix + postfix + names[i]].dist(points[prefix + postfix + names[i + 1]]) - ) - } - } - } - - const m = measurements - const crotchOffset = m.waistToFloor - m.inseam - - const waistFrontBackRatio = m.waistBack / m.waist - const sideRatio = 3 / 5 - const ease = options.ease + 1 - const waistToAnkle = m.waistToFloor - m.heel / Math.PI - - m['waistToAnkle'] = m.waistToFloor - m.heel / Math.PI - const sideFixed = (((m.waist - m.waistBack) * ease) / 2) * sideRatio - - points.insideWaist = new Point(0, 0) - points.insideHips = points.insideWaist.shift(270, m.waistToHips) - points.insideSeat = points.insideWaist.shift(270, m.waistToSeat) - points.frontCrossSeam = - points.backCrossSeam = - points.insideCrossSeam = - points.insideWaist.shift(270, crotchOffset) - points.frontUpperLeg = - points.backUpperLeg = - points.insideUpperLeg = - points.insideWaist.shift(270, m.waistToUpperLeg) - points.frontKnee = - points.backKnee = - points.insideKnee = - points.insideWaist.shift(270, m.waistToKnee) - points.frontAnkle = - points.backAnkle = - points.insideAnkle = - points.insideWaist.shift(270, waistToAnkle) - points.frontFloor = - points.backFloor = - points.insideFloor = - points.insideWaist.shift(270, m.waistToFloor) - - CreateWaistPoint(true) - CreateWaistPoint(false) - - console.log({ pionts: JSON.parse(JSON.stringify(points)) }) - - const crossSeamFront = new Path() - .move(points.frontWaist) - .curve(points.frontWaistCp, points.frontCrossSeamCp, points.insideCrossSeam) - const crossSeamBack = new Path() - .move(points.backWaist) - .curve(points.backWaistCp, points.backCrossSeamCp, points.insideCrossSeam) - - points.frontSeat = crossSeamFront.shiftAlong( - m.waistToSeat * (m.crossSeamFront / m.waistToUpperLeg) * 0.8 - ) - // .addCircle(6) - points.frontHips = crossSeamFront.shiftAlong( - m.waistToHips * (m.crossSeamFront / m.waistToUpperLeg) - ) - // .addCircle(10) - points.backSeat = crossSeamBack.shiftAlong(m.waistToSeat * (m.waistToSeat / m.waistToUpperLeg)) - // .addCircle(6) - points.backHips = crossSeamBack.shiftAlong(m.waistToHips * (m.waistToSeat / m.waistToUpperLeg)) - // .addCircle(10) - - CreateSidePoints( - 'front', - 'Side', - ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], - 0, - 0.1, - ease, - 1 - ) - CreateSidePoints( - 'back', - 'Side', - ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], - 0, - 0.1, - ease, - 1 - ) - - CreateSidePoints( - 'front', - 'Split', - ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], - sideRatio, - sideFixed, - ease, - (points.frontAnkle.dist(points.frontCrossSeam) + crossSeamFront.length()) / - (m.waistToFloor - m.heel / Math.PI) - ) - CreateSidePoints( - 'back', - 'Split', - ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], - sideRatio, - sideFixed, - ease, - (points.frontAnkle.dist(points.frontCrossSeam) + crossSeamFront.length()) / - (m.waistToFloor - m.heel / Math.PI) - ) - - points.backHipsCp1 = points.backWaistCp.clone() - points.backWaistCp = points.backWaist.shift( - points.backWaist.angle(points.backSplitWaist) - 90, - points.backWaist.dist(points.backHips) / 3 - ) - points.backHipsCp2 = points.backSeat.shiftOutwards( - points.backHips, - points.backWaist.dist(points.backHips) / 4 - ) - points.frontHipsCp1 = points.frontWaistCp.clone() - points.frontWaistCp = points.frontWaist.shift( - points.frontWaist.angle(points.frontSplitWaist) + 90, - points.frontWaist.dist(points.frontHips) / 3 - ) - points.frontHipsCp2 = points.frontSeat.shiftOutwards( - points.frontHips, - points.frontWaist.dist(points.frontHips) / 4 - ) - - paths.crossSeamFront = new Path() - .move(points.insideCrossSeam) - .curve(points.frontCrossSeamCp, points.frontHipsCp1, points.frontHips) - .curve(points.frontHipsCp2, points.frontWaistCp, points.frontWaist) - .hide() - paths.crossSeamBack = new Path() - .move(points.insideCrossSeam) - .curve(points.backCrossSeamCp, points.backHipsCp1, points.backHips) - .curve(points.backHipsCp2, points.backWaistCp, points.backWaist) - .hide() - - SmoothPoints('front', 'Side', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) - SmoothPoints('front', 'Split', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) - SmoothPoints('back', 'Side', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) - SmoothPoints('back', 'Split', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) - - console.log({ pins: JSON.parse(JSON.stringify(points)) }) - - paths.middle = new Path().move(points.insideUpperLeg).line(points.insideFloor).hide() - ;['front', 'back'].forEach((prefix) => { - ;['Side', 'Split'].forEach((type) => { - CreateControlPoints([ - prefix + type + 'Waist', - prefix + type + 'Seat', - prefix + type + 'UpperLeg', - prefix + type + 'Knee', - prefix + type + 'Ankle', - ]) - }) - }) - ;['front', 'back'].forEach((prefix) => { - ;['Side', 'Split'].forEach((type) => { - CreatePath(prefix + type, [ - prefix + type + 'Waist', - prefix + type + 'Seat', - prefix + type + 'UpperLeg', - prefix + type + 'Knee', - prefix + type + 'Ankle', - ]).hide() - }) - }) - - if (1 == 2) { - ;['front', 'back'].forEach((prefix) => { - ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { - var measurement - switch (name) { - case 'UpperLeg': - measurement = m.upperLeg - case 'Waist': - measurement = prefix == 'front' ? m.waist - m.waistBack : m.waistBack - break - case 'Seat': - measurement = prefix == 'front' ? m.seat - m.seatBack : m.seatBack - break - default: - measurement = m[name.toLowerCase()] - } - - points[prefix + 'Panel' + name] = points['inside' + name].shift( - prefix == 'front' ? 180 : 0, - measurement / 2 - points[prefix + name].dist(points[prefix + 'Split' + name]) - ) //.addCircle(4) - }) - }) - - SmoothPoints('front', 'Panel', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) - SmoothPoints('back', 'Panel', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) - paths.frontPanel = new Path() - .move(points.frontPanelAnkle) - .line(points.frontPanelKnee) - .line(points.frontPanelUpperLeg) - .line(points.frontPanelSeat) - .line(points.frontPanelWaist) - paths.backPanel = new Path() - .move(points.backPanelAnkle) - .line(points.backPanelKnee) - .line(points.backPanelUpperLeg) - .line(points.backPanelSeat) - .line(points.backPanelWaist) - } - if (1 == 1) { - ;['front', 'back'].forEach((prefix) => { - ;['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { - points[prefix + 'Panel' + name] = points['inside' + name].shift( - prefix == 'front' ? 180 : 0, - points[prefix + 'Side' + name].dist(points[prefix + 'Split' + name]) - ) //.addCircle(4) - }) - }) - - // SmoothPoints('front', 'Panel', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) - // SmoothPoints('back', 'Panel', ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist']) - ;['front', 'back'].forEach((prefix) => { - CreateControlPoints([ - prefix + 'Panel' + 'Waist', - prefix + 'Panel' + 'Seat', - prefix + 'Panel' + 'UpperLeg', - prefix + 'Panel' + 'Knee', - prefix + 'Panel' + 'Ankle', - ]) - }) - ;['front', 'back'].forEach((prefix) => { - CreatePath(prefix + 'Panel', [ - prefix + 'Panel' + 'Waist', - prefix + 'Panel' + 'Seat', - prefix + 'Panel' + 'UpperLeg', - prefix + 'Panel' + 'Knee', - prefix + 'Panel' + 'Ankle', - ]).hide() - }) - - console.log({ - fsl: paths.frontSplit.length(), - fpl: paths.frontPanel.length(), - bsl: paths.backSplit.length(), - bpl: paths.backPanel.length(), - }) - ;['front', 'back'].forEach((prefix) => { - const diff = paths[prefix + 'Split'].length() / paths[prefix + 'Panel'].length() - const names = ['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'] - for (var i = 0; i < names.length - 1; i++) { - points[prefix + 'Panel' + names[i]] = points[ - prefix + 'Panel' + names[i + 1] - ].shiftFractionTowards(points[prefix + 'Panel' + names[i]], diff) - } - }) - ;['front', 'back'].forEach((prefix) => { - CreateControlPoints([ - prefix + 'Panel' + 'Waist', - prefix + 'Panel' + 'Seat', - prefix + 'Panel' + 'UpperLeg', - prefix + 'Panel' + 'Knee', - prefix + 'Panel' + 'Ankle', - ]) - }) - ;['front', 'back'].forEach((prefix) => { - CreatePath(prefix + 'Panel', [ - prefix + 'Panel' + 'Waist', - prefix + 'Panel' + 'Seat', - prefix + 'Panel' + 'UpperLeg', - prefix + 'Panel' + 'Knee', - prefix + 'Panel' + 'Ankle', - ]).hide() - }) - } - - console.log({ - fsl: paths.frontSplit.length(), - fpl: paths.frontPanel.length(), - bsl: paths.backSplit.length(), - bpl: paths.backPanel.length(), - }) - - if (options.length < 1) { - const length = (1 - options.length) * (m.inseam - (m.waistToFloor - waistToAnkle)) - console.log({ wtf: m.waistToFloor, i: m.inseam, l: length }) - // console.log({i:m.inseam,wa:waistToAnkle,iw:(m.inseam/waistToAnkle),r:lengthRatio}) - ;['front', 'back'].forEach((prefix) => { - ;['Side', 'Split', 'Panel'].forEach((type) => { - console.log({ n: prefix + type, l: paths[prefix + type].length() }) - points[prefix + type + 'Hem'] = paths[prefix + type].reverse().shiftAlong(length) - paths[prefix + type] = paths[prefix + type].split(points[prefix + type + 'Hem'])[0] //.hide() - }) - }) - } else { - ;['front', 'back'].forEach((prefix) => { - ;['Side', 'Split', 'Panel'].forEach((type) => { - points[prefix + type + 'Hem'] = points[prefix + type + 'Ankle'] - }) - }) - } - // ;['front', 'back'].forEach((prefix) => { - // ;['Side'].forEach((type) => { - // paths[prefix + type] = new Path() - // .move(points[prefix + type + 'Ankle']) - // .line(points[prefix + type + 'Knee']) - // .line(points[prefix + type + 'UpperLeg']) - // .line(points[prefix + type + 'Seat']) - // .line(points[prefix + type + 'Waist']) - // }) - // }) - // ;['front', 'back'].forEach((prefix) => { - // ;['Split'].forEach((type) => { - // paths[prefix + type +'2'] = new Path() - // .move(points[prefix + type + 'Ankle']) - // .line(points[prefix + type + 'Knee']) - // .line(points[prefix + type + 'UpperLeg']) - // .line(points[prefix + type + 'Waist']) - // }) - // }) - - // paths.frontSplit.addClass('dotted note') - // paths.backSplit.addClass('dotted note') - // paths.frontSplit2.addClass('dashed lining') - // paths.backSplit2.addClass('dashed lining') - - // console.log({d1: points.frontKnee.dist(points.frontUpperLeg),d2: points.frontSplitKnee.dist(points.frontSplitUpperLeg)}) - - console.log({ pahts: JSON.parse(JSON.stringify(paths)) }) - console.log({ pihts: JSON.parse(JSON.stringify(points)) }) - - // paths.frontSide = new Path() - // .move(points.frontSideAnkle) - // .line(points.frontSideKnee) - // .line(points.frontSideUpperLeg) - // .line(points.frontSideSeat) - // .line(points.frontSideWaist) - return part //.hide() - }, -} - -//http://localhost:8000/new/luminous#view=%22inspect%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A960%2C%22waistBack%22%3A440%2C%22hips%22%3A884%2C%22seat%22%3A980%2C%22seatBack%22%3A490%2C%22inseam%22%3A790%2C%22waistToSeat%22%3A230%2C%22waistToUpperLeg%22%3A280%2C%22waistToKnee%22%3A610%2C%22waistToHips%22%3A120%2C%22waistToFloor%22%3A1090%2C%22knee%22%3A415%2C%22ankle%22%3A230%2C%22crossSeam%22%3A800%2C%22crossSeamFront%22%3A380%2C%22heel%22%3A300%2C%22upperLeg%22%3A640%7D%7D From 2efcf914f5dc58534ffb5c2d225e25b9dab9f5e2 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Sat, 6 Jan 2024 18:07:53 +0000 Subject: [PATCH 13/28] start with dimensions --- designs/lumina/src/index.mjs | 2 + designs/lumina/src/leg.mjs | 5 +++ designs/lumina/src/panel.mjs | 29 +++++++------- designs/lumina/src/pocket.mjs | 23 +++++------ designs/lumina/src/shape.mjs | 42 +++++++++++++------- designs/lumina/src/side.mjs | 52 ------------------------- designs/lumina/src/waistband.mjs | 66 +++++++++++++++++++++++++++++++- 7 files changed, 124 insertions(+), 95 deletions(-) delete mode 100644 designs/lumina/src/side.mjs diff --git a/designs/lumina/src/index.mjs b/designs/lumina/src/index.mjs index 6a8ec4c0016..e1082e1bb3d 100644 --- a/designs/lumina/src/index.mjs +++ b/designs/lumina/src/index.mjs @@ -24,3 +24,5 @@ export { i18n, Lumina, shape, panel, leg, waistband, pocket } // http://localhost:8000/new/lumina#view=%22inspect%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A960%2C%22waistBack%22%3A440%2C%22hips%22%3A884%2C%22seat%22%3A980%2C%22seatBack%22%3A490%2C%22inseam%22%3A790%2C%22waistToSeat%22%3A230%2C%22waistToUpperLeg%22%3A280%2C%22waistToKnee%22%3A610%2C%22waistToHips%22%3A120%2C%22waistToFloor%22%3A1090%2C%22knee%22%3A415%2C%22ankle%22%3A230%2C%22crossSeam%22%3A800%2C%22crossSeamFront%22%3A380%2C%22heel%22%3A300%2C%22upperLeg%22%3A640%7D%7D // http://localhost:8000/new/lumina#view=%22inspect%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A780%2C%22waistBack%22%3A360%2C%22hips%22%3A860%2C%22seat%22%3A980%2C%22seatBack%22%3A510%2C%22inseam%22%3A680%2C%22waistToSeat%22%3A200%2C%22waistToUpperLeg%22%3A250%2C%22waistToKnee%22%3A500%2C%22waistToHips%22%3A90%2C%22waistToFloor%22%3A890%2C%22knee%22%3A360%2C%22ankle%22%3A220%2C%22crossSeam%22%3A620%2C%22crossSeamFront%22%3A290%2C%22heel%22%3A280%2C%22upperLeg%22%3A580%7D%2C%22options%22%3A%7B%22length%22%3A1%2C%22waistreduction%22%3A0.1%2C%22waistLowering%22%3A0.012%2C%22waistlowering%22%3A0.181%7D%2C%22units%22%3A%22metric%22%7D + +// Climbing pants http://localhost:8000/new/lumina#view=%22draft%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A780%2C%22waistBack%22%3A360%2C%22hips%22%3A860%2C%22seat%22%3A980%2C%22seatBack%22%3A510%2C%22inseam%22%3A680%2C%22waistToSeat%22%3A200%2C%22waistToUpperLeg%22%3A250%2C%22waistToKnee%22%3A500%2C%22waistToHips%22%3A90%2C%22waistToFloor%22%3A890%2C%22knee%22%3A360%2C%22ankle%22%3A220%2C%22crossSeam%22%3A620%2C%22crossSeamFront%22%3A290%2C%22heel%22%3A280%2C%22upperLeg%22%3A580%7D%2C%22options%22%3A%7B%22waistreduction%22%3A0%2C%22ease%22%3A0.1%2C%22length%22%3A0.945%2C%22waistband%22%3Afalse%2C%22pocket%22%3Afalse%2C%22waistlowering%22%3A0.2%7D%2C%22sabool%22%3A1%2C%22sa%22%3A10%2C%22samm%22%3A10%7D diff --git a/designs/lumina/src/leg.mjs b/designs/lumina/src/leg.mjs index ff4ff6d7492..cf7c10b82bc 100644 --- a/designs/lumina/src/leg.mjs +++ b/designs/lumina/src/leg.mjs @@ -36,6 +36,11 @@ export const leg = { snippets.back2 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.5)) snippets.back3 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.75)) + console.log({ + front: paths.front.length(), + back: paths.back.length(), + total: paths.front.length() + paths.back.length(), + }) return part }, } diff --git a/designs/lumina/src/panel.mjs b/designs/lumina/src/panel.mjs index 5652724b4f5..c9cf9d880c9 100644 --- a/designs/lumina/src/panel.mjs +++ b/designs/lumina/src/panel.mjs @@ -5,28 +5,25 @@ export const panel = { from: shape, draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, store, part }) => { paths.panelWaistband = new Path() - .move(points.backPanelWaistband) - .line(points.frontPanelWaistband) - .addText('top', 'note center') + .move(points.frontPanelWaistband) + .line(points.backPanelWaistband) + .setText('top', 'note center') .setClass('hidden') paths.panelHem = new Path() - .move(points.frontPanelHem) - .line(points.backPanelHem) - .addText('bottom', 'note center') - .setClass('hidden') - paths.frontPanel.unhide().addText('front', 'note center').setClass('hidden') - paths.backPanel = paths.backPanel - .reverse() - .unhide() - .addText('back', 'note center') + .move(points.backPanelHem) + .line(points.frontPanelHem) + .setText('bottom', 'note center') .setClass('hidden') + paths.frontPanel.reverse().setText('front', 'note center').setClass('hidden') + paths.backPanel = paths.backPanel.unhide().setText('back', 'note center').setClass('hidden') paths.seam = new Path() - .move(points.frontPanelHem) - .join(paths.panelHem) - .join(paths.backPanel) - .join(paths.panelWaistband) + .move(points.backPanelHem) + .join(paths.backPanel.reverse()) + .join(paths.panelWaistband.reverse()) .join(paths.frontPanel) + .join(paths.panelHem.reverse()) + .reverse() .close() if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') diff --git a/designs/lumina/src/pocket.mjs b/designs/lumina/src/pocket.mjs index 225ba6d1700..d0b9413deb7 100644 --- a/designs/lumina/src/pocket.mjs +++ b/designs/lumina/src/pocket.mjs @@ -31,10 +31,6 @@ export const pocket = { store, part, }) => { - // const p = store.get('pocket') - // paths = p.paths - // points = p.points - if (!options.pocket) { return part.hide() } @@ -42,20 +38,21 @@ export const pocket = { const pocketDepth = measurements.waistToSeat * options.pocketdepth paths.pocketWaistband = new Path() - .move(points.backPanelWaistband) - .line(points.frontPanelWaistband) + .move(points.frontPanelWaistband) + .line(points.backPanelWaistband) .addText('top', 'note center') .setClass('hidden') points.frontPocketHem = paths.frontPanel.shiftAlong(pocketDepth) points.backPocketHem = paths.backPanel.shiftAlong(pocketDepth) paths.pocketHem = new Path() - .move(points.frontPocketHem) - .line(points.backPocketHem) + .move(points.backPocketHem) + .line(points.frontPocketHem) .addText('bottom', 'note center') .setClass('hidden') const frontPocketSplit = paths.frontPanel.split(points.frontPocketHem) if (frontPocketSplit) { paths.frontPocket = frontPocketSplit[0] + .reverse() .unhide() .addText('front', 'note center') .setClass('hidden') @@ -67,7 +64,6 @@ export const pocket = { if (backPocketSplit) { paths.backPocket = backPocketSplit[0] .unhide() - .reverse() .addText('back', 'note center') .setClass('hidden') } else { @@ -77,11 +73,12 @@ export const pocket = { paths.seam = new Path() .move(points.frontPocketHem) - .join(paths.pocketHem) - .join(paths.backPocket) - .join(paths.pocketWaistband) - .join(paths.frontPocket) + .join(paths.pocketHem.reverse()) + .join(paths.backPocket.reverse()) + .join(paths.pocketWaistband.reverse()) + .join(paths.frontPocket.reverse()) .close() + .reverse() if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') diff --git a/designs/lumina/src/shape.mjs b/designs/lumina/src/shape.mjs index 01081437d13..a132d21cd82 100644 --- a/designs/lumina/src/shape.mjs +++ b/designs/lumina/src/shape.mjs @@ -15,7 +15,7 @@ export const createPath = (paths, Path, points, pathName, names) => { } const lowerWaist = (paths, Path, points, waistLowering, pathName, pointName) => { - console.log({ pn: pathName, p: paths[pathName] }) + // console.log({ pn: pathName, p: paths[pathName] }) const newPath = extendPath(Path, paths[pathName], 100, 0) const newWaist = newPath.shiftAlong(waistLowering + 100) if (newWaist.sitsRoughlyOn(points[pathName + pointName])) { @@ -94,16 +94,16 @@ const createSidePoints = ({ let measurement // let width let lastGood = 0 - console.log({ - prefix: prefix, - postfix: postfix, - ratio: ratio, - ratioFixed: ratioFixed, - ease: ease, - waistReduction: waistReduction, - distanceCompensation: distanceCompensation, - fixedSidePanel: fixedSidePanel, - }) + // console.log({ + // prefix: prefix, + // postfix: postfix, + // ratio: ratio, + // ratioFixed: ratioFixed, + // ease: ease, + // waistReduction: waistReduction, + // distanceCompensation: distanceCompensation, + // fixedSidePanel: fixedSidePanel, + // }) for (let i = 0; i < names.length; i++) { let distance = measurements['waistTo' + names[lastGood]] - @@ -259,7 +259,8 @@ export const shape = { kneeToWaistLength: 400, crotchPointsCP: 2, }, - draft: ({ measurements, options, Point, Path, points, paths, utils, store, part }) => { + draft: ({ measurements, options, Point, Path, points, paths, utils, store, units, part }) => { + console.log('Shape') const inseam = measurements.inseam > measurements.waistToFloor - measurements.waistToUpperLeg ? measurements.waistToFloor - measurements.waistToUpperLeg @@ -448,7 +449,7 @@ export const shape = { ;['front', 'back'].forEach((prefix) => { ;['Waist', 'Waistband', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { points[prefix + 'Panel' + name] = points['middle' + name].shift( - prefix == 'front' ? 180 : 0, + prefix == 'front' ? 0 : 180, points[prefix + 'Side' + name].dist(points[prefix + 'Split' + name]) ) }) @@ -582,6 +583,21 @@ export const shape = { store.set('waistbandFrontLength', paths.frontWaistband.length()) store.set('waistbandPanelLength', points.frontPanelWaistband.dist(points.backPanelWaistband)) + store.flag.note({ + msg: `lumina:dimensions`, + replace: { + waistbandlength: units( + (store.get('waistbandBackLength') + + store.get('waistbandFrontLength') + + store.get('waistbandPanelLength')) * + 2 + ), + length: units( + store.get('waistbandSize') + points.frontPanelWaistband.dist(points.frontPanelHem) + ), + }, + }) + return part.hide() }, } diff --git a/designs/lumina/src/side.mjs b/designs/lumina/src/side.mjs deleted file mode 100644 index dddaa5595ac..00000000000 --- a/designs/lumina/src/side.mjs +++ /dev/null @@ -1,52 +0,0 @@ -import { ipoints } from './ipoints.mjs' - -export const side = { - name: 'lumina.ipoints', - after: ipoints, - measurements: [ - 'waist', - 'waistBack', - 'hips', - 'seat', - 'seatBack', - 'inseam', - 'waistToSeat', - 'waistToUpperLeg', - 'waistToKnee', - 'waistToHips', - 'waistToFloor', - 'knee', - 'ankle', - 'crossSeam', - 'crossSeamFront', - 'heel', - 'upperLeg', - ], - options: { - size: { pct: 50, min: 10, max: 100, menu: 'fit' }, - crossSeamAngle: 25, - crotchToKnee: 0.5, - waistToKneeCP: 0.4, - kneeToWaistLength: 400, - }, - draft: ({ - measurements, - options, - Point, - Path, - points, - paths, - Snippet, - snippets, - utils, - log, - complete, - sa, - paperless, - macro, - part, - }) => { - points.sideWaist = new Point(0, 0) - points.sideWaistFront = points.sideWaist.shift() - }, -} diff --git a/designs/lumina/src/waistband.mjs b/designs/lumina/src/waistband.mjs index 8e6c5808c22..f38b623da32 100644 --- a/designs/lumina/src/waistband.mjs +++ b/designs/lumina/src/waistband.mjs @@ -22,7 +22,6 @@ export const waistband = { if (false === options.waistband) { return part.hide() } - const waistLength = store.get('waistLength') const waistbandBackLength = store.get('waistbandBackLength') const waistbandFrontLength = store.get('waistbandFrontLength') @@ -104,6 +103,23 @@ export const waistband = { .join(paths.waistband.reverse()) } + paths.front = new Path() + .move(points.waistbandFront) + .line(points.waistFront) + .setText('front', 'note center') + .setClass('hidden') + paths.back = new Path() + .move(points.waistBack) + .line(points.waistbandBack) + .setText('back', 'note center') + .setClass('hidden') + + macro('cutonfold', { + from: points.waistbandFront, + to: points.waistFront, + }) + store.cutlist.addCut({ cut: 2, from: 'fabric', onFold: true }) + paths.seamSA = new Path() .move(points.waistFront) .join(paths.waist.reverse()) @@ -123,6 +139,54 @@ export const waistband = { .attr('class', 'fabric sa') } + let top = paths.waist.edge('top') + if (top.y == points.waistFront.y) { + top = paths.waist.edge('bottom') + } + let bottom = paths.waistband.edge('bottom') + if (bottom.y == points.waistbandFront.y) { + bottom = paths.waistband.edge('top') + } + + macro('hd', { + id: 'top', + from: points.waistBack, + to: points.waistFront, + y: Math.min(points.waistFront.y, top.y) - sa - 15, + }) + macro('hd', { + id: 'bottom', + from: points.waistbandBack, + to: points.waistbandFront, + y: Math.max(points.waistbandFront.y, bottom.y) + sa + 15, + }) + macro('vd', { + id: 'top', + from: points.waistBack, + to: top, + x: top.x - 15, + noStartMarker: true, + noEndMarker: true, + }) + macro('vd', { + id: 'bottom', + from: points.waistFront, + to: bottom, + x: top.x + 15, + }) + macro('ld', { + id: 'front', + from: points.waistFront, + to: points.waistbandFront, + d: 15, + }) + macro('ld', { + id: 'back', + from: points.waistBack, + to: points.waistbandBack, + d: -15, + }) + return part }, } From 1ff26f5a6bad28d003c1a7ea94b376c3927d102a Mon Sep 17 00:00:00 2001 From: woutervdub Date: Sun, 7 Jan 2024 19:40:43 +0000 Subject: [PATCH 14/28] Annotations and i18n --- designs/lumina/i18n/en.json | 103 +++++++++++++++++++++++++-- designs/lumina/src/leg.mjs | 115 +++++++++++++++++++++++++++++-- designs/lumina/src/panel.mjs | 70 ++++++++++++++++++- designs/lumina/src/pocket.mjs | 56 +++++++++++++++ designs/lumina/src/shape.mjs | 38 +++------- designs/lumina/src/waistband.mjs | 32 +++++---- 6 files changed, 362 insertions(+), 52 deletions(-) diff --git a/designs/lumina/i18n/en.json b/designs/lumina/i18n/en.json index 9642fb245dc..9b3b9f4a214 100644 --- a/designs/lumina/i18n/en.json +++ b/designs/lumina/i18n/en.json @@ -1,9 +1,102 @@ { - "t": "Lumina", - "d": "A FreeSewing pattern that needs a description", - "p": { }, + "t": "Lumina leggings", + "d": "A FreeSewing pattern for a pair of leggings", + "p": { + "shape": "Shape", + "leg": "Leg", + "panel": "Side Pannel", + "pocket": "Pocket", + "waistband": "Waistband" + }, "s": { - "couldNoFitWaistband": "Could not fit the waistband" + "couldNotLowerWaist": "Could not lower the waist", + "cantFitTheWaistPoint": "Cannot fit the waist point", + "couldNoFitWaistband": "Could not fit the waistband", + "couldNotCreatePocket": "Could not create the pocket", + "dimensions.d": "Dimensions", + "dimensions.t": "Waistband will be {{{ waistbandlength }}} long total.\nThe length of the garment along the side will be {{{ length }}}." }, - "o": { } + "o": { + "ease": { + "t": "Ease", + "d": "This controls the amount of ease. Since this is a pattern for leggings that is normally made of stretch fabric, the ease is negative, meaning the fabric is stretched around the body." + }, + "length": { + "t": "Leg length", + "d": "The length of the legs. Look in the Messages from the designer for the exact length." + }, + "waistlowering": { + "t": "Waist lowering", + "d": "Lowering of the waist. This is a percentage of the Waist-To-Hips measurement." + }, + "waistband": { + "t": "Waistband", + "d": "Add a separate waistband to the design." + }, + "waistbandYes": { + "t": "With a Waistband", + "d": "Add a separate waistband." + }, + "waistbandNo": { + "t": "Without a Waistband", + "d": "Do not add a separate waistband." + }, + "lowerwaistbandback": { + "t": "Waistband Lowering", + "d": "Lower the waistband in the back." + }, + "lowerwaistbandbackYes": { + "t": "Lower the Waistband", + "d": "Lower the waistband in the back, creating a 'V' shape." + }, + "lowerwaistbandbackNo": { + "t": "Straight waistband", + "d": "Do not lower the waistband in the back." + }, + "waistbandsize": { + "t": "Waistband size", + "d": "Size (height) of the waistband. This is a percentage of the Waist-To-Hips measurement." + }, + "waistreduction": { + "t": "Waist circumference reduction", + "d": "The amount by which the waist should be reduced. This is a percentage of the waist circumference. Only available when the waistband option is selected. Look in the Messages from the designer for the exact size." + }, + "pocket": { + "t": "Pocket", + "d": "Add pockets" + }, + "pocketYes": { + "t": "Add pockets", + "d": "Add pockets in the side panel" + }, + "pocketNo": { + "t": "No pockets", + "d": "Pockets are not added" + }, + "pocketdepth": { + "t": "Pocket depth", + "d": "Depth (height) of the pocket. This is a percentage of the Waist-To-Seat measurement." + }, + "fixedsidepanel": { + "t": "Side panel", + "d": "Fixed-width, or shaped side panel" + }, + "fixedsidepanelYes": { + "t": "Fixed side panel", + "d": "Create a fixed-width side panel" + }, + "fixedsidepanelNo": { + "t": "Shaped side panel", + "d": "Create a shaped side panel, consisting of a percentage of the leg circumference" + }, + "sidepanel": { + "t": "Side Panel size", + "d": "Size (width) of the side panel. This is a percentage of the waist circumference." + }, + "smoothing": { + "t": "Smoothing", + "d": "This setting controls the amount of smoothing that is done to create the side seams (and overall shape of the leggings)." + } + + } } diff --git a/designs/lumina/src/leg.mjs b/designs/lumina/src/leg.mjs index cf7c10b82bc..1d5704f5492 100644 --- a/designs/lumina/src/leg.mjs +++ b/designs/lumina/src/leg.mjs @@ -3,7 +3,7 @@ import { shape } from './shape.mjs' export const leg = { name: 'lumina.leg', from: shape, - draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, store, part }) => { + draft: ({ sa, points, Path, paths, Snippet, snippets, macro, store, part }) => { paths.front = paths.front.reverse().unhide().addText('front', 'note center').setClass('hidden') paths.frontSplit.unhide().addText('front', 'note center').setClass('hidden') paths.back.unhide().addText('back', 'note center').setClass('hidden') @@ -25,6 +25,25 @@ export const leg = { if (sa) paths.sa = paths.seam.offset(sa).attr('class', 'fabric sa') + store.cutlist.addCut({ cut: 2, from: 'fabric' }) + points.gridAnchor = points.middleUpperLeg.clone() + + points.logo = points.middleUpperLeg.shiftFractionTowards(points.frontSplitUpperLeg, 0.5) + snippets.logo = new Snippet('logo', points.logo) + + points.title = points.middleUpperLeg.shiftFractionTowards(points.backSplitUpperLeg, 0.6) + macro('title', { + at: points.title, + nr: 1, + title: 'leg', + align: 'center', + }) + + points.scalebox = points.middleUpperLeg.shift(270, 50) + macro('scalebox', { + at: points.scalebox, + }) + snippets.middle = new Snippet('notch', points.frontUpperLeg) snippets.front0 = new Snippet('notch', paths.front.shiftFractionAlong(0.5)) snippets.front1 = new Snippet('notch', paths.frontSplit.shiftFractionAlong(0.2)) @@ -36,11 +55,97 @@ export const leg = { snippets.back2 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.5)) snippets.back3 = new Snippet('notch', paths.backSplit.shiftFractionAlong(0.75)) - console.log({ - front: paths.front.length(), - back: paths.back.length(), - total: paths.front.length() + paths.back.length(), + const middleBottom = points.frontSplitHem.shiftFractionTowards(points.backSplitHem, 0.5) + middleBottom.x = 0 + const top = paths.seam.edge('top') + top.x = 0 + const back = paths.seam.edge('right') + const front = paths.seam.edge('left') + + if (!points.frontSplitWaistband.sitsRoughlyOn(front)) { + macro('hd', { + id: 'middleToFront', + from: points.middleUpperLeg, + to: front, + y: top.y - sa - 35, + }) + } + if (!points.backSplitWaistband.sitsRoughlyOn(back)) { + macro('hd', { + id: 'middleToBack', + from: back, + to: points.middleUpperLeg, + y: top.y - sa - 35, + }) + } + macro('hd', { + id: 'middleToFrontSplitWaistband', + from: points.frontSplitWaistband, + to: points.middleUpperLeg, + y: top.y - sa - 25, }) + macro('hd', { + id: 'middleToBackSplitWaistband', + from: points.middleUpperLeg, + to: points.backSplitWaistband, + y: top.y - sa - 25, + }) + macro('hd', { + id: 'middleToFrontWaistband', + from: points.frontWaistband, + to: points.middleUpperLeg, + y: top.y - sa - 15, + }) + macro('hd', { + id: 'middleToBackWaistband', + from: points.middleUpperLeg, + to: points.backWaistband, + y: top.y - sa - 15, + }) + macro('hd', { + id: 'bottomFront', + from: points.frontSplitHem, + to: middleBottom, + y: middleBottom.y + sa + 15, + }) + macro('hd', { + id: 'bottomBack', + from: middleBottom, + to: points.backSplitHem, + y: middleBottom.y + sa + 15, + }) + + macro('vd', { + id: 'middle', + from: points.middleUpperLeg, + to: middleBottom, + x: 0, + }) + macro('vd', { + id: 'front', + from: points.frontWaistband, + to: points.middleUpperLeg, + x: -15, + }) + macro('vd', { + id: 'back', + from: points.backWaistband, + to: points.middleUpperLeg, + x: 15, + }) + macro('vd', { + id: 'frontSplit', + from: points.frontSplitWaistband, + to: points.frontSplitHem, + x: front.x - sa - 15, + }) + macro('vd', { + id: 'backSplit', + from: points.backSplitWaistband, + to: points.backSplitHem, + x: back.x + sa + 15, + }) + return part }, } diff --git a/designs/lumina/src/panel.mjs b/designs/lumina/src/panel.mjs index c9cf9d880c9..684322006e0 100644 --- a/designs/lumina/src/panel.mjs +++ b/designs/lumina/src/panel.mjs @@ -3,7 +3,7 @@ import { shape } from './shape.mjs' export const panel = { name: 'lumina.panel', from: shape, - draft: ({ sa, Point, points, Path, paths, Snippet, snippets, options, macro, store, part }) => { + draft: ({ sa, Point, points, Path, paths, Snippet, snippets, macro, store, part }) => { paths.panelWaistband = new Path() .move(points.frontPanelWaistband) .line(points.backPanelWaistband) @@ -36,6 +36,74 @@ export const panel = { snippets.back2 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.5)) snippets.back3 = new Snippet('notch', paths.backPanel.shiftFractionAlong(0.75)) + store.cutlist.addCut({ cut: 2, from: 'fabric' }) + points.gridAnchor = points.middleSeat.clone() + + points.title = points.middleSeat.clone() + macro('title', { + at: points.title, + nr: 2, + title: 'panel', + align: 'center', + }) + + const middleTop = points.frontPanelWaistband.shiftFractionTowards( + points.backPanelWaistband, + 0.5 + ) + const middleBottom = new Point(middleTop.x, points.frontPanelHem.y) + const back = paths.backPanel.edge('left') + const front = paths.frontPanel.edge('right') + + macro('hd', { + id: 'topFront', + from: middleTop, + to: points.frontPanelWaistband, + y: middleTop.y - sa - 15, + }) + macro('hd', { + id: 'topBack', + from: points.backPanelWaistband, + to: middleTop, + y: middleTop.y - sa - 15, + }) + macro('hd', { + id: 'middleFront', + from: middleBottom, + to: front, + y: middleBottom.y + sa + 25, + }) + macro('hd', { + id: 'middleBack', + from: back, + to: middleBottom, + y: middleBottom.y + sa + 25, + }) + macro('hd', { + id: 'bottomFront', + from: middleBottom, + to: points.frontPanelHem, + y: middleBottom.y + sa + 15, + }) + macro('hd', { + id: 'bottomBack', + from: points.backPanelHem, + to: middleBottom, + y: middleBottom.y + sa + 15, + }) + macro('vd', { + id: 'front', + from: points.frontPanelWaistband, + to: points.frontPanelHem, + x: front.x + sa + 15, + }) + macro('vd', { + id: 'back', + from: points.backPanelWaistband, + to: points.backPanelHem, + x: back.x - sa - 15, + }) + return part }, } diff --git a/designs/lumina/src/pocket.mjs b/designs/lumina/src/pocket.mjs index d0b9413deb7..7eb23605cfd 100644 --- a/designs/lumina/src/pocket.mjs +++ b/designs/lumina/src/pocket.mjs @@ -92,6 +92,62 @@ export const pocket = { } } + store.cutlist.addCut({ cut: 2, from: 'fabric' }) + points.gridAnchor = points.middleSeat.clone() + + points.title = points.middleSeat.clone() + macro('title', { + at: points.title, + nr: 4, + title: 'pocket', + align: 'center', + }) + + const middleTop = points.frontPanelWaistband.shiftFractionTowards( + points.backPanelWaistband, + 0.5 + ) + const middleBottom = new Point(middleTop.x, points.frontPocketHem.y) + const back = paths.backPocket.edge('left') + const front = paths.frontPocket.edge('right') + + macro('hd', { + id: 'topFront', + from: middleTop, + to: points.frontPanelWaistband, + y: middleTop.y - sa - 15, + }) + macro('hd', { + id: 'topBack', + from: points.backPanelWaistband, + to: middleTop, + y: middleTop.y - sa - 15, + }) + macro('hd', { + id: 'bottomFront', + from: middleBottom, + to: front, + y: middleBottom.y + sa + 15, + }) + macro('hd', { + id: 'bottomBack', + from: back, + to: middleBottom, + y: middleBottom.y + sa + 15, + }) + macro('vd', { + id: 'front', + from: points.frontPanelWaistband, + to: points.frontPocketHem, + x: points.frontPocketHem.x + sa + 15, + }) + macro('vd', { + id: 'back', + from: points.backPanelWaistband, + to: points.backPocketHem, + x: points.backPocketHem.x - sa - 15, + }) + return part }, } diff --git a/designs/lumina/src/shape.mjs b/designs/lumina/src/shape.mjs index a132d21cd82..d512dd2843c 100644 --- a/designs/lumina/src/shape.mjs +++ b/designs/lumina/src/shape.mjs @@ -15,7 +15,6 @@ export const createPath = (paths, Path, points, pathName, names) => { } const lowerWaist = (paths, Path, points, waistLowering, pathName, pointName) => { - // console.log({ pn: pathName, p: paths[pathName] }) const newPath = extendPath(Path, paths[pathName], 100, 0) const newWaist = newPath.shiftAlong(waistLowering + 100) if (newWaist.sitsRoughlyOn(points[pathName + pointName])) { @@ -92,18 +91,7 @@ const createSidePoints = ({ fixedSidePanel, }) => { let measurement - // let width let lastGood = 0 - // console.log({ - // prefix: prefix, - // postfix: postfix, - // ratio: ratio, - // ratioFixed: ratioFixed, - // ease: ease, - // waistReduction: waistReduction, - // distanceCompensation: distanceCompensation, - // fixedSidePanel: fixedSidePanel, - // }) for (let i = 0; i < names.length; i++) { let distance = measurements['waistTo' + names[lastGood]] - @@ -139,12 +127,15 @@ const createSidePoints = ({ break default: measurement = measurements[names[i].toLowerCase()] + // Adjust for thigh size when using positive ease + if (ease > 1 && (names[i] == 'Ankle' || names[i] == 'Knee')) { + measurement *= 1.2 + } } measurement /= 2 measurement *= ease const width = measurement * ratio - // const reduction = (measurement - width) < ratioFixed ? width : measurement - ratioFixed const reduction = ratio == 0 ? measurement @@ -238,7 +229,7 @@ export const shape = { max: 150, ...pctBasedOn('waistToHips'), // eslint-disable-next-line no-unused-vars - menu: (settings, mergedOptions) => (mergedOptions?.waistband ? 'fit' : false), + menu: (settings, mergedOptions) => (mergedOptions?.waistband ? 'style' : false), }, waistlowering: { pct: 35, min: -10, max: 60, ...pctBasedOn('waistToHips'), menu: 'style' }, waistreduction: { @@ -247,10 +238,10 @@ export const shape = { max: 10, ...pctBasedOn('waist'), // eslint-disable-next-line no-unused-vars - menu: (settings, mergedOptions) => (mergedOptions?.waistband ? 'style' : false), + menu: (settings, mergedOptions) => (mergedOptions?.waistband ? 'fit' : false), }, - sidePanel: { pct: 25, min: 10, max: 40, menu: 'style' }, + sidepanel: { pct: 25, min: 10, max: 40, menu: 'style' }, smoothing: { pct: 85, min: 50, max: 100, menu: 'advanced' }, fixedsidepanel: { bool: false, menu: 'style' }, crossSeamAngle: 35, @@ -260,7 +251,6 @@ export const shape = { crotchPointsCP: 2, }, draft: ({ measurements, options, Point, Path, points, paths, utils, store, units, part }) => { - console.log('Shape') const inseam = measurements.inseam > measurements.waistToFloor - measurements.waistToUpperLeg ? measurements.waistToFloor - measurements.waistToUpperLeg @@ -274,8 +264,7 @@ export const shape = { ? 1.5 - options.waistlowering : options.waistbandsize) : 0 - const waistFrontBackRatio = measurements.waistBack / measurements.waist - const sideRatio = 1 - options.sidePanel + const sideRatio = 1 - options.sidepanel // const sideRatio = 3 / 5 const ease = options.ease + 1 const waistToAnkle = measurements.waistToFloor - measurements.heel / Math.PI @@ -287,7 +276,7 @@ export const shape = { const sideFixed = (((measurements.waist - measurements.waistBack) * ease) / 2) * sideRatio const fixedSidePanel = (((measurements.waist - measurements.waistBack - waistReduction) * ease) / 2) * - options.sidePanel + options.sidepanel points.middleWaist = new Point(0, 0) points.middleHips = points.middleWaist.shift(270, measurements.waistToHips) @@ -354,14 +343,6 @@ export const shape = { points[prefix + 'SideWaistband'] = points[prefix + 'SideWaist'].clone() }) - // ;['front', 'back'].forEach((prefix) => { - // ;['Ankle', 'Knee', 'UpperLeg', 'Seat'].forEach((point) => { - // const n = point == 'UpperLeg' ? 'upperLeg' : point.toLowerCase() - // const m = measurements[n] * ease * (point == 'Seat' ? 0.25 : 0.5) - // // console.log({n:prefix+point,m:m,d:points[prefix+'Side' +point].dist(points[prefix+point])-m}) - // }) - // }) - points.middleWaistband = points.middleWaist.clone() ;['front', 'back'].forEach((prefix) => { createSidePoints({ @@ -372,7 +353,6 @@ export const shape = { postfix: 'Split', names: ['Ankle', 'Knee', 'UpperLeg', 'Seat', 'Waist'], ratio: sideRatio, - // ratio: 0.1, ratioFixed: sideFixed, ease: ease, waistReduction: waistReduction, diff --git a/designs/lumina/src/waistband.mjs b/designs/lumina/src/waistband.mjs index f38b623da32..751b9e135da 100644 --- a/designs/lumina/src/waistband.mjs +++ b/designs/lumina/src/waistband.mjs @@ -13,7 +13,6 @@ export const waistband = { Snippet, snippets, options, - measurements, macro, log, utils, @@ -23,7 +22,6 @@ export const waistband = { return part.hide() } const waistLength = store.get('waistLength') - const waistbandBackLength = store.get('waistbandBackLength') const waistbandFrontLength = store.get('waistbandFrontLength') const waistbandPanelLength = store.get('waistbandPanelLength') const waistbandLength = store.get('waistbandLength') @@ -33,7 +31,7 @@ export const waistband = { return part.hide() } - points.origin = new Point(0, 0) //.addCircle(3) + points.origin = new Point(0, 0) const angleRad = Math.asin((Math.abs(waistbandLength - waistLength) * 0.5) / waistbandSize) const radius = (waistLength * 0.5) / Math.sin(angleRad) @@ -114,12 +112,31 @@ export const waistband = { .setText('back', 'note center') .setClass('hidden') + let top = paths.waist.edge('top') + if (top.y == points.waistFront.y) { + top = paths.waist.edge('bottom') + } + let bottom = paths.waistband.edge('bottom') + if (bottom.y == points.waistbandFront.y) { + bottom = paths.waistband.edge('top') + } + macro('cutonfold', { from: points.waistbandFront, to: points.waistFront, }) store.cutlist.addCut({ cut: 2, from: 'fabric', onFold: true }) + points.title = points.snippetPanelFront.shiftFractionTowards(points.snippetPanelBack, 0.5) + points.title.y = top.y + 20 + macro('title', { + at: points.title, + nr: 3, + title: 'waistband', + align: 'center', + scale: 0.35, + }) + paths.seamSA = new Path() .move(points.waistFront) .join(paths.waist.reverse()) @@ -139,15 +156,6 @@ export const waistband = { .attr('class', 'fabric sa') } - let top = paths.waist.edge('top') - if (top.y == points.waistFront.y) { - top = paths.waist.edge('bottom') - } - let bottom = paths.waistband.edge('bottom') - if (bottom.y == points.waistbandFront.y) { - bottom = paths.waistband.edge('top') - } - macro('hd', { id: 'top', from: points.waistBack, From 71a8ff380065c05087bc161ba840d93c756b8a18 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Tue, 9 Jan 2024 05:32:14 +0000 Subject: [PATCH 15/28] Tests completed --- designs/lumina/i18n/en.json | 1 - designs/lumina/src/pocket.mjs | 2 +- designs/lumina/src/shape.mjs | 98 ++++++++++++++++++++++---------- designs/lumina/src/waistband.mjs | 1 + 4 files changed, 69 insertions(+), 33 deletions(-) diff --git a/designs/lumina/i18n/en.json b/designs/lumina/i18n/en.json index 9b3b9f4a214..18e6ad9d0ca 100644 --- a/designs/lumina/i18n/en.json +++ b/designs/lumina/i18n/en.json @@ -97,6 +97,5 @@ "t": "Smoothing", "d": "This setting controls the amount of smoothing that is done to create the side seams (and overall shape of the leggings)." } - } } diff --git a/designs/lumina/src/pocket.mjs b/designs/lumina/src/pocket.mjs index 7eb23605cfd..774a4277e84 100644 --- a/designs/lumina/src/pocket.mjs +++ b/designs/lumina/src/pocket.mjs @@ -95,7 +95,7 @@ export const pocket = { store.cutlist.addCut({ cut: 2, from: 'fabric' }) points.gridAnchor = points.middleSeat.clone() - points.title = points.middleSeat.clone() + points.title = points.frontPocketHem.shiftFractionTowards(points.backPanelWaistband, 0.5) macro('title', { at: points.title, nr: 4, diff --git a/designs/lumina/src/shape.mjs b/designs/lumina/src/shape.mjs index d512dd2843c..4869be66bd8 100644 --- a/designs/lumina/src/shape.mjs +++ b/designs/lumina/src/shape.mjs @@ -1,6 +1,9 @@ +import { adult, doll, giant } from '@freesewing/models' import { pctBasedOn } from '@freesewing/core' import { extendPath, createControlPoints } from '@freesewing/lumira' +const classes = ['lining', 'canvas', 'mark', 'contrast', 'note', 'interfacing', 'various'] + export const createPath = (paths, Path, points, pathName, names) => { let i paths[pathName] = new Path() @@ -28,7 +31,9 @@ const lowerWaist = (paths, Path, points, waistLowering, pathName, pointName) => paths[pathName] = pTemp[1].hide() } -const createWaistPoint = (options, measurements, Path, points, utils, front) => { +const createWaistPoint = (options, measurements, Path, points, utils, log, front) => { + // console.log({front:front}) + const kneeTemp = points.middleCrossSeam.shiftFractionTowards( points.middleKnee, options.crotchToKnee @@ -38,26 +43,29 @@ const createWaistPoint = (options, measurements, Path, points, utils, front) => (front ? options.crossSeamAngle * (measurements.waistBack / measurements.waist) : -1 * options.crossSeamAngle * (1 - measurements.waistBack / measurements.waist)) - const crossSeam = front ? measurements.crossSeamFront : measurements.crossSeamBack - let kneeToWaist = measurements.waistToKnee - let ratio = 1 - let waist = kneeTemp.shift(angle, kneeToWaist * ratio) + const crossSeam = front + ? measurements.crossSeamFront + : measurements.crossSeam - measurements.crossSeamFront + let waist = kneeTemp.shift(angle, measurements.waistToKnee) const crossSeamCp = points.middleCrossSeam.shiftFractionTowards( utils.beamIntersectsY(kneeTemp, waist, points.middleCrossSeam.y), options.crotchPointsCP ) + let waistCp = waist.shiftFractionTowards(points.middleKnee, options.waistToKneeCP) + const kneeToWaist = measurements.waistToKnee * 0.75 - let waistCp - let diff + let diff = 0 let iter = 0 do { - waist = kneeTemp.shift(angle, kneeToWaist * ratio * (ratio < 1 ? 1.05 : 0.95)) + // waist = kneeTemp.shift(angle, kneeToWaist +((diff > 0 ? 1 : -1) *iter)) + waist = kneeTemp.shift(angle, kneeToWaist + diff * 1.03) //* (diff < 0 ? 1.01 : 0.97))) + // waist = kneeTemp.shift(angle, kneeToWaist *ratio) waistCp = waist.shiftFractionTowards(points.middleKnee, options.waistToKneeCP) const crossSeamPath = new Path().move(points.middleCrossSeam).curve(crossSeamCp, waistCp, waist) diff = crossSeam - crossSeamPath.length() - ratio = crossSeam / crossSeamPath.length() + // console.log({i:iter,d:diff,cs:crossSeam,csl:crossSeamPath.length()}) } while (++iter < 100 && (diff > 1 || diff < -1)) if (iter >= 100) { log.error('lumina:cantFitTheWaistPoint') @@ -93,9 +101,15 @@ const createSidePoints = ({ let measurement let lastGood = 0 for (let i = 0; i < names.length; i++) { - let distance = - measurements['waistTo' + names[lastGood]] - - (measurements['waistTo' + names[i]] === undefined ? 0 : measurements['waistTo' + names[i]]) + let m1 = 0, + m2 = 0 + if (names[i] != 'Waist') { + m1 = measurements['waistTo' + names[i]] + } + if (names[lastGood] != 'Waist') { + m2 = measurements['waistTo' + names[lastGood]] + } + let distance = m2 - m1 switch (names[i]) { case 'UpperLeg': measurement = measurements['upperLeg'] @@ -118,11 +132,14 @@ const createSidePoints = ({ break case 'Waist': measurement = - (prefix == 'front' ? measurements.waistFront : measurements.waistBack) - + (prefix == 'front' + ? measurements.waist - measurements.waistBack + : measurements.waistBack) - waistReduction * 0.5 break case 'Seat': - measurement = prefix == 'front' ? measurements.seatFront : measurements.seatBack + measurement = + prefix == 'front' ? measurements.seat - measurements.seatBack : measurements.seatBack distance *= distanceCompensation break default: @@ -134,7 +151,7 @@ const createSidePoints = ({ } measurement /= 2 measurement *= ease - + let ci const width = measurement * ratio const reduction = ratio == 0 @@ -150,18 +167,22 @@ const createSidePoints = ({ reduction ) } else { - let ci = utils.circlesIntersect( - points[prefix + names[i]], - reduction, - points[prefix + postfix + names[lastGood]], - distance - ) - if (false !== ci) { - points[prefix + postfix + names[i]] = ci[prefix == 'front' ? 0 : 1] - lastGood = i - } else { - points[prefix + postfix + names[i]] = points[prefix + postfix + names[lastGood]].clone() - } + let iter = 0 + do { + ci = utils.circlesIntersect( + points[prefix + names[i]], + reduction * (1 + iter * 0.02), + points[prefix + postfix + names[lastGood]], + distance + ) + if (false !== ci) { + points[prefix + postfix + names[i]] = ci[prefix == 'front' ? 0 : 1] + } + if (prefix == 'front' && postfix == 'Side') { + } + } while (iter++ < 100 && (false == ci || isNaN(ci[prefix == 'front' ? 0 : 1].x))) + + lastGood = i } } } @@ -250,7 +271,22 @@ export const shape = { kneeToWaistLength: 400, crotchPointsCP: 2, }, - draft: ({ measurements, options, Point, Path, points, paths, utils, store, units, part }) => { + draft: ({ + measurements, + options, + Point, + Path, + points, + paths, + utils, + store, + units, + log, + part, + }) => { + // measurements = adult['cisFemale'][36] + measurements = giant['cisFemale'][200] + const inseam = measurements.inseam > measurements.waistToFloor - measurements.waistToUpperLeg ? measurements.waistToFloor - measurements.waistToUpperLeg @@ -302,8 +338,8 @@ export const shape = { points.middleFloor = points.middleWaist.shift(270, measurements.waistToFloor) - createWaistPoint(options, measurements, Path, points, utils, true) - createWaistPoint(options, measurements, Path, points, utils, false) + createWaistPoint(options, measurements, Path, points, utils, log, true) + createWaistPoint(options, measurements, Path, points, utils, log, false) const frontCrossSeam = new Path() .move(points.frontWaist) @@ -578,6 +614,6 @@ export const shape = { }, }) - return part.hide() + return part //.hide() }, } diff --git a/designs/lumina/src/waistband.mjs b/designs/lumina/src/waistband.mjs index 751b9e135da..54d7f63e133 100644 --- a/designs/lumina/src/waistband.mjs +++ b/designs/lumina/src/waistband.mjs @@ -79,6 +79,7 @@ export const waistband = { diff = waistbandLength - paths.waistband.length() const rWaistband = paths.waistband.reverse() + points.snippetPanelBack = rWaistband.shiftAlong(waistbandFrontLength + waistbandPanelLength) snippets.panelBack = new Snippet('notch', points.snippetPanelBack) points.snippetPanelFront = rWaistband.shiftAlong(waistbandFrontLength) From 4523d9b7b75c01da87e2b3be3a686d0cf814d3e7 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Tue, 9 Jan 2024 05:34:08 +0000 Subject: [PATCH 16/28] remove test --- designs/lumina/src/shape.mjs | 6 ------ 1 file changed, 6 deletions(-) diff --git a/designs/lumina/src/shape.mjs b/designs/lumina/src/shape.mjs index 4869be66bd8..f9516ae6ff9 100644 --- a/designs/lumina/src/shape.mjs +++ b/designs/lumina/src/shape.mjs @@ -1,9 +1,6 @@ -import { adult, doll, giant } from '@freesewing/models' import { pctBasedOn } from '@freesewing/core' import { extendPath, createControlPoints } from '@freesewing/lumira' -const classes = ['lining', 'canvas', 'mark', 'contrast', 'note', 'interfacing', 'various'] - export const createPath = (paths, Path, points, pathName, names) => { let i paths[pathName] = new Path() @@ -284,9 +281,6 @@ export const shape = { log, part, }) => { - // measurements = adult['cisFemale'][36] - measurements = giant['cisFemale'][200] - const inseam = measurements.inseam > measurements.waistToFloor - measurements.waistToUpperLeg ? measurements.waistToFloor - measurements.waistToUpperLeg From 854095bd1a4890c614a1db41f8e9ea1046ff8e03 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Tue, 9 Jan 2024 06:23:14 +0000 Subject: [PATCH 17/28] Docs --- .../org/docs/designs/lumina/cutting/de.md | 14 ++++ .../org/docs/designs/lumina/cutting/en.md | 14 ++++ .../org/docs/designs/lumina/cutting/es.md | 14 ++++ .../org/docs/designs/lumina/cutting/fr.md | 14 ++++ .../org/docs/designs/lumina/cutting/nl.md | 14 ++++ .../org/docs/designs/lumina/cutting/uk.md | 14 ++++ markdown/org/docs/designs/lumina/de.md | 8 +++ markdown/org/docs/designs/lumina/en.md | 8 +++ markdown/org/docs/designs/lumina/es.md | 8 +++ markdown/org/docs/designs/lumina/fabric/de.md | 30 +++++++++ markdown/org/docs/designs/lumina/fabric/en.md | 30 +++++++++ markdown/org/docs/designs/lumina/fabric/es.md | 30 +++++++++ markdown/org/docs/designs/lumina/fabric/fr.md | 30 +++++++++ markdown/org/docs/designs/lumina/fabric/nl.md | 30 +++++++++ markdown/org/docs/designs/lumina/fabric/uk.md | 30 +++++++++ markdown/org/docs/designs/lumina/fr.md | 8 +++ .../docs/designs/lumina/instructions/de.md | 67 +++++++++++++++++++ .../docs/designs/lumina/instructions/en.md | 67 +++++++++++++++++++ .../docs/designs/lumina/instructions/es.md | 67 +++++++++++++++++++ .../docs/designs/lumina/instructions/fr.md | 67 +++++++++++++++++++ .../docs/designs/lumina/instructions/nl.md | 67 +++++++++++++++++++ .../docs/designs/lumina/instructions/uk.md | 67 +++++++++++++++++++ .../docs/designs/lumina/measurements/de.md | 5 ++ .../docs/designs/lumina/measurements/en.md | 5 ++ .../docs/designs/lumina/measurements/es.md | 5 ++ .../docs/designs/lumina/measurements/fr.md | 5 ++ .../docs/designs/lumina/measurements/nl.md | 5 ++ .../docs/designs/lumina/measurements/uk.md | 5 ++ markdown/org/docs/designs/lumina/needs/de.md | 10 +++ markdown/org/docs/designs/lumina/needs/en.md | 10 +++ markdown/org/docs/designs/lumina/needs/es.md | 10 +++ markdown/org/docs/designs/lumina/needs/fr.md | 10 +++ markdown/org/docs/designs/lumina/needs/nl.md | 10 +++ markdown/org/docs/designs/lumina/needs/uk.md | 10 +++ markdown/org/docs/designs/lumina/nl.md | 8 +++ markdown/org/docs/designs/lumina/notes/de.md | 21 ++++++ markdown/org/docs/designs/lumina/notes/en.md | 21 ++++++ markdown/org/docs/designs/lumina/notes/es.md | 21 ++++++ markdown/org/docs/designs/lumina/notes/fr.md | 21 ++++++ markdown/org/docs/designs/lumina/notes/nl.md | 21 ++++++ markdown/org/docs/designs/lumina/notes/uk.md | 21 ++++++ .../org/docs/designs/lumina/options/de.md | 5 ++ .../docs/designs/lumina/options/ease/de.md | 19 ++++++ .../docs/designs/lumina/options/ease/en.md | 1 + .../docs/designs/lumina/options/ease/es.md | 19 ++++++ .../docs/designs/lumina/options/ease/fr.md | 19 ++++++ .../docs/designs/lumina/options/ease/nl.md | 9 +++ .../docs/designs/lumina/options/ease/uk.md | 19 ++++++ .../org/docs/designs/lumina/options/en.md | 5 ++ .../org/docs/designs/lumina/options/es.md | 5 ++ .../org/docs/designs/lumina/options/fr.md | 5 ++ .../docs/designs/lumina/options/length/de.md | 19 ++++++ .../docs/designs/lumina/options/length/en.md | 19 ++++++ .../docs/designs/lumina/options/length/es.md | 19 ++++++ .../docs/designs/lumina/options/length/fr.md | 19 ++++++ .../docs/designs/lumina/options/length/nl.md | 19 ++++++ .../docs/designs/lumina/options/length/uk.md | 19 ++++++ .../org/docs/designs/lumina/options/nl.md | 5 ++ .../docs/designs/lumina/options/pocket/de.md | 10 +++ .../docs/designs/lumina/options/pocket/en.md | 10 +++ .../docs/designs/lumina/options/pocket/es.md | 10 +++ .../docs/designs/lumina/options/pocket/fr.md | 10 +++ .../docs/designs/lumina/options/pocket/nl.md | 10 +++ .../docs/designs/lumina/options/pocket/uk.md | 10 +++ .../designs/lumina/options/pocketdepth/de.md | 11 +++ .../designs/lumina/options/pocketdepth/en.md | 10 +++ .../designs/lumina/options/pocketdepth/es.md | 11 +++ .../designs/lumina/options/pocketdepth/fr.md | 11 +++ .../designs/lumina/options/pocketdepth/nl.md | 11 +++ .../designs/lumina/options/pocketdepth/uk.md | 11 +++ .../designs/lumina/options/sidepanel/de.md | 15 +++++ .../designs/lumina/options/sidepanel/en.md | 15 +++++ .../designs/lumina/options/sidepanel/es.md | 15 +++++ .../designs/lumina/options/sidepanel/fr.md | 15 +++++ .../designs/lumina/options/sidepanel/nl.md | 15 +++++ .../designs/lumina/options/sidepanel/uk.md | 15 +++++ .../lumina/options/sidepanelsize/de.md | 11 +++ .../lumina/options/sidepanelsize/en.md | 1 + .../lumina/options/sidepanelsize/es.md | 11 +++ .../lumina/options/sidepanelsize/fr.md | 11 +++ .../lumina/options/sidepanelsize/nl.md | 11 +++ .../lumina/options/sidepanelsize/uk.md | 11 +++ .../designs/lumina/options/smoothing/de.md | 11 +++ .../designs/lumina/options/smoothing/en.md | 11 +++ .../designs/lumina/options/smoothing/es.md | 11 +++ .../designs/lumina/options/smoothing/fr.md | 11 +++ .../designs/lumina/options/smoothing/nl.md | 11 +++ .../designs/lumina/options/smoothing/uk.md | 11 +++ .../org/docs/designs/lumina/options/uk.md | 5 ++ .../designs/lumina/options/waistband/de.md | 11 +++ .../designs/lumina/options/waistband/en.md | 11 +++ .../designs/lumina/options/waistband/es.md | 11 +++ .../designs/lumina/options/waistband/fr.md | 11 +++ .../designs/lumina/options/waistband/nl.md | 11 +++ .../designs/lumina/options/waistband/uk.md | 11 +++ .../lumina/options/waistbandsize/de.md | 11 +++ .../lumina/options/waistbandsize/en.md | 11 +++ .../lumina/options/waistbandsize/es.md | 11 +++ .../lumina/options/waistbandsize/fr.md | 11 +++ .../lumina/options/waistbandsize/nl.md | 11 +++ .../lumina/options/waistbandsize/uk.md | 11 +++ .../lumina/options/waistlowering/de.md | 11 +++ .../lumina/options/waistlowering/en.md | 11 +++ .../lumina/options/waistlowering/es.md | 11 +++ .../lumina/options/waistlowering/fr.md | 11 +++ .../lumina/options/waistlowering/nl.md | 11 +++ .../lumina/options/waistlowering/uk.md | 11 +++ .../lumina/options/waistreduction/de.md | 11 +++ .../lumina/options/waistreduction/en.md | 11 +++ .../lumina/options/waistreduction/es.md | 11 +++ .../lumina/options/waistreduction/fr.md | 11 +++ .../lumina/options/waistreduction/nl.md | 11 +++ .../lumina/options/waistreduction/uk.md | 11 +++ markdown/org/docs/designs/lumina/uk.md | 8 +++ 114 files changed, 1761 insertions(+) create mode 100644 markdown/org/docs/designs/lumina/cutting/de.md create mode 100644 markdown/org/docs/designs/lumina/cutting/en.md create mode 100644 markdown/org/docs/designs/lumina/cutting/es.md create mode 100644 markdown/org/docs/designs/lumina/cutting/fr.md create mode 100644 markdown/org/docs/designs/lumina/cutting/nl.md create mode 100644 markdown/org/docs/designs/lumina/cutting/uk.md create mode 100644 markdown/org/docs/designs/lumina/de.md create mode 100644 markdown/org/docs/designs/lumina/en.md create mode 100644 markdown/org/docs/designs/lumina/es.md create mode 100644 markdown/org/docs/designs/lumina/fabric/de.md create mode 100644 markdown/org/docs/designs/lumina/fabric/en.md create mode 100644 markdown/org/docs/designs/lumina/fabric/es.md create mode 100644 markdown/org/docs/designs/lumina/fabric/fr.md create mode 100644 markdown/org/docs/designs/lumina/fabric/nl.md create mode 100644 markdown/org/docs/designs/lumina/fabric/uk.md create mode 100644 markdown/org/docs/designs/lumina/fr.md create mode 100644 markdown/org/docs/designs/lumina/instructions/de.md create mode 100644 markdown/org/docs/designs/lumina/instructions/en.md create mode 100644 markdown/org/docs/designs/lumina/instructions/es.md create mode 100644 markdown/org/docs/designs/lumina/instructions/fr.md create mode 100644 markdown/org/docs/designs/lumina/instructions/nl.md create mode 100644 markdown/org/docs/designs/lumina/instructions/uk.md create mode 100644 markdown/org/docs/designs/lumina/measurements/de.md create mode 100644 markdown/org/docs/designs/lumina/measurements/en.md create mode 100644 markdown/org/docs/designs/lumina/measurements/es.md create mode 100644 markdown/org/docs/designs/lumina/measurements/fr.md create mode 100644 markdown/org/docs/designs/lumina/measurements/nl.md create mode 100644 markdown/org/docs/designs/lumina/measurements/uk.md create mode 100644 markdown/org/docs/designs/lumina/needs/de.md create mode 100644 markdown/org/docs/designs/lumina/needs/en.md create mode 100644 markdown/org/docs/designs/lumina/needs/es.md create mode 100644 markdown/org/docs/designs/lumina/needs/fr.md create mode 100644 markdown/org/docs/designs/lumina/needs/nl.md create mode 100644 markdown/org/docs/designs/lumina/needs/uk.md create mode 100644 markdown/org/docs/designs/lumina/nl.md create mode 100644 markdown/org/docs/designs/lumina/notes/de.md create mode 100644 markdown/org/docs/designs/lumina/notes/en.md create mode 100644 markdown/org/docs/designs/lumina/notes/es.md create mode 100644 markdown/org/docs/designs/lumina/notes/fr.md create mode 100644 markdown/org/docs/designs/lumina/notes/nl.md create mode 100644 markdown/org/docs/designs/lumina/notes/uk.md create mode 100644 markdown/org/docs/designs/lumina/options/de.md create mode 100644 markdown/org/docs/designs/lumina/options/ease/de.md create mode 100644 markdown/org/docs/designs/lumina/options/ease/en.md create mode 100644 markdown/org/docs/designs/lumina/options/ease/es.md create mode 100644 markdown/org/docs/designs/lumina/options/ease/fr.md create mode 100644 markdown/org/docs/designs/lumina/options/ease/nl.md create mode 100644 markdown/org/docs/designs/lumina/options/ease/uk.md create mode 100644 markdown/org/docs/designs/lumina/options/en.md create mode 100644 markdown/org/docs/designs/lumina/options/es.md create mode 100644 markdown/org/docs/designs/lumina/options/fr.md create mode 100644 markdown/org/docs/designs/lumina/options/length/de.md create mode 100644 markdown/org/docs/designs/lumina/options/length/en.md create mode 100644 markdown/org/docs/designs/lumina/options/length/es.md create mode 100644 markdown/org/docs/designs/lumina/options/length/fr.md create mode 100644 markdown/org/docs/designs/lumina/options/length/nl.md create mode 100644 markdown/org/docs/designs/lumina/options/length/uk.md create mode 100644 markdown/org/docs/designs/lumina/options/nl.md create mode 100644 markdown/org/docs/designs/lumina/options/pocket/de.md create mode 100644 markdown/org/docs/designs/lumina/options/pocket/en.md create mode 100644 markdown/org/docs/designs/lumina/options/pocket/es.md create mode 100644 markdown/org/docs/designs/lumina/options/pocket/fr.md create mode 100644 markdown/org/docs/designs/lumina/options/pocket/nl.md create mode 100644 markdown/org/docs/designs/lumina/options/pocket/uk.md create mode 100644 markdown/org/docs/designs/lumina/options/pocketdepth/de.md create mode 100644 markdown/org/docs/designs/lumina/options/pocketdepth/en.md create mode 100644 markdown/org/docs/designs/lumina/options/pocketdepth/es.md create mode 100644 markdown/org/docs/designs/lumina/options/pocketdepth/fr.md create mode 100644 markdown/org/docs/designs/lumina/options/pocketdepth/nl.md create mode 100644 markdown/org/docs/designs/lumina/options/pocketdepth/uk.md create mode 100644 markdown/org/docs/designs/lumina/options/sidepanel/de.md create mode 100644 markdown/org/docs/designs/lumina/options/sidepanel/en.md create mode 100644 markdown/org/docs/designs/lumina/options/sidepanel/es.md create mode 100644 markdown/org/docs/designs/lumina/options/sidepanel/fr.md create mode 100644 markdown/org/docs/designs/lumina/options/sidepanel/nl.md create mode 100644 markdown/org/docs/designs/lumina/options/sidepanel/uk.md create mode 100644 markdown/org/docs/designs/lumina/options/sidepanelsize/de.md create mode 100644 markdown/org/docs/designs/lumina/options/sidepanelsize/en.md create mode 100644 markdown/org/docs/designs/lumina/options/sidepanelsize/es.md create mode 100644 markdown/org/docs/designs/lumina/options/sidepanelsize/fr.md create mode 100644 markdown/org/docs/designs/lumina/options/sidepanelsize/nl.md create mode 100644 markdown/org/docs/designs/lumina/options/sidepanelsize/uk.md create mode 100644 markdown/org/docs/designs/lumina/options/smoothing/de.md create mode 100644 markdown/org/docs/designs/lumina/options/smoothing/en.md create mode 100644 markdown/org/docs/designs/lumina/options/smoothing/es.md create mode 100644 markdown/org/docs/designs/lumina/options/smoothing/fr.md create mode 100644 markdown/org/docs/designs/lumina/options/smoothing/nl.md create mode 100644 markdown/org/docs/designs/lumina/options/smoothing/uk.md create mode 100644 markdown/org/docs/designs/lumina/options/uk.md create mode 100644 markdown/org/docs/designs/lumina/options/waistband/de.md create mode 100644 markdown/org/docs/designs/lumina/options/waistband/en.md create mode 100644 markdown/org/docs/designs/lumina/options/waistband/es.md create mode 100644 markdown/org/docs/designs/lumina/options/waistband/fr.md create mode 100644 markdown/org/docs/designs/lumina/options/waistband/nl.md create mode 100644 markdown/org/docs/designs/lumina/options/waistband/uk.md create mode 100644 markdown/org/docs/designs/lumina/options/waistbandsize/de.md create mode 100644 markdown/org/docs/designs/lumina/options/waistbandsize/en.md create mode 100644 markdown/org/docs/designs/lumina/options/waistbandsize/es.md create mode 100644 markdown/org/docs/designs/lumina/options/waistbandsize/fr.md create mode 100644 markdown/org/docs/designs/lumina/options/waistbandsize/nl.md create mode 100644 markdown/org/docs/designs/lumina/options/waistbandsize/uk.md create mode 100644 markdown/org/docs/designs/lumina/options/waistlowering/de.md create mode 100644 markdown/org/docs/designs/lumina/options/waistlowering/en.md create mode 100644 markdown/org/docs/designs/lumina/options/waistlowering/es.md create mode 100644 markdown/org/docs/designs/lumina/options/waistlowering/fr.md create mode 100644 markdown/org/docs/designs/lumina/options/waistlowering/nl.md create mode 100644 markdown/org/docs/designs/lumina/options/waistlowering/uk.md create mode 100644 markdown/org/docs/designs/lumina/options/waistreduction/de.md create mode 100644 markdown/org/docs/designs/lumina/options/waistreduction/en.md create mode 100644 markdown/org/docs/designs/lumina/options/waistreduction/es.md create mode 100644 markdown/org/docs/designs/lumina/options/waistreduction/fr.md create mode 100644 markdown/org/docs/designs/lumina/options/waistreduction/nl.md create mode 100644 markdown/org/docs/designs/lumina/options/waistreduction/uk.md create mode 100644 markdown/org/docs/designs/lumina/uk.md diff --git a/markdown/org/docs/designs/lumina/cutting/de.md b/markdown/org/docs/designs/lumina/cutting/de.md new file mode 100644 index 00000000000..c43389eed9a --- /dev/null +++ b/markdown/org/docs/designs/lumina/cutting/de.md @@ -0,0 +1,14 @@ +--- +title: "Lumina leggings: Cutting Instructions" +--- + +### Materials + +- **Main fabric** + - Cut **2 leg** parts + - Cut **2 panel** parts + +Optionally + - Cut **2 waistband** parts on the fold + - Cut **2 pocket** parts + diff --git a/markdown/org/docs/designs/lumina/cutting/en.md b/markdown/org/docs/designs/lumina/cutting/en.md new file mode 100644 index 00000000000..c43389eed9a --- /dev/null +++ b/markdown/org/docs/designs/lumina/cutting/en.md @@ -0,0 +1,14 @@ +--- +title: "Lumina leggings: Cutting Instructions" +--- + +### Materials + +- **Main fabric** + - Cut **2 leg** parts + - Cut **2 panel** parts + +Optionally + - Cut **2 waistband** parts on the fold + - Cut **2 pocket** parts + diff --git a/markdown/org/docs/designs/lumina/cutting/es.md b/markdown/org/docs/designs/lumina/cutting/es.md new file mode 100644 index 00000000000..c43389eed9a --- /dev/null +++ b/markdown/org/docs/designs/lumina/cutting/es.md @@ -0,0 +1,14 @@ +--- +title: "Lumina leggings: Cutting Instructions" +--- + +### Materials + +- **Main fabric** + - Cut **2 leg** parts + - Cut **2 panel** parts + +Optionally + - Cut **2 waistband** parts on the fold + - Cut **2 pocket** parts + diff --git a/markdown/org/docs/designs/lumina/cutting/fr.md b/markdown/org/docs/designs/lumina/cutting/fr.md new file mode 100644 index 00000000000..c43389eed9a --- /dev/null +++ b/markdown/org/docs/designs/lumina/cutting/fr.md @@ -0,0 +1,14 @@ +--- +title: "Lumina leggings: Cutting Instructions" +--- + +### Materials + +- **Main fabric** + - Cut **2 leg** parts + - Cut **2 panel** parts + +Optionally + - Cut **2 waistband** parts on the fold + - Cut **2 pocket** parts + diff --git a/markdown/org/docs/designs/lumina/cutting/nl.md b/markdown/org/docs/designs/lumina/cutting/nl.md new file mode 100644 index 00000000000..c43389eed9a --- /dev/null +++ b/markdown/org/docs/designs/lumina/cutting/nl.md @@ -0,0 +1,14 @@ +--- +title: "Lumina leggings: Cutting Instructions" +--- + +### Materials + +- **Main fabric** + - Cut **2 leg** parts + - Cut **2 panel** parts + +Optionally + - Cut **2 waistband** parts on the fold + - Cut **2 pocket** parts + diff --git a/markdown/org/docs/designs/lumina/cutting/uk.md b/markdown/org/docs/designs/lumina/cutting/uk.md new file mode 100644 index 00000000000..c43389eed9a --- /dev/null +++ b/markdown/org/docs/designs/lumina/cutting/uk.md @@ -0,0 +1,14 @@ +--- +title: "Lumina leggings: Cutting Instructions" +--- + +### Materials + +- **Main fabric** + - Cut **2 leg** parts + - Cut **2 panel** parts + +Optionally + - Cut **2 waistband** parts on the fold + - Cut **2 pocket** parts + diff --git a/markdown/org/docs/designs/lumina/de.md b/markdown/org/docs/designs/lumina/de.md new file mode 100644 index 00000000000..c3d49f4c903 --- /dev/null +++ b/markdown/org/docs/designs/lumina/de.md @@ -0,0 +1,8 @@ +--- +title: "Lumina leggings" +--- + + + + + diff --git a/markdown/org/docs/designs/lumina/en.md b/markdown/org/docs/designs/lumina/en.md new file mode 100644 index 00000000000..c3d49f4c903 --- /dev/null +++ b/markdown/org/docs/designs/lumina/en.md @@ -0,0 +1,8 @@ +--- +title: "Lumina leggings" +--- + + + + + diff --git a/markdown/org/docs/designs/lumina/es.md b/markdown/org/docs/designs/lumina/es.md new file mode 100644 index 00000000000..c3d49f4c903 --- /dev/null +++ b/markdown/org/docs/designs/lumina/es.md @@ -0,0 +1,8 @@ +--- +title: "Lumina leggings" +--- + + + + + diff --git a/markdown/org/docs/designs/lumina/fabric/de.md b/markdown/org/docs/designs/lumina/fabric/de.md new file mode 100644 index 00000000000..a5d75a18050 --- /dev/null +++ b/markdown/org/docs/designs/lumina/fabric/de.md @@ -0,0 +1,30 @@ +--- +title: "Lumina leggings: Fabric Options" +--- + +### Main Fabric + +This pattern requires a stretch fabric. The stretch needs to be perpendicular to the grainline. There is no stretch required along +the grainline, but a 4-way stretch fabric can definitely be used. Not all stretch fabrics have the same amount of stretch. The default +ease value of -5% works well for fabrics that have 60% stretch. If your fabric has a different amount of stretch, you may want to +adjust this setting accordingly. Reduce the ease when your fabric has more stretch. Getting the ease right is *very* important for +getting a good fit. + + + +If the ease setting is larger than 0 (positive ease), any type of knit fabric can be used. Keep in mind that even with the ease +set at the maximum, you probably will not be able to use a fabric with no stretch at all (a wovel fabric). + + + +These fabrics come in different weights. Pick one that works for how you intent to use it. Thicker fabrics provide more support +and warmth. + +For yoga pants, take something that has a medium thickness. Supplex is a good choice for this. It also works well for cycling. For +other athletic use fabrics that would be appropriate for that. Most fabrics that contain spandex will work. + + + +Since this pattern has an outside panel, you can use contrasting fabrics to make interesting effects. + + diff --git a/markdown/org/docs/designs/lumina/fabric/en.md b/markdown/org/docs/designs/lumina/fabric/en.md new file mode 100644 index 00000000000..a5d75a18050 --- /dev/null +++ b/markdown/org/docs/designs/lumina/fabric/en.md @@ -0,0 +1,30 @@ +--- +title: "Lumina leggings: Fabric Options" +--- + +### Main Fabric + +This pattern requires a stretch fabric. The stretch needs to be perpendicular to the grainline. There is no stretch required along +the grainline, but a 4-way stretch fabric can definitely be used. Not all stretch fabrics have the same amount of stretch. The default +ease value of -5% works well for fabrics that have 60% stretch. If your fabric has a different amount of stretch, you may want to +adjust this setting accordingly. Reduce the ease when your fabric has more stretch. Getting the ease right is *very* important for +getting a good fit. + + + +If the ease setting is larger than 0 (positive ease), any type of knit fabric can be used. Keep in mind that even with the ease +set at the maximum, you probably will not be able to use a fabric with no stretch at all (a wovel fabric). + + + +These fabrics come in different weights. Pick one that works for how you intent to use it. Thicker fabrics provide more support +and warmth. + +For yoga pants, take something that has a medium thickness. Supplex is a good choice for this. It also works well for cycling. For +other athletic use fabrics that would be appropriate for that. Most fabrics that contain spandex will work. + + + +Since this pattern has an outside panel, you can use contrasting fabrics to make interesting effects. + + diff --git a/markdown/org/docs/designs/lumina/fabric/es.md b/markdown/org/docs/designs/lumina/fabric/es.md new file mode 100644 index 00000000000..a5d75a18050 --- /dev/null +++ b/markdown/org/docs/designs/lumina/fabric/es.md @@ -0,0 +1,30 @@ +--- +title: "Lumina leggings: Fabric Options" +--- + +### Main Fabric + +This pattern requires a stretch fabric. The stretch needs to be perpendicular to the grainline. There is no stretch required along +the grainline, but a 4-way stretch fabric can definitely be used. Not all stretch fabrics have the same amount of stretch. The default +ease value of -5% works well for fabrics that have 60% stretch. If your fabric has a different amount of stretch, you may want to +adjust this setting accordingly. Reduce the ease when your fabric has more stretch. Getting the ease right is *very* important for +getting a good fit. + + + +If the ease setting is larger than 0 (positive ease), any type of knit fabric can be used. Keep in mind that even with the ease +set at the maximum, you probably will not be able to use a fabric with no stretch at all (a wovel fabric). + + + +These fabrics come in different weights. Pick one that works for how you intent to use it. Thicker fabrics provide more support +and warmth. + +For yoga pants, take something that has a medium thickness. Supplex is a good choice for this. It also works well for cycling. For +other athletic use fabrics that would be appropriate for that. Most fabrics that contain spandex will work. + + + +Since this pattern has an outside panel, you can use contrasting fabrics to make interesting effects. + + diff --git a/markdown/org/docs/designs/lumina/fabric/fr.md b/markdown/org/docs/designs/lumina/fabric/fr.md new file mode 100644 index 00000000000..a5d75a18050 --- /dev/null +++ b/markdown/org/docs/designs/lumina/fabric/fr.md @@ -0,0 +1,30 @@ +--- +title: "Lumina leggings: Fabric Options" +--- + +### Main Fabric + +This pattern requires a stretch fabric. The stretch needs to be perpendicular to the grainline. There is no stretch required along +the grainline, but a 4-way stretch fabric can definitely be used. Not all stretch fabrics have the same amount of stretch. The default +ease value of -5% works well for fabrics that have 60% stretch. If your fabric has a different amount of stretch, you may want to +adjust this setting accordingly. Reduce the ease when your fabric has more stretch. Getting the ease right is *very* important for +getting a good fit. + + + +If the ease setting is larger than 0 (positive ease), any type of knit fabric can be used. Keep in mind that even with the ease +set at the maximum, you probably will not be able to use a fabric with no stretch at all (a wovel fabric). + + + +These fabrics come in different weights. Pick one that works for how you intent to use it. Thicker fabrics provide more support +and warmth. + +For yoga pants, take something that has a medium thickness. Supplex is a good choice for this. It also works well for cycling. For +other athletic use fabrics that would be appropriate for that. Most fabrics that contain spandex will work. + + + +Since this pattern has an outside panel, you can use contrasting fabrics to make interesting effects. + + diff --git a/markdown/org/docs/designs/lumina/fabric/nl.md b/markdown/org/docs/designs/lumina/fabric/nl.md new file mode 100644 index 00000000000..a5d75a18050 --- /dev/null +++ b/markdown/org/docs/designs/lumina/fabric/nl.md @@ -0,0 +1,30 @@ +--- +title: "Lumina leggings: Fabric Options" +--- + +### Main Fabric + +This pattern requires a stretch fabric. The stretch needs to be perpendicular to the grainline. There is no stretch required along +the grainline, but a 4-way stretch fabric can definitely be used. Not all stretch fabrics have the same amount of stretch. The default +ease value of -5% works well for fabrics that have 60% stretch. If your fabric has a different amount of stretch, you may want to +adjust this setting accordingly. Reduce the ease when your fabric has more stretch. Getting the ease right is *very* important for +getting a good fit. + + + +If the ease setting is larger than 0 (positive ease), any type of knit fabric can be used. Keep in mind that even with the ease +set at the maximum, you probably will not be able to use a fabric with no stretch at all (a wovel fabric). + + + +These fabrics come in different weights. Pick one that works for how you intent to use it. Thicker fabrics provide more support +and warmth. + +For yoga pants, take something that has a medium thickness. Supplex is a good choice for this. It also works well for cycling. For +other athletic use fabrics that would be appropriate for that. Most fabrics that contain spandex will work. + + + +Since this pattern has an outside panel, you can use contrasting fabrics to make interesting effects. + + diff --git a/markdown/org/docs/designs/lumina/fabric/uk.md b/markdown/org/docs/designs/lumina/fabric/uk.md new file mode 100644 index 00000000000..a5d75a18050 --- /dev/null +++ b/markdown/org/docs/designs/lumina/fabric/uk.md @@ -0,0 +1,30 @@ +--- +title: "Lumina leggings: Fabric Options" +--- + +### Main Fabric + +This pattern requires a stretch fabric. The stretch needs to be perpendicular to the grainline. There is no stretch required along +the grainline, but a 4-way stretch fabric can definitely be used. Not all stretch fabrics have the same amount of stretch. The default +ease value of -5% works well for fabrics that have 60% stretch. If your fabric has a different amount of stretch, you may want to +adjust this setting accordingly. Reduce the ease when your fabric has more stretch. Getting the ease right is *very* important for +getting a good fit. + + + +If the ease setting is larger than 0 (positive ease), any type of knit fabric can be used. Keep in mind that even with the ease +set at the maximum, you probably will not be able to use a fabric with no stretch at all (a wovel fabric). + + + +These fabrics come in different weights. Pick one that works for how you intent to use it. Thicker fabrics provide more support +and warmth. + +For yoga pants, take something that has a medium thickness. Supplex is a good choice for this. It also works well for cycling. For +other athletic use fabrics that would be appropriate for that. Most fabrics that contain spandex will work. + + + +Since this pattern has an outside panel, you can use contrasting fabrics to make interesting effects. + + diff --git a/markdown/org/docs/designs/lumina/fr.md b/markdown/org/docs/designs/lumina/fr.md new file mode 100644 index 00000000000..c3d49f4c903 --- /dev/null +++ b/markdown/org/docs/designs/lumina/fr.md @@ -0,0 +1,8 @@ +--- +title: "Lumina leggings" +--- + + + + + diff --git a/markdown/org/docs/designs/lumina/instructions/de.md b/markdown/org/docs/designs/lumina/instructions/de.md new file mode 100644 index 00000000000..734587b5b3c --- /dev/null +++ b/markdown/org/docs/designs/lumina/instructions/de.md @@ -0,0 +1,67 @@ +--- +title: "Lumina leggings: Sewing Instructions" +--- + + + +This is a garment made from a stretch fabric. So use appropriate seam solutions. A serger is a good way to do this, as +are specific stitches that certain sewing machines provide. A zigzag stitch will do if that's all you have. + +Keep in mind that since these seams are always under tension, it may be a good idea to double them up, or +provide a zigzag in addition to serging the seam. + + + +### Step 1: The waistband (optional) + +- Sew the two pieces to each other, right sides together, along the top seam. +- Press the seam open +- Sew the back seam, right sides together. This creates a loop. + + +If you want to include elastic into the waistband, now is a good time to do so. You should +add it to the seam you just sewed. + + +### Step 2: The cross seam + +- Sew both leg pieces together along the cross seam. + +### Step 3: Pockets + +- Serge the top of the two panels. +- Fold this top over onto itself, and stitch in place. Using a double needle is a good way to do this. +Zigzag works too. Make sure that you fold it slightly more than the seam allowance. +- Lay the panel down with the right side down. +- Lay the pocket part on top, right side down, aligning the notches. Pin in place +- Stitch the bottom of the pocket to the panel. Again, a double needle or zigzag works well. + +### Step 4: Panels + +- Align all the front notches of the panel to the front of the leg panel, right sides together. +If you included the pocket option, make sure you treat the pocket and panel pieces as one piece. +- Seam this seam on both legs. +- Repeat for the back side of the panel and leg parts + + +The number and distance of the notches on the front and back seams are different. + + +### Step 5: Attaching the waistband + +- Align the waistband seam with the seam in the back. Align the notches with the panel seams. +- Sew all the way around, attaching the waistband to the legs. Make sure you sew both pieces of the waistband +into this seam. This seam will combine three layers, both layers of the waistband, and one layer of the leg +pieces. + + +If you have included the pocket option, take extra care not to sew the folded over part of the panel into +the waistband seam. + + +### Step 6: Finish up + +Now you can add the elastic to the leg openings. Otherwise finish those in any way you like. + + +You're all done! Enjoy your Lumina leggings! diff --git a/markdown/org/docs/designs/lumina/instructions/en.md b/markdown/org/docs/designs/lumina/instructions/en.md new file mode 100644 index 00000000000..734587b5b3c --- /dev/null +++ b/markdown/org/docs/designs/lumina/instructions/en.md @@ -0,0 +1,67 @@ +--- +title: "Lumina leggings: Sewing Instructions" +--- + + + +This is a garment made from a stretch fabric. So use appropriate seam solutions. A serger is a good way to do this, as +are specific stitches that certain sewing machines provide. A zigzag stitch will do if that's all you have. + +Keep in mind that since these seams are always under tension, it may be a good idea to double them up, or +provide a zigzag in addition to serging the seam. + + + +### Step 1: The waistband (optional) + +- Sew the two pieces to each other, right sides together, along the top seam. +- Press the seam open +- Sew the back seam, right sides together. This creates a loop. + + +If you want to include elastic into the waistband, now is a good time to do so. You should +add it to the seam you just sewed. + + +### Step 2: The cross seam + +- Sew both leg pieces together along the cross seam. + +### Step 3: Pockets + +- Serge the top of the two panels. +- Fold this top over onto itself, and stitch in place. Using a double needle is a good way to do this. +Zigzag works too. Make sure that you fold it slightly more than the seam allowance. +- Lay the panel down with the right side down. +- Lay the pocket part on top, right side down, aligning the notches. Pin in place +- Stitch the bottom of the pocket to the panel. Again, a double needle or zigzag works well. + +### Step 4: Panels + +- Align all the front notches of the panel to the front of the leg panel, right sides together. +If you included the pocket option, make sure you treat the pocket and panel pieces as one piece. +- Seam this seam on both legs. +- Repeat for the back side of the panel and leg parts + + +The number and distance of the notches on the front and back seams are different. + + +### Step 5: Attaching the waistband + +- Align the waistband seam with the seam in the back. Align the notches with the panel seams. +- Sew all the way around, attaching the waistband to the legs. Make sure you sew both pieces of the waistband +into this seam. This seam will combine three layers, both layers of the waistband, and one layer of the leg +pieces. + + +If you have included the pocket option, take extra care not to sew the folded over part of the panel into +the waistband seam. + + +### Step 6: Finish up + +Now you can add the elastic to the leg openings. Otherwise finish those in any way you like. + + +You're all done! Enjoy your Lumina leggings! diff --git a/markdown/org/docs/designs/lumina/instructions/es.md b/markdown/org/docs/designs/lumina/instructions/es.md new file mode 100644 index 00000000000..734587b5b3c --- /dev/null +++ b/markdown/org/docs/designs/lumina/instructions/es.md @@ -0,0 +1,67 @@ +--- +title: "Lumina leggings: Sewing Instructions" +--- + + + +This is a garment made from a stretch fabric. So use appropriate seam solutions. A serger is a good way to do this, as +are specific stitches that certain sewing machines provide. A zigzag stitch will do if that's all you have. + +Keep in mind that since these seams are always under tension, it may be a good idea to double them up, or +provide a zigzag in addition to serging the seam. + + + +### Step 1: The waistband (optional) + +- Sew the two pieces to each other, right sides together, along the top seam. +- Press the seam open +- Sew the back seam, right sides together. This creates a loop. + + +If you want to include elastic into the waistband, now is a good time to do so. You should +add it to the seam you just sewed. + + +### Step 2: The cross seam + +- Sew both leg pieces together along the cross seam. + +### Step 3: Pockets + +- Serge the top of the two panels. +- Fold this top over onto itself, and stitch in place. Using a double needle is a good way to do this. +Zigzag works too. Make sure that you fold it slightly more than the seam allowance. +- Lay the panel down with the right side down. +- Lay the pocket part on top, right side down, aligning the notches. Pin in place +- Stitch the bottom of the pocket to the panel. Again, a double needle or zigzag works well. + +### Step 4: Panels + +- Align all the front notches of the panel to the front of the leg panel, right sides together. +If you included the pocket option, make sure you treat the pocket and panel pieces as one piece. +- Seam this seam on both legs. +- Repeat for the back side of the panel and leg parts + + +The number and distance of the notches on the front and back seams are different. + + +### Step 5: Attaching the waistband + +- Align the waistband seam with the seam in the back. Align the notches with the panel seams. +- Sew all the way around, attaching the waistband to the legs. Make sure you sew both pieces of the waistband +into this seam. This seam will combine three layers, both layers of the waistband, and one layer of the leg +pieces. + + +If you have included the pocket option, take extra care not to sew the folded over part of the panel into +the waistband seam. + + +### Step 6: Finish up + +Now you can add the elastic to the leg openings. Otherwise finish those in any way you like. + + +You're all done! Enjoy your Lumina leggings! diff --git a/markdown/org/docs/designs/lumina/instructions/fr.md b/markdown/org/docs/designs/lumina/instructions/fr.md new file mode 100644 index 00000000000..734587b5b3c --- /dev/null +++ b/markdown/org/docs/designs/lumina/instructions/fr.md @@ -0,0 +1,67 @@ +--- +title: "Lumina leggings: Sewing Instructions" +--- + + + +This is a garment made from a stretch fabric. So use appropriate seam solutions. A serger is a good way to do this, as +are specific stitches that certain sewing machines provide. A zigzag stitch will do if that's all you have. + +Keep in mind that since these seams are always under tension, it may be a good idea to double them up, or +provide a zigzag in addition to serging the seam. + + + +### Step 1: The waistband (optional) + +- Sew the two pieces to each other, right sides together, along the top seam. +- Press the seam open +- Sew the back seam, right sides together. This creates a loop. + + +If you want to include elastic into the waistband, now is a good time to do so. You should +add it to the seam you just sewed. + + +### Step 2: The cross seam + +- Sew both leg pieces together along the cross seam. + +### Step 3: Pockets + +- Serge the top of the two panels. +- Fold this top over onto itself, and stitch in place. Using a double needle is a good way to do this. +Zigzag works too. Make sure that you fold it slightly more than the seam allowance. +- Lay the panel down with the right side down. +- Lay the pocket part on top, right side down, aligning the notches. Pin in place +- Stitch the bottom of the pocket to the panel. Again, a double needle or zigzag works well. + +### Step 4: Panels + +- Align all the front notches of the panel to the front of the leg panel, right sides together. +If you included the pocket option, make sure you treat the pocket and panel pieces as one piece. +- Seam this seam on both legs. +- Repeat for the back side of the panel and leg parts + + +The number and distance of the notches on the front and back seams are different. + + +### Step 5: Attaching the waistband + +- Align the waistband seam with the seam in the back. Align the notches with the panel seams. +- Sew all the way around, attaching the waistband to the legs. Make sure you sew both pieces of the waistband +into this seam. This seam will combine three layers, both layers of the waistband, and one layer of the leg +pieces. + + +If you have included the pocket option, take extra care not to sew the folded over part of the panel into +the waistband seam. + + +### Step 6: Finish up + +Now you can add the elastic to the leg openings. Otherwise finish those in any way you like. + + +You're all done! Enjoy your Lumina leggings! diff --git a/markdown/org/docs/designs/lumina/instructions/nl.md b/markdown/org/docs/designs/lumina/instructions/nl.md new file mode 100644 index 00000000000..734587b5b3c --- /dev/null +++ b/markdown/org/docs/designs/lumina/instructions/nl.md @@ -0,0 +1,67 @@ +--- +title: "Lumina leggings: Sewing Instructions" +--- + + + +This is a garment made from a stretch fabric. So use appropriate seam solutions. A serger is a good way to do this, as +are specific stitches that certain sewing machines provide. A zigzag stitch will do if that's all you have. + +Keep in mind that since these seams are always under tension, it may be a good idea to double them up, or +provide a zigzag in addition to serging the seam. + + + +### Step 1: The waistband (optional) + +- Sew the two pieces to each other, right sides together, along the top seam. +- Press the seam open +- Sew the back seam, right sides together. This creates a loop. + + +If you want to include elastic into the waistband, now is a good time to do so. You should +add it to the seam you just sewed. + + +### Step 2: The cross seam + +- Sew both leg pieces together along the cross seam. + +### Step 3: Pockets + +- Serge the top of the two panels. +- Fold this top over onto itself, and stitch in place. Using a double needle is a good way to do this. +Zigzag works too. Make sure that you fold it slightly more than the seam allowance. +- Lay the panel down with the right side down. +- Lay the pocket part on top, right side down, aligning the notches. Pin in place +- Stitch the bottom of the pocket to the panel. Again, a double needle or zigzag works well. + +### Step 4: Panels + +- Align all the front notches of the panel to the front of the leg panel, right sides together. +If you included the pocket option, make sure you treat the pocket and panel pieces as one piece. +- Seam this seam on both legs. +- Repeat for the back side of the panel and leg parts + + +The number and distance of the notches on the front and back seams are different. + + +### Step 5: Attaching the waistband + +- Align the waistband seam with the seam in the back. Align the notches with the panel seams. +- Sew all the way around, attaching the waistband to the legs. Make sure you sew both pieces of the waistband +into this seam. This seam will combine three layers, both layers of the waistband, and one layer of the leg +pieces. + + +If you have included the pocket option, take extra care not to sew the folded over part of the panel into +the waistband seam. + + +### Step 6: Finish up + +Now you can add the elastic to the leg openings. Otherwise finish those in any way you like. + + +You're all done! Enjoy your Lumina leggings! diff --git a/markdown/org/docs/designs/lumina/instructions/uk.md b/markdown/org/docs/designs/lumina/instructions/uk.md new file mode 100644 index 00000000000..734587b5b3c --- /dev/null +++ b/markdown/org/docs/designs/lumina/instructions/uk.md @@ -0,0 +1,67 @@ +--- +title: "Lumina leggings: Sewing Instructions" +--- + + + +This is a garment made from a stretch fabric. So use appropriate seam solutions. A serger is a good way to do this, as +are specific stitches that certain sewing machines provide. A zigzag stitch will do if that's all you have. + +Keep in mind that since these seams are always under tension, it may be a good idea to double them up, or +provide a zigzag in addition to serging the seam. + + + +### Step 1: The waistband (optional) + +- Sew the two pieces to each other, right sides together, along the top seam. +- Press the seam open +- Sew the back seam, right sides together. This creates a loop. + + +If you want to include elastic into the waistband, now is a good time to do so. You should +add it to the seam you just sewed. + + +### Step 2: The cross seam + +- Sew both leg pieces together along the cross seam. + +### Step 3: Pockets + +- Serge the top of the two panels. +- Fold this top over onto itself, and stitch in place. Using a double needle is a good way to do this. +Zigzag works too. Make sure that you fold it slightly more than the seam allowance. +- Lay the panel down with the right side down. +- Lay the pocket part on top, right side down, aligning the notches. Pin in place +- Stitch the bottom of the pocket to the panel. Again, a double needle or zigzag works well. + +### Step 4: Panels + +- Align all the front notches of the panel to the front of the leg panel, right sides together. +If you included the pocket option, make sure you treat the pocket and panel pieces as one piece. +- Seam this seam on both legs. +- Repeat for the back side of the panel and leg parts + + +The number and distance of the notches on the front and back seams are different. + + +### Step 5: Attaching the waistband + +- Align the waistband seam with the seam in the back. Align the notches with the panel seams. +- Sew all the way around, attaching the waistband to the legs. Make sure you sew both pieces of the waistband +into this seam. This seam will combine three layers, both layers of the waistband, and one layer of the leg +pieces. + + +If you have included the pocket option, take extra care not to sew the folded over part of the panel into +the waistband seam. + + +### Step 6: Finish up + +Now you can add the elastic to the leg openings. Otherwise finish those in any way you like. + + +You're all done! Enjoy your Lumina leggings! diff --git a/markdown/org/docs/designs/lumina/measurements/de.md b/markdown/org/docs/designs/lumina/measurements/de.md new file mode 100644 index 00000000000..063e941c890 --- /dev/null +++ b/markdown/org/docs/designs/lumina/measurements/de.md @@ -0,0 +1,5 @@ +--- +title: "Lumina leggings: Required Measurements" +--- + + diff --git a/markdown/org/docs/designs/lumina/measurements/en.md b/markdown/org/docs/designs/lumina/measurements/en.md new file mode 100644 index 00000000000..063e941c890 --- /dev/null +++ b/markdown/org/docs/designs/lumina/measurements/en.md @@ -0,0 +1,5 @@ +--- +title: "Lumina leggings: Required Measurements" +--- + + diff --git a/markdown/org/docs/designs/lumina/measurements/es.md b/markdown/org/docs/designs/lumina/measurements/es.md new file mode 100644 index 00000000000..063e941c890 --- /dev/null +++ b/markdown/org/docs/designs/lumina/measurements/es.md @@ -0,0 +1,5 @@ +--- +title: "Lumina leggings: Required Measurements" +--- + + diff --git a/markdown/org/docs/designs/lumina/measurements/fr.md b/markdown/org/docs/designs/lumina/measurements/fr.md new file mode 100644 index 00000000000..063e941c890 --- /dev/null +++ b/markdown/org/docs/designs/lumina/measurements/fr.md @@ -0,0 +1,5 @@ +--- +title: "Lumina leggings: Required Measurements" +--- + + diff --git a/markdown/org/docs/designs/lumina/measurements/nl.md b/markdown/org/docs/designs/lumina/measurements/nl.md new file mode 100644 index 00000000000..063e941c890 --- /dev/null +++ b/markdown/org/docs/designs/lumina/measurements/nl.md @@ -0,0 +1,5 @@ +--- +title: "Lumina leggings: Required Measurements" +--- + + diff --git a/markdown/org/docs/designs/lumina/measurements/uk.md b/markdown/org/docs/designs/lumina/measurements/uk.md new file mode 100644 index 00000000000..063e941c890 --- /dev/null +++ b/markdown/org/docs/designs/lumina/measurements/uk.md @@ -0,0 +1,5 @@ +--- +title: "Lumina leggings: Required Measurements" +--- + + diff --git a/markdown/org/docs/designs/lumina/needs/de.md b/markdown/org/docs/designs/lumina/needs/de.md new file mode 100644 index 00000000000..f7c5cb0c474 --- /dev/null +++ b/markdown/org/docs/designs/lumina/needs/de.md @@ -0,0 +1,10 @@ +--- +title: "Lumina leggings: What You Need" +--- + +To make Lumina, you will need the following: + +- Basic sewing supplies +- About 1.5 metres (1.7 yards) of a suitable fabric ([see Lumina Fabric options](/docs/designs/lumina/fabric/)) +- Elastic for the leg openings and waist. + diff --git a/markdown/org/docs/designs/lumina/needs/en.md b/markdown/org/docs/designs/lumina/needs/en.md new file mode 100644 index 00000000000..f7c5cb0c474 --- /dev/null +++ b/markdown/org/docs/designs/lumina/needs/en.md @@ -0,0 +1,10 @@ +--- +title: "Lumina leggings: What You Need" +--- + +To make Lumina, you will need the following: + +- Basic sewing supplies +- About 1.5 metres (1.7 yards) of a suitable fabric ([see Lumina Fabric options](/docs/designs/lumina/fabric/)) +- Elastic for the leg openings and waist. + diff --git a/markdown/org/docs/designs/lumina/needs/es.md b/markdown/org/docs/designs/lumina/needs/es.md new file mode 100644 index 00000000000..f7c5cb0c474 --- /dev/null +++ b/markdown/org/docs/designs/lumina/needs/es.md @@ -0,0 +1,10 @@ +--- +title: "Lumina leggings: What You Need" +--- + +To make Lumina, you will need the following: + +- Basic sewing supplies +- About 1.5 metres (1.7 yards) of a suitable fabric ([see Lumina Fabric options](/docs/designs/lumina/fabric/)) +- Elastic for the leg openings and waist. + diff --git a/markdown/org/docs/designs/lumina/needs/fr.md b/markdown/org/docs/designs/lumina/needs/fr.md new file mode 100644 index 00000000000..f7c5cb0c474 --- /dev/null +++ b/markdown/org/docs/designs/lumina/needs/fr.md @@ -0,0 +1,10 @@ +--- +title: "Lumina leggings: What You Need" +--- + +To make Lumina, you will need the following: + +- Basic sewing supplies +- About 1.5 metres (1.7 yards) of a suitable fabric ([see Lumina Fabric options](/docs/designs/lumina/fabric/)) +- Elastic for the leg openings and waist. + diff --git a/markdown/org/docs/designs/lumina/needs/nl.md b/markdown/org/docs/designs/lumina/needs/nl.md new file mode 100644 index 00000000000..f7c5cb0c474 --- /dev/null +++ b/markdown/org/docs/designs/lumina/needs/nl.md @@ -0,0 +1,10 @@ +--- +title: "Lumina leggings: What You Need" +--- + +To make Lumina, you will need the following: + +- Basic sewing supplies +- About 1.5 metres (1.7 yards) of a suitable fabric ([see Lumina Fabric options](/docs/designs/lumina/fabric/)) +- Elastic for the leg openings and waist. + diff --git a/markdown/org/docs/designs/lumina/needs/uk.md b/markdown/org/docs/designs/lumina/needs/uk.md new file mode 100644 index 00000000000..f7c5cb0c474 --- /dev/null +++ b/markdown/org/docs/designs/lumina/needs/uk.md @@ -0,0 +1,10 @@ +--- +title: "Lumina leggings: What You Need" +--- + +To make Lumina, you will need the following: + +- Basic sewing supplies +- About 1.5 metres (1.7 yards) of a suitable fabric ([see Lumina Fabric options](/docs/designs/lumina/fabric/)) +- Elastic for the leg openings and waist. + diff --git a/markdown/org/docs/designs/lumina/nl.md b/markdown/org/docs/designs/lumina/nl.md new file mode 100644 index 00000000000..c3d49f4c903 --- /dev/null +++ b/markdown/org/docs/designs/lumina/nl.md @@ -0,0 +1,8 @@ +--- +title: "Lumina leggings" +--- + + + + + diff --git a/markdown/org/docs/designs/lumina/notes/de.md b/markdown/org/docs/designs/lumina/notes/de.md new file mode 100644 index 00000000000..621e3ea7633 --- /dev/null +++ b/markdown/org/docs/designs/lumina/notes/de.md @@ -0,0 +1,21 @@ +--- +title: "Lumina leggings: Designer Notes" +--- + +I started working on this design when I wanted to make a pair of cycling shorts. I had made a pair in the past, +using a commercial pattern. And since you can buy the chamois separately, this is a great garment to make. + +After starting this, I realized that there would be people who would want a more traditional leggings pattern. +So I decided to make two patterns, one with a seam on the inside of the leg (traditional), and one without a +seam on the inside (this one). I played with the idea to keep both patterns under one name, but it became +obvious that it would be better to have two different patterns instead. Since this one was called `lumina`, I +named the other `lumira`. As it may be, I quickly got distracted by the other version, and that one was +published first. + +Since this pattern has a panel on the side, it seemed easy to add a pocket option. So if you want to keep +your mobile phone on you while working out, this is the pattern to use. + +I was also in need of a pair of gym climbing pants. So this pattern has the option to have a positive ease +setting, allowing you to use a non-stretch knit fabric. This makes for loose-fitting workout pants. + +Wouter diff --git a/markdown/org/docs/designs/lumina/notes/en.md b/markdown/org/docs/designs/lumina/notes/en.md new file mode 100644 index 00000000000..621e3ea7633 --- /dev/null +++ b/markdown/org/docs/designs/lumina/notes/en.md @@ -0,0 +1,21 @@ +--- +title: "Lumina leggings: Designer Notes" +--- + +I started working on this design when I wanted to make a pair of cycling shorts. I had made a pair in the past, +using a commercial pattern. And since you can buy the chamois separately, this is a great garment to make. + +After starting this, I realized that there would be people who would want a more traditional leggings pattern. +So I decided to make two patterns, one with a seam on the inside of the leg (traditional), and one without a +seam on the inside (this one). I played with the idea to keep both patterns under one name, but it became +obvious that it would be better to have two different patterns instead. Since this one was called `lumina`, I +named the other `lumira`. As it may be, I quickly got distracted by the other version, and that one was +published first. + +Since this pattern has a panel on the side, it seemed easy to add a pocket option. So if you want to keep +your mobile phone on you while working out, this is the pattern to use. + +I was also in need of a pair of gym climbing pants. So this pattern has the option to have a positive ease +setting, allowing you to use a non-stretch knit fabric. This makes for loose-fitting workout pants. + +Wouter diff --git a/markdown/org/docs/designs/lumina/notes/es.md b/markdown/org/docs/designs/lumina/notes/es.md new file mode 100644 index 00000000000..621e3ea7633 --- /dev/null +++ b/markdown/org/docs/designs/lumina/notes/es.md @@ -0,0 +1,21 @@ +--- +title: "Lumina leggings: Designer Notes" +--- + +I started working on this design when I wanted to make a pair of cycling shorts. I had made a pair in the past, +using a commercial pattern. And since you can buy the chamois separately, this is a great garment to make. + +After starting this, I realized that there would be people who would want a more traditional leggings pattern. +So I decided to make two patterns, one with a seam on the inside of the leg (traditional), and one without a +seam on the inside (this one). I played with the idea to keep both patterns under one name, but it became +obvious that it would be better to have two different patterns instead. Since this one was called `lumina`, I +named the other `lumira`. As it may be, I quickly got distracted by the other version, and that one was +published first. + +Since this pattern has a panel on the side, it seemed easy to add a pocket option. So if you want to keep +your mobile phone on you while working out, this is the pattern to use. + +I was also in need of a pair of gym climbing pants. So this pattern has the option to have a positive ease +setting, allowing you to use a non-stretch knit fabric. This makes for loose-fitting workout pants. + +Wouter diff --git a/markdown/org/docs/designs/lumina/notes/fr.md b/markdown/org/docs/designs/lumina/notes/fr.md new file mode 100644 index 00000000000..621e3ea7633 --- /dev/null +++ b/markdown/org/docs/designs/lumina/notes/fr.md @@ -0,0 +1,21 @@ +--- +title: "Lumina leggings: Designer Notes" +--- + +I started working on this design when I wanted to make a pair of cycling shorts. I had made a pair in the past, +using a commercial pattern. And since you can buy the chamois separately, this is a great garment to make. + +After starting this, I realized that there would be people who would want a more traditional leggings pattern. +So I decided to make two patterns, one with a seam on the inside of the leg (traditional), and one without a +seam on the inside (this one). I played with the idea to keep both patterns under one name, but it became +obvious that it would be better to have two different patterns instead. Since this one was called `lumina`, I +named the other `lumira`. As it may be, I quickly got distracted by the other version, and that one was +published first. + +Since this pattern has a panel on the side, it seemed easy to add a pocket option. So if you want to keep +your mobile phone on you while working out, this is the pattern to use. + +I was also in need of a pair of gym climbing pants. So this pattern has the option to have a positive ease +setting, allowing you to use a non-stretch knit fabric. This makes for loose-fitting workout pants. + +Wouter diff --git a/markdown/org/docs/designs/lumina/notes/nl.md b/markdown/org/docs/designs/lumina/notes/nl.md new file mode 100644 index 00000000000..621e3ea7633 --- /dev/null +++ b/markdown/org/docs/designs/lumina/notes/nl.md @@ -0,0 +1,21 @@ +--- +title: "Lumina leggings: Designer Notes" +--- + +I started working on this design when I wanted to make a pair of cycling shorts. I had made a pair in the past, +using a commercial pattern. And since you can buy the chamois separately, this is a great garment to make. + +After starting this, I realized that there would be people who would want a more traditional leggings pattern. +So I decided to make two patterns, one with a seam on the inside of the leg (traditional), and one without a +seam on the inside (this one). I played with the idea to keep both patterns under one name, but it became +obvious that it would be better to have two different patterns instead. Since this one was called `lumina`, I +named the other `lumira`. As it may be, I quickly got distracted by the other version, and that one was +published first. + +Since this pattern has a panel on the side, it seemed easy to add a pocket option. So if you want to keep +your mobile phone on you while working out, this is the pattern to use. + +I was also in need of a pair of gym climbing pants. So this pattern has the option to have a positive ease +setting, allowing you to use a non-stretch knit fabric. This makes for loose-fitting workout pants. + +Wouter diff --git a/markdown/org/docs/designs/lumina/notes/uk.md b/markdown/org/docs/designs/lumina/notes/uk.md new file mode 100644 index 00000000000..621e3ea7633 --- /dev/null +++ b/markdown/org/docs/designs/lumina/notes/uk.md @@ -0,0 +1,21 @@ +--- +title: "Lumina leggings: Designer Notes" +--- + +I started working on this design when I wanted to make a pair of cycling shorts. I had made a pair in the past, +using a commercial pattern. And since you can buy the chamois separately, this is a great garment to make. + +After starting this, I realized that there would be people who would want a more traditional leggings pattern. +So I decided to make two patterns, one with a seam on the inside of the leg (traditional), and one without a +seam on the inside (this one). I played with the idea to keep both patterns under one name, but it became +obvious that it would be better to have two different patterns instead. Since this one was called `lumina`, I +named the other `lumira`. As it may be, I quickly got distracted by the other version, and that one was +published first. + +Since this pattern has a panel on the side, it seemed easy to add a pocket option. So if you want to keep +your mobile phone on you while working out, this is the pattern to use. + +I was also in need of a pair of gym climbing pants. So this pattern has the option to have a positive ease +setting, allowing you to use a non-stretch knit fabric. This makes for loose-fitting workout pants. + +Wouter diff --git a/markdown/org/docs/designs/lumina/options/de.md b/markdown/org/docs/designs/lumina/options/de.md new file mode 100644 index 00000000000..28b2581450d --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/de.md @@ -0,0 +1,5 @@ +--- +title: "Lumira leggings: Design Options" +--- + + diff --git a/markdown/org/docs/designs/lumina/options/ease/de.md b/markdown/org/docs/designs/lumina/options/ease/de.md new file mode 100644 index 00000000000..1cf4921212d --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/ease/de.md @@ -0,0 +1,19 @@ +--- +title: "Ease" +--- + +*** + +Controls the amount of ease build into the pattern. Since these are leggings that are to be made of stretch fabric, +the ease is nagative. So the completed garment will be narower than the measurements would dictate. + + +Getting the wease right for your type of fabric is essential for getting a good fit. If you make the ease +too negative, the leggings will be too constricting, and limiting movement. If you don't make the ease +negative enough, the leggings will not hug your legs and torso. The fabric should be stretched in all +places, without being too tight. + + + +With a positive ease, these leggings will tuirn into slightly loose fitting pants + diff --git a/markdown/org/docs/designs/lumina/options/ease/en.md b/markdown/org/docs/designs/lumina/options/ease/en.md new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/ease/en.md @@ -0,0 +1 @@ + diff --git a/markdown/org/docs/designs/lumina/options/ease/es.md b/markdown/org/docs/designs/lumina/options/ease/es.md new file mode 100644 index 00000000000..1cf4921212d --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/ease/es.md @@ -0,0 +1,19 @@ +--- +title: "Ease" +--- + +*** + +Controls the amount of ease build into the pattern. Since these are leggings that are to be made of stretch fabric, +the ease is nagative. So the completed garment will be narower than the measurements would dictate. + + +Getting the wease right for your type of fabric is essential for getting a good fit. If you make the ease +too negative, the leggings will be too constricting, and limiting movement. If you don't make the ease +negative enough, the leggings will not hug your legs and torso. The fabric should be stretched in all +places, without being too tight. + + + +With a positive ease, these leggings will tuirn into slightly loose fitting pants + diff --git a/markdown/org/docs/designs/lumina/options/ease/fr.md b/markdown/org/docs/designs/lumina/options/ease/fr.md new file mode 100644 index 00000000000..1cf4921212d --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/ease/fr.md @@ -0,0 +1,19 @@ +--- +title: "Ease" +--- + +*** + +Controls the amount of ease build into the pattern. Since these are leggings that are to be made of stretch fabric, +the ease is nagative. So the completed garment will be narower than the measurements would dictate. + + +Getting the wease right for your type of fabric is essential for getting a good fit. If you make the ease +too negative, the leggings will be too constricting, and limiting movement. If you don't make the ease +negative enough, the leggings will not hug your legs and torso. The fabric should be stretched in all +places, without being too tight. + + + +With a positive ease, these leggings will tuirn into slightly loose fitting pants + diff --git a/markdown/org/docs/designs/lumina/options/ease/nl.md b/markdown/org/docs/designs/lumina/options/ease/nl.md new file mode 100644 index 00000000000..4ae9e35b387 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/ease/nl.md @@ -0,0 +1,9 @@ +--- +title: "Ease" +--- + +*** + +Controls the amount of ease build into the pattern. Since these are leggings that are to be made of stretch fabric, +the ease is nagative. So the completed garment will be narrower than the measurements would dictate. + diff --git a/markdown/org/docs/designs/lumina/options/ease/uk.md b/markdown/org/docs/designs/lumina/options/ease/uk.md new file mode 100644 index 00000000000..1cf4921212d --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/ease/uk.md @@ -0,0 +1,19 @@ +--- +title: "Ease" +--- + +*** + +Controls the amount of ease build into the pattern. Since these are leggings that are to be made of stretch fabric, +the ease is nagative. So the completed garment will be narower than the measurements would dictate. + + +Getting the wease right for your type of fabric is essential for getting a good fit. If you make the ease +too negative, the leggings will be too constricting, and limiting movement. If you don't make the ease +negative enough, the leggings will not hug your legs and torso. The fabric should be stretched in all +places, without being too tight. + + + +With a positive ease, these leggings will tuirn into slightly loose fitting pants + diff --git a/markdown/org/docs/designs/lumina/options/en.md b/markdown/org/docs/designs/lumina/options/en.md new file mode 100644 index 00000000000..28b2581450d --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/en.md @@ -0,0 +1,5 @@ +--- +title: "Lumira leggings: Design Options" +--- + + diff --git a/markdown/org/docs/designs/lumina/options/es.md b/markdown/org/docs/designs/lumina/options/es.md new file mode 100644 index 00000000000..28b2581450d --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/es.md @@ -0,0 +1,5 @@ +--- +title: "Lumira leggings: Design Options" +--- + + diff --git a/markdown/org/docs/designs/lumina/options/fr.md b/markdown/org/docs/designs/lumina/options/fr.md new file mode 100644 index 00000000000..28b2581450d --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/fr.md @@ -0,0 +1,5 @@ +--- +title: "Lumira leggings: Design Options" +--- + + diff --git a/markdown/org/docs/designs/lumina/options/length/de.md b/markdown/org/docs/designs/lumina/options/length/de.md new file mode 100644 index 00000000000..8033f405444 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/length/de.md @@ -0,0 +1,19 @@ +--- +title: "Leg length" +--- + +*** + +Controls the length of the legs. This is a percentage of the inseam. + + + +Since the inseam is measured to the floor, and these leggings max out at the ankle, +The maximum is beyond the ankle, and is ignored. The slider will not do anything +for the top 10% or so. + + + + + + diff --git a/markdown/org/docs/designs/lumina/options/length/en.md b/markdown/org/docs/designs/lumina/options/length/en.md new file mode 100644 index 00000000000..8033f405444 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/length/en.md @@ -0,0 +1,19 @@ +--- +title: "Leg length" +--- + +*** + +Controls the length of the legs. This is a percentage of the inseam. + + + +Since the inseam is measured to the floor, and these leggings max out at the ankle, +The maximum is beyond the ankle, and is ignored. The slider will not do anything +for the top 10% or so. + + + + + + diff --git a/markdown/org/docs/designs/lumina/options/length/es.md b/markdown/org/docs/designs/lumina/options/length/es.md new file mode 100644 index 00000000000..8033f405444 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/length/es.md @@ -0,0 +1,19 @@ +--- +title: "Leg length" +--- + +*** + +Controls the length of the legs. This is a percentage of the inseam. + + + +Since the inseam is measured to the floor, and these leggings max out at the ankle, +The maximum is beyond the ankle, and is ignored. The slider will not do anything +for the top 10% or so. + + + + + + diff --git a/markdown/org/docs/designs/lumina/options/length/fr.md b/markdown/org/docs/designs/lumina/options/length/fr.md new file mode 100644 index 00000000000..8033f405444 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/length/fr.md @@ -0,0 +1,19 @@ +--- +title: "Leg length" +--- + +*** + +Controls the length of the legs. This is a percentage of the inseam. + + + +Since the inseam is measured to the floor, and these leggings max out at the ankle, +The maximum is beyond the ankle, and is ignored. The slider will not do anything +for the top 10% or so. + + + + + + diff --git a/markdown/org/docs/designs/lumina/options/length/nl.md b/markdown/org/docs/designs/lumina/options/length/nl.md new file mode 100644 index 00000000000..8033f405444 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/length/nl.md @@ -0,0 +1,19 @@ +--- +title: "Leg length" +--- + +*** + +Controls the length of the legs. This is a percentage of the inseam. + + + +Since the inseam is measured to the floor, and these leggings max out at the ankle, +The maximum is beyond the ankle, and is ignored. The slider will not do anything +for the top 10% or so. + + + + + + diff --git a/markdown/org/docs/designs/lumina/options/length/uk.md b/markdown/org/docs/designs/lumina/options/length/uk.md new file mode 100644 index 00000000000..8033f405444 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/length/uk.md @@ -0,0 +1,19 @@ +--- +title: "Leg length" +--- + +*** + +Controls the length of the legs. This is a percentage of the inseam. + + + +Since the inseam is measured to the floor, and these leggings max out at the ankle, +The maximum is beyond the ankle, and is ignored. The slider will not do anything +for the top 10% or so. + + + + + + diff --git a/markdown/org/docs/designs/lumina/options/nl.md b/markdown/org/docs/designs/lumina/options/nl.md new file mode 100644 index 00000000000..28b2581450d --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/nl.md @@ -0,0 +1,5 @@ +--- +title: "Lumira leggings: Design Options" +--- + + diff --git a/markdown/org/docs/designs/lumina/options/pocket/de.md b/markdown/org/docs/designs/lumina/options/pocket/de.md new file mode 100644 index 00000000000..cc77272532a --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/pocket/de.md @@ -0,0 +1,10 @@ +--- +title: "Pocket" +--- + +*** + +The pattern allows for a pocket to be added in the side panel. + + + diff --git a/markdown/org/docs/designs/lumina/options/pocket/en.md b/markdown/org/docs/designs/lumina/options/pocket/en.md new file mode 100644 index 00000000000..cc77272532a --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/pocket/en.md @@ -0,0 +1,10 @@ +--- +title: "Pocket" +--- + +*** + +The pattern allows for a pocket to be added in the side panel. + + + diff --git a/markdown/org/docs/designs/lumina/options/pocket/es.md b/markdown/org/docs/designs/lumina/options/pocket/es.md new file mode 100644 index 00000000000..cc77272532a --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/pocket/es.md @@ -0,0 +1,10 @@ +--- +title: "Pocket" +--- + +*** + +The pattern allows for a pocket to be added in the side panel. + + + diff --git a/markdown/org/docs/designs/lumina/options/pocket/fr.md b/markdown/org/docs/designs/lumina/options/pocket/fr.md new file mode 100644 index 00000000000..cc77272532a --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/pocket/fr.md @@ -0,0 +1,10 @@ +--- +title: "Pocket" +--- + +*** + +The pattern allows for a pocket to be added in the side panel. + + + diff --git a/markdown/org/docs/designs/lumina/options/pocket/nl.md b/markdown/org/docs/designs/lumina/options/pocket/nl.md new file mode 100644 index 00000000000..cc77272532a --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/pocket/nl.md @@ -0,0 +1,10 @@ +--- +title: "Pocket" +--- + +*** + +The pattern allows for a pocket to be added in the side panel. + + + diff --git a/markdown/org/docs/designs/lumina/options/pocket/uk.md b/markdown/org/docs/designs/lumina/options/pocket/uk.md new file mode 100644 index 00000000000..cc77272532a --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/pocket/uk.md @@ -0,0 +1,10 @@ +--- +title: "Pocket" +--- + +*** + +The pattern allows for a pocket to be added in the side panel. + + + diff --git a/markdown/org/docs/designs/lumina/options/pocketdepth/de.md b/markdown/org/docs/designs/lumina/options/pocketdepth/de.md new file mode 100644 index 00000000000..eb2157b6391 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/pocketdepth/de.md @@ -0,0 +1,11 @@ +--- +title: "Pocket depth" +--- + +*** + +Controls the depth of the pocket. + + + + diff --git a/markdown/org/docs/designs/lumina/options/pocketdepth/en.md b/markdown/org/docs/designs/lumina/options/pocketdepth/en.md new file mode 100644 index 00000000000..2fa34028e67 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/pocketdepth/en.md @@ -0,0 +1,10 @@ +--- +title: "Pocket depth" +--- + +*** + +Controls the depth of the pocket. + + + diff --git a/markdown/org/docs/designs/lumina/options/pocketdepth/es.md b/markdown/org/docs/designs/lumina/options/pocketdepth/es.md new file mode 100644 index 00000000000..eb2157b6391 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/pocketdepth/es.md @@ -0,0 +1,11 @@ +--- +title: "Pocket depth" +--- + +*** + +Controls the depth of the pocket. + + + + diff --git a/markdown/org/docs/designs/lumina/options/pocketdepth/fr.md b/markdown/org/docs/designs/lumina/options/pocketdepth/fr.md new file mode 100644 index 00000000000..eb2157b6391 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/pocketdepth/fr.md @@ -0,0 +1,11 @@ +--- +title: "Pocket depth" +--- + +*** + +Controls the depth of the pocket. + + + + diff --git a/markdown/org/docs/designs/lumina/options/pocketdepth/nl.md b/markdown/org/docs/designs/lumina/options/pocketdepth/nl.md new file mode 100644 index 00000000000..eb2157b6391 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/pocketdepth/nl.md @@ -0,0 +1,11 @@ +--- +title: "Pocket depth" +--- + +*** + +Controls the depth of the pocket. + + + + diff --git a/markdown/org/docs/designs/lumina/options/pocketdepth/uk.md b/markdown/org/docs/designs/lumina/options/pocketdepth/uk.md new file mode 100644 index 00000000000..eb2157b6391 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/pocketdepth/uk.md @@ -0,0 +1,11 @@ +--- +title: "Pocket depth" +--- + +*** + +Controls the depth of the pocket. + + + + diff --git a/markdown/org/docs/designs/lumina/options/sidepanel/de.md b/markdown/org/docs/designs/lumina/options/sidepanel/de.md new file mode 100644 index 00000000000..e5f01fa1451 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/sidepanel/de.md @@ -0,0 +1,15 @@ +--- +title: "Side panel" +--- + +*** + +Have either a fixed width side panel, or one that follows the contours of the legs. + + +Even a fixed width side panel will taper towards the ankle + + + + + diff --git a/markdown/org/docs/designs/lumina/options/sidepanel/en.md b/markdown/org/docs/designs/lumina/options/sidepanel/en.md new file mode 100644 index 00000000000..e5f01fa1451 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/sidepanel/en.md @@ -0,0 +1,15 @@ +--- +title: "Side panel" +--- + +*** + +Have either a fixed width side panel, or one that follows the contours of the legs. + + +Even a fixed width side panel will taper towards the ankle + + + + + diff --git a/markdown/org/docs/designs/lumina/options/sidepanel/es.md b/markdown/org/docs/designs/lumina/options/sidepanel/es.md new file mode 100644 index 00000000000..e5f01fa1451 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/sidepanel/es.md @@ -0,0 +1,15 @@ +--- +title: "Side panel" +--- + +*** + +Have either a fixed width side panel, or one that follows the contours of the legs. + + +Even a fixed width side panel will taper towards the ankle + + + + + diff --git a/markdown/org/docs/designs/lumina/options/sidepanel/fr.md b/markdown/org/docs/designs/lumina/options/sidepanel/fr.md new file mode 100644 index 00000000000..e5f01fa1451 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/sidepanel/fr.md @@ -0,0 +1,15 @@ +--- +title: "Side panel" +--- + +*** + +Have either a fixed width side panel, or one that follows the contours of the legs. + + +Even a fixed width side panel will taper towards the ankle + + + + + diff --git a/markdown/org/docs/designs/lumina/options/sidepanel/nl.md b/markdown/org/docs/designs/lumina/options/sidepanel/nl.md new file mode 100644 index 00000000000..e5f01fa1451 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/sidepanel/nl.md @@ -0,0 +1,15 @@ +--- +title: "Side panel" +--- + +*** + +Have either a fixed width side panel, or one that follows the contours of the legs. + + +Even a fixed width side panel will taper towards the ankle + + + + + diff --git a/markdown/org/docs/designs/lumina/options/sidepanel/uk.md b/markdown/org/docs/designs/lumina/options/sidepanel/uk.md new file mode 100644 index 00000000000..e5f01fa1451 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/sidepanel/uk.md @@ -0,0 +1,15 @@ +--- +title: "Side panel" +--- + +*** + +Have either a fixed width side panel, or one that follows the contours of the legs. + + +Even a fixed width side panel will taper towards the ankle + + + + + diff --git a/markdown/org/docs/designs/lumina/options/sidepanelsize/de.md b/markdown/org/docs/designs/lumina/options/sidepanelsize/de.md new file mode 100644 index 00000000000..80e25f47b11 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/sidepanelsize/de.md @@ -0,0 +1,11 @@ +--- +title: "Side panel side" +--- + +*** + +Controls the width of the side panel. This is a percentage of the waist. + + + + diff --git a/markdown/org/docs/designs/lumina/options/sidepanelsize/en.md b/markdown/org/docs/designs/lumina/options/sidepanelsize/en.md new file mode 100644 index 00000000000..8b137891791 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/sidepanelsize/en.md @@ -0,0 +1 @@ + diff --git a/markdown/org/docs/designs/lumina/options/sidepanelsize/es.md b/markdown/org/docs/designs/lumina/options/sidepanelsize/es.md new file mode 100644 index 00000000000..80e25f47b11 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/sidepanelsize/es.md @@ -0,0 +1,11 @@ +--- +title: "Side panel side" +--- + +*** + +Controls the width of the side panel. This is a percentage of the waist. + + + + diff --git a/markdown/org/docs/designs/lumina/options/sidepanelsize/fr.md b/markdown/org/docs/designs/lumina/options/sidepanelsize/fr.md new file mode 100644 index 00000000000..80e25f47b11 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/sidepanelsize/fr.md @@ -0,0 +1,11 @@ +--- +title: "Side panel side" +--- + +*** + +Controls the width of the side panel. This is a percentage of the waist. + + + + diff --git a/markdown/org/docs/designs/lumina/options/sidepanelsize/nl.md b/markdown/org/docs/designs/lumina/options/sidepanelsize/nl.md new file mode 100644 index 00000000000..80e25f47b11 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/sidepanelsize/nl.md @@ -0,0 +1,11 @@ +--- +title: "Side panel side" +--- + +*** + +Controls the width of the side panel. This is a percentage of the waist. + + + + diff --git a/markdown/org/docs/designs/lumina/options/sidepanelsize/uk.md b/markdown/org/docs/designs/lumina/options/sidepanelsize/uk.md new file mode 100644 index 00000000000..e671be76993 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/sidepanelsize/uk.md @@ -0,0 +1,11 @@ +--- +title: "Front gusset length" +--- + +*** + +Controls the length of the gusset in the front. + + + + diff --git a/markdown/org/docs/designs/lumina/options/smoothing/de.md b/markdown/org/docs/designs/lumina/options/smoothing/de.md new file mode 100644 index 00000000000..ffc36921dfa --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/smoothing/de.md @@ -0,0 +1,11 @@ +--- +title: "Smoothing" +--- + +*** + +This option controls the amount of smoothing of the side seam the pattern employs. + + + + diff --git a/markdown/org/docs/designs/lumina/options/smoothing/en.md b/markdown/org/docs/designs/lumina/options/smoothing/en.md new file mode 100644 index 00000000000..ffc36921dfa --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/smoothing/en.md @@ -0,0 +1,11 @@ +--- +title: "Smoothing" +--- + +*** + +This option controls the amount of smoothing of the side seam the pattern employs. + + + + diff --git a/markdown/org/docs/designs/lumina/options/smoothing/es.md b/markdown/org/docs/designs/lumina/options/smoothing/es.md new file mode 100644 index 00000000000..ffc36921dfa --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/smoothing/es.md @@ -0,0 +1,11 @@ +--- +title: "Smoothing" +--- + +*** + +This option controls the amount of smoothing of the side seam the pattern employs. + + + + diff --git a/markdown/org/docs/designs/lumina/options/smoothing/fr.md b/markdown/org/docs/designs/lumina/options/smoothing/fr.md new file mode 100644 index 00000000000..ffc36921dfa --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/smoothing/fr.md @@ -0,0 +1,11 @@ +--- +title: "Smoothing" +--- + +*** + +This option controls the amount of smoothing of the side seam the pattern employs. + + + + diff --git a/markdown/org/docs/designs/lumina/options/smoothing/nl.md b/markdown/org/docs/designs/lumina/options/smoothing/nl.md new file mode 100644 index 00000000000..ffc36921dfa --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/smoothing/nl.md @@ -0,0 +1,11 @@ +--- +title: "Smoothing" +--- + +*** + +This option controls the amount of smoothing of the side seam the pattern employs. + + + + diff --git a/markdown/org/docs/designs/lumina/options/smoothing/uk.md b/markdown/org/docs/designs/lumina/options/smoothing/uk.md new file mode 100644 index 00000000000..ffc36921dfa --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/smoothing/uk.md @@ -0,0 +1,11 @@ +--- +title: "Smoothing" +--- + +*** + +This option controls the amount of smoothing of the side seam the pattern employs. + + + + diff --git a/markdown/org/docs/designs/lumina/options/uk.md b/markdown/org/docs/designs/lumina/options/uk.md new file mode 100644 index 00000000000..28b2581450d --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/uk.md @@ -0,0 +1,5 @@ +--- +title: "Lumira leggings: Design Options" +--- + + diff --git a/markdown/org/docs/designs/lumina/options/waistband/de.md b/markdown/org/docs/designs/lumina/options/waistband/de.md new file mode 100644 index 00000000000..2c9aa3d1f6f --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistband/de.md @@ -0,0 +1,11 @@ +--- +title: "Waistband" +--- + +*** + +Adds a waistband + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistband/en.md b/markdown/org/docs/designs/lumina/options/waistband/en.md new file mode 100644 index 00000000000..2c9aa3d1f6f --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistband/en.md @@ -0,0 +1,11 @@ +--- +title: "Waistband" +--- + +*** + +Adds a waistband + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistband/es.md b/markdown/org/docs/designs/lumina/options/waistband/es.md new file mode 100644 index 00000000000..2c9aa3d1f6f --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistband/es.md @@ -0,0 +1,11 @@ +--- +title: "Waistband" +--- + +*** + +Adds a waistband + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistband/fr.md b/markdown/org/docs/designs/lumina/options/waistband/fr.md new file mode 100644 index 00000000000..2c9aa3d1f6f --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistband/fr.md @@ -0,0 +1,11 @@ +--- +title: "Waistband" +--- + +*** + +Adds a waistband + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistband/nl.md b/markdown/org/docs/designs/lumina/options/waistband/nl.md new file mode 100644 index 00000000000..2c9aa3d1f6f --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistband/nl.md @@ -0,0 +1,11 @@ +--- +title: "Waistband" +--- + +*** + +Adds a waistband + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistband/uk.md b/markdown/org/docs/designs/lumina/options/waistband/uk.md new file mode 100644 index 00000000000..2c9aa3d1f6f --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistband/uk.md @@ -0,0 +1,11 @@ +--- +title: "Waistband" +--- + +*** + +Adds a waistband + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistbandsize/de.md b/markdown/org/docs/designs/lumina/options/waistbandsize/de.md new file mode 100644 index 00000000000..ae583903bc5 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistbandsize/de.md @@ -0,0 +1,11 @@ +--- +title: "Waistband size" +--- + +*** + +Controls the size of the waistband. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistbandsize/en.md b/markdown/org/docs/designs/lumina/options/waistbandsize/en.md new file mode 100644 index 00000000000..ae583903bc5 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistbandsize/en.md @@ -0,0 +1,11 @@ +--- +title: "Waistband size" +--- + +*** + +Controls the size of the waistband. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistbandsize/es.md b/markdown/org/docs/designs/lumina/options/waistbandsize/es.md new file mode 100644 index 00000000000..ae583903bc5 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistbandsize/es.md @@ -0,0 +1,11 @@ +--- +title: "Waistband size" +--- + +*** + +Controls the size of the waistband. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistbandsize/fr.md b/markdown/org/docs/designs/lumina/options/waistbandsize/fr.md new file mode 100644 index 00000000000..ae583903bc5 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistbandsize/fr.md @@ -0,0 +1,11 @@ +--- +title: "Waistband size" +--- + +*** + +Controls the size of the waistband. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistbandsize/nl.md b/markdown/org/docs/designs/lumina/options/waistbandsize/nl.md new file mode 100644 index 00000000000..ae583903bc5 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistbandsize/nl.md @@ -0,0 +1,11 @@ +--- +title: "Waistband size" +--- + +*** + +Controls the size of the waistband. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistbandsize/uk.md b/markdown/org/docs/designs/lumina/options/waistbandsize/uk.md new file mode 100644 index 00000000000..ae583903bc5 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistbandsize/uk.md @@ -0,0 +1,11 @@ +--- +title: "Waistband size" +--- + +*** + +Controls the size of the waistband. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistlowering/de.md b/markdown/org/docs/designs/lumina/options/waistlowering/de.md new file mode 100644 index 00000000000..9b5ab3119ed --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistlowering/de.md @@ -0,0 +1,11 @@ +--- +title: "Waist lowering" +--- + +*** + +This lowers where the top of the leggings stop. Can be anywhere between the true waist and the hips. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistlowering/en.md b/markdown/org/docs/designs/lumina/options/waistlowering/en.md new file mode 100644 index 00000000000..9b5ab3119ed --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistlowering/en.md @@ -0,0 +1,11 @@ +--- +title: "Waist lowering" +--- + +*** + +This lowers where the top of the leggings stop. Can be anywhere between the true waist and the hips. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistlowering/es.md b/markdown/org/docs/designs/lumina/options/waistlowering/es.md new file mode 100644 index 00000000000..9b5ab3119ed --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistlowering/es.md @@ -0,0 +1,11 @@ +--- +title: "Waist lowering" +--- + +*** + +This lowers where the top of the leggings stop. Can be anywhere between the true waist and the hips. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistlowering/fr.md b/markdown/org/docs/designs/lumina/options/waistlowering/fr.md new file mode 100644 index 00000000000..9b5ab3119ed --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistlowering/fr.md @@ -0,0 +1,11 @@ +--- +title: "Waist lowering" +--- + +*** + +This lowers where the top of the leggings stop. Can be anywhere between the true waist and the hips. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistlowering/nl.md b/markdown/org/docs/designs/lumina/options/waistlowering/nl.md new file mode 100644 index 00000000000..9b5ab3119ed --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistlowering/nl.md @@ -0,0 +1,11 @@ +--- +title: "Waist lowering" +--- + +*** + +This lowers where the top of the leggings stop. Can be anywhere between the true waist and the hips. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistlowering/uk.md b/markdown/org/docs/designs/lumina/options/waistlowering/uk.md new file mode 100644 index 00000000000..9b5ab3119ed --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistlowering/uk.md @@ -0,0 +1,11 @@ +--- +title: "Waist lowering" +--- + +*** + +This lowers where the top of the leggings stop. Can be anywhere between the true waist and the hips. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistreduction/de.md b/markdown/org/docs/designs/lumina/options/waistreduction/de.md new file mode 100644 index 00000000000..d1d96e2d838 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistreduction/de.md @@ -0,0 +1,11 @@ +--- +title: "Taillenreduzierung" +--- + +*** + +Reduziert die Taille für eine leichte Passform. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistreduction/en.md b/markdown/org/docs/designs/lumina/options/waistreduction/en.md new file mode 100644 index 00000000000..3ddc6afca62 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistreduction/en.md @@ -0,0 +1,11 @@ +--- +title: "Waist reduction" +--- + +*** + +Reduces the waist for a more snug fit. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistreduction/es.md b/markdown/org/docs/designs/lumina/options/waistreduction/es.md new file mode 100644 index 00000000000..733c368906e --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistreduction/es.md @@ -0,0 +1,11 @@ +--- +title: "Reducción de cintura" +--- + +*** + +Reduce la cintura para un mejor encaje. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistreduction/fr.md b/markdown/org/docs/designs/lumina/options/waistreduction/fr.md new file mode 100644 index 00000000000..adb79fade75 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistreduction/fr.md @@ -0,0 +1,11 @@ +--- +title: "Réduction de la taille" +--- + +*** + +Réduit la taille de la ceinture pour un porté plus ajusté. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistreduction/nl.md b/markdown/org/docs/designs/lumina/options/waistreduction/nl.md new file mode 100644 index 00000000000..de91c0babc0 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistreduction/nl.md @@ -0,0 +1,11 @@ +--- +title: "Reductie taille" +--- + +*** + +Vermindert de taille voor een meer snug pas. + + + + diff --git a/markdown/org/docs/designs/lumina/options/waistreduction/uk.md b/markdown/org/docs/designs/lumina/options/waistreduction/uk.md new file mode 100644 index 00000000000..bed881dfcf2 --- /dev/null +++ b/markdown/org/docs/designs/lumina/options/waistreduction/uk.md @@ -0,0 +1,11 @@ +--- +title: "Зменшення талії" +--- + +*** + +Зменшує талію для більш щільного прилягання. + + + + diff --git a/markdown/org/docs/designs/lumina/uk.md b/markdown/org/docs/designs/lumina/uk.md new file mode 100644 index 00000000000..c3d49f4c903 --- /dev/null +++ b/markdown/org/docs/designs/lumina/uk.md @@ -0,0 +1,8 @@ +--- +title: "Lumina leggings" +--- + + + + + From 75770b0b02bcadb8cbade39623104bcde5dd25ff Mon Sep 17 00:00:00 2001 From: Wouter van Wageningen Date: Mon, 8 Jan 2024 22:58:49 -0800 Subject: [PATCH 18/28] Update designs.mjs --- sites/shared/i18n/designs.mjs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/sites/shared/i18n/designs.mjs b/sites/shared/i18n/designs.mjs index 90f998858e7..06cdac638c5 100644 --- a/sites/shared/i18n/designs.mjs +++ b/sites/shared/i18n/designs.mjs @@ -32,6 +32,7 @@ import { i18n as legend } from '@freesewing/legend' import { i18n as lucy } from '@freesewing/lucy' import { i18n as lunetius } from '@freesewing/lunetius' import { i18n as magde } from '@freesewing/magde' +import { i18n as naomiwu } from '@freesewing/naomiwu' import { i18n as noble } from '@freesewing/noble' import { i18n as octoplushy } from '@freesewing/octoplushy' import { i18n as onyx } from '@freesewing/onyx' @@ -57,6 +58,7 @@ import { i18n as walburga } from '@freesewing/walburga' import { i18n as waralee } from '@freesewing/waralee' import { i18n as yuri } from '@freesewing/yuri' import { i18n as otis } from '@freesewing/otis' +import { i18n as lumira } from '@freesewing/lumira' import { i18n as lumina } from '@freesewing/lumina' export const designs = { @@ -90,6 +92,7 @@ export const designs = { lucy, lunetius, magde, + naomiwu, noble, octoplushy, onyx, @@ -115,5 +118,6 @@ export const designs = { waralee, yuri, otis, + lumira, lumina, } From 58b2ec5ea9b1162bd9df58fcfd9824d290bca218 Mon Sep 17 00:00:00 2001 From: Wouter van Wageningen Date: Mon, 8 Jan 2024 23:04:34 -0800 Subject: [PATCH 19/28] Update designs.mjs --- sites/shared/i18n/designs.mjs | 2 -- 1 file changed, 2 deletions(-) diff --git a/sites/shared/i18n/designs.mjs b/sites/shared/i18n/designs.mjs index 06cdac638c5..d6d0bdbc570 100644 --- a/sites/shared/i18n/designs.mjs +++ b/sites/shared/i18n/designs.mjs @@ -59,7 +59,6 @@ import { i18n as waralee } from '@freesewing/waralee' import { i18n as yuri } from '@freesewing/yuri' import { i18n as otis } from '@freesewing/otis' import { i18n as lumira } from '@freesewing/lumira' -import { i18n as lumina } from '@freesewing/lumina' export const designs = { aaron, @@ -119,5 +118,4 @@ export const designs = { yuri, otis, lumira, - lumina, } From 3a23ead4476d2b915f8dd9ec9ae46ad1fb39f108 Mon Sep 17 00:00:00 2001 From: Wouter van Wageningen Date: Mon, 8 Jan 2024 23:06:43 -0800 Subject: [PATCH 20/28] Update designs.mjs --- sites/shared/i18n/designs.mjs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/sites/shared/i18n/designs.mjs b/sites/shared/i18n/designs.mjs index d6d0bdbc570..1af0bdb5900 100644 --- a/sites/shared/i18n/designs.mjs +++ b/sites/shared/i18n/designs.mjs @@ -59,6 +59,7 @@ import { i18n as waralee } from '@freesewing/waralee' import { i18n as yuri } from '@freesewing/yuri' import { i18n as otis } from '@freesewing/otis' import { i18n as lumira } from '@freesewing/lumira' +import { i18n as lumira } from '@freesewing/lumina' export const designs = { aaron, @@ -118,4 +119,5 @@ export const designs = { yuri, otis, lumira, + lumina, } From e78f488bf049c3974e3f1babee3f604cda6cda40 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Tue, 9 Jan 2024 22:40:50 +0000 Subject: [PATCH 21/28] Lint, lint, lint --- designs/lumina/src/pocket.mjs | 1 + designs/lumina/src/shape.mjs | 36 ++++++++++++++++++++++------------- 2 files changed, 24 insertions(+), 13 deletions(-) diff --git a/designs/lumina/src/pocket.mjs b/designs/lumina/src/pocket.mjs index 774a4277e84..a8a4ebf44f8 100644 --- a/designs/lumina/src/pocket.mjs +++ b/designs/lumina/src/pocket.mjs @@ -29,6 +29,7 @@ export const pocket = { options, macro, store, + log, part, }) => { if (!options.pocket) { diff --git a/designs/lumina/src/shape.mjs b/designs/lumina/src/shape.mjs index f9516ae6ff9..58645f583e7 100644 --- a/designs/lumina/src/shape.mjs +++ b/designs/lumina/src/shape.mjs @@ -14,7 +14,7 @@ export const createPath = (paths, Path, points, pathName, names) => { return paths[pathName] } -const lowerWaist = (paths, Path, points, waistLowering, pathName, pointName) => { +const lowerWaist = (paths, Path, points, log, waistLowering, pathName, pointName) => { const newPath = extendPath(Path, paths[pathName], 100, 0) const newWaist = newPath.shiftAlong(waistLowering + 100) if (newWaist.sitsRoughlyOn(points[pathName + pointName])) { @@ -108,7 +108,7 @@ const createSidePoints = ({ } let distance = m2 - m1 switch (names[i]) { - case 'UpperLeg': + case 'UpperLeg': { measurement = measurements['upperLeg'] const intersect = utils.beamIntersectsCurve( points[prefix + names[i]], @@ -127,24 +127,28 @@ const createSidePoints = ({ } } break - case 'Waist': + } + case 'Waist': { measurement = (prefix == 'front' ? measurements.waist - measurements.waistBack : measurements.waistBack) - waistReduction * 0.5 break - case 'Seat': + } + case 'Seat': { measurement = prefix == 'front' ? measurements.seat - measurements.seatBack : measurements.seatBack distance *= distanceCompensation break - default: + } + default: { measurement = measurements[names[i].toLowerCase()] // Adjust for thigh size when using positive ease if (ease > 1 && (names[i] == 'Ankle' || names[i] == 'Knee')) { measurement *= 1.2 } + } } measurement /= 2 measurement *= ease @@ -175,8 +179,6 @@ const createSidePoints = ({ if (false !== ci) { points[prefix + postfix + names[i]] = ci[prefix == 'front' ? 0 : 1] } - if (prefix == 'front' && postfix == 'Side') { - } } while (iter++ < 100 && (false == ci || isNaN(ci[prefix == 'front' ? 0 : 1].x))) lastGood = i @@ -531,18 +533,18 @@ export const shape = { }) } - lowerWaist(paths, Path, points, waistLowering, 'middle', 'Waist') + lowerWaist(paths, Path, points, log, waistLowering, 'middle', 'Waist') ;['front', 'back'].forEach((prefix) => { ;['Side', 'Split', 'Panel'].forEach((type) => { - lowerWaist(paths, Path, points, waistLowering, prefix + type, 'Waist') + lowerWaist(paths, Path, points, log, waistLowering, prefix + type, 'Waist') }) - lowerWaist(paths, Path, points, waistLowering, prefix, 'Waist') + lowerWaist(paths, Path, points, log, waistLowering, prefix, 'Waist') }) ;['front', 'back'].forEach((prefix) => { ;['Side', 'Split', 'Panel'].forEach((type) => { - lowerWaist(paths, Path, points, waistbandSize, prefix + type, 'Waistband') + lowerWaist(paths, Path, points, log, waistbandSize, prefix + type, 'Waistband') }) - lowerWaist(paths, Path, points, waistbandSize, prefix, 'Waistband') + lowerWaist(paths, Path, points, log, waistbandSize, prefix, 'Waistband') }) store.set( @@ -582,7 +584,15 @@ export const shape = { if (options.waistband && options.lowerwaistbandback) { // Lower the back a little more to get a V-shape in the back // lowerWaist(paths, Path, points, waistLowering * 0.5, 'back', 'Waistband') - lowerWaist(paths, Path, points, (waistLowering + waistbandSize) * 0.5, 'back', 'Waistband') + lowerWaist( + paths, + Path, + points, + log, + (waistLowering + waistbandSize) * 0.5, + 'back', + 'Waistband' + ) paths.backWaistband = new Path() .move(points.backWaistband) ._curve(points.backSplitWaistbandCp, points.backSplitWaistband) From 56bcb9761f862a8f5604a15ca7575d8b29454674 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Tue, 9 Jan 2024 22:54:20 +0000 Subject: [PATCH 22/28] More lint! --- designs/lumina/src/shape.mjs | 2 -- 1 file changed, 2 deletions(-) diff --git a/designs/lumina/src/shape.mjs b/designs/lumina/src/shape.mjs index 58645f583e7..2ab8aa85d6e 100644 --- a/designs/lumina/src/shape.mjs +++ b/designs/lumina/src/shape.mjs @@ -29,8 +29,6 @@ const lowerWaist = (paths, Path, points, log, waistLowering, pathName, pointName } const createWaistPoint = (options, measurements, Path, points, utils, log, front) => { - // console.log({front:front}) - const kneeTemp = points.middleCrossSeam.shiftFractionTowards( points.middleKnee, options.crotchToKnee From c153ad6118ebd270b44c85457b23831f80249836 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Tue, 9 Jan 2024 23:38:26 +0000 Subject: [PATCH 23/28] Always more lint --- designs/lumina/src/shape.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/designs/lumina/src/shape.mjs b/designs/lumina/src/shape.mjs index 2ab8aa85d6e..bcefddea17a 100644 --- a/designs/lumina/src/shape.mjs +++ b/designs/lumina/src/shape.mjs @@ -53,7 +53,7 @@ const createWaistPoint = (options, measurements, Path, points, utils, log, front let iter = 0 do { // waist = kneeTemp.shift(angle, kneeToWaist +((diff > 0 ? 1 : -1) *iter)) - waist = kneeTemp.shift(angle, kneeToWaist + diff * 1.03) //* (diff < 0 ? 1.01 : 0.97))) + waist = kneeTemp.shift(angle, kneeToWaist + diff * 1.03) // waist = kneeTemp.shift(angle, kneeToWaist *ratio) waistCp = waist.shiftFractionTowards(points.middleKnee, options.waistToKneeCP) From 137e37ec5cbfa6a4ab23991246cee5a8205d31fa Mon Sep 17 00:00:00 2001 From: woutervdub Date: Wed, 10 Jan 2024 00:03:49 +0000 Subject: [PATCH 24/28] We all bow to the mighty Lint! --- designs/lumina/src/shape.mjs | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/designs/lumina/src/shape.mjs b/designs/lumina/src/shape.mjs index bcefddea17a..a775e810954 100644 --- a/designs/lumina/src/shape.mjs +++ b/designs/lumina/src/shape.mjs @@ -422,6 +422,7 @@ export const shape = { .curve(points.backWaistCp, points.backHipsCp2, points.backHips) .curve(points.backHipsCp1, points.backCrossSeamCp, points.middleCrossSeam) ;['front', 'back'].forEach((prefix) => { + // Semicolon removed to please the Lint: ;['Side', 'Split'].forEach((type) => { smoothPoints( points, @@ -435,6 +436,7 @@ export const shape = { paths.middle = new Path().move(points.middleWaist).line(points.middleFloor).setHidden() ;['front', 'back'].forEach((prefix) => { + // Semicolon removed to please the Lint: ;['Side', 'Split'].forEach((type) => { createControlPoints(points, 3, [ prefix + type + 'Waist', @@ -446,6 +448,7 @@ export const shape = { }) }) ;['front', 'back'].forEach((prefix) => { + // Semicolon removed to please the Lint: ;['Side', 'Split'].forEach((type) => { createPath(paths, Path, points, prefix + type, [ prefix + type + 'Waist', @@ -457,6 +460,7 @@ export const shape = { }) }) ;['front', 'back'].forEach((prefix) => { + // Semicolon removed to please the Lint: ;['Waist', 'Waistband', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { points[prefix + 'Panel' + name] = points['middle' + name].shift( prefix == 'front' ? 0 : 180, @@ -486,6 +490,7 @@ export const shape = { const frontSplitlength = paths.frontSplit.length() while (Math.abs(frontSplitlength - paths.frontPanel.length()) > 1) { + // Semicolon removed to please the Lint: ;['front', 'back'].forEach((prefix) => { const diff = paths[prefix + 'Split'].length() / paths[prefix + 'Panel'].length() const names = ['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'] @@ -518,6 +523,7 @@ export const shape = { if (options.length < 1) { const length = (1 - options.length) * (inseam - (measurements.waistToFloor - waistToAnkle)) ;['front', 'back'].forEach((prefix) => { + // Semicolon removed to please the Lint: ;['Side', 'Split', 'Panel'].forEach((type) => { points[prefix + type + 'Hem'] = paths[prefix + type].reverse().shiftAlong(length) paths[prefix + type] = paths[prefix + type].split(points[prefix + type + 'Hem'])[0] @@ -525,6 +531,7 @@ export const shape = { }) } else { ;['front', 'back'].forEach((prefix) => { + // Semicolon removed to please the Lint: ;['Side', 'Split', 'Panel'].forEach((type) => { points[prefix + type + 'Hem'] = points[prefix + type + 'Ankle'] }) @@ -533,12 +540,14 @@ export const shape = { lowerWaist(paths, Path, points, log, waistLowering, 'middle', 'Waist') ;['front', 'back'].forEach((prefix) => { + // Semicolon removed to please the Lint: ;['Side', 'Split', 'Panel'].forEach((type) => { lowerWaist(paths, Path, points, log, waistLowering, prefix + type, 'Waist') }) lowerWaist(paths, Path, points, log, waistLowering, prefix, 'Waist') }) ;['front', 'back'].forEach((prefix) => { + // Semicolon removed to please the Lint: ;['Side', 'Split', 'Panel'].forEach((type) => { lowerWaist(paths, Path, points, log, waistbandSize, prefix + type, 'Waistband') }) From 898013c48688896ca9b4fe904f7f1f646d727b23 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Wed, 10 Jan 2024 00:11:41 +0000 Subject: [PATCH 25/28] Lint is killing me! --- designs/lumina/src/shape.mjs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/designs/lumina/src/shape.mjs b/designs/lumina/src/shape.mjs index a775e810954..9e772df1e44 100644 --- a/designs/lumina/src/shape.mjs +++ b/designs/lumina/src/shape.mjs @@ -422,7 +422,7 @@ export const shape = { .curve(points.backWaistCp, points.backHipsCp2, points.backHips) .curve(points.backHipsCp1, points.backCrossSeamCp, points.middleCrossSeam) ;['front', 'back'].forEach((prefix) => { - // Semicolon removed to please the Lint: + // eslint-disable-next-line no-extra-semi ;['Side', 'Split'].forEach((type) => { smoothPoints( points, @@ -436,7 +436,7 @@ export const shape = { paths.middle = new Path().move(points.middleWaist).line(points.middleFloor).setHidden() ;['front', 'back'].forEach((prefix) => { - // Semicolon removed to please the Lint: + // eslint-disable-next-line no-extra-semi ;['Side', 'Split'].forEach((type) => { createControlPoints(points, 3, [ prefix + type + 'Waist', @@ -448,7 +448,7 @@ export const shape = { }) }) ;['front', 'back'].forEach((prefix) => { - // Semicolon removed to please the Lint: + // eslint-disable-next-line no-extra-semi ;['Side', 'Split'].forEach((type) => { createPath(paths, Path, points, prefix + type, [ prefix + type + 'Waist', @@ -460,7 +460,7 @@ export const shape = { }) }) ;['front', 'back'].forEach((prefix) => { - // Semicolon removed to please the Lint: + // eslint-disable-next-line no-extra-semi ;['Waist', 'Waistband', 'Seat', 'UpperLeg', 'Knee', 'Ankle'].forEach((name) => { points[prefix + 'Panel' + name] = points['middle' + name].shift( prefix == 'front' ? 0 : 180, @@ -490,7 +490,7 @@ export const shape = { const frontSplitlength = paths.frontSplit.length() while (Math.abs(frontSplitlength - paths.frontPanel.length()) > 1) { - // Semicolon removed to please the Lint: + // eslint-disable-next-line no-extra-semi ;['front', 'back'].forEach((prefix) => { const diff = paths[prefix + 'Split'].length() / paths[prefix + 'Panel'].length() const names = ['Waist', 'Seat', 'UpperLeg', 'Knee', 'Ankle'] @@ -523,7 +523,7 @@ export const shape = { if (options.length < 1) { const length = (1 - options.length) * (inseam - (measurements.waistToFloor - waistToAnkle)) ;['front', 'back'].forEach((prefix) => { - // Semicolon removed to please the Lint: + // eslint-disable-next-line no-extra-semi ;['Side', 'Split', 'Panel'].forEach((type) => { points[prefix + type + 'Hem'] = paths[prefix + type].reverse().shiftAlong(length) paths[prefix + type] = paths[prefix + type].split(points[prefix + type + 'Hem'])[0] @@ -531,7 +531,7 @@ export const shape = { }) } else { ;['front', 'back'].forEach((prefix) => { - // Semicolon removed to please the Lint: + // eslint-disable-next-line no-extra-semi ;['Side', 'Split', 'Panel'].forEach((type) => { points[prefix + type + 'Hem'] = points[prefix + type + 'Ankle'] }) @@ -540,14 +540,14 @@ export const shape = { lowerWaist(paths, Path, points, log, waistLowering, 'middle', 'Waist') ;['front', 'back'].forEach((prefix) => { - // Semicolon removed to please the Lint: + // eslint-disable-next-line no-extra-semi ;['Side', 'Split', 'Panel'].forEach((type) => { lowerWaist(paths, Path, points, log, waistLowering, prefix + type, 'Waist') }) lowerWaist(paths, Path, points, log, waistLowering, prefix, 'Waist') }) ;['front', 'back'].forEach((prefix) => { - // Semicolon removed to please the Lint: + // eslint-disable-next-line no-extra-semi ;['Side', 'Split', 'Panel'].forEach((type) => { lowerWaist(paths, Path, points, log, waistbandSize, prefix + type, 'Waistband') }) From 67af20da43f678bd2a0daadef026bcc9f7631f61 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Wed, 10 Jan 2024 00:17:57 +0000 Subject: [PATCH 26/28] There is always more lint. --- designs/lumina/src/shape.mjs | 1 + 1 file changed, 1 insertion(+) diff --git a/designs/lumina/src/shape.mjs b/designs/lumina/src/shape.mjs index 9e772df1e44..9d0d21a5fc0 100644 --- a/designs/lumina/src/shape.mjs +++ b/designs/lumina/src/shape.mjs @@ -530,6 +530,7 @@ export const shape = { }) }) } else { + // eslint-disable-next-line no-extra-semi ;['front', 'back'].forEach((prefix) => { // eslint-disable-next-line no-extra-semi ;['Side', 'Split', 'Panel'].forEach((type) => { From 0b28088374ca180802d4b224e3043e1747322d69 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Wed, 10 Jan 2024 00:22:25 +0000 Subject: [PATCH 27/28] Oopsies --- sites/shared/i18n/designs.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sites/shared/i18n/designs.mjs b/sites/shared/i18n/designs.mjs index 1af0bdb5900..06cdac638c5 100644 --- a/sites/shared/i18n/designs.mjs +++ b/sites/shared/i18n/designs.mjs @@ -59,7 +59,7 @@ import { i18n as waralee } from '@freesewing/waralee' import { i18n as yuri } from '@freesewing/yuri' import { i18n as otis } from '@freesewing/otis' import { i18n as lumira } from '@freesewing/lumira' -import { i18n as lumira } from '@freesewing/lumina' +import { i18n as lumina } from '@freesewing/lumina' export const designs = { aaron, From 6f81c005154b2bf37f5a29410a3da66c853569c1 Mon Sep 17 00:00:00 2001 From: woutervdub Date: Tue, 23 Jan 2024 06:06:23 +0000 Subject: [PATCH 28/28] Fix errors found by BJB --- designs/lumina/i18n/en.json | 10 +++++----- designs/lumina/src/index.mjs | 8 -------- designs/lumina/src/leg.mjs | 8 ++++---- designs/lumina/src/waistband.mjs | 13 ++++++++++--- designs/lumira/src/shape.mjs | 2 +- markdown/org/docs/designs/lumina/fabric/en.md | 6 +++--- markdown/org/docs/designs/lumina/options/de.md | 4 ++-- .../org/docs/designs/lumina/options/ease/de.md | 8 ++++---- .../org/docs/designs/lumina/options/ease/en.md | 18 ++++++++++++++++++ .../org/docs/designs/lumina/options/ease/es.md | 8 ++++---- .../org/docs/designs/lumina/options/ease/fr.md | 8 ++++---- .../org/docs/designs/lumina/options/ease/nl.md | 14 ++++++++++++-- .../org/docs/designs/lumina/options/ease/uk.md | 8 ++++---- markdown/org/docs/designs/lumina/options/en.md | 4 ++-- markdown/org/docs/designs/lumina/options/es.md | 4 ++-- markdown/org/docs/designs/lumina/options/fr.md | 4 ++-- markdown/org/docs/designs/lumina/options/nl.md | 4 ++-- .../designs/lumina/options/sidepanelsize/en.md | 10 ++++++++++ markdown/org/docs/designs/lumina/options/uk.md | 4 ++-- 19 files changed, 91 insertions(+), 54 deletions(-) diff --git a/designs/lumina/i18n/en.json b/designs/lumina/i18n/en.json index 18e6ad9d0ca..60d27a6076b 100644 --- a/designs/lumina/i18n/en.json +++ b/designs/lumina/i18n/en.json @@ -4,15 +4,15 @@ "p": { "shape": "Shape", "leg": "Leg", - "panel": "Side Pannel", + "panel": "Side panel", "pocket": "Pocket", "waistband": "Waistband" }, "s": { - "couldNotLowerWaist": "Could not lower the waist", - "cantFitTheWaistPoint": "Cannot fit the waist point", - "couldNoFitWaistband": "Could not fit the waistband", - "couldNotCreatePocket": "Could not create the pocket", + "couldNotLowerWaist.t": "Could not lower the waist", + "cantFitTheWaistPoint.t": "Cannot fit the waist point", + "couldNoFitWaistband.t": "Could not fit the waistband", + "couldNotCreatePocket.t": "Could not create the pocket", "dimensions.d": "Dimensions", "dimensions.t": "Waistband will be {{{ waistbandlength }}} long total.\nThe length of the garment along the side will be {{{ length }}}." }, diff --git a/designs/lumina/src/index.mjs b/designs/lumina/src/index.mjs index e1082e1bb3d..85f68e79c47 100644 --- a/designs/lumina/src/index.mjs +++ b/designs/lumina/src/index.mjs @@ -18,11 +18,3 @@ const Lumina = new Design({ // Named exports export { i18n, Lumina, shape, panel, leg, waistband, pocket } - -// const classes = ['lining','canvas','mark','contrast','note','interfacing','various'] - -// http://localhost:8000/new/lumina#view=%22inspect%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A960%2C%22waistBack%22%3A440%2C%22hips%22%3A884%2C%22seat%22%3A980%2C%22seatBack%22%3A490%2C%22inseam%22%3A790%2C%22waistToSeat%22%3A230%2C%22waistToUpperLeg%22%3A280%2C%22waistToKnee%22%3A610%2C%22waistToHips%22%3A120%2C%22waistToFloor%22%3A1090%2C%22knee%22%3A415%2C%22ankle%22%3A230%2C%22crossSeam%22%3A800%2C%22crossSeamFront%22%3A380%2C%22heel%22%3A300%2C%22upperLeg%22%3A640%7D%7D - -// http://localhost:8000/new/lumina#view=%22inspect%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A780%2C%22waistBack%22%3A360%2C%22hips%22%3A860%2C%22seat%22%3A980%2C%22seatBack%22%3A510%2C%22inseam%22%3A680%2C%22waistToSeat%22%3A200%2C%22waistToUpperLeg%22%3A250%2C%22waistToKnee%22%3A500%2C%22waistToHips%22%3A90%2C%22waistToFloor%22%3A890%2C%22knee%22%3A360%2C%22ankle%22%3A220%2C%22crossSeam%22%3A620%2C%22crossSeamFront%22%3A290%2C%22heel%22%3A280%2C%22upperLeg%22%3A580%7D%2C%22options%22%3A%7B%22length%22%3A1%2C%22waistreduction%22%3A0.1%2C%22waistLowering%22%3A0.012%2C%22waistlowering%22%3A0.181%7D%2C%22units%22%3A%22metric%22%7D - -// Climbing pants http://localhost:8000/new/lumina#view=%22draft%22&settings=%7B%22measurements%22%3A%7B%22waist%22%3A780%2C%22waistBack%22%3A360%2C%22hips%22%3A860%2C%22seat%22%3A980%2C%22seatBack%22%3A510%2C%22inseam%22%3A680%2C%22waistToSeat%22%3A200%2C%22waistToUpperLeg%22%3A250%2C%22waistToKnee%22%3A500%2C%22waistToHips%22%3A90%2C%22waistToFloor%22%3A890%2C%22knee%22%3A360%2C%22ankle%22%3A220%2C%22crossSeam%22%3A620%2C%22crossSeamFront%22%3A290%2C%22heel%22%3A280%2C%22upperLeg%22%3A580%7D%2C%22options%22%3A%7B%22waistreduction%22%3A0%2C%22ease%22%3A0.1%2C%22length%22%3A0.945%2C%22waistband%22%3Afalse%2C%22pocket%22%3Afalse%2C%22waistlowering%22%3A0.2%7D%2C%22sabool%22%3A1%2C%22sa%22%3A10%2C%22samm%22%3A10%7D diff --git a/designs/lumina/src/leg.mjs b/designs/lumina/src/leg.mjs index 1d5704f5492..69d98f20852 100644 --- a/designs/lumina/src/leg.mjs +++ b/designs/lumina/src/leg.mjs @@ -65,16 +65,16 @@ export const leg = { if (!points.frontSplitWaistband.sitsRoughlyOn(front)) { macro('hd', { id: 'middleToFront', - from: points.middleUpperLeg, - to: front, + from: front, + to: points.middleUpperLeg, y: top.y - sa - 35, }) } if (!points.backSplitWaistband.sitsRoughlyOn(back)) { macro('hd', { id: 'middleToBack', - from: back, - to: points.middleUpperLeg, + from: points.middleUpperLeg, + to: back, y: top.y - sa - 35, }) } diff --git a/designs/lumina/src/waistband.mjs b/designs/lumina/src/waistband.mjs index 54d7f63e133..319d9cf2e24 100644 --- a/designs/lumina/src/waistband.mjs +++ b/designs/lumina/src/waistband.mjs @@ -37,6 +37,13 @@ export const waistband = { const radius = (waistLength * 0.5) / Math.sin(angleRad) const baseAngle = waistLength < waistbandLength ? 270 : 90 let angle = utils.rad2deg(angleRad) + if (isNaN(angle)) { + log.info('lumina:couldNoFitWaistband') + store.flag.note({ + msg: `lumina:couldNoFitWaistband`, + }) + return part.hide() + } let diff = 0 let iter = 0 @@ -114,10 +121,10 @@ export const waistband = { .setClass('hidden') let top = paths.waist.edge('top') - if (top.y == points.waistFront.y) { + if (top.y == points.waistBack.y) { top = paths.waist.edge('bottom') } - let bottom = paths.waistband.edge('bottom') + let bottom = paths.waistband.shiftFractionAlong(0.5) if (bottom.y == points.waistbandFront.y) { bottom = paths.waistband.edge('top') } @@ -167,7 +174,7 @@ export const waistband = { id: 'bottom', from: points.waistbandBack, to: points.waistbandFront, - y: Math.max(points.waistbandFront.y, bottom.y) + sa + 15, + y: Math.max(points.waistbandFront.y, Math.max(bottom.y, points.waistbandBack.y)) + sa + 15, }) macro('vd', { id: 'top', diff --git a/designs/lumira/src/shape.mjs b/designs/lumira/src/shape.mjs index 15aa0c06812..1693277241b 100644 --- a/designs/lumira/src/shape.mjs +++ b/designs/lumira/src/shape.mjs @@ -28,7 +28,7 @@ export const controlPoints = (p1, p2, p3, cpDistanceDivider) => { return { cp1: p1.clone(), cp2: cp2 } } if (p3 !== undefined && p2.sitsRoughlyOn(p3)) { - return { cp1: cp1.clone(), cp2: p3.clone() } + return { cp1: cp1, cp2: p3.clone() } } return { cp1: cp1, cp2: cp2 } } diff --git a/markdown/org/docs/designs/lumina/fabric/en.md b/markdown/org/docs/designs/lumina/fabric/en.md index a5d75a18050..e1246c5d5be 100644 --- a/markdown/org/docs/designs/lumina/fabric/en.md +++ b/markdown/org/docs/designs/lumina/fabric/en.md @@ -13,15 +13,15 @@ getting a good fit. If the ease setting is larger than 0 (positive ease), any type of knit fabric can be used. Keep in mind that even with the ease -set at the maximum, you probably will not be able to use a fabric with no stretch at all (a wovel fabric). +set at the maximum, you probably will not be able to use a fabric with no stretch at all (a woven fabric). -These fabrics come in different weights. Pick one that works for how you intent to use it. Thicker fabrics provide more support +These fabrics come in different weights. Pick one that works for how you intend to use it. Thicker fabrics provide more support and warmth. For yoga pants, take something that has a medium thickness. Supplex is a good choice for this. It also works well for cycling. For -other athletic use fabrics that would be appropriate for that. Most fabrics that contain spandex will work. +other athletics use fabrics that would be appropriate for that. Most fabrics that contain spandex will work. diff --git a/markdown/org/docs/designs/lumina/options/de.md b/markdown/org/docs/designs/lumina/options/de.md index 28b2581450d..7b6330f3b63 100644 --- a/markdown/org/docs/designs/lumina/options/de.md +++ b/markdown/org/docs/designs/lumina/options/de.md @@ -1,5 +1,5 @@ --- -title: "Lumira leggings: Design Options" +title: "Lumina leggings: Design Options" --- - + diff --git a/markdown/org/docs/designs/lumina/options/ease/de.md b/markdown/org/docs/designs/lumina/options/ease/de.md index 1cf4921212d..46458170021 100644 --- a/markdown/org/docs/designs/lumina/options/ease/de.md +++ b/markdown/org/docs/designs/lumina/options/ease/de.md @@ -4,16 +4,16 @@ title: "Ease" *** -Controls the amount of ease build into the pattern. Since these are leggings that are to be made of stretch fabric, -the ease is nagative. So the completed garment will be narower than the measurements would dictate. +Controls the amount of ease built into the pattern. Since these are leggings that are to be made of stretch fabric, +the ease is nagative. So the completed garment will be narrower than the measurements would dictate. -Getting the wease right for your type of fabric is essential for getting a good fit. If you make the ease +Getting the ease right for your type of fabric is essential for getting a good fit. If you make the ease too negative, the leggings will be too constricting, and limiting movement. If you don't make the ease negative enough, the leggings will not hug your legs and torso. The fabric should be stretched in all places, without being too tight. -With a positive ease, these leggings will tuirn into slightly loose fitting pants +With a positive ease, these leggings will turn into slightly loose fitting pants diff --git a/markdown/org/docs/designs/lumina/options/ease/en.md b/markdown/org/docs/designs/lumina/options/ease/en.md index 8b137891791..46458170021 100644 --- a/markdown/org/docs/designs/lumina/options/ease/en.md +++ b/markdown/org/docs/designs/lumina/options/ease/en.md @@ -1 +1,19 @@ +--- +title: "Ease" +--- +*** + +Controls the amount of ease built into the pattern. Since these are leggings that are to be made of stretch fabric, +the ease is nagative. So the completed garment will be narrower than the measurements would dictate. + + +Getting the ease right for your type of fabric is essential for getting a good fit. If you make the ease +too negative, the leggings will be too constricting, and limiting movement. If you don't make the ease +negative enough, the leggings will not hug your legs and torso. The fabric should be stretched in all +places, without being too tight. + + + +With a positive ease, these leggings will turn into slightly loose fitting pants + diff --git a/markdown/org/docs/designs/lumina/options/ease/es.md b/markdown/org/docs/designs/lumina/options/ease/es.md index 1cf4921212d..46458170021 100644 --- a/markdown/org/docs/designs/lumina/options/ease/es.md +++ b/markdown/org/docs/designs/lumina/options/ease/es.md @@ -4,16 +4,16 @@ title: "Ease" *** -Controls the amount of ease build into the pattern. Since these are leggings that are to be made of stretch fabric, -the ease is nagative. So the completed garment will be narower than the measurements would dictate. +Controls the amount of ease built into the pattern. Since these are leggings that are to be made of stretch fabric, +the ease is nagative. So the completed garment will be narrower than the measurements would dictate. -Getting the wease right for your type of fabric is essential for getting a good fit. If you make the ease +Getting the ease right for your type of fabric is essential for getting a good fit. If you make the ease too negative, the leggings will be too constricting, and limiting movement. If you don't make the ease negative enough, the leggings will not hug your legs and torso. The fabric should be stretched in all places, without being too tight. -With a positive ease, these leggings will tuirn into slightly loose fitting pants +With a positive ease, these leggings will turn into slightly loose fitting pants diff --git a/markdown/org/docs/designs/lumina/options/ease/fr.md b/markdown/org/docs/designs/lumina/options/ease/fr.md index 1cf4921212d..46458170021 100644 --- a/markdown/org/docs/designs/lumina/options/ease/fr.md +++ b/markdown/org/docs/designs/lumina/options/ease/fr.md @@ -4,16 +4,16 @@ title: "Ease" *** -Controls the amount of ease build into the pattern. Since these are leggings that are to be made of stretch fabric, -the ease is nagative. So the completed garment will be narower than the measurements would dictate. +Controls the amount of ease built into the pattern. Since these are leggings that are to be made of stretch fabric, +the ease is nagative. So the completed garment will be narrower than the measurements would dictate. -Getting the wease right for your type of fabric is essential for getting a good fit. If you make the ease +Getting the ease right for your type of fabric is essential for getting a good fit. If you make the ease too negative, the leggings will be too constricting, and limiting movement. If you don't make the ease negative enough, the leggings will not hug your legs and torso. The fabric should be stretched in all places, without being too tight. -With a positive ease, these leggings will tuirn into slightly loose fitting pants +With a positive ease, these leggings will turn into slightly loose fitting pants diff --git a/markdown/org/docs/designs/lumina/options/ease/nl.md b/markdown/org/docs/designs/lumina/options/ease/nl.md index 4ae9e35b387..46458170021 100644 --- a/markdown/org/docs/designs/lumina/options/ease/nl.md +++ b/markdown/org/docs/designs/lumina/options/ease/nl.md @@ -4,6 +4,16 @@ title: "Ease" *** -Controls the amount of ease build into the pattern. Since these are leggings that are to be made of stretch fabric, -the ease is nagative. So the completed garment will be narrower than the measurements would dictate. +Controls the amount of ease built into the pattern. Since these are leggings that are to be made of stretch fabric, +the ease is nagative. So the completed garment will be narrower than the measurements would dictate. + +Getting the ease right for your type of fabric is essential for getting a good fit. If you make the ease +too negative, the leggings will be too constricting, and limiting movement. If you don't make the ease +negative enough, the leggings will not hug your legs and torso. The fabric should be stretched in all +places, without being too tight. + + + +With a positive ease, these leggings will turn into slightly loose fitting pants + diff --git a/markdown/org/docs/designs/lumina/options/ease/uk.md b/markdown/org/docs/designs/lumina/options/ease/uk.md index 1cf4921212d..46458170021 100644 --- a/markdown/org/docs/designs/lumina/options/ease/uk.md +++ b/markdown/org/docs/designs/lumina/options/ease/uk.md @@ -4,16 +4,16 @@ title: "Ease" *** -Controls the amount of ease build into the pattern. Since these are leggings that are to be made of stretch fabric, -the ease is nagative. So the completed garment will be narower than the measurements would dictate. +Controls the amount of ease built into the pattern. Since these are leggings that are to be made of stretch fabric, +the ease is nagative. So the completed garment will be narrower than the measurements would dictate. -Getting the wease right for your type of fabric is essential for getting a good fit. If you make the ease +Getting the ease right for your type of fabric is essential for getting a good fit. If you make the ease too negative, the leggings will be too constricting, and limiting movement. If you don't make the ease negative enough, the leggings will not hug your legs and torso. The fabric should be stretched in all places, without being too tight. -With a positive ease, these leggings will tuirn into slightly loose fitting pants +With a positive ease, these leggings will turn into slightly loose fitting pants diff --git a/markdown/org/docs/designs/lumina/options/en.md b/markdown/org/docs/designs/lumina/options/en.md index 28b2581450d..7b6330f3b63 100644 --- a/markdown/org/docs/designs/lumina/options/en.md +++ b/markdown/org/docs/designs/lumina/options/en.md @@ -1,5 +1,5 @@ --- -title: "Lumira leggings: Design Options" +title: "Lumina leggings: Design Options" --- - + diff --git a/markdown/org/docs/designs/lumina/options/es.md b/markdown/org/docs/designs/lumina/options/es.md index 28b2581450d..7b6330f3b63 100644 --- a/markdown/org/docs/designs/lumina/options/es.md +++ b/markdown/org/docs/designs/lumina/options/es.md @@ -1,5 +1,5 @@ --- -title: "Lumira leggings: Design Options" +title: "Lumina leggings: Design Options" --- - + diff --git a/markdown/org/docs/designs/lumina/options/fr.md b/markdown/org/docs/designs/lumina/options/fr.md index 28b2581450d..7b6330f3b63 100644 --- a/markdown/org/docs/designs/lumina/options/fr.md +++ b/markdown/org/docs/designs/lumina/options/fr.md @@ -1,5 +1,5 @@ --- -title: "Lumira leggings: Design Options" +title: "Lumina leggings: Design Options" --- - + diff --git a/markdown/org/docs/designs/lumina/options/nl.md b/markdown/org/docs/designs/lumina/options/nl.md index 28b2581450d..7b6330f3b63 100644 --- a/markdown/org/docs/designs/lumina/options/nl.md +++ b/markdown/org/docs/designs/lumina/options/nl.md @@ -1,5 +1,5 @@ --- -title: "Lumira leggings: Design Options" +title: "Lumina leggings: Design Options" --- - + diff --git a/markdown/org/docs/designs/lumina/options/sidepanelsize/en.md b/markdown/org/docs/designs/lumina/options/sidepanelsize/en.md index 8b137891791..80e25f47b11 100644 --- a/markdown/org/docs/designs/lumina/options/sidepanelsize/en.md +++ b/markdown/org/docs/designs/lumina/options/sidepanelsize/en.md @@ -1 +1,11 @@ +--- +title: "Side panel side" +--- + +*** + +Controls the width of the side panel. This is a percentage of the waist. + + + diff --git a/markdown/org/docs/designs/lumina/options/uk.md b/markdown/org/docs/designs/lumina/options/uk.md index 28b2581450d..7b6330f3b63 100644 --- a/markdown/org/docs/designs/lumina/options/uk.md +++ b/markdown/org/docs/designs/lumina/options/uk.md @@ -1,5 +1,5 @@ --- -title: "Lumira leggings: Design Options" +title: "Lumina leggings: Design Options" --- - +