Poor edge routing and avoidable intersections of common source edges in dot
Don't get me wrong, graphviz and
dot are amazing, and I have been using them for more than 15 years now. So thank you a lot for this!
dot usually produces perfect or close to perfect results, but sometimes it does really bizarre things that are known to be an issue, and even mentioned in the man page.
CAVEATS Edge splines can overlap unintentionally.
This happens to polylines too (I assume polylines are just quantized splines internally).
This happens even for reasonably small non-planar DAGs and sometimes for fully upward planar graphs too.
Apologizes for the big size of the original: 6376 x 2508
I think fixing this would significantly improve the quality of graphviz graphs. The same happens for much simpler graph (i.e. without ports or custom styles).
My current workaround is to do
dot -Tplain-ext layout with
polylines and do postprocessing on all the edges manually to find unnecessary intersection of common source edges, and collapse into multi edges sometimes. It adds a lot of the extra complexity to my program tho of course.
I feel that maybe it could be fixed reasonably easy with some constrains on tangents of splines as they exit/enter the node? But I do not want necessarily constrain them to be to be constant 90 degree. Fanning them out gently would be preferable, just like it is doing it now, just in well ... correct order.
Graphviz 2.42.2-3 on Debian GNU/Linux testing, amd64.