fix(junction): bound complex cutback transitions

This commit is contained in:
que01 committed 2026-09-09 10:28:55 +08:00
1 parent 280b726c6f
commit 4e7274ec61
4 files changed
+23 -4

No files matched your search

+6 -3
View File
@@ -344,9 +344,12 @@ function numericValue(constraint, key, fallback) {
function clusterCutbackMaximum(cluster, approachLength) {
const metrics = complexJunctionMetrics(cluster);
// The carriageway's outer edge may retreat only to the core safety envelope.
// The other cap preserves a usable part of a short source approach.
return Math.min(approachLength * 0.45, Math.max(1, metrics.approachOuterRadius - (metrics.coreRadius + 4)));
// Keep a measurable local taper between the source-road outer section and
// the inner core section. The other cap preserves a usable source approach.
return Math.min(
approachLength * 0.45,
Math.max(1, metrics.approachOuterRadius - (metrics.approachInnerRadius + metrics.minimumTransitionMeters)),
);
}
function roadGroups(model) {