Use addLineIntersection() in subdivision algorithm as well.

This commit is contained in:
Jürg Lehni 2013-05-26 17:10:29 -07:00
parent 20737c6664
commit 9540b7f6a9

View file

@ -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