iconexperience
0e3ac9d7f4
Handle cases when point y is equal to y of horizontal curve in path
2015-12-30 21:52:34 +01:00
sapics
9c1c00c11e
Minor minification
2015-12-30 21:52:34 +01:00
iconexperience
c0a5739254
Change addCurveIntersections() to handle cases when tDiff == 0
2015-12-19 10:48:31 +01:00
Jürg Lehni
deafacdad0
Treat overlaps as crossings as well.
...
This solves https://github.com/paperjs/paper.js/issues/784#issuecomment-153085486 , simplifies code quite a bit, and does not cause any new issues.
2015-11-04 01:19:20 +01:00
Jürg Lehni
f32a1def6e
Only complain about open paths in boolean ops when they are long enough.
2015-11-02 18:21:19 +01:00
Jürg Lehni
9a772678a8
Clean up #816 a bit.
...
Closes #815 also.
2015-10-28 22:17:44 +01:00
Tomas Junnonen
09d4de6a1b
Issue 815: Cannot add segment to Path after removing last segment
...
Fixed an issue where after removing the last segment of a path,
new segments cannot be re-added.
Added new Path Curve test cases to test the difference between
a path with one and no segments (zero curves in both cases), which
catches the bug.
2015-10-28 12:15:07 -04:00
Jürg Lehni
8eb0dcc87d
Fix various JS linting problems.
2015-10-27 23:35:30 +01:00
Jürg Lehni
238801e485
Improve docs for boolean operations.
2015-10-25 09:41:43 +01:00
Jürg Lehni
e9d54a05f0
Minor change in the way #reorient() is called.
2015-10-24 23:13:13 +02:00
Jürg Lehni
c61cb804cb
Implement boolean operations intersect() and subtract() for open path with closed paths.
...
Closes #757
2015-10-24 22:41:51 +02:00
Jürg Lehni
648985fcd2
Fix yet another issue with Path#curves and Path#_add()
...
Including a unit test to prevent regression.
2015-10-24 18:11:30 +02:00
Jürg Lehni
19e3136892
Address small issue in Path#getLocationAt() when paths are empty.
2015-10-24 17:46:20 +02:00
Jürg Lehni
fcd4fe824c
Pass Item.NO_INSERT to internally created paths and do not rely on insertAbove() to always return a result.
...
If `this` itself is not in the DOM, insertAbove() will fail.
2015-10-24 17:45:22 +02:00
Jürg Lehni
1fc17766fb
Address remaining issue with curves being wrongly linked up after adding new segments.
2015-10-24 17:43:22 +02:00
Jürg Lehni
ae2bed9cf0
Fix issue of faulty curves list after inserting segments at the end of open paths.
2015-10-24 17:00:37 +02:00
Jürg Lehni
39731808b8
Switch from imprecise trigonometric method to Curve.getParameterOf()
...
And from !hasHandles() to isStraight(), as we can now handle all straight curves.
2015-10-24 12:23:25 +02:00
Jürg Lehni
780b999220
Fix typo.
2015-10-24 11:55:59 +02:00
Jürg Lehni
b9a0f5f659
Further simplify code.
2015-10-24 11:29:15 +02:00
Jürg Lehni
4678697638
Some refactoring and added comments to @sapics code in Curve.getNearestParameter()
2015-10-24 11:14:08 +02:00
sapics
89a45a6682
Use cubic equation solution for faster calculation
2015-10-24 14:54:57 +09:00
sapics
294904eac7
Faster curve.getNearestParameter when curve has no handles
2015-10-24 11:39:50 +09:00
Jürg Lehni
c8cc653004
Merge Path#_getOffset() with CurveLocation#getOffset()
2015-10-23 19:57:25 +02:00
Jürg Lehni
5be9e1dde5
Remove unused variable.
2015-10-22 15:30:29 +02:00
Jürg Lehni
813ea48932
Remove unused local reference.
2015-10-22 14:46:17 +02:00
Jürg Lehni
bafb6794a6
Introduce separate epsilon for fat-line clipping code, and reduce curve-time epsilon.
2015-10-21 23:44:24 +02:00
Jürg Lehni
e9c3e72f60
Simplify handling of winding overlap-adjustment in isValid()
2015-10-21 15:02:53 +02:00
Jürg Lehni
a79212b920
Make handling of points on infinite lines in Line.getSide() more clear.
2015-10-21 10:00:11 +02:00
Jürg Lehni
a9710cf7c0
Fix Line.getSide() call.
2015-10-21 09:35:55 +02:00
Jürg Lehni
7c37a4a4d2
Revert "No need for special length handling in propagateWinding()"
...
This reverts commit 8c702ce5b4
.
2015-10-21 09:35:17 +02:00
Jürg Lehni
f8595e93c6
Improve some comments.
2015-10-21 02:45:57 +02:00
Jürg Lehni
169f18617c
Address more pending TODOs.
2015-10-21 02:40:12 +02:00
Jürg Lehni
7a95625a13
Remove debug code and TODO from CurveLocation#isCrossing()
2015-10-21 02:36:43 +02:00
Jürg Lehni
8c702ce5b4
No need for special length handling in propagateWinding()
2015-10-21 02:32:56 +02:00
Jürg Lehni
3daa7f78b4
Some comment clean-ups.
2015-10-21 02:24:54 +02:00
Jürg Lehni
341fe1ab4e
Remove all boolean debugging and streamline code.
2015-10-21 02:16:17 +02:00
Jürg Lehni
2cf637d13b
Merge remote-tracking branch 'origin/boolean-fix' into develop
2015-10-21 01:44:15 +02:00
Jürg Lehni
43cf20096a
Implement Curve.getNearestParameter()
2015-10-21 01:43:14 +02:00
Jürg Lehni
5d6b761d3a
Introduce separate WINDING_EPSILON and improve GEOMETRIC_EPSILON.
...
New values are based on a lot of testing.
2015-10-21 01:16:52 +02:00
Jürg Lehni
eb62530958
Improve CurveLocation#equals().
2015-10-21 01:15:46 +02:00
Jürg Lehni
1f476c2107
Improve CurveLocation#isTouching() to better handle straight lines.
2015-10-21 01:10:24 +02:00
Jürg Lehni
1073340eeb
Do not use GEOMETRIC_EPSILON in Curve.getParameterAt()
...
This caused issues in some rare edge-cases.
2015-10-21 01:09:03 +02:00
Jürg Lehni
d543658c43
Remove old version of Curve#getParameterOf()
2015-10-21 00:17:05 +02:00
Jürg Lehni
140fba56cc
Fix Line#isCollinear() and #isOrthogonal()
2015-10-20 23:37:37 +02:00
Jürg Lehni
bcd6520e66
Merge handling of self-intersection crossings with normal crossings.
...
Shorter code and no additional glitches.
2015-10-20 23:03:40 +02:00
Jürg Lehni
08122131dc
Use isOverlap() instead of _overlap everywhere.
2015-10-20 23:02:50 +02:00
Jürg Lehni
6ccd78e8af
Go back to simpler code to handle visited segments.
...
It appears that the imprecisions addressed in 6cdead0e8c
have since disappeared.
2015-10-20 23:02:19 +02:00
Jürg Lehni
7422e0710f
Some changes to boolean debug logging.
2015-10-20 22:04:30 +02:00
Jürg Lehni
3aa7507ce1
Avoid issues with imprecision in CurveLocation#getCurve() / trySegment()
2015-10-20 22:04:04 +02:00
Jürg Lehni
447feea1da
Improve Curve#getParameterOf() to first check curve points with zero epsilon.
2015-10-20 22:03:45 +02:00