Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds automatic graph layout to Foreman (see also #21). Are you interested in a contribution like this? I realize that the README discourages contributions, but there also haven't been recent changes. I've tried to keep the new feature in its own files.
At this point this is an experimental change. The base feature works quite well on small graphs, but it needs to be tested and optimized for large graphs. I wouldn't try it on the Seablock example, yet. There are also a lot of improvements that could be done in follow-up changes. IMHO this is already quite useful on small graphs, and I wanted to get feedback before going down the wrong direction.
One follow-up that I have been experimenting with is a continuous layout mode (see https://github.com/MForster/Foreman2/tree/continuous-layout), but that definitely needs more work. Other changes would be more configuration options, better support for flipped nodes, and the option to run the algorithm on subgraphs.
As for the details of the change, I was trying to keep the diffs to existing files minimal, which turned out to be hard because of inconsistent Tabs/Spaces/LF/CRLF and unapplied autoformat changes. I ended up normalizing the touched files first in a separate commit. Let me know if you wouldn't want me to do this.