Commit graph

38 commits

Author SHA1 Message Date
Jürg Lehni
db82f41151 Update year, author email addresses and links 2020-05-23 22:24:42 +02:00
Jürg Lehni
efcdd7bda8 Handle CurveLocation on path with only one segment 2020-01-15 09:40:49 +01:00
Jürg Lehni
652574115c Implement unit test for #1255
This appears to have been fixed in the meantime.
Closes #1255
2019-06-23 10:30:56 +02:00
Jürg Lehni
bba70907e7 Fix PathItem#isCrossing() to not return overlaps
Closes #1409
2019-06-23 10:27:31 +02:00
Jürg Lehni
7f496408b5 Crossing detection: Revert boundary checks
Adjust ambiguous edge case test instead
2019-06-23 10:26:47 +02:00
Jürg Lehni
e779d24a6d Implement higher precision in getSignedDistance()
Also add unit test for overlap edge case.
Closes #1262
2019-06-22 18:42:19 +02:00
Jürg Lehni
ef8ba35911 Implement unit tests for 3ff5560c0c
Closes #1419, closes #1263
2019-06-22 18:21:47 +02:00
Jürg Lehni
f66c73e534 Fix regression in curve-intersections code
Closes #1638
2019-06-22 15:27:25 +02:00
sapics
be4199b6eb Update copyright year to 2019 2018-12-27 16:13:01 +09:00
sapics
cfc5a912da Replace url to avoid redirection
Replace http://jonathanpuckey.com to https://puckey.studio
2018-11-14 11:24:32 +01:00
Jürg Lehni
d436d07fee Intersections: Correctly handle item#applyMatrix = false
Closes #1289
2017-03-23 13:13:32 +01:00
Jürg Lehni
fdd42076f9 Intersections: Bring back special handling of curve end-points.
Revert commit 89e31dd393, and add further improvements:

- Implement unit tests for #1284
- Remove Rectangle#touches(rect) in favor of #intersects(rect, epsilon)

Closes #1284
2017-03-18 16:42:55 +01:00
Jürg Lehni
5ea09c2fa2 Tests: Implement unit test for #1270.
Closes #1270.
2017-03-07 20:57:47 +01:00
Jürg Lehni
ecc1edb6ea Revert d204175d39
Revert fat-line clipping optimization that checked for straight curves, as unfortunately it wasn't reliable in many edge cases.

Relates to #1263
2017-03-07 20:01:05 +01:00
Jürg Lehni
8461d8d9f4 Curve Intersection: Improve algorithm to work with correct version of isStraight()
Relates to #1269
2017-03-07 17:41:16 +01:00
Jürg Lehni
e3828d810b When aborting fat-line clipping, attempt an approximation with line intersections. 2017-02-22 13:58:27 +01:00
Jürg Lehni
d204175d39 Improve and optimize fat-line clipping algorithm.
By checking if subdivided curves are straight and falling back on line-line / line-curve approach if they are.
2017-02-21 23:09:30 +01:00
Jürg Lehni
f16b91e0fe Tests: Implement unit test for #1233 2017-02-21 22:10:08 +01:00
Jürg Lehni
357ff0dd43 Reduce epsilon in fat-line clipping to 1e-12 and adjust unit tests.
These results make much more sense and the algorithm finds less false positives while still behaving reliably in all edge cases.
2017-02-16 14:05:05 +01:00
Jürg Lehni
6ad5bfafee Implement unit test for #1073
Closes #1073, closes #1074
2017-01-25 07:55:37 -05:00
Jürg Lehni
cf2ebbaaf8 Partly revert 09785a504b
To make the edge-case in #1239 work again. Also add unit tests for edge-case.
2017-01-15 11:34:02 +01:00
Jürg Lehni
8946f44ed9 Fix curve-bounds check in getIntersections()
Closes #1197
2016-11-20 20:19:38 -05:00
Jürg Lehni
287f48a0db Implement unit test for #1165
Closes #1165
2016-09-24 14:34:46 -04:00
Jürg Lehni
b37b8cc495 Improve reliability of Curve.getIntersection()
Reduce epsilon when checking against curve end points from GEOMETRIC_EPSILON to EPSILON.

Coses #1174
2016-09-24 14:28:43 -04:00
Jürg Lehni
16e53cc1ad Minor reformatting and changes.
no need for paper namespace in unit test code
2016-07-20 17:58:47 +02:00
Jan
381e92501a Add test for #1088 2016-07-20 16:33:13 +02:00
Jürg Lehni
4966f6250f Implement better calculation of tangential angles in CurveLocation#isCrossing()
Relates to #1074
2016-06-12 18:53:14 +02:00
Jürg Lehni
614c781f29 Put the recursion cap back into fat-line clipping code.
But use a higher value, and have it work in conjunction with call-count cap.
Relates to #1074
2016-06-12 17:07:43 +02:00
Jürg Lehni
452bbfdaa4 Add unit tests and change-log entry for #904
Closes #904
2016-06-11 13:13:08 +02:00
Jürg Lehni
803dfb6bb1 Improve reliability of Curve#isStraight()
Closes #1066
2016-06-10 12:33:44 +02:00
Jürg Lehni
a59a5354fb Clean-up unit test for #943 and add edge case from #944
See https://github.com/paperjs/paper.js/pull/944#issuecomment-180370569
2016-02-05 21:18:16 +01:00
Jürg Lehni
340a1e2a5f Rename curve-time in API from 'parameter' to 'time'
And create separate versions of methods that receive curve-time arguments instead of offsets.

Curve#getNormalAt(time, true) -> #getNormalAtTime(true)
Curve#divide() -> #divideAt(offset) / #divideAtTime(time)
Curve#split() -> #splitAt(offset) / #splitAtTime(time)
Curve#getParameterAt(offset) -> #getTimeAt(offset)
Curve#getParameterOf(point) -> getTimeOf(point)
Curve#getPointAt(time, true) -> #getPointAtTime(time)
Curve#getTangentAt(time, true) -> #getTangenttTime(time)
Curve#getNormalAt(time, true) -> #getNormalAtTime(time)
Curve#getCurvatureAt(time, true) -> #getCurvatureAtTime(time)
CurveLocation#parameter -> #time
Path#split(offset/location) -> #splitAt(offset/location)

Closes #563
2016-02-02 11:59:53 +01:00
Jürg Lehni
4c84c3dad5 Tests: Start getting QUnit tests to work on Node.js
Work in progress…
2016-01-31 12:43:20 +01:00
Jürg Lehni
7152942719 Replace links to issues with short references. 2016-01-06 14:13:02 +01:00
Jürg Lehni
a7a07fb6d5 Update JSDoc and do some documentation spring-cleaning.
- Convert from {@code ...} to shorter `...`
- Reformat some documentation comment blocks
- Update copyright notices
2015-12-30 21:55:19 +01:00
Jürg Lehni
12dbd3eb26 Add unit tests for isCrossing() and define a new, currently failing test. 2015-12-30 21:55:19 +01:00
Jürg Lehni
1d80c13b73 Clean up path intersection tests. 2015-12-30 21:55:17 +01:00
Jürg Lehni
a683493e59 Implement unit tests for path intersection.
Related: #565, #568, #570, #571
2015-01-04 14:01:32 +01:00