fix(junction): reject overlapping exclusion cores

This commit is contained in:
que01 committed 2026-09-09 10:00:32 +08:00
1 parent 75bdfbe607
commit 3bf2edaf99
2 files changed
+34 -1

No files matched your search

@@ -135,6 +135,15 @@ const teeWithIsland = buildJunctionBoundaryGraph(
[{ id: 'island:known', ring: exclusionRing }],
);
assert.equal(buildCoreClosure(tee.topology, teeWithIsland, point(0, 0)).reason, 'known-exclusion-region');
const enclosingExclusion = [point(-30, -30), point(30, -30), point(30, 30), point(-30, 30), point(-30, -30)];
const teeInsideExclusion = buildJunctionBoundaryGraph(
tee.topology,
point(0, 0),
{ outerRadiusFor: () => 30, innerRadiusFor: () => 10 },
tee.helpers,
[{ id: 'island:enclosing', ring: enclosingExclusion }],
);
assert.equal(buildCoreClosure(tee.topology, teeInsideExclusion, point(0, 0)).reason, 'known-exclusion-region');
// Offset and unequal-width approaches preserve individual source sections and
// local section tangents rather than a single arm envelope.