Tighter corner radius clamping (len/3 instead of len/2.5)
Reduces S-curve artifacts on short intermediate segments. The previous 2.5 divisor allowed curves from adjacent bends to overlap on 24px segments. Divisor 3 gives cleaner curves on short segments. Remaining visible kink on edge/33 is from the routing's 19px+24px dogleg near End — needs routing-level fix, not rendering. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -2041,6 +2041,9 @@ public sealed class WorkflowRenderSvgRenderer
|
||||
// When removing a jog, snap the next point to the previous point's
|
||||
// axis so we get a clean L-shape instead of a diagonal.
|
||||
var mutablePoints = points.ToList();
|
||||
// No debug needed — the S-curve comes from the corner radius
|
||||
// on short intermediate segments, not from tiny jog points.
|
||||
|
||||
var cleaned = new List<WorkflowRenderPoint> { mutablePoints[0] };
|
||||
for (var i = 1; i < mutablePoints.Count; i++)
|
||||
{
|
||||
@@ -2085,7 +2088,7 @@ public sealed class WorkflowRenderSvgRenderer
|
||||
var dyOut = next.Y - curr.Y;
|
||||
var lenOut = Math.Sqrt((dxOut * dxOut) + (dyOut * dyOut));
|
||||
|
||||
var r = Math.Min(radius, Math.Min(lenIn / 2.5d, lenOut / 2.5d));
|
||||
var r = Math.Min(radius, Math.Min(lenIn / 3d, lenOut / 3d));
|
||||
if (r < 0.5d || lenIn < 1d || lenOut < 1d)
|
||||
{
|
||||
builder.Append($" L {Format(curr.X + offsetX)},{Format(curr.Y + offsetY)}");
|
||||
|
||||
Reference in New Issue
Block a user