Repository navigation
fix(view): part draw.io neighbours by the router's own corridor - #1688
Merged
Merged
Conversation
The grid for unplaced nodes and the members inside a container were 40 px apart, less than the router needs between two boxes with port squares on their facing sides (twice its clearance plus the two half squares), so such an edge was left for draw.io to route under a notice. The gap is now derived from the router's constants: 2*Clearance + PortSize + Nudging, one nudging lane for the path. Co-Authored-By: jason.han <hanhuijun@gmail.com>
Contributor
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
6 tasks done
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.
What and why
The last genuine no-route case left after #1683: in
interconnection-constraints,noiseandmixsit 40 px apart with port squares on the facing sides, and the router needs twice its clearance (2 × 16) plus the two half port squares (10) between two boxes before a path fits — 42 is still too tight (the corridor is zero wide), 43 routes. The 40 px was the draw.io writer's owndrawioGridGap, used for the grid that lays unplaced nodes out and (asdrawioNestedGap) for the members inside a container and their distance from its header. No other form shares it: DOT, D2, PlantUML and Mermaid let their renderers lay out, and the panel's ELK spacing keeps connected nodes in different layers 2 × GAP = 64 apart, so neither moves.The gap is now derived from the router's constants rather than being a second number:
drawioGridGap = 2*route.Clearance + route.PortSize + route.Nudging(50 px) — clearance on both sides, the two half port squares, and one nudging lane for the path — anddrawioNestedGap = drawioGridGap. With it the amplifier'snoise -> mix.bbinding routes and its notice disappears.Before (develop, draw.io 32.6.1 export; draw.io routes the edge itself, slanted):
After (the router's route, with anchors and waypoints):
Golden movement, per form: draw.io 34 (every fixture with an unplaced grid or nested members; positions move by multiples of 10 px, routes follow), DOT 0, D2 0, PlantUML 0, Mermaid 0, text 0. No
not routednotice remains in any golden. Route parity is untouched: 1108 scenes / 2713 routes.Dry-merge from current develop (#1683 and #1685 in):
feat/drawio-import(#1679, headfc13fdee1) merges with no conflicts.Changelog:
changes/unreleased/drawio-grid-gap.fixed.md.How it was verified
go vet ./internal/ir/view/...,gofmt,go test ./internal/ir/view/... ./tests/hygiene/(34 draw.io goldens re-recorded, parity 1108/2713),make lint,python3 scripts/changelog.py check.route.Routesat gaps 40–60: 40–42 leave the edge unrouted, 43 and above route all five.interconnection-constraints.drawio.goldenwith draw.io desktop 32.6.1 under Xvfb (above).Checklist
make testandmake lintpass locallychanges/unreleased/<slug>.<section>.md, not as an edit toCHANGELOG.mdmake docs-countsrun if a gate count moved (compliance rows need nothing: the census is counted at docs build)F4,K5) in the body, docs, or changelogLink to Devin session: https://nasa-jpl-demo.devinenterprise.com/sessions/3f1b939418f644f9a6748f63888daf78
Open in Devin Desktop: https://nasa-jpl-demo.devinenterprise.com/desktop/session/3f1b939418f644f9a6748f63888daf78?variant=devin
Requested by: @HuiJun