Take the ImGui suite at 3.25.0 - #31
Merged
Merged
Conversation
3.25.0 untangles the links in the node editor (ktsu-dev/ImGuiApp#366). Two links arriving at one node from two different bodies cross whenever the bodies sit in the opposite vertical order to the pins they arrive at. In this editor's own Counter document, `assign` and `return` both feed `function Add` and were doing exactly that. Nothing in the layout could see it: every force acts on one link or one pair of bodies at a time, and each of those two links is individually short, level and well spaced. Measured upstream over 150 random starting arrangements of a graph the size of the Counter document: | measure | before | after | |--------------------------------------|--------|-------| | crossings, links sharing a node | 5.79 | 4.65 | | crossings, links sharing nothing | 2.09 | 1.04 | | links drawn over an unrelated body | 3.19 | 3.03 | | mean angle off horizontal | 27.7d | 24.8d | | worst body overlap | 0 | 0 | Total crossings fall 28%. The one cost is hidden link length, 228 to 241 pixels: the same number of links are hidden, slightly more of each. Directory.Packages.props only - the six packages published from the ImGuiApp repo, 3.24.0 to 3.25.0. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01D2KNUKr1xJPTEdDmeF2tQN
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.



Why
3.25.0 untangles the links in the node editor (ktsu-dev/ImGuiApp#366).
Two links arriving at one node from two different bodies cross whenever the bodies sit in the opposite vertical order to the pins they arrive at — the upper body's link has to dive under the lower body's to reach the lower pin. In this editor's own
Counterdocument,assignandreturnboth feedfunction Addand were doing exactly that.Nothing in the layout could see it. Every force acts on one link or one pair of bodies at a time, and each of those two links is individually short, level and well spaced — they were only wrong about each other. Measured upstream, sibling twist accounted for 5.76 of 5.79 crossings between links sharing a node, and those outnumbered crossings between unrelated links nearly three to one.
Measured over 150 random starting arrangements of a graph the size of the
Counterdocument:Total crossings fall 28%. The one cost is hidden link length, 228 → 241px: the same number of links are hidden, slightly more of each.
Getting there needed the overlap pass to give the untwist room. Separating a pair along the very axis it is trying to move on holds it exactly one clearance apart on the wrong side of itself, so each untangle now gets the axis it travels on and is separated on the other — a reorder along X is pushed apart on Y, a swap along Y is pushed apart on X. A settled graph is still left with no overlaps at all.
What changed
Directory.Packages.propsonly — the six packages published from the ImGuiApp repo, 3.24.0 to 3.25.0:ktsu.ImGui.App,ktsu.ImGui.App.Testing,ktsu.ImGui.SyntaxHighlighting,ktsu.ImGui.Widgets,ktsu.ImGui.NodeEditor,ktsu.ForceDirectedLayout.Verification
563693f).ktsu.ImGui.Applagged the other five by several minutes, which is the exact shape of theNU1102that bit an earlier bump — and cleared the NuGet HTTP cache first.dotnet build -c Releaseclean,Coder.Test329/329 against 3.25.0.Not verified visually: this environment is headless. The upstream change alters where nodes settle rather than how fast, so it should be visible as fewer links crossing near the
function Addandfunction Nextnodes.🤖 Generated with Claude Code
https://claude.ai/code/session_01D2KNUKr1xJPTEdDmeF2tQN
Generated by Claude Code