Commit graph

56 commits

Author SHA1 Message Date
Jürg Lehni
f28e6ba372 Merge handling of flat curves. 2013-05-24 22:03:42 -07:00
Jürg Lehni
44be94e55e More getConvexHull() clean up. 2013-05-24 21:47:19 -07:00
Jürg Lehni
6374164de7 Remove unused variable dqmin. 2013-05-24 21:32:15 -07:00
Jürg Lehni
b1562d7594 Further clean up clipFatLine() 2013-05-24 21:31:32 -07:00
Jürg Lehni
696887477a Some clean up in clipFatLine() 2013-05-24 21:24:52 -07:00
Jürg Lehni
24f61c854a Merge the two convergence checks to one. 2013-05-24 21:11:10 -07:00
Jürg Lehni
ec1ef905cf Simplify convergence checks. 2013-05-24 21:10:02 -07:00
Jürg Lehni
eeac15ac46 Rename p\d to part\d 2013-05-24 21:05:20 -07:00
Jürg Lehni
9cf6536e5b Rename v\dt to range\d 2013-05-24 21:02:58 -07:00
Jürg Lehni
08245f936b Simplify handling of ranges and curve parts. 2013-05-24 21:01:37 -07:00
Jürg Lehni
1d1375915a Switch to using arrays rather than objects for parameter ranges. 2013-05-24 20:50:28 -07:00
Jürg Lehni
4a53767021 Reverse logic of v1t / _v1t naming and switch to using Numerical constants. 2013-05-24 20:39:40 -07:00
Jürg Lehni
6eab957fce Re-implement Curve.getLocation2() as "hub" for all the different intersection methods. 2013-05-24 20:25:29 -07:00
Jürg Lehni
7ef52b3dd4 Use break; instead of return; and untangle unnecessarily nested conditionals. 2013-05-24 20:12:42 -07:00
Jürg Lehni
d77fc505c7 Define private addLocation() to reduce code redundancy. 2013-05-24 20:04:48 -07:00
Jürg Lehni
be76cf22bb Correctly handle calculation of CurveLocation point in getCurveIntersections(). 2013-05-24 19:56:40 -07:00
Jürg Lehni
7f03ff83af Move Curve.getIntersection2 to private function and better name other private functions. 2013-05-24 19:55:17 -07:00
Jürg Lehni
26d79e6c16 Always use parameter in getCurveLineIntersection() by flipping curve1 / 2 values as well. 2013-05-24 19:53:30 -07:00
Jürg Lehni
d964ca3496 More fat-line refactoring.
Renaming and simple clean ups.
2013-05-24 19:36:26 -07:00
Jürg Lehni
f387d1596e Further simplify fat line code. 2013-05-24 18:00:28 -07:00
Jürg Lehni
fb477da0e4 Scope fat-line code, fix variable leakage and rename private functions. 2013-05-24 17:50:10 -07:00
Jürg Lehni
1eb1580112 More code clean-up.
Keep it all to 80 chars per line, and some more coding convention enforcements.
2013-05-24 17:40:11 -07:00
Jürg Lehni
662736ebf2 Move getIntersections2 to PathItem.prototype. 2013-05-24 17:27:56 -07:00
Jürg Lehni
ed572e7d48 Do not pre-calculate numeric values, count on optimizing JS engines to do that for us. 2013-05-24 17:14:23 -07:00
Jürg Lehni
aac8bf83fd Convert to Paper.js coding conventions. 2013-05-24 17:08:28 -07:00
hkrish
239462b5a4 Return only the "valid" intersections, by backtracing, like in paperjs 2013-05-20 19:26:16 +02:00
hkrish
9806173d3f Increase the recusion depth cut-off. And voilà!! 2013-05-19 18:21:41 +02:00
hkrish
3a881e3a14 Resolve some bad clipping 2013-05-19 16:22:15 +02:00
hkrish
f6e474da50 Check curve bounds before recursively clipping.
The speeds are back to "normal"!
2013-05-15 21:53:05 +02:00
hkrish
48e5d3aa8e Calculate abscissae directly 2013-05-14 23:37:01 +02:00
hkrish
0a9a0bdb9b Efficient calculation of tmax, tmin 2013-05-14 22:34:25 +02:00
hkrish
ebbe2d7569 Increase stability of the implementation 2013-05-14 22:15:11 +02:00
hkrish
4e2680e605 Minor optimizations 2013-05-14 20:27:04 +02:00
hkrish
17d356b117 Optimise 2013-05-12 22:14:41 +02:00
hkrish
3037f764ee Avoid endless recursion 2013-05-12 17:33:45 +02:00
hkrish
92b4e44dad if dmin or dmax does not intersect w/ c-hull reset to a very small value 2013-05-12 17:00:23 +02:00
hkrish
378dcb8461 Do a Curve-Line intersection if the curves are flat enough 2013-05-12 16:42:31 +02:00
hkrish
fed2a73903 Curve - line intersection 2013-05-12 15:12:53 +02:00
hkrish
6064d73379 Avoid unnecessary recursion
Especially when this curve's extended fatline (infinite) intersects
with another curve ouside this curve's bounds.
2013-05-12 03:12:48 +02:00
hkrish
a26a2dbf0c Added getIntersections for Paths and CompoundPaths 2013-05-11 16:15:45 +02:00
hkrish
9c852ee3db More comments 2013-05-11 14:25:42 +02:00
hkrish
48ab34a116 Minor cleanup. 2013-05-11 14:15:38 +02:00
hkrish
483a43c887 Added more comments 2013-05-11 01:50:34 +02:00
hkrish
ac05de7426 Fatline clipping working now. Needs more tests! 2013-05-11 00:47:52 +02:00
hkrish
3e968eacf8 Intersect rewrite in progress.. 2013-05-10 20:46:07 +02:00
hkrish
910740d82d Subdivition: needs complete rewrite 2013-05-09 14:37:16 +02:00
hkrish
0785af76ee Fat-line clipping. Needs more tests. 2013-05-05 17:45:06 +02:00
hkrish
fd30fa8427 Migrate Convexhull code to Intersect.js 2013-05-05 15:34:20 +02:00
hkrish
7075427619 Convex hull code in progress 2013-05-05 13:38:56 +02:00
hkrish
14c731edc0 Almost working. But needs a better solution that can handle multiple ixs 2013-05-05 12:15:18 +02:00