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
@@ -79,6 +79,14 @@ complex-junction.js / native-road.js:构建与全部消费者;direct-edit-so
本次进一步修复路口面板保存按钮漏读 EditSession.dirty、缺少撤销重做入口、保存回调误用渲染计数导致白屏,以及长短进口没有共同范围时仍显示统一输入的问题。浏览器回归覆盖单独过渡长度输入、撤销、重做、保存重编译与刷新;后端覆盖拒绝的收口约束不影响有效过渡范围。保持父任务进行中,不将本次编辑闭环等同于全部几何验收完成。
## 接入边界手柄几何交付记录
复杂车行道左右边界手柄现统一发布向右法线,由客户端仅对左侧反转一次,修复左边界向外拖反而收窄。手柄位置使用与 BoundaryGraph 相同的有效内断面站点 `outer - transition + position`,并消费当前方向、有效宽度及各侧边界偏移;左右手柄不再重叠,曲线进口和过渡长度变化后仍落在实际编辑断面。
回归按米制测量左右手柄间距、地理侧别、过渡断面对齐以及位置/方向响应;客户端覆盖两侧向外展宽、向内收窄、约束值、ghost 位置和边界钳制。npm test、190 项客户端单测、类型检查、生产构建、11 项 E2E、format:check 与 git diff --check 通过,构建仅保留既有 bundle 大小提示。
方向控件仍以沿切线的线性拖动米数映射角度,且位置/方向自身手柄仍显示旧收口点。完整旋转交互需要单独明确手柄契约,本轮不据此关闭 A4/A5。
本轮质量门:npm test 通过;npm run test:client 通过;npm run test:client:unit 15 文件/188 测试通过;npm run test:e2e(包含 production build)11 测试通过,包含保存后重置与放弃恢复;npm run format:check 与 git diff --check 通过。构建仍有既有 bundle 大小提示。遵循用户“整体任务完成再提交”,本轮未提交、未归档父任务。
下一阶段已实现共享内边的实际米制端点误差:`sharedSeamErrors` 逐车行道报告,缺失/非邻接为 Infinity;回归通过人为 2 米偏移验证指标变化。显式过渡站点统一限制在来源折线范围,超长请求标记来源长度不足并由 solver 拒绝。全图层接缝、凹形多区域和真实 OSM 视觉验收仍未完成。