fix: align carriageway edge handles with entry geometry

This commit is contained in:
que01 committed 2026-09-11 09:36:31 +08:00
1 parent 44fa82299b
commit a5089220b5
5 files changed
+157 -3

No files matched your search

+15
View File
@@ -113,6 +113,21 @@ the pure resolver remains reusable by preview and formal compilation.
The handle manifest reports `axisAzimuth = tangent + 90` for both sides, which is
therefore *right*. Handle placement must offset the left handle by `tangent - 90`.
Complex carriageway edge handles use the same convention, but their position is
the effective inner entry section rather than the legacy cutback point:
```text
innerStation = outerStation - transitionLength + positionOffset
edgeDistance = effectiveWidth / 2 + sideEdgeOffset
```
Compute the tangent at `innerStation`, then apply `directionOffsetDegrees` before
placing the left and right handles. This keeps the manifest aligned with
`JunctionBoundaryGraph` after transition, position, direction, width, or edge
edits. Tests must measure that the two handles are geographically opposite and
their separation equals `effectiveWidth + leftOffset + rightOffset` within the
geometry tolerance; checking only stored scalar values does not prove placement.
**Regression**: `makeRoadHandles()` once placed the left handle at `tangent + 90`,
drawing it over the right kerb, so dragging the visually-left handle moved the
right edge. Assert sides by geography (a north-heading road's left handle is west