Commit fc06111
fix(library): a dragged bend arm rests on the adjacent parallel arm, not through it
Squeezing a loop's arms together (e.g. diagram 83) did not collapse cleanly: dragging an
arm toward the parallel arm two segments away let it sail straight through and grow a
fresh zig-zag on the far side, which read as the geometry "pushing apart" instead of
merging. The lane had walls only at the endpoint stubs, none at the neighbouring arm.
getBendLaneBounds now also clamps a dragged arm's lane at each parallel arm two segments
away (joined to it by the perpendicular connectors i±1), on whichever side that arm
currently sits. The lane comes to rest exactly where the connector collapses to zero, so
the loop merges to the clean route and further dragging in the same direction does
nothing — matching the existing "follow the cursor, stop at a wall" model. A neighbour
already coincident imposes no bound (already merged).
Unit tests cover the clamp toward each side; the U-merge release tests, bend-drag e2e,
interactions, zoom and the routing-quality gate are unaffected (290 unit + gate green).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 5313620 commit fc06111
2 files changed
Lines changed: 64 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2968 | 2968 | | |
2969 | 2969 | | |
2970 | 2970 | | |
| 2971 | + | |
| 2972 | + | |
| 2973 | + | |
| 2974 | + | |
| 2975 | + | |
| 2976 | + | |
| 2977 | + | |
| 2978 | + | |
| 2979 | + | |
| 2980 | + | |
| 2981 | + | |
| 2982 | + | |
| 2983 | + | |
| 2984 | + | |
| 2985 | + | |
| 2986 | + | |
| 2987 | + | |
2971 | 2988 | | |
2972 | 2989 | | |
2973 | 2990 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
32 | 32 | | |
33 | 33 | | |
34 | 34 | | |
| 35 | + | |
35 | 36 | | |
36 | 37 | | |
37 | 38 | | |
| |||
1533 | 1534 | | |
1534 | 1535 | | |
1535 | 1536 | | |
| 1537 | + | |
| 1538 | + | |
| 1539 | + | |
| 1540 | + | |
| 1541 | + | |
| 1542 | + | |
| 1543 | + | |
| 1544 | + | |
| 1545 | + | |
| 1546 | + | |
| 1547 | + | |
| 1548 | + | |
| 1549 | + | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
1536 | 1583 | | |
1537 | 1584 | | |
1538 | 1585 | | |
| |||
0 commit comments