mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-06 04:42:15 -05:00
Use addLineIntersection() in subdivision algorithm as well.
This commit is contained in:
parent
20737c6664
commit
9540b7f6a9
1 changed files with 1 additions and 5 deletions
|
@ -1162,11 +1162,7 @@ new function() { // Scope for methods that require numerical integration
|
|||
&& (Curve.isLinear(v2)
|
||||
|| Curve.isFlatEnough(v2, /*#=*/ Numerical.TOLERANCE))) {
|
||||
// See if the parametric equations of the lines interesct.
|
||||
var point = Line.intersect(
|
||||
v1[0], v1[1], v1[6], v1[7],
|
||||
v2[0], v2[1], v2[6], v2[7]);
|
||||
if (point)
|
||||
addLocation(locations, curve1, null, point, curve2);
|
||||
addLineIntersection(v1, v2, curve1, curve2, locations);
|
||||
} else {
|
||||
// Subdivide both curves, and see if they intersect.
|
||||
// If one of the curves is flat already, no further subdivion
|
||||
|
|
Loading…
Reference in a new issue