diff options
Diffstat (limited to 'Build/source/utils/asymptote/base/bezulate.asy')
-rw-r--r-- | Build/source/utils/asymptote/base/bezulate.asy | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Build/source/utils/asymptote/base/bezulate.asy b/Build/source/utils/asymptote/base/bezulate.asy index c47f3144912..2710996b322 100644 --- a/Build/source/utils/asymptote/base/bezulate.asy +++ b/Build/source/utils/asymptote/base/bezulate.asy @@ -1,6 +1,7 @@ // Bezier triangulation routines written by Orest Shardt, 2008. -private real fuzz = sqrtEpsilon; +private real fuzz=sqrtEpsilon; +real duplicateFuzz=1e-3; // Work around font errors. int countIntersections(path[] p, pair start, pair end) { @@ -46,7 +47,7 @@ path[][] containmentTree(path[] paths) bool isDuplicate(pair a, pair b, real relSize) { - return abs(a-b) <= sqrtEpsilon*relSize; + return abs(a-b) <= duplicateFuzz*relSize; } path removeDuplicates(path p) @@ -101,8 +102,7 @@ void connect(path[] paths, path[] result, path[] patch) // find first intersection of line segment with outer curve path line = start--start+d*direction; real[][] ints=intersections(line,outer,fuzz); - assert(ints.length != 0); - real endtime=ints[0][1]; // endtime is time on outer + real endtime=ints.length > 0 ? ints[0][1] : 0; // endtime is time on outer pair end = point(outer,endtime); line = start--end; path rline = reverse(line); |