feat(junction): enable complex carriageway width editing

This commit is contained in:
que01 committed 2026-09-08 12:09:44 +08:00
1 parent 56647fcdaa
commit c4bcbe8ff9
22 files changed
+449 -52

No files matched your search

+12 -2
View File
@@ -10,7 +10,7 @@ It is required because the feature crosses compiler, storage, and HTTP layers.
```js
resolveDirectEditConstraints(model, editDocument, context)
// -> { roadProfiles, junctionPlans, constraintStates, handles, diagnostics }
// -> { roadProfiles, junctionPlans, clusterPlans, constraintStates, handles, diagnostics }
GET /api/edit-state
POST /api/edit-preview
@@ -316,7 +316,17 @@ then `structureFromTopology(topology, shape, center, features)`. Projection is
`cluster:<id>`. The legacy singular field is null at this unscoped entry point.
- `GET /api/edit-state?junction=<node>` preserves the node selection contract;
`?cluster=<id>` selects a cluster. Preview uses the equivalent `selection`
object. Cluster handle manifests are empty until a future writable contract.
object. A selected editable cluster publishes only `cluster-carriageway-width`
handles for its external carriageways.
- A `cluster-carriageway-width` anchor contains `clusterId`, stable
`carriagewayKey`, `sourceNodeIds`, and `sourceRoadIds`. Replay matches all
source identity; a missing or changed source is stale with `anchor-missing`.
The solver stores accepted values in `clusterPlans`, and `compileGeometry()`
applies them to the matching complex-junction approach before geometry is
generated. It must not widen unrelated member-node approaches.
- Preview and save both evaluate the same candidate through the resolver and
`compileGeometry()`. Save rejects every `severity: error` diagnostic before
writing the edit document.
- Complex road-surface features carry `junction_key`, `object_key` and relevant
`arm_key`, `carriageway_key`, `corner_key`. Core (or the first remaining
approach when the core fails) carries `junction_structure` for persisted reads.