Number: 74
Title: Using ports on non-record shapes causes splines on edges
Submitter: John Breen
Date: Fri Jan 18 16:29:50 2002
Subsys: Dot
Version: 1.7.14
System: Sparc-SunOS-5.8
Severity: major
Problem:
I'm trying to use the headport and tailport attributes with box-shaped nodes. Perhaps this isn't an official feature yet - the only place I saw it described was the Dot.ref file. Basically, I want all of the edge heads to come out one side of the nodes, and the tails to all go in the opposite side (this is for a sequence diagram).

Consider the dot file shown below.

If I comment out both the "rank" statement and the "edge" statement, I get a graph with a straight line pointing from the bottom of n0 to the top of n1.

If I uncomment the "rank" statement, I get the effect I'm trying for - the right side of n0 connected to the left side of n1 - except it doesn't persist if I add more nodes (the edges connect to whatever side is closest).

Now here's where it gets strange. If I uncomment the "edge" statement, I get essentially the same graph, except the edge is a rather curvy spline, even though there's a straight path between the nodes. Just as an off-hand guess, I'd say the control points are getting their directions mixed up (but what do I know?).

If I have time, I'll try to dig through the source code, but I don't know if it would be anytime soon.

Thanks!
Input:

digraph polyport {
    nodesep=2;
    { node [shape=box];
      n0; n1;
    }
    { rank = same;
      edge [headport=":w", tailport=":e"];
      n0->n1;
    }
}
Output file: b74.svg
Owner: erg
Status: Fixed