]> granicus.if.org Git - graphviz/commitdiff
Give a better warning message if there appear to be overlapping nodes when splines...
authorEmden Gansner <emdenrg@google.com>
Wed, 2 Mar 2016 17:07:51 +0000 (12:07 -0500)
committerEmden Gansner <emdenrg@google.com>
Wed, 2 Mar 2016 17:07:51 +0000 (12:07 -0500)
lib/fdpgen/clusteredges.c

index f10b1f9f1882be60b121f6479d7eb11ef0324cf3..cb6f2288683e0a96d8a4b858c05b737ec3941fa7 100644 (file)
@@ -29,6 +29,7 @@
 #include <fdp.h>
 #include <neatoprocs.h>
 #include "vispath.h"
+#include "pack.h"
 
 typedef struct {
     int cnt;
@@ -284,10 +285,17 @@ int compoundEdges(graph_t * g, expand_t* pm, int edgetype)
                    }
                }
                else {
-                   if (Verbose)
-                       fprintf(stderr,
-                               "nodes touch - falling back to straight line edges\n");
-                   rv = 1;
+                   if (rv == 0) {
+                       expand_t margin = sepFactor(g);
+                       int pack = getPack (g, CL_OFFSET, CL_OFFSET); 
+                       agerr(AGWARN, "compoundEdges: nodes touch - falling back to straight line edges\n");
+                       if ((pack <= pm->x) || (pack <= pm->y))
+                           agerr(AGPREV, "pack value %d is smaller than esep (%.03f,%.03f)\n", pack, pm->x, pm->y);
+                       else if ((margin.x <= pm->x) || (margin.y <= pm->y))
+                           agerr(AGPREV, "sep value (%.03f,%.03f) is smaller than esep (%.03f,%.03f)\n",  
+                               margin.x, margin.y, pm->x, pm->y);
+                       rv = 1;
+                   }
                    continue;
                }