Spread corridor entries across End right face
Each corridor edge enters End at a distinct Y position (1/n+1 fraction) so the highways are visually traceable all the way to the terminus. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -332,11 +332,13 @@ internal static partial class ElkEdgeRouterIterative
|
||||
// Enter End from the right side: corridor goes past End,
|
||||
// descends to End's center Y, approaches from right.
|
||||
// This avoids the ugly long vertical drop from corridor.
|
||||
// Offset both X and Y for each corridor edge so their
|
||||
// vertical descent legs don't overlap (parallel vertical
|
||||
// segments at the same X trigger target-join detection).
|
||||
// Offset both X and Y for each corridor edge so they
|
||||
// enter End at distinct positions (visually traceable).
|
||||
var rightApproachX = tgtNode.X + tgtNode.Width + 24d + (corridorFixed * (nodeSizeClearance + 4d));
|
||||
var centerY = tgtNode.Y + (tgtNode.Height / 2d);
|
||||
// Spread entry points across the right face. First edge
|
||||
// enters at 1/3 from top, second at 2/3, etc.
|
||||
var slotFraction = (corridorFixed + 1d) / (corridorFixed + 2d);
|
||||
var centerY = tgtNode.Y + (tgtNode.Height * slotFraction);
|
||||
newPath =
|
||||
[
|
||||
src,
|
||||
|
||||
Reference in New Issue
Block a user