]> granicus.if.org Git - graphviz/commit
Fix finally, it is hoped, the potential infinite loop in routespl. When recovering...
authorEmden Gansner <erg@research.att.com>
Thu, 1 Mar 2012 18:31:42 +0000 (13:31 -0500)
committerEmden Gansner <erg@research.att.com>
Thu, 1 Mar 2012 18:31:42 +0000 (13:31 -0500)
commitf693aeec68fa7c72781bb6d9f0b76e363d96e794
tree9fd697d780a21ad85566951da68c09ad6b07943f
parentf16a8735ca6add87b02f06a846df20674899e8b6
Fix finally, it is hoped, the potential infinite loop in routespl. When recovering unused space from
the boxes, we try to find the smallest and largest x values of the spline in the box and reduce the
box to that size. This is done by subdividing the spline into small pieces and using the end points.
If the box is small in height, it is possible none of the points will lie in the box. To handle this,
if any box is still unbounded, the spline is divided into smaller pieces and we try again. Alas, some
times the path planner just fails, with the spline not passing through some boxes. In this case, the loop
will never stop. So we now do some reasonable number of passes (initially, 15). If this isn't enough,
we use the shortest path polyline to bound the boxes. This will allow the layout to finish. The bad
spline will be emitted, but this should be obvious and, in any case, will help with debugging.
lib/common/routespl.c