mirror of
https://github.com/scratchfoundation/paper.js.git
synced 2025-01-03 19:45:44 -05:00
Fatline clipping: fix convergence check to be more strict
This commit is contained in:
parent
ac41f0d3c1
commit
ef66b6dbe6
1 changed files with 2 additions and 2 deletions
|
@ -1177,7 +1177,7 @@ new function() { // Scope for methods that require numerical integration
|
|||
dp2 = getSignedDistance(q0x, q0y, q3x, q3y, v1[4], v1[5]),
|
||||
dp3 = getSignedDistance(q0x, q0y, q3x, q3y, v1[6], v1[7]);
|
||||
|
||||
if(q0x === q3x){
|
||||
if(q0x === q3x && umax-umin <= Numerical.EPSILON && recursion > 3){
|
||||
// fatline of Q has converged to a point. The clipping is not reliable.
|
||||
// Return the value we have even though we will miss the precision.
|
||||
var tminNew = (tmax + tmin) / 2, tmaxNew = tminNew,
|
||||
|
@ -1235,7 +1235,7 @@ new function() { // Scope for methods that require numerical integration
|
|||
}
|
||||
else // Iterate
|
||||
addCurveIntersections(v2, v1New, curve2, curve1, locations,
|
||||
umin, umax, tminNew, tmaxNew, tDiff, !reverse, recursion);
|
||||
umin, umax, tminNew, tmaxNew, tDiff, !reverse, recursion+1);
|
||||
|
||||
/*#*/ } else { // !__options.fatline
|
||||
// Subdivision method
|
||||
|
|
Loading…
Reference in a new issue