fix(junction): protect entry surfaces from exclusion regions
This commit is contained in:
1 parent
9b6b5b5791
commit
a22319a149
3 files changed
+31
No files matched your search
@@ -65,9 +65,13 @@ function buildJunctionBoundaryGraph(topology, center, radii, helpers, exclusionR
|
||||
const outer = sectionAt(item, outerRadius, center, outerWidthMeters, helpers);
|
||||
const inner = sectionAt(item, innerRadius, center, innerWidthMeters, helpers);
|
||||
const key = `boundary:${item.key}`;
|
||||
const sectionRing = [outer.right, inner.right, inner.left, outer.left, outer.right];
|
||||
const exclusion = exclusionRegions.find((region) => ringsOverlap(region.ring, sectionRing));
|
||||
return {
|
||||
key,
|
||||
carriagewayKey: item.key,
|
||||
exclusionStatus: exclusion ? 'overlaps-known-region' : 'clear',
|
||||
...(exclusion ? { exclusionRegionId: String(exclusion.id ?? '') } : {}),
|
||||
armKey: item.armKey,
|
||||
outerWidthMeters,
|
||||
innerWidthMeters,
|
||||
|
||||
Reference in new issue
Block a user