test: cover safe junction exclusion holes

This commit is contained in:
que01 committed 2026-09-10 10:00:38 +08:00
1 parent 609935d209
commit bde28c8743
1 file changed
+10
@@ -150,6 +150,16 @@ const teeCore = buildCoreClosure(tee.topology, teeBoundaryGraph, point(0, 0));
assert.equal(teeCore.status, 'supported');
assert.equal(teeCore.sharedEdgeRefs.length, teeBoundaryGraph.sections.length);
assert.ok(teeCore.ring.every((coordinate) => coordinate.every(Number.isFinite)));
const safeHole = buildJunctionBoundaryGraph(
tee.topology,
point(0, 0),
{ outerRadiusFor: () => 30, innerRadiusFor: () => 10 },
tee.helpers,
[{ id: 'island:hole', isHole: true, ring: [point(-2, -2), point(2, -2), point(2, 2), point(-2, 2), point(-2, -2)] }],
);
const holedCore = buildCoreClosure(tee.topology, safeHole, point(0, 0));
assert.equal(holedCore.status, 'supported');
assert.equal(holedCore.holes.length, 1);
const exclusionRing = [point(-1, -1), point(1, -1), point(1, 1), point(-1, 1), point(-1, -1)];
const teeWithIsland = buildJunctionBoundaryGraph(
tee.topology,