From 173296e34841fc1b230b3969323682742d3655a0 Mon Sep 17 00:00:00 2001 From: que01 Date: Wed, 9 Sep 2026 13:38:32 +0800 Subject: [PATCH] test(junction): cover skew four-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 9f7f5ad..54dc798 100644 --- a/test/junction-build-plan-counterexamples.js +++ b/test/junction-build-plan-counterexamples.js @@ -486,3 +486,19 @@ const skewThreeArmGraph = buildJunctionBoundaryGraph( skewThreeArm.helpers, ); assertCoreGeometry(skewThreeArm.topology, skewThreeArmGraph, point(0, 0)); + +const skewFourArm = topology( + 'skew-four-arm', + [15, 100, 205, 300].map((angle, index) => ({ + widthMeters: [3.5, 6.5, 4.25, 8][index], + line: [point(0, 0), point(Math.sin((angle * Math.PI) / 180) * 48, Math.cos((angle * Math.PI) / 180) * 48)], + })), +); +assert.equal(skewFourArm.topology.arms.length, 4); +const skewFourArmGraph = buildJunctionBoundaryGraph( + skewFourArm.topology, + point(0, 0), + { outerRadiusFor: () => 30, innerRadiusFor: () => 10 }, + skewFourArm.helpers, +); +assertCoreGeometry(skewFourArm.topology, skewFourArmGraph, point(0, 0));