feat(junction): edit complex cutbacks and corners

This commit is contained in:
que01 committed 2026-09-08 14:30:43 +08:00
1 parent d0e1f62f2b
commit 80f122be46
15 files changed
+354 -38

No files matched your search

+2
View File
@@ -114,6 +114,8 @@ const KIND_LABELS: Record<ConstraintKind, string> = {
'road-lane-divider': '车道分隔',
'junction-approach-width': '进口宽度',
'cluster-carriageway-width': '车行道宽度',
'cluster-carriageway-cutback': '车行道收口距离',
'cluster-corner-radius': '角部圆角',
'junction-cutback': '进口收口距离',
'junction-corner-radius': '角部圆角',
'junction-crosswalk-inset': '斑马线退让',
+4
View File
@@ -104,6 +104,10 @@ export function constraintValueFor(
case 'junction-approach-width':
case 'cluster-carriageway-width':
return { widthMeters: Math.max(0, scalar) };
case 'cluster-carriageway-cutback':
return { cutbackMeters: Math.max(0, scalar) };
case 'cluster-corner-radius':
return { radiusMeters: Math.max(0, scalar) };
case 'junction-cutback':
return { cutbackMeters: Math.max(0, scalar) };
case 'junction-corner-radius':
+3
View File
@@ -27,6 +27,8 @@ export const CONTROL_KINDS = ['junction-crosswalk-inset', 'junction-stop-line-of
export const JUNCTION_KINDS = [
'junction-approach-width',
'cluster-carriageway-width',
'cluster-carriageway-cutback',
'cluster-corner-radius',
'junction-cutback',
'junction-corner-radius',
...CONTROL_KINDS,
@@ -59,6 +61,7 @@ export type SemanticAnchor =
// in projection.ts is the only place that moves it across.
boundaryIndex?: number;
}
| { type: 'cluster-corner'; clusterId: string; cornerKey: string; carriagewayKeys: string[] }
| { type: 'junction-approach'; nodeId: string; segmentId: string; side?: Side }
| {
type: 'cluster-carriageway';