test(junction): cover skew three-arm closure

This commit is contained in:
que01 committed 2026-09-09 13:32:08 +08:00
1 parent 103004b30a
commit 9df315ec16
1 file changed
+16
@@ -470,3 +470,19 @@ const deterministicGraph = buildJunctionBoundaryGraph(
);
assert.deepEqual(deterministicTopology, sixArm.topology, 'repeated topology resolution must be deterministic');
assert.deepEqual(deterministicGraph, sixArmGraph, 'repeated boundary graph construction must be deterministic');
const skewThreeArm = topology(
'skew-three-arm',
[20, 145, 265].map((angle, index) => ({
widthMeters: 4 + index,
line: [point(0, 0), point(Math.sin((angle * Math.PI) / 180) * 42, Math.cos((angle * Math.PI) / 180) * 42)],
})),
);
assert.equal(skewThreeArm.topology.arms.length, 3);
const skewThreeArmGraph = buildJunctionBoundaryGraph(
skewThreeArm.topology,
point(0, 0),
{ outerRadiusFor: () => 28, innerRadiusFor: () => 9 },
skewThreeArm.helpers,
);
assertCoreGeometry(skewThreeArm.topology, skewThreeArmGraph, point(0, 0));