I have been using Crtl + L to auto-layout my nodes. Sometimes it works fine, sometimes it mixes all up my patch. So I was wondering how this works internally and if we could improve it?
Some theory:
Most patches are constructed as hirarchical graph. Input top, output buttom. There are several algorithms to auto layout hirarchical graphs. They all try to layout a graph in a way that follows “aesthetic” rules so that humans find the patch easy to read. For example, it will try to find the hirarchical levels of the patch and place each node on the optimal level. They also try to avoid line crossings - it will move nodes in order to not have connections crossing each other.
Some tools:
Graphviz is one of the most know tools and open source.
yEd is great as well but expensive. Another good overview is here:
Does this really help?
If I open patches from other people I often would love to press the magical “autolayout” buttom to have the patch structured correctly. On the other hand: If the complete patch gets restructured you will lose comments that are placed next to specific nodes. But still: There is already an auto layout method in vvvv, so why not improving it? It is not super critical, of course, just an idea.
What do you think?