test: cover multiple automatic exclusion holes
This commit is contained in:
1 parent
3d5cc2de6b
commit
36c5d5c4c8
2 files changed
+25
-2
No files matched your search
@@ -188,6 +188,28 @@ const holedCore = buildCoreClosure(tee.topology, safeHole, point(0, 0));
|
||||
assert.equal(holedCore.status, 'supported');
|
||||
assert.equal(holedCore.holes.length, 1);
|
||||
assert.equal(holedCore.requiredPavementConnected, true, 'a contained hole must preserve every required entry seam');
|
||||
const multiHoleGraph = buildJunctionBoundaryGraph(
|
||||
tee.topology,
|
||||
point(0, 0),
|
||||
{ outerRadiusFor: () => 30, innerRadiusFor: () => 10 },
|
||||
tee.helpers,
|
||||
[
|
||||
{
|
||||
id: 'island:hole-west',
|
||||
isHole: true,
|
||||
ring: [point(-1.8, -1.8), point(-0.2, -1.8), point(-0.2, -0.2), point(-1.8, -0.2), point(-1.8, -1.8)],
|
||||
},
|
||||
{
|
||||
id: 'island:hole-east',
|
||||
isHole: true,
|
||||
ring: [point(0.2, 0.2), point(1.8, 0.2), point(1.8, 1.8), point(0.2, 1.8), point(0.2, 0.2)],
|
||||
},
|
||||
],
|
||||
);
|
||||
const multiHoleCore = buildCoreClosure(tee.topology, multiHoleGraph, point(0, 0));
|
||||
assert.equal(multiHoleCore.status, 'supported');
|
||||
assert.equal(multiHoleCore.holes.length, 2, 'multiple contained holes must be preserved automatically');
|
||||
assert.equal(multiHoleCore.requiredPavementConnected, true);
|
||||
const exclusionRing = [point(-1, -1), point(1, -1), point(1, 1), point(-1, 1), point(-1, -1)];
|
||||
const teeWithIsland = buildJunctionBoundaryGraph(
|
||||
tee.topology,
|
||||
|
||||
Reference in new issue
Block a user