Collapse short doglegs: routing-level (gated) + rendering-level (30px)

Routing: CollapseShortDoglegs processes one dogleg at a time, accepts
only if no entry-angle/node-crossing/shared-lane regressions.

Rendering: jog filter increased to 30px to catch 19px+24px doglegs
that the routing can't collapse without violations. The filter snaps
the next point's axis to prevent diagonals.

Sharp corners (r=0) for tight doglegs where both segments < 30px.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
master
2026-04-02 16:30:07 +03:00
parent 6c70c6bd20
commit 58d2ba83ab
3 changed files with 67 additions and 1 deletions

View File

@@ -2052,7 +2052,7 @@ public sealed class WorkflowRenderSvgRenderer
var dxIn = Math.Abs(curr.X - prev.X);
var dyIn = Math.Abs(curr.Y - prev.Y);
var segLen = dxIn + dyIn;
if (segLen < 24d && i < mutablePoints.Count - 1)
if (segLen < 30d && i < mutablePoints.Count - 1)
{
var next = mutablePoints[i + 1];
if (dxIn < dyIn)