From ff7f011826f5338b28304ad9261582fc8c3cbc94 Mon Sep 17 00:00:00 2001 From: que01 Date: Wed, 9 Sep 2026 13:46:47 +0800 Subject: [PATCH] test(junction): cover irregular six-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 1d72d4b..84cd56b 100644 --- a/test/junction-build-plan-counterexamples.js +++ b/test/junction-build-plan-counterexamples.js @@ -518,3 +518,19 @@ const irregularFiveArmGraph = buildJunctionBoundaryGraph( irregularFiveArm.helpers, ); assertCoreGeometry(irregularFiveArm.topology, irregularFiveArmGraph, point(0, 0)); + +const irregularSixArm = topology( + 'irregular-six-arm', + [2, 61, 119, 184, 247, 311].map((angle, index) => ({ + widthMeters: [4, 6, 5, 7.5, 3.5, 8][index], + line: [point(0, 0), point(Math.sin((angle * Math.PI) / 180) * 47, Math.cos((angle * Math.PI) / 180) * 47)], + })), +); +assert.equal(irregularSixArm.topology.arms.length, 6); +const irregularSixArmGraph = buildJunctionBoundaryGraph( + irregularSixArm.topology, + point(0, 0), + { outerRadiusFor: () => 30, innerRadiusFor: () => 10 }, + irregularSixArm.helpers, +); +assertCoreGeometry(irregularSixArm.topology, irregularSixArmGraph, point(0, 0));