Jonathan Haas
6f233441b3
Fix a special case in the reduce function when pass1 created very short segments
...
Fixes #286
Also add testcase.
2025-04-26 13:42:24 +00:00
joostdecock
02f841c570
feat: Added studio to monorepo
2025-04-23 16:46:23 +00:00
Jonathan Haas
c9300e6739
[core] fix: stack anchoring ( #261 )
...
Fixes #54
Also adds the fabric class to lumina parts for proper line width and rainbow coloring.
The last commit is probably not right. It works, but I'm not sure if these are the right functions to change.

Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/261
Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org>
Co-authored-by: Jonathan Haas <haasjona@gmail.com>
Co-committed-by: Jonathan Haas <haasjona@gmail.com>
2025-04-18 13:00:40 +00:00
Jonathan Haas
7bb1f8cf3d
[core] chore: Minor improvements for the bezier reduce function ( #257 )
...
- Give up early if the curve is empty (or otherwise malformed, i.e. if it contains NaN points), instead of iterating endlessly
- Limit the iterations to 20 as the comment says
- Don't go above 1 for the t values
Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/257
Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org>
Co-authored-by: Jonathan Haas <haasjona@gmail.com>
Co-committed-by: Jonathan Haas <haasjona@gmail.com>
2025-04-18 06:23:03 +00:00
Jonathan Haas
5672638bf9
[core] feat: Hotfix the reduce function in the bezier library ( #224 )
...
Fixes #117
Co-authored-by: joostdecock <joost@joost.at>
Reviewed-on: https://codeberg.org/freesewing/freesewing/pulls/224
Reviewed-by: Joost De Cock <joostdecock@noreply.codeberg.org>
Co-authored-by: Jonathan Haas <haasjona@gmail.com>
Co-committed-by: Jonathan Haas <haasjona@gmail.com>
2025-04-12 07:48:39 +00:00
Joost De Cock
51dc1d9732
[breaking]: FreeSewing v4 ( #7297 )
...
Refer to the CHANGELOG for all info.
---------
Co-authored-by: Wouter van Wageningen <wouter.vdub@yahoo.com>
Co-authored-by: Josh Munic <jpmunic@gmail.com>
Co-authored-by: Jonathan Haas <haasjona@gmail.com>
2025-04-01 16:15:20 +02:00
Joost De Cock
90ef19b20c
Merge pull request #7137 from HaasJona/fix/core-methods
...
Fix and improve path intersection methods
2024-10-26 15:27:42 +02:00
joostdecock
76fbc5f6a4
chore: Dependency updates
2024-10-26 11:24:47 +02:00
Jonathan Haas
4346137a0e
Fix typos in jsdoc
2024-10-03 13:02:59 +02:00
Jonathan Haas
4b83212f41
Fix and improve path intersection methods
...
- Add path.intersectsBeam() method
- Add utils.beamIntersectsLine() method
- Simplify calculation and improve precision on beam intersections
- Document return types properly
- beamIntersectsCurve now uses the proper function from Bezier library instead of emulating it by constructing a huge line
- docs: path.intersect... methods never return false, they simply return an empty array in case of no intersection
2024-10-03 11:37:55 +02:00
dependabot[bot]
d547ba9fb5
chore(deps-dev): bump mocha from 10.7.0 to 10.7.3
...
Bumps [mocha](https://github.com/mochajs/mocha ) from 10.7.0 to 10.7.3.
- [Release notes](https://github.com/mochajs/mocha/releases )
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md )
- [Commits](https://github.com/mochajs/mocha/compare/v10.7.0...v10.7.3 )
---
updated-dependencies:
- dependency-name: mocha
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-08-26 04:27:11 +00:00
dependabot[bot]
4c571a5e0e
chore(deps-dev): bump mocha from 10.6.0 to 10.7.0
...
Bumps [mocha](https://github.com/mochajs/mocha ) from 10.6.0 to 10.7.0.
- [Release notes](https://github.com/mochajs/mocha/releases )
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md )
- [Commits](https://github.com/mochajs/mocha/compare/v10.6.0...v10.7.0 )
---
updated-dependencies:
- dependency-name: mocha
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-24 04:16:53 +00:00
Joost De Cock
e8482185ff
Merge pull request #6955 from HaasJona/add/circleSegment
...
Add path.circleSegment() function
2024-07-14 16:12:29 +02:00
Jonathan Haas
55e776db2c
add unit tests for circleSegment method
2024-07-12 07:29:11 +02:00
Jonathan Haas
dd1b4f1a14
feature(core): add path.circleSegment() method and documentation
2024-07-11 18:38:04 +02:00
dependabot[bot]
4efd978b21
chore(deps-dev): bump mocha from 10.5.2 to 10.6.0
...
Bumps [mocha](https://github.com/mochajs/mocha ) from 10.5.2 to 10.6.0.
- [Release notes](https://github.com/mochajs/mocha/releases )
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md )
- [Commits](https://github.com/mochajs/mocha/compare/v10.5.2...v10.6.0 )
---
updated-dependencies:
- dependency-name: mocha
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-07-05 04:33:05 +00:00
Jonathan Haas
1ee4864761
fix(core): Fix typo in path.clean() method
2024-07-02 18:41:18 +02:00
dependabot[bot]
b8813079c8
chore(deps-dev): bump mocha from 10.5.0 to 10.5.2
...
Bumps [mocha](https://github.com/mochajs/mocha ) from 10.5.0 to 10.5.2.
- [Release notes](https://github.com/mochajs/mocha/releases )
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md )
- [Commits](https://github.com/mochajs/mocha/compare/v10.5.0...v10.5.2 )
---
updated-dependencies:
- dependency-name: mocha
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-27 04:50:38 +00:00
dependabot[bot]
af8bcbf1fc
chore(deps-dev): bump mocha from 10.4.0 to 10.5.0
...
Bumps [mocha](https://github.com/mochajs/mocha ) from 10.4.0 to 10.5.0.
- [Release notes](https://github.com/mochajs/mocha/releases )
- [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md )
- [Commits](https://github.com/mochajs/mocha/compare/v10.4.0...v10.5.0 )
---
updated-dependencies:
- dependency-name: mocha
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-06-25 04:35:58 +00:00
joostdecock
9718d9580b
chore: Update dependencies and contributors
2024-06-12 15:25:33 +02:00
Joost De Cock
ebfd10d2eb
Merge pull request #6768 from freesewing/dependabot/npm_and_yarn/sinon-18.0.0
...
chore(deps-dev): Bump sinon from 17.0.2 to 18.0.0
2024-06-12 15:09:51 +02:00
joostdecock
eded9e9d3a
fix(core): Handle path splits on start or end points
...
In some edge cases, like when splitting a path on or very close to its
start or end point, `Path.split()` will return an array in which one of
the elements is not a Path object, but rather an empty array.
That is rather combersome to check for, so this changes that behaviour
and will return null for such cases.
I've also updated the documentation to clarify this behaviour.
Fixes #6816
This also fixes a bug when a path was being split on its end point.
2024-06-12 13:24:42 +02:00
dependabot[bot]
db5ecd1eac
chore(deps-dev): Bump sinon from 17.0.2 to 18.0.0
...
Bumps [sinon](https://github.com/sinonjs/sinon ) from 17.0.2 to 18.0.0.
- [Release notes](https://github.com/sinonjs/sinon/releases )
- [Changelog](https://github.com/sinonjs/sinon/blob/main/docs/changelog.md )
- [Commits](https://github.com/sinonjs/sinon/compare/v17.0.2...v18.0.0 )
---
updated-dependencies:
- dependency-name: sinon
dependency-type: direct:development
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-23 16:05:08 +00:00
joostdecock
21f386f56e
prerelease: v3.3.0-rc.1
2024-05-11 17:30:26 +02:00
dependabot[bot]
6ff2f8d4b6
chore(deps-dev): Bump chai from 5.1.0 to 5.1.1
...
Bumps [chai](https://github.com/chaijs/chai ) from 5.1.0 to 5.1.1.
- [Release notes](https://github.com/chaijs/chai/releases )
- [Changelog](https://github.com/chaijs/chai/blob/main/History.md )
- [Commits](https://github.com/chaijs/chai/compare/v5.1.0...v5.1.1 )
---
updated-dependencies:
- dependency-name: chai
dependency-type: direct:development
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-05-10 05:00:32 +00:00
dependabot[bot]
73662ab39f
chore(deps-dev): Bump mocha from 10.3.0 to 10.4.0
...
Bumps [mocha](https://github.com/mochajs/mocha ) from 10.3.0 to 10.4.0.
- [Release notes](https://github.com/mochajs/mocha/releases )
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mochajs/mocha/compare/v10.3.0...v10.4.0 )
---
updated-dependencies:
- dependency-name: mocha
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-29 17:23:44 +00:00
joostdecock
aaf4e04fd1
chore: Dependency updates
2024-04-27 16:12:28 +02:00
joostdecock
6ca891ae6f
chore: Update dependencies and contributors
2024-04-27 15:29:01 +02:00
Joost De Cock
f82ebd97d8
Merge pull request #6558 from HaasJona/add/path-angle
...
add(core): Add Path.angleAt(point) method
2024-04-18 19:02:26 +02:00
Jonathan Haas
ed608b52a0
Add documentation and rename method
2024-04-18 10:53:30 +02:00
Joost De Cock
281a04c37f
Merge pull request #6527 from HaasJona/fix/path-offset
...
fix(core): Path.offset(...) improvements
2024-04-16 19:07:55 +02:00
Jonathan Haas
789ff3f8ca
Fix test
2024-04-15 19:31:01 +02:00
Jonathan Haas
85946eb716
Add clarifying comment
2024-04-15 18:43:39 +02:00
Jonathan Haas
25059b818f
Add test for path.angleAt
2024-04-15 18:28:49 +02:00
Jonathan Haas
d2731a6d88
add(core): Add Path.angleAt(point) method
2024-04-15 18:28:49 +02:00
Jonathan Haas
1909955d73
Make pointOnCurve behaviour match documentation
2024-04-15 18:28:09 +02:00
dependabot[bot]
0269f81ead
chore(deps-dev): Bump mocha from 10.3.0 to 10.4.0
...
Bumps [mocha](https://github.com/mochajs/mocha ) from 10.3.0 to 10.4.0.
- [Release notes](https://github.com/mochajs/mocha/releases )
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mochajs/mocha/compare/v10.3.0...v10.4.0 )
---
updated-dependencies:
- dependency-name: mocha
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-04-09 17:56:32 +00:00
Jonathan Haas
080874dd88
fix(core): Path.offset(...) no longer fails on very short curves or zero length paths. Fixes #6519
2024-04-08 08:25:09 +02:00
joostdecock
04505691d6
Merge branch 'develop' into joost
2024-04-06 18:05:18 +02:00
joostdecock
f8d9aeb035
chore: Changelog/all-contributors update
...
Updated the changelog after recent features/fixes by @haasjona and
@woutervdub
Re-ran reconfigure to update README's with the updated contributor list.
2024-04-06 18:00:10 +02:00
Jonathan Haas
849563d1ec
add(core): Add Path.rotate(...) function analogue to Point.rotate(...)
2024-04-05 14:45:20 +02:00
dependabot[bot]
633b87272a
chore(deps-dev): Bump mocha from 10.3.0 to 10.4.0
...
Bumps [mocha](https://github.com/mochajs/mocha ) from 10.3.0 to 10.4.0.
- [Release notes](https://github.com/mochajs/mocha/releases )
- [Changelog](https://github.com/mochajs/mocha/blob/master/CHANGELOG.md )
- [Commits](https://github.com/mochajs/mocha/compare/v10.3.0...v10.4.0 )
---
updated-dependencies:
- dependency-name: mocha
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-03-27 04:07:47 +00:00
Joost De Cock
5bb261c946
chore: Reconfigure after adding new contributor
2024-03-25 19:49:59 +01:00
joostdecock
b2b2e0cf73
chore: dependencies update
2024-03-23 11:36:28 +01:00
joostdecock
2b36340cb8
chore(core): Remove unused var in tests
2024-03-16 12:19:42 +01:00
joostdecock
18f009db1a
chore: Dependency updates
2024-03-16 12:16:16 +01:00
joostdecock
88cbd6a4f9
chore(core): Drop the chai-string dependency for tests
...
We're using chai-string as it provides the `equalIgnoreSpaces`
assertion which we use in our SVG tests.
However, that package does not seem to be maintained, and lists chai v4
as its peer dependency. We've moved on to chai v5 and this is causes
issues in one of our github workflows as dependencies cannot be
resolved.
So, I've extracted the assertion we need, and dropped the dependency.
2024-03-16 12:10:31 +01:00
joostdecock
8f13ace1f3
chore: Update dependencies and changelog
2024-03-03 10:10:43 +01:00
dependabot[bot]
dd9c78dd31
chore(deps-dev): Bump eslint from 8.56.0 to 8.57.0
...
Bumps [eslint](https://github.com/eslint/eslint ) from 8.56.0 to 8.57.0.
- [Release notes](https://github.com/eslint/eslint/releases )
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md )
- [Commits](https://github.com/eslint/eslint/compare/v8.56.0...v8.57.0 )
---
updated-dependencies:
- dependency-name: eslint
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-02-26 04:37:25 +00:00
dependabot[bot]
e55f384618
Bump chai from 5.0.3 to 5.1.0
...
Bumps [chai](https://github.com/chaijs/chai ) from 5.0.3 to 5.1.0.
- [Release notes](https://github.com/chaijs/chai/releases )
- [Changelog](https://github.com/chaijs/chai/blob/main/History.md )
- [Commits](https://github.com/chaijs/chai/compare/v5.0.3...v5.1.0 )
---
updated-dependencies:
- dependency-name: chai
dependency-type: direct:development
update-type: version-update:semver-minor
...
Signed-off-by: dependabot[bot] <support@github.com>
2024-02-13 04:23:41 +00:00