Add road edge kind labeling and utilities

This commit is contained in:
2026-05-13 02:59:05 +02:00
parent a81caeecc1
commit 0f8050b8c0

View File

@@ -241,6 +241,10 @@ import {
getScenePathLabel,
getScenePathPointIndex,
getScenePaths,
normalizeScenePathRoadEdgeHeight,
normalizeScenePathRoadEdgeKind,
normalizeScenePathRoadEdgeMaterialId,
normalizeScenePathRoadEdgeWidth,
normalizeScenePathRoadFalloff,
normalizeScenePathRoadHeightOffset,
normalizeScenePathRoadShoulderWidth,
@@ -251,6 +255,8 @@ import {
normalizeScenePathRoadMaterialId,
type ScenePath,
type ScenePathCurveMode,
type ScenePathRoadEdgeKind,
type ScenePathRoadEdgeSide,
type ScenePathPoint
} from "../document/paths";
import {
@@ -1502,6 +1508,19 @@ function getPathLabelById(pathId: string, paths: ScenePath[]): string {
: getScenePathLabel(paths[pathIndex], pathIndex);
}
function getRoadEdgeKindLabel(kind: ScenePathRoadEdgeKind): string {
switch (kind) {
case "curb":
return "Curb";
case "softShoulder":
return "Soft shoulder";
case "bank":
return "Bank";
case "ditch":
return "Ditch";
}
}
function getTerrainLabel(terrain: Terrain, index: number): string {
return terrain.name ?? `Terrain ${index + 1}`;
}