fix(junction): protect entry surfaces from exclusion regions

This commit is contained in:
que01 committed 2026-09-09 12:01:16 +08:00
1 parent 9b6b5b5791
commit a22319a149
3 files changed
+31

No files matched your search

@@ -345,3 +345,17 @@ assert.equal(taperedSection.outerWidthMeters, 10);
assert.equal(taperedSection.innerWidthMeters, 6);
assert.ok(taperedSection.transitionMeters > 0);
assert.equal(taperedSection.transitionStatus, 'supported');
const approachExclusion = [point(-6, 8), point(6, 8), point(6, 24), point(-6, 24), point(-6, 8)];
const graphWithApproachExclusion = buildJunctionBoundaryGraph(
tee.topology,
point(0, 0),
{ outerRadiusFor: () => 30, innerRadiusFor: () => 10 },
tee.helpers,
[{ id: 'island:approach', ring: approachExclusion }],
);
const excludedSection = graphWithApproachExclusion.sections.find(
(section) => section.outer.point[1] > section.outer.point[1] - 1,
);
assert.equal(excludedSection.exclusionStatus, 'overlaps-known-region');
assert.equal(excludedSection.exclusionRegionId, 'island:approach');