From 9df315ec164d6e59c7d4a619898d87fb0fa2b89c Mon Sep 17 00:00:00 2001 From: que01 Date: Wed, 9 Sep 2026 13:32:08 +0800 Subject: [PATCH] test(junction): cover skew three-arm closure --- test/junction-build-plan-counterexamples.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/test/junction-build-plan-counterexamples.js b/test/junction-build-plan-counterexamples.js index 69d8e9b..9f7f5ad 100644 --- a/test/junction-build-plan-counterexamples.js +++ b/test/junction-build-plan-counterexamples.js @@ -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));