Number: 46
Title: Assert error with edges between clusters
Submitter: Carlos Puchol
Date: 31 Jul 2001
Subsys: Dot
Version: 1.7.7
System: *-*-*
Severity: major
Problem:
Certain graphs trigger assertion failures in the code for edges connecting clusters.

Error: segment [(-13,167),(-5,172)] does not intersect box ll=(-26,148),ur=(60,236) dot: compound.c:93: boxIntersect: Assertion `0' failed.
Input:

digraph top {
    compound=true;
    subgraph cluster_A { label="A";
        subgraph cluster_B { label="B";
            subgraph cluster_C { label="C";
                subgraph cluster_C_children { style=invis;
                    E;
                }
            }
        }
        subgraph cluster_D { label="D";
            F;
        }
    }
    C -> F [label = "X0", weight=3, lhead=cluster_D, weight=3, ltail=cluster_B];
    C -> F [label = "X4", weight=3, lhead=cluster_D, weight=3, ltail=cluster_B];
    E -> F [label = "X1", weight=3, lhead=cluster_D, weight=3, ltail=cluster_C];
    E -> F [label = "_"];
    F -> E [label = "X2", weight=3, ltail=cluster_D];
    F -> E [label = "X3", weight=3, ltail=cluster_D];
}
Fix:
The original version assumed the spline path always progressed from the tail to the head. For some nodes, this is not true. The code now tests for this reversal and switches the role of head and tail.

Note that this type of reversal is not explicitly flagged. The current test assumes a reversal occurs when the rank or order of the tail is greater than the head.
Owner: erg
Status: Fixed