├── .github
├── CONTRIBUTING.md
├── ISSUE_TEMPLATE.md
└── PULL_REQUEST_TEMPLATE.md
├── .gitignore
├── .gitmodules
├── .travis.yml
├── CHANGELOG.md
├── CODE_OF_CONDUCT.md
├── LICENSE
├── README.md
├── apigen.neon
├── channels
└── Core
│ ├── Channel
│ └── Channel.php
│ └── Freesewing
│ ├── Freesewing.php
│ └── config.yml
├── composer.json
├── composer.lock
├── config.yml
├── freesewing
├── index.php
├── patterns
├── Beta
│ ├── BenjaminBowTie
│ │ ├── BenjaminBowTie.php
│ │ ├── config.yml
│ │ └── sampler
│ │ │ └── models.yml
│ ├── BentBodyBlock
│ │ ├── BentBodyBlock.php
│ │ ├── config.yml
│ │ └── sampler
│ │ │ └── models.yml
│ ├── CarlitaCoat
│ │ ├── CarlitaCoat.php
│ │ ├── config.yml
│ │ └── sampler
│ │ │ └── models.yml
│ ├── CarltonCoat
│ │ ├── CarltonCoat.php
│ │ ├── config.yml
│ │ └── sampler
│ │ │ └── models.yml
│ ├── FlorentFlatCap
│ │ ├── FlorentFlatCap.php
│ │ ├── config.yml
│ │ └── sampler
│ │ │ └── models.yml
│ ├── HueyHoodie
│ │ ├── HueyHoodie.php
│ │ ├── README.md
│ │ ├── config.yml
│ │ ├── sampler
│ │ │ └── models.yml
│ │ └── translations
│ │ │ ├── messages.de.yml
│ │ │ ├── messages.en.yml
│ │ │ ├── messages.fr.yml
│ │ │ └── messages.nl.yml
│ ├── JaegerJacket
│ │ ├── JaegerJacket.php
│ │ ├── config.yml
│ │ └── sampler
│ │ │ └── models.yml
│ ├── PenelopePencilSkirt
│ │ ├── PenelopePencilSkirt.php
│ │ ├── config.yml
│ │ └── sampler
│ │ │ └── models.yml
│ ├── SandySkirt
│ │ ├── SandySkirt.php
│ │ ├── config.yml
│ │ └── sampler
│ │ │ └── models.yml
│ └── ShinSwimTrunks
│ │ ├── ShinSwimTrunks.php
│ │ ├── config.yml
│ │ ├── sampler
│ │ └── models.yml
│ │ └── translations
│ │ └── messages.en.yml
├── Core
│ ├── AaronAshirt
│ │ ├── AaronAshirt.php
│ │ ├── config.yml
│ │ └── translations
│ │ │ ├── messages.de.yml
│ │ │ ├── messages.en.yml
│ │ │ ├── messages.fr.yml
│ │ │ └── messages.nl.yml
│ ├── BrianBodyBlock
│ │ ├── BrianBodyBlock.php
│ │ ├── config.yml
│ │ ├── sampler
│ │ │ └── models.yml
│ │ └── translations
│ │ │ ├── messages.en.yml
│ │ │ ├── messages.fr.yml
│ │ │ └── messages.nl.yml
│ ├── BruceBoxerBriefs
│ │ ├── BruceBoxerBriefs.php
│ │ ├── config.yml
│ │ ├── sampler
│ │ │ └── models.yml
│ │ └── translations
│ │ │ ├── messages.en.yml
│ │ │ └── messages.nl.yml
│ ├── CathrinCorset
│ │ ├── CathrinCorset.php
│ │ ├── config.yml
│ │ ├── sampler
│ │ │ └── models.yml
│ │ └── translations
│ │ │ ├── messages.en.yml
│ │ │ ├── messages.fr.yml
│ │ │ └── messages.nl.yml
│ ├── HugoHoodie
│ │ ├── HugoHoodie.php
│ │ ├── config.yml
│ │ ├── sampler
│ │ │ └── models.yml
│ │ └── translations
│ │ │ ├── messages.de.yml
│ │ │ ├── messages.en.yml
│ │ │ ├── messages.fr.yml
│ │ │ └── messages.nl.yml
│ ├── Pattern
│ │ ├── Pattern.php
│ │ └── translations
│ │ │ ├── messages.de.yml
│ │ │ ├── messages.en.yml
│ │ │ ├── messages.fr.yml
│ │ │ └── messages.nl.yml
│ ├── SimonShirt
│ │ ├── SimonShirt.php
│ │ ├── config.yml
│ │ └── sampler
│ │ │ └── models.yml
│ ├── SvenSweatshirt
│ │ ├── SvenSweatshirt.php
│ │ ├── config.yml
│ │ └── sampler
│ │ │ └── models.yml
│ ├── TamikoTop
│ │ ├── TamikoTop.php
│ │ ├── config.yml
│ │ └── sampler
│ │ │ └── models.yml
│ ├── TheoTrousers
│ │ ├── TheoTrousers.php
│ │ └── config.yml
│ ├── TheodoreTrousers
│ │ ├── TheodoreTrousers.php
│ │ ├── config.yml
│ │ └── sampler
│ │ │ └── models.yml
│ ├── TrayvonTie
│ │ ├── TrayvonTie.php
│ │ ├── config.yml
│ │ ├── sampler
│ │ │ └── models.yml
│ │ └── translations
│ │ │ ├── messages.en.yml
│ │ │ ├── messages.fr.yml
│ │ │ └── messages.nl.yml
│ └── WahidWaistcoat
│ │ ├── WahidWaistcoat.php
│ │ ├── config.yml
│ │ └── sampler
│ │ └── models.yml
├── Docs
│ ├── ClassDocs
│ │ ├── ClassDocs.php
│ │ ├── config.yml
│ │ └── sampler
│ │ │ └── models.yml
│ ├── DesignTutorial
│ │ ├── DesignTutorial.php
│ │ ├── config.yml
│ │ ├── sampler
│ │ │ └── models.yml
│ │ └── translations
│ │ │ ├── messages.en.yml
│ │ │ └── messages.nl.yml
│ └── NotationLegend
│ │ ├── NotationLegend.php
│ │ └── config.yml
├── Templates
│ └── PatternTemplate
│ │ ├── PatternTemplate.php
│ │ ├── config.yml
│ │ └── sampler
│ │ └── models.yml
└── Tests
│ └── TestPattern
│ ├── TestPattern.php
│ ├── config.yml
│ └── sampler
│ └── models.yml
├── phpunit.xml
├── scripts
├── deploy.sh
├── test.php
├── test.sh
├── testall.php
└── testall.sh
├── src
├── BezierToolbox
│ └── BezierToolbox.php
├── Boundary
│ └── Boundary.php
├── Context
│ └── Context.php
├── Coords
│ └── Coords.php
├── Dimension
│ └── Dimension.php
├── GrowingPacker
│ └── GrowingPacker.php
├── LayoutBlock
│ └── LayoutBlock.php
├── MeasurementsSampler
│ └── MeasurementsSampler.php
├── Model
│ └── Model.php
├── Note
│ └── Note.php
├── OptionsSampler
│ └── OptionsSampler.php
├── Packer
│ └── Packer.php
├── Part
│ └── Part.php
├── Path
│ └── Path.php
├── Point
│ └── Point.php
├── Polynomial
│ └── Polynomial.php
├── Request
│ └── Request.php
├── Response
│ └── Response.php
├── Sampler
│ └── Sampler.php
├── Services
│ ├── CompareService.php
│ ├── DraftService.php
│ ├── InfoService.php
│ ├── SampleService.php
│ └── Service.php
├── Stack
│ └── Stack.php
├── SvgAttributes
│ └── SvgAttributes.php
├── SvgBlock
│ └── SvgBlock.php
├── SvgComments
│ └── SvgComments.php
├── SvgCss
│ └── SvgCss.php
├── SvgDefs
│ └── SvgDefs.php
├── SvgDocument
│ └── SvgDocument.php
├── SvgInclude
│ └── SvgInclude.php
├── SvgRenderbot
│ └── SvgRenderbot.php
├── SvgScript
│ └── SvgScript.php
├── SvgSnippet
│ └── SvgSnippet.php
├── Text
│ └── Text.php
├── TextOnPath
│ └── TextOnPath.php
├── Transform
│ └── Transform.php
├── Utils
│ └── Utils.php
├── Vector
│ └── Vector.php
└── Yamlr
│ └── Yamlr.php
├── tests
├── channels
│ └── FreesewingTest.php
├── patterns
│ └── TestPatternTest.php
├── src
│ ├── BezierToolboxTest.php
│ ├── BoundaryTest.php
│ ├── CompareServiceTest.php
│ ├── ContextTest.php
│ ├── CoordsTest.php
│ ├── DimensionTest.php
│ ├── DraftServiceTest.php
│ ├── GrowningPackerTest.php
│ ├── InfoServiceTest.php
│ ├── LayoutBlockTest.php
│ ├── MeasurementsSamplerTest.php
│ ├── ModelTest.php
│ ├── NoteTest.php
│ ├── OptionsSamplerTest.php
│ ├── Part.offsetCode.Test.php
│ ├── PartTest.php
│ ├── PathTest.php
│ ├── PointTest.php
│ ├── PolynomialTest.php
│ ├── RequestTest.php
│ ├── ResponseTest.php
│ ├── SampleServiceTest.php
│ ├── SamplerTest.php
│ ├── StackTest.php
│ ├── SvgAttributesTest.php
│ ├── SvgCommentsTest.php
│ ├── SvgCssTest.php
│ ├── SvgDefsTest.php
│ ├── SvgDocumentTest.php
│ ├── SvgIncludeTest.php
│ ├── SvgRenderbotTest.php
│ ├── SvgScriptTest.php
│ ├── SvgSnippetTest.php
│ ├── TransformTest.php
│ ├── UtilsTest.php
│ ├── VectorTest.php
│ ├── YamlrTest.php
│ ├── assets
│ │ └── testFunctions.php
│ └── fixtures
│ │ ├── GrowingPacker.1.layout
│ │ ├── GrowingPacker.12.layout
│ │ ├── GrowingPacker.2.layout
│ │ ├── GrowingPacker.4.layout
│ │ ├── GrowingPacker.8.layout
│ │ ├── Part.cutOnFold.data
│ │ ├── Part.grainline.data
│ │ ├── Part.heightDimensions.data
│ │ ├── Part.linearDimensions.data
│ │ ├── Part.nearDimensions.data
│ │ ├── Part.newCurvedDimension.data
│ │ ├── Part.notch.data
│ │ ├── Part.note.data
│ │ ├── Part.offset.curveOffset.data
│ │ ├── Part.offset.curveOffsetCp1IsStart.data
│ │ ├── Part.offset.curveOffsetCp2IsEnd.data
│ │ ├── Part.offset.lineOffset.data
│ │ ├── Part.offset.lineOffsetClosedPath.data
│ │ ├── Part.offset.offsetCurveCurve.data
│ │ ├── Part.offset.offsetCurveLine.data
│ │ ├── Part.offset.offsetLineCurve.data
│ │ ├── Part.offset.offsetLineLine.data
│ │ ├── Part.title.default.data
│ │ ├── Part.title.extraSmall.data
│ │ ├── Part.title.horitzontalSmall.data
│ │ ├── Part.title.horizontal.data
│ │ ├── Part.title.horizontalSmall.data
│ │ ├── Part.title.vertical.data
│ │ ├── Part.title.verticalSmall.data
│ │ ├── Part.widthDimensions.data
│ │ ├── Sampler.parts.data
│ │ ├── SvgRenderbot.dimension.svg
│ │ ├── SvgRenderbot.include.svg
│ │ ├── SvgRenderbot.note.svg
│ │ ├── SvgRenderbot.path.svg
│ │ ├── SvgRenderbot.pathFromPart.svg
│ │ ├── SvgRenderbot.pattern.svg
│ │ ├── SvgRenderbot.snippet.svg
│ │ ├── SvgRenderbot.text.svg
│ │ ├── SvgRenderbot.textOnPath.svg
│ │ ├── SvgRenderbot.transform.svg
│ │ ├── Utils.debug.txt
│ │ ├── YamlrTest.correct.yml
│ │ └── YamlrTest.incorrect.yml
└── themes
│ ├── BasicTest.php
│ ├── DesignerTest.php
│ ├── DeveloperTest.php
│ ├── InfoTest.php
│ ├── PaperlessTest.php
│ └── fixtures
│ ├── Designer.themePatternBasic.data
│ ├── Info.infoHtml.data
│ ├── Info.patternInfoHtml.data
│ ├── Info.patternInfoJson.data
│ ├── Info.patternInfoOther.data
│ └── Info.patternInfoPhp.data
└── themes
└── Core
├── Basic
├── Basic.php
└── config.yml
├── BasicJson
├── BasicJson.php
└── config.yml
├── Compare
├── Compare.php
├── config.yml
└── templates
│ ├── footer-comments
│ ├── header-comments
│ ├── style.css
│ └── svg-attributes
├── Designer
├── Designer.php
├── config.yml
└── templates
│ ├── css
│ └── designer.css
│ ├── defs
│ └── designer
│ ├── js
│ └── designer.js
│ └── sass
│ └── designer.scss
├── Designerless
├── Designerless.php
└── config.yml
├── Developer
├── Developer.php
└── config.yml
├── Info
├── Info.php
└── templates
│ ├── footer-comments
│ ├── header-comments
│ ├── style.css
│ └── svg-attributes
├── Paperless
├── Paperless.php
├── config.yml
└── templates
│ ├── css
│ └── paperless.css
│ ├── defs
│ ├── grid.imperial
│ └── grid.metric
│ └── sass
│ ├── paperless.scss
│ └── variables.scss
├── PaperlessJson
├── PaperlessJson.php
├── config.yml
└── templates
│ ├── css
│ └── paperless.css
│ ├── defs
│ ├── grid.imperial
│ └── grid.metric
│ └── sass
│ ├── paperless.scss
│ └── variables.scss
├── Sampler
├── Sampler.php
├── config.yml
└── templates
│ ├── footer-comments
│ ├── header-comments
│ ├── style.css
│ └── svg-attributes
└── Theme
├── Theme.php
├── config.yml
├── templates
├── attributes
│ └── svg
├── comments
│ ├── footer
│ └── header
├── css
│ └── style.css
├── defs
│ ├── base
│ ├── buttonholes
│ ├── buttons
│ ├── logo
│ ├── scalebox
│ └── snaps
└── sass
│ ├── style.scss
│ └── variables.scss
└── translations
├── messages.de.yml
├── messages.en.yml
├── messages.fr.yml
└── messages.nl.yml
/.github/CONTRIBUTING.md:
--------------------------------------------------------------------------------
1 | Please see our contributing guidelines at [https://freesewing.org/contribute](https://freesewing.org/contribute)
2 |
--------------------------------------------------------------------------------
/.github/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | While I appreciate you are reporting an issue, here are some things to keep in mind:
2 |
3 | **File your issue in the right place**
4 |
5 | - Problems with patterns are for the [core](https://github.com/freesewing/core/issues/new) repository
6 | - Website issues are for the [site](https://github.com/freesewing/site/issues/new) repository
7 | - Problems with the data backend are for the [data](https://github.com/freesewing/data/issues/new) repository
8 |
9 | **Provide relevant data**
10 |
11 | This depends on what you're reporting, but useful info is:
12 |
13 | - Your username on the site
14 | - The hash of your draft
15 | - Any error message you may have received
16 |
17 | **Give it a good title**
18 |
19 | Be descriptive, because people who skim this list are more likely to turn
20 | their attention to your issue if you give it a good title.
21 |
--------------------------------------------------------------------------------
/.github/PULL_REQUEST_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | Thank you for this pull request. Please use this field to briefly explain the changes you've made.
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | vendor/
2 | print/
3 | .php_cs.cache
4 | .sass_cache/
5 | coverage
6 | .buildpath
7 | .externalToolBuilders/
8 | .metadata/
9 | .project
10 | .settings/
11 | .idea/
12 | scripts/test.log
13 | .gitmodules
14 | tags
15 |
--------------------------------------------------------------------------------
/.gitmodules:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/joostdecock/core/e313c2cd078745812995ae63bfe1a64d0b8632c3/.gitmodules
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | language: php
2 | php:
3 | - '5.6'
4 | - '7.0'
5 | - '7.1'
6 | addons:
7 | apt:
8 | packages:
9 | - sshpass
10 | install:
11 | - composer install --no-interaction --no-dev
12 | - composer dump-autoload -o
13 | env:
14 | global:
15 | - DEPLOY_HOST=lin.freesewing.org
16 | - DEPLOY_USER=travis
17 | - DEPLOY_PATH=/fs/deploy/core/
18 | - secure: iXJjf3hixPU+AmWdYqRF8iT1/jQf4PP0smyibRhLjG3PoiN9hyHMoH2T9FyXX8Gd49HcEW275TERwb+MEKA0omPJtnSE4SikfwW1hR8s4Ulki1WSkvH+yGlFggZhUlTht9pSxu4qASUJx9J+IBF4A2AgeZPHD8YWkHf4OHn3+DhlzBTsI49g3ZT+h8jXJAqBSMwNDbELFI4UMllVub9QrdnCCofBJlZ1XkFWyF59z0RNKO9D9NRu39nMFzpLqKQGYCf/StNBJgut8Myapy3zupn6WXDgOLyPZ7EJMuHwRJmeMWg95oADhOWWWhWyH/chxoeHZ954AIxHyiNOQo9Pyy7QgcLPdOicZgNvvrAnLo/RAiLMcndTNUVFPPmLUR4BquzNFyJE7FLQEkcoUMDxLk5112Nreunh6Hi1GQWtkM0PoMOJjhAb4x8s7BsZFRC2dv52vqum6EcoqeEUPETxY6JCw1ZMW4NyOp3wk8KvXdpNKOisT2l9E5b8khexycxWPk2ErwiW/LqAIfhlRi0/G9yKMv+S+b4OTyCDbwsEx2dG+mZcfe4oj9gpuYKmWhMDqRUR0jdHIzIH5PF6aAzNjDY2afbqVCUfFM7IIpjbr8573c5yQ9JIBYB1rCGudYjIIVOJN6oMB9Tt+ancGt0Vz9AiFgH+v79YMLUiE5du+hc=
19 | script:
20 | - phpunit
21 | - "./scripts/test.sh"
22 | deploy:
23 | provider: script
24 | script: scripts/deploy.sh
25 | skip_cleanup: true
26 | on:
27 | all_branches: true
28 |
--------------------------------------------------------------------------------
/CODE_OF_CONDUCT.md:
--------------------------------------------------------------------------------
1 | Please see our code of conduct at [https://freesewing.org/about/code-of-conduct](https://freesewing.org/about/code-of-conduct)
2 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # DEPRECATED: Please see freesewing/freesewing instead
2 |
3 | FreeSewing v2 and up are maintained in the [freesewing](https://github.com/freesewing/freesewing) repository.
4 |
5 |
6 |
7 | [](https://travis-ci.org/freesewing/core)
8 |
9 | # Freesewing core
10 | [Freesewing](https://freesewing.org/) is an online platform to draft sewing patterns based on your measurements.
11 |
12 | > This is the core repository, which holds the platform and the sewing patterns I maintain.
13 |
14 | For all info on what freesewing does/is/provides, please check [the about page](https://freesewing.org/about/) or [documentation](https://freesewing.org/docs/).
15 |
16 | ## System Requirements
17 | * PHP 5.6 or newer
18 | * composer
19 |
20 | ## Installation
21 |
22 | Full install instructions are available at [freesewing.org/docs/core/install](https://freesewing.org/docs/core/install)
23 | but here's the gist of it:
24 |
25 | > ##### A note about installing on PHP 5.6
26 | >
27 | > Core uses a Developer theme that requires PHP 7.0 or newer. However, that theme is only
28 | > useful for hacking core. So if you just want to run this and maybe design some patterns
29 | > install without the dev requirements.
30 | >
31 | > In other words, to install on PHP 5.6, pass `--no-dev` to composer
32 |
33 | ### From packagist
34 | ```
35 | composer create-project freesewing/core
36 | cd core
37 | composer dump-autoload -o
38 | ```
39 |
40 | ### From GitHub
41 | ```
42 | git clone git@github.com:freesewing/core.git
43 | cd core
44 | composer install
45 | composer dump-autoload -o
46 | ```
47 |
48 | ## License
49 | This code is licensed [GPL-3](https://www.gnu.org/licenses/gpl-3.0.en.html),
50 | the pattern drafts, documentation, and other content is licensed [CC-BY](https://creativecommons.org/licenses/by/4.0/).
51 |
52 | ## Contribute
53 |
54 | Your pull request are welcome here.
55 |
56 | If you're interested in contributing, I'd love your help.
57 | That's exactly why I made this thing open source in the first place.
58 |
59 | Read [freesewing.org/contribute](https://freesewing.org/contribute) to get started.
60 | If you have any questions, the best place to ask is [the freesewing community on Gitter](https://gitter.im/freesewing/freesewing).
61 |
--------------------------------------------------------------------------------
/apigen.neon:
--------------------------------------------------------------------------------
1 | # Dirs or files documentation is generated for.
2 | source:
3 | - src/
4 | - patterns/Core/Pattern/
5 | - themes/
6 | - channels/
7 |
8 | # Target dir for documentation.
9 | destination: ../site/apigen/core
10 |
11 | # Access levels of included method and properties. (default: ["public","protected"]) (multiple values allowed)
12 | accessLevels:
13 | - public
14 | - private
15 | - protected
16 |
17 | # Base url used for sitemap (useful for public doc).
18 | baseUrl: https://freesewing.org/apigen/core/
19 |
20 | # Turn on debug mode.
21 | debug: false
22 |
23 | # Generate documentation for elements marked as @deprecated
24 | deprecated: false
25 |
26 | # Add link to ZIP archive of documentation.
27 | download: true
28 |
29 | # Scanned file extensions. (default: ["php"]) (multiple values allowed)
30 | extensions:
31 | - php
32 |
33 | # Directories and files matching this mask will not be parsed (e.g. */tests/*). (multiple values allowed)
34 | exclude:
35 | - vendor/
36 |
37 | # Charset of scanned files. (multiple values allowed)
38 | charset:
39 | - utf-8
40 |
41 | # Elements with this name prefix will be first in tree.
42 | # main:
43 |
44 | # Include elements marked as @internal.
45 | internal: true
46 |
47 | # Generate documentation for PHP internal classes.
48 | php: false
49 |
50 | # Title of generated documentation.
51 | title: Freesewing core
52 |
53 | # Generate documentation for elements marked as @todo.
54 | todo: true
55 |
56 | # Generate tree view of classes, interfaces, traits and exceptions.
57 | tree: true
58 |
59 |
--------------------------------------------------------------------------------
/channels/Core/Freesewing/config.yml:
--------------------------------------------------------------------------------
1 | headers:
2 | 'Access-Control-Allow-Origin': '*'
3 | 'X-Generated-By': 'freesewing'
4 |
--------------------------------------------------------------------------------
/composer.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "freesewing/core",
3 | "description": "Freesewing is an open source platform for made-to-measure sewing patterns",
4 | "license": "GPL-3.0-or-later",
5 | "homepage": "https://freesewing.org/",
6 | "authors": [
7 | {
8 | "name": "Joost De Cock",
9 | "email": "joost@decock.org",
10 | "homepage": "http://joost.decock.org/",
11 | "role": "Developer"
12 | }],
13 | "require": {
14 | "symfony/translation": "3.1.*",
15 | "symfony/yaml": "3.1.*",
16 | "freesewing/bail": "^0.2.0",
17 | "kint-php/kint": "^2.2"
18 | },
19 | "require-dev": {
20 | "phpunit/phpunit": "5.5.*"
21 | },
22 | "autoload": {
23 | "psr-4": {
24 | "Freesewing\\": "src/",
25 | "Freesewing\\Channels\\": "channels/",
26 | "Freesewing\\Themes\\": "themes/",
27 | "Freesewing\\Patterns\\": "patterns/"
28 | }
29 | },
30 | "scripts": {
31 | "test": "phpunit"
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/config.yml:
--------------------------------------------------------------------------------
1 | version: 1.11.1
2 | defaults:
3 | service: draft
4 | channel: Freesewing
5 | draftTheme: Basic
6 | sampleTheme: Sampler
7 | compareTheme: Compare
8 | infoTheme: Info
9 | pattern: TestPattern
10 | locale: en
11 |
12 | services:
13 | - info
14 | - draft
15 | - sample
16 | - compare
17 |
18 | patternNamespaces:
19 | - Core
20 | - Beta
21 | - Docs
22 | - Templates
23 | - Tests
24 |
25 | themeNamespaces:
26 | - Core
27 |
28 | channelNamespaces:
29 | - Core
30 |
31 | integrations:
32 | bail:
33 | bail_enabled: false
34 | api: 'https://data.freesewing.org/error'
35 | origin: 'core.freesewing.org'
36 |
--------------------------------------------------------------------------------
/freesewing:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | if [ $# -eq 0 ]
4 | then
5 | bold=$(tput bold)
6 | normal=$(tput sgr0)
7 | echo "${bold}USAGE:"
8 | echo "${normal} freesewing [key=value ...]"
9 | echo ""
10 | echo "${bold}EXAMPLES:"
11 | echo "${bold} Show this help:"
12 | echo "${normal} freesewing"
13 | echo ""
14 | echo "${bold} Contact the info service, return data in text format:"
15 | echo "${normal} freesewing service=info format=text"
16 | echo ""
17 | echo "${bold} Get info on the SimonShirt pattern:"
18 | echo "${normal} freesewing service=info format=text pattern=SimonShirt"
19 | echo ""
20 | echo "${bold} Draft the WahidWaistcoat pattern with default measurements and options:"
21 | echo "${normal} freesewing service=draft pattern=WahidWaistcoat"
22 | echo ""
23 | echo "${bold}SEE ALSO:"
24 | echo "${normal} https://freesewing.org/docs/core/cli"
25 | else
26 | for var in "$@"
27 | do
28 | input="${input} $var"
29 | done
30 | php index.php $input
31 | fi
32 |
--------------------------------------------------------------------------------
/index.php:
--------------------------------------------------------------------------------
1 |
8 | * @copyright 2016 Joost De Cock
9 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
10 | * @see https://github.com/joostdecock/freesewing Code repository on GitHub
11 | */
12 |
13 | // Sensible error settings
14 | ini_set("display_errors", 0);
15 | ini_set("log_errors", 1);
16 |
17 | require __DIR__.'/vendor/autoload.php';
18 | $context = new \Freesewing\Context();
19 | $context->setRequest(new \Freesewing\Request($_REQUEST));
20 | $context->configure();
21 |
22 |
23 | // Use bail for error handling?
24 | use Freesewing\Bail\ErrorHandler;
25 | if($context->getConfig()['integrations']['bail']['bail_enabled'] === true) {
26 | ErrorHandler::init(
27 | $context->getConfig()['integrations']['bail']['api'],
28 | $context->getConfig()['integrations']['bail']['origin']
29 | );
30 | }
31 |
32 | $context->runService();
33 |
--------------------------------------------------------------------------------
/patterns/Beta/BenjaminBowTie/config.yml:
--------------------------------------------------------------------------------
1 | info:
2 | name: "Benjamin Bow Tie"
3 | description: "Benjamin is a bow tie pattern with four different shape options."
4 | handle: "benjamin"
5 | level: 4
6 | tags:
7 | - accessories
8 |
9 | seamAllowance:
10 | metric: 0.6
11 | imperial: 0.25
12 |
13 | languages:
14 | en: "English"
15 |
16 | parts:
17 | bowTie1: "Bow Tie knot"
18 | bowTie2: "Bow Tie knot"
19 | bowTie3: "Bow Tie knot"
20 | collarBand: "Collar band"
21 |
22 | measurements:
23 | neckCircumference: 394
24 |
25 | options:
26 | # Style group
27 | tipWidth:
28 | title: "Tip width"
29 | description: "The width of the wings of the bow tie at the tip."
30 | group: "style"
31 | type: measure
32 | min: 24
33 | max: 80
34 | default: 65
35 | dependsOn: bowStyle
36 | onlyOn: [diamond,buterfly,widesquare]
37 | knotWidth:
38 | title: "Knot width"
39 | description: "The width of the tie at the knot/middle."
40 | group: "style"
41 | type: measure
42 | min: 24
43 | max: 40
44 | default: 30
45 | bowLength:
46 | title: "Bow length"
47 | description: "The length of the wings of the bow tie."
48 | group: "style"
49 | type: measure
50 | min: 100
51 | max: 140
52 | default: 120
53 | bowStyle:
54 | title: "Bow style"
55 | description: "The style of the bow."
56 | group: "style"
57 | type: "chooseOne"
58 | options:
59 | diamond: "Diamond"
60 | butterfly: "Butterfly"
61 | square: "Square"
62 | widesquare: "Wide Square"
63 | default: "diamond"
64 | endStyle:
65 | title: "End style"
66 | description: "The style of the end of the tie."
67 | group: "style"
68 | type: "chooseOne"
69 | options:
70 | straight: "Straight end"
71 | pointed: "Pointed end"
72 | rounded: "Rounded end"
73 | default: "straight"
74 |
75 | # Fit group
76 | collarEase:
77 | title: "Collar ease"
78 | description: "The amount of ease around your neck."
79 | group: "ease"
80 | type: "measure"
81 | min: 0
82 | max: 40
83 | default: 15
84 | adjustmentRibbon:
85 | title: "Adjustment Ribbon"
86 | description: "Add a ribbon to make the tie adjustable."
87 | group: "sewing"
88 | type: "chooseOne"
89 | options:
90 | 0: "Do not include ribbon"
91 | 1: "Include ribbon"
92 | default: 0
93 |
--------------------------------------------------------------------------------
/patterns/Beta/BenjaminBowTie/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: maleStandardUsSizes
3 |
4 | groups:
5 | maleStandardUsSizes:
6 | - usSize34
7 | - usSize36
8 | - usSize38
9 | - usSize40
10 | - usSize42
11 | - usSize44
12 |
13 | measurements:
14 | neckCircumference:
15 | usSize34: 366
16 | usSize36: 378
17 | usSize38: 391
18 | usSize40: 404
19 | usSize42: 416
20 | usSize44: 429
21 |
--------------------------------------------------------------------------------
/patterns/Beta/BentBodyBlock/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: maleStandardUsSizes
3 | groups:
4 | realMen:
5 | - joost
6 | maleStandardUsSizes:
7 | - usSize34
8 | - usSize36
9 | - usSize38
10 | - usSize40
11 | - usSize42
12 | - usSize44
13 | measurements:
14 | shoulderToElbow:
15 | joost : 340
16 | usSize34: 330
17 | usSize36: 340
18 | usSize38: 350
19 | usSize40: 360
20 | usSize42: 370
21 | usSize44: 380
22 | ukSize10: 330
23 | ukSize12: 335
24 | ukSize14: 340
25 | ukSize16: 345
26 |
27 |
--------------------------------------------------------------------------------
/patterns/Beta/CarlitaCoat/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: ukFemaleSizes
3 | groups:
4 | ukFemaleSizes:
5 | - ukSize10
6 | - ukSize12
7 | - ukSize14
8 | - ukSize16
9 | measurements:
10 | highBust:
11 | ukSize10: 774
12 | ukSize12: 810
13 | ukSize14: 846
14 | ukSize16: 882
15 | bustSpan:
16 | ukSize10: 178
17 | ukSize12: 190
18 | ukSize14: 202
19 | ukSize16: 214
20 | highPointShoulderToBust:
21 | ukSize10: 265
22 | ukSize12: 275
23 | ukSize14: 285
24 | ukSize16: 295
25 |
26 |
--------------------------------------------------------------------------------
/patterns/Beta/CarltonCoat/sampler/models.yml:
--------------------------------------------------------------------------------
1 | measurements:
2 | naturalWaist:
3 | joost : 885
4 | usSize34: 697
5 | usSize36: 755
6 | usSize38: 813
7 | usSize40: 871
8 | usSize42: 929
9 | usSize44: 987
10 | ukSize10: 610
11 | ukSize12: 610
12 | ukSize14: 610
13 | ukSize16: 610
14 | seatCircumference:
15 | joost : 950
16 | usSize34: 920
17 | usSize36: 955
18 | usSize38: 990
19 | usSize40: 1025
20 | usSize42: 1060
21 | usSize44: 1095
22 | ukSize10: 870
23 | ukSize12: 920
24 | ukSize14: 970
25 | ukSize16: 1020
26 | naturalWaistToFloor:
27 | joost : 1060
28 | usSize34: 940
29 | usSize36: 960
30 | usSize38: 980
31 | usSize40: 1000
32 | usSize42: 1020
33 | usSize44: 1040
34 | ukSize10: 975
35 | ukSize12: 990
36 | ukSize14: 1005
37 | ukSize16: 1020
38 | naturalWaistToSeat:
39 | joost : 230
40 | usSize34: 160
41 | usSize36: 170
42 | usSize38: 180
43 | usSize40: 190
44 | usSize42: 200
45 | usSize44: 210
46 | ukSize10: 217
47 | ukSize12: 220
48 | ukSize14: 223
49 | ukSize16: 226
50 |
51 |
--------------------------------------------------------------------------------
/patterns/Beta/FlorentFlatCap/config.yml:
--------------------------------------------------------------------------------
1 | info:
2 | name: "Florent Flat Cap"
3 | description: "Florent is a flat cap, a rounded cap with a small stiff brim in front."
4 | handle: "florent"
5 | level: 4
6 | tags:
7 | - menswear
8 | - womenswear
9 | - hats
10 | - accessories
11 |
12 | parts:
13 | top: "Cap Top"
14 | side: "Cap Side"
15 | brimBottom: "Cap Brim Bottom"
16 | brimTop: "Cap Brim Top"
17 | brimPlastic: "Cap Brim Interfacing"
18 |
19 | languages:
20 | en: "English"
21 |
22 | measurements:
23 | headCircumference: 600
24 |
25 | options:
26 | headEase:
27 | group: "fit"
28 | title: "Head ease"
29 | description: "The amount of ease to fit the cap on your head."
30 | type: "measure"
31 | min: 0
32 | max: 25
33 | default: 10
34 |
--------------------------------------------------------------------------------
/patterns/Beta/FlorentFlatCap/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: standardSizes
3 | groups:
4 | realMen:
5 | - quentin
6 | standardSizes:
7 | - small
8 | - medium
9 | - large
10 | - xlarge
11 | - xxlarge
12 |
13 | measurements:
14 | headCircumference:
15 | quentin: 605
16 | small: 545
17 | medium: 563
18 | large: 582
19 | xlarge: 600
20 | xxlarge: 625
21 |
22 | options:
23 | brimLength:
24 | quentin: 0
25 | small: 0
26 | medium: 0
27 | large: 0
28 | xlarge: 0
29 | xxlarge: 0
--------------------------------------------------------------------------------
/patterns/Beta/HueyHoodie/README.md:
--------------------------------------------------------------------------------
1 | # HueyHoodie
2 | A zip-up hoodie pattern.
3 |
4 | This should make its way into freesewing core one day.
5 | But for now, I'm just working on it here.
6 |
7 |
--------------------------------------------------------------------------------
/patterns/Beta/HueyHoodie/sampler/models.yml:
--------------------------------------------------------------------------------
1 | measurements:
2 | headCircumference:
3 | joost : 590
4 | usSize34: 564
5 | usSize36: 567
6 | usSize38: 570
7 | usSize40: 573
8 | usSize42: 576
9 | usSize44: 579
10 |
--------------------------------------------------------------------------------
/patterns/Beta/HueyHoodie/translations/messages.de.yml:
--------------------------------------------------------------------------------
1 | "Pouch": "Tasche"
2 | "Hood": "Kapuze"
3 |
--------------------------------------------------------------------------------
/patterns/Beta/HueyHoodie/translations/messages.en.yml:
--------------------------------------------------------------------------------
1 | "Pouch": "Pouch"
2 | "Hood": "Hood"
3 |
--------------------------------------------------------------------------------
/patterns/Beta/HueyHoodie/translations/messages.fr.yml:
--------------------------------------------------------------------------------
1 | "Pouch": "Poche"
2 | "Hood": "Capuchon"
3 |
--------------------------------------------------------------------------------
/patterns/Beta/HueyHoodie/translations/messages.nl.yml:
--------------------------------------------------------------------------------
1 | "Pouch": "Zak"
2 | "Hood": "Kap"
3 |
--------------------------------------------------------------------------------
/patterns/Beta/JaegerJacket/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: maleStandardUsSizes
3 | groups:
4 | realMen:
5 | - joost
6 | maleStandardUsSizes:
7 | - usSize34
8 | - usSize36
9 | - usSize38
10 | - usSize40
11 | - usSize42
12 | - usSize44
13 | measurements:
14 |
15 | naturalWaist:
16 | joost : 885
17 | usSize34: 697
18 | usSize36: 755
19 | usSize38: 813
20 | usSize40: 871
21 | usSize42: 929
22 | usSize44: 987
23 |
--------------------------------------------------------------------------------
/patterns/Beta/SandySkirt/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: ukFemaleSizes
3 | groups:
4 | ukFemaleSizes:
5 | - ukSize10
6 | - ukSize12
7 | - ukSize14
8 | - ukSize16
9 | measurements:
10 | naturalWaistToHip:
11 | ukSize10: 130
12 | ukSize12: 135
13 | ukSize14: 140
14 | ukSize16: 145
15 | hipsCircumference:
16 | ukSize10: 935
17 | ukSize12: 985
18 | ukSize14: 1035
19 | ukSize16: 1085
20 | naturalWaist:
21 | ukSize10: 700
22 | ukSize12: 750
23 | ukSize14: 800
24 | ukSize16: 850
25 |
26 |
--------------------------------------------------------------------------------
/patterns/Beta/ShinSwimTrunks/config.yml:
--------------------------------------------------------------------------------
1 | info:
2 | name: "Shin Swim Trunks"
3 | description: "Shin is a close-fitting swim trunk pattern for men."
4 | handle: "shin"
5 | level: 4
6 | tags:
7 | - accessories
8 | - sportswear
9 |
10 | parts:
11 | front: "Front"
12 | back: "Back"
13 | waistband: "Waistband"
14 |
15 | languages:
16 | en: English
17 |
18 | measurements:
19 | hipsCircumference: 970
20 | upperLegCircumference: 600
21 | hipsToUpperLeg: 220
22 |
23 | options:
24 | elasticWidth:
25 | title: "Elastic width"
26 | description: "Width of the elastic band you intend to use."
27 | group: "fit"
28 | type: "measure"
29 | min: 15
30 | max: 60
31 | default: 35
32 | stretch:
33 | title: "Stretch"
34 | description: "The amount of negative ease."
35 | group: "fit"
36 | type: "percent"
37 | min: 10
38 | max: 30
39 | default: 20
40 | bulge:
41 | title: "Bulge"
42 | description: "Create some extra room in the front."
43 | group: "fit"
44 | type: "percent"
45 | min: 0
46 | max: 5
47 | default: 2.5
48 | legReduction:
49 | title: "Leg reduction"
50 | description: "Further increases negative ease at the legs to avoid gaping."
51 | group: "fit"
52 | type: "percent"
53 | min: 0
54 | max: 10
55 | default: 5
56 | legBonus:
57 | title: "Leg bonus"
58 | description: "Increases the length of the legs."
59 | group: "style"
60 | type: "percent"
61 | min: 0
62 | max: 50
63 | default: 0
64 | rise:
65 | title: "Rise"
66 | description: "How much to raise the trunks above the default height."
67 | group: "style"
68 | type: "percent"
69 | min: 0
70 | max: 25
71 | default: 0
72 | backRise:
73 | title: "Back rise"
74 | description: "How much to raise the trunks extra at the back."
75 | group: "style"
76 | type: "percent"
77 | min: 0
78 | max: 10
79 | default: 5
80 |
--------------------------------------------------------------------------------
/patterns/Beta/ShinSwimTrunks/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: maleStandardUsSizes
3 | groups:
4 | realMen:
5 | - joost
6 | maleStandardUsSizes:
7 | - usSize34
8 | - usSize36
9 | - usSize38
10 | - usSize40
11 | - usSize42
12 | - usSize44
13 | measurements:
14 | hipsCircumference:
15 | joost : 960
16 | usSize34: 722
17 | usSize36: 780
18 | usSize38: 838
19 | usSize40: 896
20 | usSize42: 954
21 | usSize44: 1012
22 | upperLegCircumference:
23 | joost : 600
24 | usSize34: 520
25 | usSize36: 540
26 | usSize38: 560
27 | usSize40: 580
28 | usSize42: 600
29 | usSize44: 620
30 | hipsToUpperLeg:
31 | joost : 220
32 | usSize34: 180
33 | usSize36: 190
34 | usSize38: 200
35 | usSize40: 210
36 | usSize42: 220
37 | usSize44: 230
38 |
--------------------------------------------------------------------------------
/patterns/Beta/ShinSwimTrunks/translations/messages.en.yml:
--------------------------------------------------------------------------------
1 | "front": "Front"
2 | "back": "Back"
3 | "waistband": "Waistband"
4 |
--------------------------------------------------------------------------------
/patterns/Core/AaronAshirt/translations/messages.de.yml:
--------------------------------------------------------------------------------
1 | "Cut one strip to finish the neck opening": "Einen Streifen für die Halsöffnung zuschneiden"
2 | "Cut two strips to finish the armholes": "Zwei Streifen für die Armöffnungen zuschneiden"
3 |
--------------------------------------------------------------------------------
/patterns/Core/AaronAshirt/translations/messages.en.yml:
--------------------------------------------------------------------------------
1 | "Cut two strips to finish the armholes": "Cut two strips to finish the armholes"
2 | "Cut one strip to finish the neck opening": "Cut one strip to finish the neck opening"
3 |
--------------------------------------------------------------------------------
/patterns/Core/AaronAshirt/translations/messages.fr.yml:
--------------------------------------------------------------------------------
1 | "Cut two strips to finish the armholes": "Couper deux bandes pour finir les emmanchures"
2 | "Cut one strip to finish the neck opening": "Couper une bande pour finir l’encolure"
3 |
--------------------------------------------------------------------------------
/patterns/Core/AaronAshirt/translations/messages.nl.yml:
--------------------------------------------------------------------------------
1 | "Cut one strip to finish the neck opening": "Knip 2 repels uit om de halsuitsnijding af te werken"
2 | "Cut two strips to finish the armholes": "Knip 2 repels uit om de armsgaten af te werken"
3 |
--------------------------------------------------------------------------------
/patterns/Core/BrianBodyBlock/translations/messages.en.yml:
--------------------------------------------------------------------------------
1 | 'Back block': 'Back block'
2 | 'Front block': 'Front block'
3 | 'Sleeve block': 'Sleeve block'
4 |
--------------------------------------------------------------------------------
/patterns/Core/BrianBodyBlock/translations/messages.fr.yml:
--------------------------------------------------------------------------------
1 | 'Back block': 'Bloc du dos'
2 | 'Front block': 'Bloc du devant'
3 | 'Sleeve block': 'Bloc de la manche'
4 |
--------------------------------------------------------------------------------
/patterns/Core/BrianBodyBlock/translations/messages.nl.yml:
--------------------------------------------------------------------------------
1 | 'Back block': 'Rug blok'
2 | 'Front block': 'Voorzijde blok'
3 | 'Sleeve block': 'Mouw blok'
4 |
--------------------------------------------------------------------------------
/patterns/Core/BruceBoxerBriefs/config.yml:
--------------------------------------------------------------------------------
1 | info:
2 | name: "Bruce Boxer Briefs"
3 | description: "Bruce are comfortable yet stylish boxer briefs."
4 | handle: "bruce"
5 | level: 4
6 | tags:
7 | - menswear
8 | - underwear
9 | - bottom
10 |
11 | parts:
12 | block: ".Block"
13 | front: "Front"
14 | back: "Back"
15 | side: "Side"
16 | inset: "Inset"
17 |
18 | languages:
19 | en: English
20 | nl: Nederlands
21 |
22 | measurements:
23 | hipsCircumference: 985
24 | upperLegCircumference: 630
25 | hipsToUpperLeg: 220
26 |
27 | options:
28 | # fit group
29 | elasticWidth:
30 | title: "Elastic width"
31 | description: "Width of the elastic band you intend to use."
32 | group: "fit"
33 | type: "measure"
34 | min: 10
35 | max: 70
36 | default: 35
37 | bulge:
38 | title: "Bulge"
39 | description: "Increase angle to create more room in the front pouch."
40 | group: "fit"
41 | type: "angle"
42 | min: 0
43 | max: 40
44 | default: 20
45 | legBonus:
46 | title: "Leg length bonus"
47 | description: "Extra length to add to the legs."
48 | group: "fit"
49 | type: "measure"
50 | min: 0
51 | max: 70
52 | default: 0
53 | rise:
54 | title: "Rise"
55 | description: "Amount to raise the waist. A negative value will lower it."
56 | group: "fit"
57 | type: "measure"
58 | min: -30
59 | max: 100
60 | default: 35
61 |
62 | # advanced group
63 | stretch:
64 | title: "Stretch"
65 | description: "The amount of negative ease."
66 | group: "advanced"
67 | type: "percent"
68 | min: 4
69 | max: 24
70 | default: 14
71 | legStretch:
72 | title: "Leg stretch"
73 | description: "For best results, you want to fit your legs a but more snugly — say no to gaping."
74 | group: "advanced"
75 | type: "percent"
76 | min: 25
77 | max: 45
78 | default: 40
79 | backRise:
80 | title: "Back rise"
81 | description: "Percentage by which the waist will be raised at the back."
82 | group: "advanced"
83 | type: "percent"
84 | min: 0
85 | max: 5
86 | default: 2.5
87 |
--------------------------------------------------------------------------------
/patterns/Core/BruceBoxerBriefs/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: maleStandardUsSizes
3 | groups:
4 | realMen:
5 | - joost
6 | maleStandardUsSizes:
7 | - usSize34
8 | - usSize36
9 | - usSize38
10 | - usSize40
11 | - usSize42
12 | - usSize44
13 | measurements:
14 | hipsCircumference:
15 | joost : 960
16 | usSize34: 722
17 | usSize36: 780
18 | usSize38: 838
19 | usSize40: 896
20 | usSize42: 954
21 | usSize44: 1012
22 | upperLegCircumference:
23 | joost : 600
24 | usSize34: 520
25 | usSize36: 540
26 | usSize38: 560
27 | usSize40: 580
28 | usSize42: 600
29 | usSize44: 620
30 | hipsToUpperLeg:
31 | joost : 220
32 | usSize34: 180
33 | usSize36: 190
34 | usSize38: 200
35 | usSize40: 210
36 | usSize42: 220
37 | usSize44: 230
38 |
--------------------------------------------------------------------------------
/patterns/Core/BruceBoxerBriefs/translations/messages.en.yml:
--------------------------------------------------------------------------------
1 | "Inset": "Inset"
2 | "Front side": "Front side"
3 | "Back side": "Back side"
4 |
--------------------------------------------------------------------------------
/patterns/Core/BruceBoxerBriefs/translations/messages.nl.yml:
--------------------------------------------------------------------------------
1 | "Inset": "Inzet"
2 | "Front side": "Voorzijde"
3 | "Back side": "Achterzijde"
4 |
5 |
--------------------------------------------------------------------------------
/patterns/Core/CathrinCorset/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: realWomen
3 | groups:
4 | realWomen:
5 | - cathrin
6 | - sorcha
7 | measurements:
8 | underBust:
9 | cathrin: 720
10 | sorcha : 730
11 | naturalWaist:
12 | cathrin: 640
13 | sorcha : 840
14 | hipsCircumference:
15 | cathrin: 800
16 | sorcha : 1000
17 | naturalWaistToUnderbust:
18 | cathrin: 100
19 | sorcha : 90
20 | naturalWaistToHip:
21 | cathrin: 160
22 | sorcha : 200
23 |
--------------------------------------------------------------------------------
/patterns/Core/CathrinCorset/translations/messages.en.yml:
--------------------------------------------------------------------------------
1 | "Panel": "Panel"
2 |
--------------------------------------------------------------------------------
/patterns/Core/CathrinCorset/translations/messages.fr.yml:
--------------------------------------------------------------------------------
1 | "Panel": "Panneau"
2 |
--------------------------------------------------------------------------------
/patterns/Core/CathrinCorset/translations/messages.nl.yml:
--------------------------------------------------------------------------------
1 | "Panel": "Paneel"
2 |
--------------------------------------------------------------------------------
/patterns/Core/HugoHoodie/sampler/models.yml:
--------------------------------------------------------------------------------
1 | measurements:
2 | headCircumference:
3 | joost : 590
4 | usSize34: 564
5 | usSize36: 567
6 | usSize38: 570
7 | usSize40: 573
8 | usSize42: 576
9 | usSize44: 579
10 |
--------------------------------------------------------------------------------
/patterns/Core/HugoHoodie/translations/messages.de.yml:
--------------------------------------------------------------------------------
1 | "Cuff": "Ärmelbund"
2 | "Hood center": "Kapuze Mittelstreifen"
3 | "Hood side": "Kapuze Seitenteil"
4 | "Neck binding": "Halsverblendung"
5 | "Pocket facing": "Taschenbeleg"
6 | "Pocket": "Tasche"
7 | "Sleeve": "Ärmel"
8 | "Waistband": "Bund"
9 |
--------------------------------------------------------------------------------
/patterns/Core/HugoHoodie/translations/messages.en.yml:
--------------------------------------------------------------------------------
1 | "Cuff": "Cuff"
2 | "Hood center": "Hood center"
3 | "Hood side": "Hood side"
4 | "Neck binding": "Neck binding"
5 | "Pocket facing": "Pocket facing"
6 | "Pocket": "Pocket"
7 | "Sleeve": "Sleeve"
8 | "Waistband": "Waistband"
9 |
--------------------------------------------------------------------------------
/patterns/Core/HugoHoodie/translations/messages.fr.yml:
--------------------------------------------------------------------------------
1 | "Cuff": "Manchette"
2 | "Hood center": "Capuche centrale"
3 | "Hood side": "Capuche latérale"
4 | "Neck binding": "Reliure de l'encolure"
5 | "Pocket facing": "Parementure de poche"
6 | "Pocket": "Poche"
7 | "Sleeve": "Manche"
8 | "Waistband": "Ceinture"
9 |
--------------------------------------------------------------------------------
/patterns/Core/HugoHoodie/translations/messages.nl.yml:
--------------------------------------------------------------------------------
1 | "Cuff": "Manchet"
2 | "Hood center": "Middendeel kap"
3 | "Hood side": "Zijdeel kap"
4 | "Neck binding": "Band halsopening"
5 | "Pocket facing": "Zak doublure"
6 | "Pocket": "Zak"
7 | "Sleeve": "Mouw"
8 | "Waistband": "Tailleband"
9 |
--------------------------------------------------------------------------------
/patterns/Core/Pattern/translations/messages.de.yml:
--------------------------------------------------------------------------------
1 | "Back": "Rückenteil"
2 | "Curve length": "Kurvenlänge"
3 | "Cut on fold": "Im Stoffbruch zuschneiden"
4 | "from fabric": "aus dem Hauptstoff"
5 | "from interfacing": "from interfacing"
6 | "from lining": "aus dem Futterstoff"
7 | "from ribbing": "aus der Bündchenware"
8 | "Front": "Vorderteil"
9 | "Good sides together": "Stoffaußenseiten zusammen"
10 | "Grainline": "Fadenverlauf"
11 | "Hem allowance": "Saumzugabe"
12 | "length": "Höhe"
13 | "No\nseam\nallowance": "Keine\nNahtzugabe"
14 | "Seam length": "Nahtlänge"
15 | "Standard\nseam\nallowance": "Standard\nNahtzugabe"
16 | "width": "Weite"
17 |
--------------------------------------------------------------------------------
/patterns/Core/Pattern/translations/messages.en.yml:
--------------------------------------------------------------------------------
1 | "Back": "Back"
2 | "Front": "Front"
3 | "Side": "Side"
4 | "Sleeve": "Sleeve"
5 | "Curve length": "Curve length"
6 | "Cut on fold": "Cut on fold"
7 | "from fabric": "from main fabric"
8 | "from interfacing": "from interfacing"
9 | "from lining": "from lining"
10 | "from ribbing": "from ribbing"
11 | "Good sides together": "Good sides together"
12 | "Grainline": "Grainline"
13 | "Hem allowance": "Hem allowance"
14 | "length": "length"
15 | "No\nseam\nallowance": "No\nseam\nallowance"
16 | "Seam length": "Seam length"
17 | "Standard\nseam\nallowance": "Standard\nseam\nallowance"
18 | "width": "width"
19 |
--------------------------------------------------------------------------------
/patterns/Core/Pattern/translations/messages.fr.yml:
--------------------------------------------------------------------------------
1 | "Back": "Dos"
2 | "Curve length": "Longueur de la courbe"
3 | "Cut on fold": "Couper sur la pliure"
4 | "from fabric": "à partir du tissu principal"
5 | "from interfacing": "à partir de tissue d'entoilage"
6 | "from lining": "à partir de tissu de doublure"
7 | "from ribbing": "à partir de tissu côtelé"
8 | "Front": "Devant"
9 | "Good sides together": "Côtés endroits ensemble"
10 | "Grainline": "Droit fil"
11 | "Hem allowance": "Marge d'ourlet"
12 | "length": "longueur"
13 | "No\nseam\nallowance": "Aucune\nmarge\nde couture"
14 | "Seam length": "Longeur de couture"
15 | "Standard\nseam\nallowance": "Marge\nde couture\nstandard"
16 | "width": "largeur"
17 |
--------------------------------------------------------------------------------
/patterns/Core/Pattern/translations/messages.nl.yml:
--------------------------------------------------------------------------------
1 | "Back": "Rug"
2 | "Front": "Voorzijde"
3 | "Side": "Zijkant"
4 | "Sleeve": "Mouw"
5 | "Curve length": "Lengte curve"
6 | "Cut on fold": "Knippen op stofvouw"
7 | "from fabric": "uit de hoofd stof"
8 | "from interfacing": "uit interfacing"
9 | "from lining": "uit voering"
10 | "from ribbing": "uit ribbing"
11 | "Good sides together": "Met de goede stofkant tegen elkaar"
12 | "Grainline": "Draadrichting"
13 | "Hem allowance": "Zoom naadwaarde"
14 | "length": "lengte"
15 | "No\nseam\nallowance": "Zonder\nnaadwaarde"
16 | "Seam length": "Naad lengte"
17 | "Standard\nseam\nallowance": "Standaard\nnaadwaarde"
18 | "width": "breedte"
19 |
--------------------------------------------------------------------------------
/patterns/Core/SimonShirt/sampler/models.yml:
--------------------------------------------------------------------------------
1 | measurements:
2 | naturalWaist:
3 | joost : 885
4 | usSize34: 697
5 | usSize36: 755
6 | usSize38: 813
7 | usSize40: 871
8 | usSize42: 929
9 | usSize44: 987
10 |
--------------------------------------------------------------------------------
/patterns/Core/SvenSweatshirt/sampler/models.yml:
--------------------------------------------------------------------------------
1 | measurements:
2 | naturalWaist:
3 | joost : 885
4 | usSize34: 697
5 | usSize36: 755
6 | usSize38: 813
7 | usSize40: 871
8 | usSize42: 929
9 | usSize44: 987
10 |
--------------------------------------------------------------------------------
/patterns/Core/TamikoTop/config.yml:
--------------------------------------------------------------------------------
1 | info:
2 | name: "Tamiko Top"
3 | description: "Tamiko is a zero-waste top."
4 | handle: "tamiko"
5 | level: 2
6 | tags:
7 | - womenswear
8 | - menswear
9 | - top
10 |
11 | parts:
12 | top: "Tamiko Top"
13 |
14 | languages:
15 | en: English
16 | nl: Nederlands
17 |
18 | measurements:
19 | shoulderToShoulder: 380
20 | chestCircumference: 1050
21 | centerBackNeckToWaist: 365
22 | naturalWaistToHip: 260
23 |
24 | options:
25 | lengthBonus:
26 | title: "Length bonus"
27 | description: "The amount to lengthen the garment. A negative value will shorten it."
28 | group: "style"
29 | type: "measure"
30 | min: -150
31 | max: 350
32 | default: 0
33 |
--------------------------------------------------------------------------------
/patterns/Core/TamikoTop/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: realWomen
3 |
4 | groups:
5 | realWomen:
6 | - sorcha
7 |
8 | measurements:
9 | chestCircumference:
10 | sorcha: 1050
11 | centerBackNeckToWaist:
12 | sorcha: 365
13 | naturalWaistToHip:
14 | sorcha: 260
15 | shoulderToShoulder:
16 | sorcha: 380
17 |
18 |
--------------------------------------------------------------------------------
/patterns/Core/TheoTrousers/TheoTrousers.php:
--------------------------------------------------------------------------------
1 |
11 | * @copyright 2016 Joost De Cock
12 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
13 | */
14 | class TheoTrousers extends TheodoreTrousers
15 | {
16 | /*
17 | ___ _ _ _ _ _
18 | |_ _|_ __ (_) |_(_) __ _| (_)___ ___
19 | | || '_ \| | __| |/ _` | | / __|/ _ \
20 | | || | | | | |_| | (_| | | \__ \ __/
21 | |___|_| |_|_|\__|_|\__,_|_|_|___/\___|
22 |
23 | Things we need to do before we can draft a pattern
24 | */
25 |
26 | /**
27 | * Sets up options and values for our draft
28 | *
29 | * By branching this out of the sample/draft methods, we can
30 | * set a bunch of options and values the influence the draft
31 | * without having to touch the sample/draft methods
32 | * When extending this pattern so we can just implement the
33 | * initialize() method and re-use the other methods.
34 | *
35 | * Good to know:
36 | * Options are typically provided by the user, but sometimes they are fixed
37 | * Values are calculated for re-use later
38 | *
39 | * @param \Freesewing\Model $model The model to sample for
40 | *
41 | * @return void
42 | */
43 | public function initialize($model)
44 | {
45 | // Prevent missing sa from causing warnings
46 | $this->setOptionIfUnset('sa', 0);
47 |
48 | // This option is fixed in the legacy code
49 | $this->setOptionIfUnset('trouserBottomWidth', 226);
50 |
51 | // Specific to the Theo pattern
52 | $this->setValue('legReduction', 30);
53 | $this->setValue('frontReduction', 10);
54 | $this->setValue('backReduction', 15);
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/patterns/Core/TheoTrousers/config.yml:
--------------------------------------------------------------------------------
1 | info:
2 | name: "Theo trousers"
3 | description: "Theo is Theodore with a more slim cut."
4 | handle: "theo"
5 | level: 8
6 | tags:
7 | - menswear
8 | - trousers
9 | - bottom
10 |
11 | parts:
12 | back: "Back"
13 | front: "Front"
14 | waistbandInterfacingLeft: "Waistband interfacing left"
15 | waistbandInterfacingRight: "Waistband interfacing right"
16 | waistbandLeft: "Waistband left"
17 | waistbandRight: "Waistband right"
18 | waistbandLiningLeft: "Waistband lining left"
19 | waistbandLiningRight: "Waistband lining right"
20 | flyPiece: "Fly piece"
21 | flyShield: "Fly shield"
22 | sidePiece: "Side piece"
23 | frontPocketBag: "Front pocket bag"
24 | backInnerPocketBag: "Back inner pocket bag"
25 | backOuterPocketBag: "Back outer pocket bag"
26 | backPocketFacing: "Back pocket facing"
27 | backPocketInterfacing: "Back pocket interfacing"
28 | beltLoop: "Belt loop"
29 |
30 | languages:
31 | en: "English"
32 | nl: "Nederlands"
33 | de: "Deutsch"
34 |
35 | measurements:
36 | hipsCircumference: 950
37 | seatCircumference: 1045
38 | inseam: 910
39 | seatDepth: 200
40 | options:
41 | waistbandWidth:
42 | title: "Waistband width"
43 | description: "The width of the waistband."
44 | group: "fit"
45 | type: "measure"
46 | min: -10
47 | max: 60
48 | default: 40
49 | backRise:
50 | title: "Back rise"
51 | description: "The amount by which to raise the back."
52 | group: "fit"
53 | type: "measure"
54 | min: 0
55 | max: 60
56 | default: 40
57 | lengthBonus:
58 | title: "Length bonus"
59 | description: "The amount to lengthen the garment. A negative value will shorten it."
60 | group: "fit"
61 | type: "measure"
62 | min: -60
63 | max: 80
64 | default: 40
65 |
--------------------------------------------------------------------------------
/patterns/Core/TheodoreTrousers/config.yml:
--------------------------------------------------------------------------------
1 | info:
2 | name: "Theodore trousers"
3 | description: "Thedore are classic trousers by the (Aldrich) book."
4 | handle: "theodore"
5 | level: 8
6 | tags:
7 | - menswear
8 | - trousers
9 | - bottom
10 |
11 | parts:
12 | back: "Back"
13 | front: "Front"
14 | waistbandInterfacingLeft: "Waistband interfacing left"
15 | waistbandInterfacingRight: "Waistband interfacing right"
16 | waistbandLeft: "Waistband left"
17 | waistbandRight: "Waistband right"
18 | waistbandLiningLeft: "Waistband lining left"
19 | waistbandLiningRight: "Waistband lining right"
20 | flyPiece: "Fly piece"
21 | flyShield: "Fly shield"
22 | sidePiece: "Side piece"
23 | frontPocketBag: "Front pocket bag"
24 | backInnerPocketBag: "Back inner pocket bag"
25 | backOuterPocketBag: "Back outer pocket bag"
26 | backPocketFacing: "Back pocket facing"
27 | backPocketInterfacing: "Back pocket interfacing"
28 | beltLoop: "Belt loop"
29 |
30 | languages:
31 | en: "English"
32 | nl: "Nederlands"
33 | de: "Deutsch"
34 |
35 | measurements:
36 | hipsCircumference: 950
37 | seatCircumference: 1045
38 | inseam: 910
39 | seatDepth: 200
40 |
41 | options:
42 | waistbandWidth:
43 | title: "Waistband width"
44 | description: "The width of the waistband."
45 | group: "fit"
46 | type: "measure"
47 | min: 20
48 | max: 60
49 | default: 40
50 | backRise:
51 | title: "Back rise"
52 | description: "The amount by which to raise the back."
53 | group: "fit"
54 | type: "measure"
55 | min: 0
56 | max: 60
57 | default: 40
58 | lengthBonus:
59 | title: "Length bonus"
60 | description: "The amount to lengthen the garment. A negative value will shorten it."
61 | group: "fit"
62 | type: "measure"
63 | min: -60
64 | max: 80
65 | default: 0
66 |
--------------------------------------------------------------------------------
/patterns/Core/TheodoreTrousers/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: maleStandardUsSizes
3 | groups:
4 | realMen:
5 | - joost
6 | maleStandardUsSizes:
7 | - usSize34
8 | - usSize36
9 | - usSize38
10 | - usSize40
11 | - usSize42
12 | - usSize44
13 | measurements:
14 | hipsCircumference:
15 | joost : 950
16 | usSize34: 950
17 | usSize36: 950
18 | usSize38: 950
19 | usSize40: 950
20 | usSize42: 950
21 | usSize44: 950
22 | seatCircumference:
23 | joost : 1045
24 | usSize34: 1045
25 | usSize36: 1045
26 | usSize38: 1045
27 | usSize40: 1045
28 | usSize42: 1045
29 | usSize44: 1045
30 | inseam:
31 | joost : 910
32 | usSize34: 910
33 | usSize36: 910
34 | usSize38: 910
35 | usSize40: 910
36 | usSize42: 910
37 | usSize44: 910
38 | seatDepth:
39 | joost : 200
40 | usSize34: 200
41 | usSize36: 200
42 | usSize38: 200
43 | usSize40: 200
44 | usSize42: 200
45 | usSize44: 200
46 |
--------------------------------------------------------------------------------
/patterns/Core/TrayvonTie/config.yml:
--------------------------------------------------------------------------------
1 | info:
2 | name: "Trayvon Tie"
3 | description: "Trayvon is a tie that cuts no corners for a professional result."
4 | handle: "trayvon"
5 | level: 3
6 | tags:
7 | - accessories
8 |
9 | inMemoryOf:
10 | name: "Trayvon Martin"
11 | link: "https://en.wikipedia.org/wiki/Trayvon_Martin"
12 |
13 | parts:
14 | interfacingTip: "Interfacing tip"
15 | interfacingTail: "Interfacing tail"
16 | fabricTip: "Fabric tip"
17 | fabricTail: "Fabric tail"
18 | liningTip: "Lining tip"
19 | liningTail: "Lining tail"
20 | loop: "Loop"
21 |
22 | languages:
23 | en: English
24 | nl: Nederlands
25 | fr: French
26 |
27 | measurements:
28 | centerBackNeckToWaist: 480
29 | neckCircumference: 420
30 |
31 | options:
32 | tipWidth:
33 | title: "Tip width"
34 | description: "The width of the tie at the tip."
35 | group: "style"
36 | type: measure
37 | min: 20
38 | max: 120
39 | default: 60
40 | knotWidth:
41 | title: "Knot width"
42 | description: "The width of the tie at the knot/middle."
43 | group: "style"
44 | type: measure
45 | min: 20
46 | max: 70
47 | default: 35
48 |
49 |
--------------------------------------------------------------------------------
/patterns/Core/TrayvonTie/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: maleStandardUsSizes
3 | groups:
4 | realMen:
5 | - joost
6 | maleStandardUsSizes:
7 | - usSize34
8 | - usSize36
9 | - usSize38
10 | - usSize40
11 | - usSize42
12 | - usSize44
13 | measurements:
14 | centerBackNeckToWaist:
15 | joost : 480
16 | usSize34: 489
17 | usSize36: 492
18 | usSize38: 495
19 | usSize40: 498
20 | usSize42: 501
21 | usSize44: 505
22 | neckCircumference:
23 | joost : 420
24 | usSize34: 366
25 | usSize36: 378
26 | usSize38: 391
27 | usSize40: 404
28 | usSize42: 416
29 | usSize44: 429
30 |
--------------------------------------------------------------------------------
/patterns/Core/TrayvonTie/translations/messages.en.yml:
--------------------------------------------------------------------------------
1 | "Fabric tail": "Fabric tail"
2 | "Fabric tip": "Fabric tip"
3 | "from tie interfacing": "from tie interfacing"
4 | "Interfacing tail": "Interfacing tail"
5 | "Interfacing tip": "Interfacing tip"
6 | "Lining tail": "Lining tail"
7 | "Lining tip": "Lining tip"
8 | "Loop": "Loop"
9 |
--------------------------------------------------------------------------------
/patterns/Core/TrayvonTie/translations/messages.fr.yml:
--------------------------------------------------------------------------------
1 | "Fabric tail": "Queue du tissu"
2 | "Fabric tip": "Pointe du tissu"
3 | "from tie interfacing": "à partir de tissu d'entoilage pour cravate"
4 | "Interfacing tail": "Queue de l'entoilage"
5 | "Interfacing tip": "Bout de l'entoilage"
6 | "Lining tail": "Queue de la doublure"
7 | "Lining tip": "Pointe de la doublure"
8 | "Loop": "Boucle"
9 |
--------------------------------------------------------------------------------
/patterns/Core/TrayvonTie/translations/messages.nl.yml:
--------------------------------------------------------------------------------
1 | "Fabric tail": "Stof staart"
2 | "Fabric tip": "Stof punt"
3 | "from tie interfacing": "uit stropdas interfacing"
4 | "Interfacing tail": "Interfacing staart"
5 | "Interfacing tip": "Interfacing punt"
6 | "Lining tail": "Voering staart"
7 | "Lining tip": "Voering punt"
8 | "Loop": "Lus"
9 |
--------------------------------------------------------------------------------
/patterns/Core/WahidWaistcoat/sampler/models.yml:
--------------------------------------------------------------------------------
1 | measurements:
2 | naturalWaist:
3 | joost : 885
4 | usSize34: 697
5 | usSize36: 755
6 | usSize38: 813
7 | usSize40: 871
8 | usSize42: 929
9 | usSize44: 987
10 |
--------------------------------------------------------------------------------
/patterns/Docs/ClassDocs/config.yml:
--------------------------------------------------------------------------------
1 | hidden: true
2 | info:
3 | name: "Class documentation"
4 | version: "1.0"
5 | date: 20170130
6 | author: "Joost De Cock"
7 | email: "joost@decock.org"
8 | company: "freesewing.org"
9 | handle: "classdocs"
10 | parts:
11 | part: "A part"
12 |
13 | languages:
14 | en: "English"
15 |
16 | measurements:
17 | exampleMeasurement: 520
18 |
19 | options:
20 | class:
21 | type: "chooseOne"
22 | default: "none"
23 | method:
24 | type: "chooseOne"
25 | default: "none"
26 |
--------------------------------------------------------------------------------
/patterns/Docs/ClassDocs/sampler/models.yml:
--------------------------------------------------------------------------------
1 | measurements:
2 | naturalWaist:
3 | joost : 885
4 | usSize34: 697
5 | usSize36: 755
6 | usSize38: 813
7 | usSize40: 871
8 | usSize42: 929
9 | usSize44: 987
10 |
--------------------------------------------------------------------------------
/patterns/Docs/DesignTutorial/config.yml:
--------------------------------------------------------------------------------
1 | hidden: true
2 | info:
3 | name: "Design Tutorial"
4 | author: "Joost De Cock"
5 | email: "joost@decock.org"
6 | company: "freesewing.org"
7 |
8 | parts:
9 | part: "Part"
10 |
11 | options:
12 | figure:
13 | type: "chooseOne"
14 | default: "none"
15 |
16 |
--------------------------------------------------------------------------------
/patterns/Docs/DesignTutorial/sampler/models.yml:
--------------------------------------------------------------------------------
1 | measurements:
2 | naturalWaist:
3 | joost : 885
4 | usSize34: 697
5 | usSize36: 755
6 | usSize38: 813
7 | usSize40: 871
8 | usSize42: 929
9 | usSize44: 987
10 |
--------------------------------------------------------------------------------
/patterns/Docs/DesignTutorial/translations/messages.en.yml:
--------------------------------------------------------------------------------
1 | "Baby bib": "Baby bib"
2 | "Attach snap at the back": "Attach snap at the back"
3 | "Finish with bias tape": "Finish with bias tape"
4 |
5 |
--------------------------------------------------------------------------------
/patterns/Docs/DesignTutorial/translations/messages.nl.yml:
--------------------------------------------------------------------------------
1 | "Baby bib": "Baby slabber"
2 | "Attach snap at the back": "Drukknop vastmaken aan de achterkant"
3 | "Finish with bias tape": "Afwerken met biesband"
4 |
5 |
--------------------------------------------------------------------------------
/patterns/Docs/NotationLegend/config.yml:
--------------------------------------------------------------------------------
1 | hidden: true
2 | info:
3 | name: "Pattern notation legend"
4 | version: "1.0"
5 | date: 20180818
6 | author: "Joost De Cock"
7 | email: "joost@decock.org"
8 | company: "freesewing.org"
9 |
10 | parts:
11 | part: "A part"
12 |
13 | languages:
14 | en: "English"
15 |
16 | measurements:
17 | exampleMeasurement: 520
18 |
19 | options:
20 | item:
21 | type: "chooseOne"
22 | default: "none"
23 |
--------------------------------------------------------------------------------
/patterns/Templates/PatternTemplate/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: realMen
3 | groups:
4 | realMen:
5 | - joost
6 | measurements:
7 | naturalWaist:
8 | joost : 885
9 | usSize34: 697
10 | usSize36: 755
11 | usSize38: 813
12 | usSize40: 871
13 | usSize42: 929
14 | usSize44: 987
15 |
--------------------------------------------------------------------------------
/patterns/Tests/TestPattern/TestPattern.php:
--------------------------------------------------------------------------------
1 |
15 | * @copyright 2017 Joost De Cock
16 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
17 | */
18 | class TestPattern extends Pattern
19 | {
20 | /**
21 | * The mandatory draft method
22 | *
23 | * @param \Freesewing\Model $model The model to draft for
24 | *
25 | * @return void
26 | */
27 | public function draft($model)
28 | {
29 |
30 | }
31 |
32 | /**
33 | * The mandatory sample method
34 | *
35 | * @param \Freesewing\Model $model The model to sample for
36 | *
37 | * @return void
38 | */
39 | public function sample($model)
40 | {
41 |
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/patterns/Tests/TestPattern/config.yml:
--------------------------------------------------------------------------------
1 | hidden: true
2 | info:
3 | name: "Test Pattern"
4 | version: "1.0"
5 | date: 20170118
6 | author: "Joost De Cock"
7 | email: "joost@decock.org"
8 | company: "freesewing.org"
9 |
10 | parts:
11 | testPart: "Test Part"
12 |
13 | measurements:
14 | someMeasurement: 200
15 |
16 | options:
17 | measureOption:
18 | type: "measure"
19 | min: 10
20 | max: 50
21 | default: 30
22 | angleOption:
23 | type: "angle"
24 | default: 45
25 | min: 10
26 | max: 50
27 | percentOption:
28 | type: "percent"
29 | default: 50
30 | min: 10
31 | max: 50
32 | chooseOneOption:
33 | type: "chooseOne"
34 | options:
35 | 1: "Option 1"
36 | 2: "Option 2"
37 | default: 1
38 |
--------------------------------------------------------------------------------
/patterns/Tests/TestPattern/sampler/models.yml:
--------------------------------------------------------------------------------
1 | default:
2 | group: someGroup
3 | groups:
4 | someGroup:
5 | - someModel
6 | anotherGroup:
7 | - anotherModel
8 | measurements:
9 | someMeasurement:
10 | someModel : 123
11 | anotherModel : 321
12 |
--------------------------------------------------------------------------------
/phpunit.xml:
--------------------------------------------------------------------------------
1 |
2 |
7 |
8 |
9 | tests
10 |
11 |
12 |
13 |
14 | ./src
15 | ./channels
16 | ./themes
17 | ./patterns/Core/Pattern/Pattern.php
18 |
19 |
20 |
21 |
22 |
23 |
24 |
--------------------------------------------------------------------------------
/scripts/deploy.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | echo "Starting deploy script"
3 | if [ -z "$TRAVIS_PULL_REQUEST" ]; then
4 | echo "Pull request, not deploying.";
5 | exit
6 | else
7 | if [ "$TRAVIS_BRANCH" = "develop" ] || [ "$TRAVIS_BRANCH" = "master" ]; then
8 | if [ "$TRAVIS_PHP_VERSION" = "7.0" ]; then
9 | echo "Deploying PHP version $TRAVIS_PHP_VERSION build.";
10 | cd $TRAVIS_BUILD_DIR
11 | if [ "$TRAVIS_BRANCH" = "master" ]; then
12 | echo "Enabling bail"
13 | sed -i "s#bail_enabled: false#bail_enabled: true#g" config.yml
14 | fi
15 | mkdir build
16 | mv channels src themes patterns vendor index.php config.yml build/
17 | tar -czf freesewing.tgz build
18 | export SSHPASS=$DEPLOY_PASS
19 | sshpass -e scp -o stricthostkeychecking=no freesewing.tgz $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_PATH/$TRAVIS_BRANCH/builds
20 | sshpass -e ssh -o stricthostkeychecking=no $DEPLOY_USER@$DEPLOY_HOST "cd /fs/deploy/core/$TRAVIS_BRANCH/builds ; tar -xzf freesewing.tgz ; rm freesewing.tgz ; rm -rf previous ; mv current previous ; mv build current "
21 | echo "All done.";
22 | else
23 | echo "Build on PHP version $TRAVIS_PHP_VERSION, not deploying.";
24 | fi
25 | else
26 | echo "Branch is neither master nor develop, not deploying."
27 | fi
28 | fi
29 | echo "Bye"
30 |
--------------------------------------------------------------------------------
/scripts/test.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | DIR="$(dirname "${BASH_SOURCE[0]}")"
3 | cd $DIR
4 | php ./test.php
5 |
--------------------------------------------------------------------------------
/scripts/testall.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 | DIR="$(dirname "${BASH_SOURCE[0]}")"
3 | cd $DIR
4 | php ./testall.php
5 |
--------------------------------------------------------------------------------
/src/Boundary/Boundary.php:
--------------------------------------------------------------------------------
1 |
11 | * @copyright 2016 Joost De Cock
12 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
13 | */
14 | class Boundary
15 | {
16 | /** @var \Freesewing\Point topLeft Top-left point of the boundary */
17 | public $topLeft;
18 |
19 | /** @var \Freesewing\Point bottomRight Bottom-right point of the boundary */
20 | public $bottomRight;
21 |
22 | /** @var float width Width of the boundary */
23 | public $width;
24 |
25 | /** @var float height Height of the boundary */
26 | public $height;
27 |
28 | /**
29 | * Sets the topLeft property and updates width and height.
30 | *
31 | * @param \Freesewing\Point point
32 | */
33 | public function setTopLeft($point)
34 | {
35 | $this->topLeft = $point;
36 | $this->updateDimensions();
37 | }
38 |
39 | /**
40 | * Sets the bottomRight property and updates width and height.
41 | *
42 | * @param \Freesewing\Point point
43 | */
44 | public function setBottomRight($point)
45 | {
46 | $this->bottomRight = $point;
47 | $this->updateDimensions();
48 | }
49 |
50 | /**
51 | * Returns the topLeft property.
52 | *
53 | * @return \Freesewing\Point
54 | */
55 | public function getTopLeft()
56 | {
57 | return $this->topLeft;
58 | }
59 |
60 | /**
61 | * Returns the bottomRight property.
62 | *
63 | * @return \Freesewing\Point
64 | */
65 | public function getBottomRight()
66 | {
67 | return $this->bottomRight;
68 | }
69 |
70 | /**
71 | * Calculates boundary dimensions and updates width and height properties.
72 | */
73 | private function updateDimensions()
74 | {
75 | if (is_object($this->topLeft) && is_object($this->bottomRight)) {
76 | $this->width = round($this->bottomRight->getX() - $this->topLeft->getX(),3);
77 | $this->height = round($this->bottomRight->y - $this->topLeft->y,3);
78 | if ($this->height > $this->width) {
79 | $this->maxSize = $this->height;
80 | } else {
81 | $this->maxSize = $this->width;
82 | }
83 | }
84 | }
85 | }
86 |
--------------------------------------------------------------------------------
/src/Coords/Coords.php:
--------------------------------------------------------------------------------
1 |
12 | * @copyright 2016 Joost De Cock
13 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
14 | */
15 | abstract class Coords
16 | {
17 | /** * @var float $x X-coordinate */
18 | public $x = null;
19 |
20 | /** @var float $y Y-coordinate */
21 | public $y = null;
22 |
23 | /**
24 | * Sets the X-coordinate
25 | *
26 | * @param float $x The value to set
27 | */
28 | public function setX($x)
29 | {
30 | if (is_numeric($x)) {
31 | $this->x = $x;
32 | } else {
33 | $x = 0;
34 | }
35 | }
36 | /**
37 | * Sets the Y-coordinate
38 | *
39 | * @param float $y The value to set
40 | */
41 | public function setY($y)
42 | {
43 | if (is_numeric($y)) {
44 | $this->y = $y;
45 | } else {
46 | $y = 0;
47 | }
48 | }
49 |
50 | /**
51 | * Returns the X-coordinate
52 | *
53 | * @return float The X-coordinate
54 | */
55 | public function getX()
56 | {
57 | return $this->x;
58 | }
59 |
60 | /**
61 | * Returns the Y-coordinate
62 | *
63 | * @return float The Y-coordinate
64 | */
65 | public function getY()
66 | {
67 | return $this->y;
68 | }
69 | }
70 |
--------------------------------------------------------------------------------
/src/Dimension/Dimension.php:
--------------------------------------------------------------------------------
1 |
13 | * @copyright 2016 Joost De Cock
14 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
15 | */
16 | class Dimension
17 | {
18 | /** @var \Freesewing\TextOnPath $label The label for the dimension */
19 | private $label;
20 |
21 | /** @var array $leaders Array of leader lines/paths for the dimension */
22 | private $leaders = array();
23 |
24 | /**
25 | * Sets the label property
26 | *
27 | * @param \Freesewing\TextOnPath $label The label for the dimension
28 | */
29 | public function setLabel(\Freesewing\TextOnPath $label)
30 | {
31 | $this->label = $label;
32 | }
33 |
34 | /**
35 | * Sets the leaders property
36 | *
37 | * @param array $leaders Array of leaders
38 | */
39 | public function setLeaders($leaders)
40 | {
41 | $this->leaders = $leaders;
42 | }
43 |
44 | /**
45 | * Gets the label property
46 | *
47 | * @return \Freesewing\TextOnPath The label for the dimension
48 | */
49 | public function getLabel()
50 | {
51 | return $this->label;
52 | }
53 |
54 | /**
55 | * Gets the leaders property
56 | *
57 | * @return array The leaders
58 | */
59 | public function getLeaders()
60 | {
61 | return $this->leaders;
62 | }
63 |
64 | /**
65 | * Gets the path from the label
66 | *
67 | * @return \Freesewing\Path The label path
68 | */
69 | public function getPath()
70 | {
71 | return $this->label->getPath();
72 | }
73 |
74 | /**
75 | * Adds a leader to the leaders property
76 | *
77 | * @param \Freesewing\Path $leader A leader
78 | */
79 | public function addLeader(\Freesewing\Path $leader)
80 | {
81 | $this->leaders[] = $leader;
82 | }
83 | }
84 |
--------------------------------------------------------------------------------
/src/LayoutBlock/LayoutBlock.php:
--------------------------------------------------------------------------------
1 |
11 | * @copyright 2016 Joost De Cock
12 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
13 | */
14 | class LayoutBlock
15 | {
16 | /** @var float x Position X-value */
17 | public $x = null;
18 |
19 | /** @var float y Postition Y-value */
20 | public $y = null;
21 |
22 | /** @var float w Width */
23 | public $w = null;
24 |
25 | /** @var float h Height */
26 | public $h = null;
27 |
28 | /** @var bool used Whether this block is in use or not */
29 | private $used = false;
30 |
31 | /**
32 | * Sets the position
33 | *
34 | * @param float x Position X-value
35 | * @param float y Position Y-value
36 | */
37 | public function setPosition($x, $y)
38 | {
39 | $this->x = $x;
40 | $this->y = $y;
41 | }
42 |
43 | /**
44 | * Sets the size
45 | *
46 | * @param float w Width
47 | * @param float h Height
48 | */
49 | public function setSize($w, $h)
50 | {
51 | $this->w = $w;
52 | $this->h = $h;
53 | }
54 |
55 | /**
56 | * Sets whether the block is used or not
57 | *
58 | * @param bool used
59 | */
60 | public function setUsed($used = true)
61 | {
62 | $this->used = $used;
63 | }
64 | /**
65 | * Return whether the block is used or not
66 | *
67 | * @return bool True if it's used, false if not
68 | */
69 | public function isUsed()
70 | {
71 | if ($this->used === true) {
72 | return true;
73 | } else {
74 | return false;
75 | }
76 | }
77 | }
78 |
--------------------------------------------------------------------------------
/src/Model/Model.php:
--------------------------------------------------------------------------------
1 |
13 | * @copyright 2016 Joost De Cock
14 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
15 | */
16 | class Model
17 | {
18 |
19 | /** @var array measurements */
20 | private $measurements = array();
21 |
22 | /**
23 | * Sets a measurement.
24 | *
25 | * @param string $key Measurement key in the array
26 | * @param float $value Measurement value
27 | */
28 | public function setMeasurement($key, $value)
29 | {
30 | $this->measurements[$key] = $value;
31 | }
32 |
33 | /**
34 | * Gets a measurement.
35 | *
36 | * @param string $key The key in the measurements array
37 | *
38 | * @return float The measurement value
39 | */
40 | public function getMeasurement($key)
41 | {
42 | return $this->measurements[$key];
43 | }
44 |
45 | /**
46 | * Alias for getMeasurement()
47 | *
48 | * @param string $key The key in the measurements array
49 | *
50 | * @return float The measurement value
51 | */
52 | public function m($key)
53 | {
54 | return $this->getMeasurement($key);
55 | }
56 |
57 | /**
58 | * Adds measurements.
59 | *
60 | * Rater than adding measurements individually, this adds
61 | * an array of measurements.
62 | *
63 | * @param array $measurements
64 | */
65 | public function addMeasurements($measurements)
66 | {
67 | if (is_array($measurements)) {
68 | foreach ($measurements as $key => $value) {
69 | $this->measurements[$key] = $value;
70 | }
71 | }
72 | }
73 | }
74 |
--------------------------------------------------------------------------------
/src/Note/Note.php:
--------------------------------------------------------------------------------
1 |
16 | * @copyright 2016-2017 Joost De Cock
17 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
18 | */
19 | class Note extends Text
20 | {
21 | /** @var array Path of the arrow */
22 | public $path;
23 |
24 | /**
25 | * Sets the path that the arrow follows.
26 | *
27 | * @param \Freesewing\Path path
28 | */
29 | public function setPath(\Freesewing\Path $path)
30 | {
31 | $this->path = $path;
32 | }
33 |
34 | /**
35 | * Returns the path that the arrow follows.
36 | *
37 | * @return \Freesewing\Path
38 | */
39 | public function getPath()
40 | {
41 | return $this->path;
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/src/Packer/Packer.php:
--------------------------------------------------------------------------------
1 |
12 | * @copyright 2016 Joost De Cock
13 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
14 | */
15 | abstract class Packer
16 | {
17 | /**
18 | * Packers should implement the fit() method
19 | *
20 | * @param array List of blocks to fit
21 | */
22 | abstract public function fit(&$blocks);
23 | }
24 |
--------------------------------------------------------------------------------
/src/Point/Point.php:
--------------------------------------------------------------------------------
1 |
21 | * @copyright 2016 Joost De Cock
22 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
23 | */
24 | class Point extends Coords
25 | {
26 | /** Precision to round point coordinates on */
27 | const PRECISION = 3;
28 |
29 | /** @var string $description Point description */
30 | public $description = null;
31 |
32 | /**
33 | * Sets the X-coordinate for a point
34 | *
35 | * @param float $x The value to set
36 | */
37 | public function setX($x)
38 | {
39 | if (is_numeric($x)) {
40 | $this->x = round($x, self::PRECISION);
41 | } else {
42 | $x = 0;
43 | }
44 | }
45 |
46 | /**
47 | * Sets the Y-coordinate for a point
48 | *
49 | * @param float $y The value to set
50 | */
51 | public function setY($y)
52 | {
53 | if (is_numeric($y)) {
54 | $this->y = round($y, self::PRECISION);
55 | } else {
56 | $y = 0;
57 | }
58 | }
59 |
60 | /**
61 | * Sets the description property
62 | *
63 | * @param string $description The point description
64 | */
65 | public function setDescription($description)
66 | {
67 | $this->description = $description;
68 | }
69 |
70 | /**
71 | * Returns the description property
72 | *
73 | * @return string The point description
74 | */
75 | public function getDescription()
76 | {
77 | return $this->description;
78 | }
79 |
80 | /**
81 | * Returns point as vector object
82 | *
83 | * @return \Freesewing\Vector The new vector object
84 | */
85 | public function asVector()
86 | {
87 | $vector = new \Freesewing\Vector();
88 | $vector->setX($this->getX());
89 | $vector->setY($this->getY());
90 |
91 | return $vector;
92 | }
93 | }
94 |
--------------------------------------------------------------------------------
/src/Services/Service.php:
--------------------------------------------------------------------------------
1 |
9 | * @copyright 2016 Joost De Cock
10 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
11 | */
12 | abstract class Service
13 | {
14 |
15 | /**
16 | * Returns the name of the service
17 | *
18 | * This is used to load the default theme for the service when no theme is specified
19 | *
20 | * @see Context::loadTheme()
21 | *
22 | * @return string
23 | */
24 | abstract public function getServiceName();
25 |
26 | /**
27 | * @param \Freesewing\Context $context
28 | *
29 | * @return void
30 | */
31 | abstract public function run(\Freesewing\Context $context);
32 | }
33 |
--------------------------------------------------------------------------------
/src/Stack/Stack.php:
--------------------------------------------------------------------------------
1 |
15 | * @copyright 2016 Joost De Cock
16 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
17 | */
18 | class Stack
19 | {
20 | /** @var array $items Items on the stack */
21 | public $items = array();
22 |
23 | /** @var array $intersections Intersections on the stack */
24 | public $intersections = array();
25 |
26 | /**
27 | * Adds items to the stack
28 | *
29 | * @param array items The items to add
30 | */
31 | public function push($items)
32 | {
33 | foreach ($items as $item) {
34 | $this->items[] = $item;
35 | }
36 | }
37 |
38 | /**
39 | * Adds intersection to the stack
40 | *
41 | * @param array $intersection The intersection to add
42 | */
43 | public function addIntersection($intersection)
44 | {
45 | $this->intersections[] = $intersection;
46 | }
47 |
48 | /**
49 | * Replaces an item on the stack
50 | *
51 | * @param string $search The content of the item to replace
52 | * @param array $replace The replacement items
53 | */
54 | public function replace($search, $replace)
55 | {
56 | $targetKey = false;
57 | foreach ($this->items as $key => $item) {
58 | if ($item == $search) {
59 | $targetKey = $key;
60 | }
61 | }
62 | if ($targetKey !== false) {
63 | array_splice($this->items, $targetKey, 1, $replace);
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/src/SvgAttributes/SvgAttributes.php:
--------------------------------------------------------------------------------
1 |
9 | * @copyright 2016 Joost De Cock
10 | * @license http://opensource.org/licenses/GPL-3.0 GNU General Public License, Version 3
11 | */
12 | class SvgAttributes extends SvgBlock
13 | {
14 | /**
15 | * Returns the full svg tag
16 | *
17 | * Note that we are returning this as a string,
18 | * using the magic __toString() method
19 | * which is defined in the parent class
20 | *
21 | * @see \Freesewing\SvgBlock::__toString()
22 | *
23 | * @return string svg tag
24 | */
25 | public function load()
26 | {
27 | return "\n