diff --git a/test/junction-build-plan-counterexamples.js b/test/junction-build-plan-counterexamples.js index 54dc798..1d72d4b 100644 --- a/test/junction-build-plan-counterexamples.js +++ b/test/junction-build-plan-counterexamples.js @@ -502,3 +502,19 @@ const skewFourArmGraph = buildJunctionBoundaryGraph( skewFourArm.helpers, ); assertCoreGeometry(skewFourArm.topology, skewFourArmGraph, point(0, 0)); + +const irregularFiveArm = topology( + 'irregular-five-arm', + [5, 78, 151, 238, 319].map((angle, index) => ({ + widthMeters: [4, 7, 5.5, 3.75, 8.25][index], + line: [point(0, 0), point(Math.sin((angle * Math.PI) / 180) * 46, Math.cos((angle * Math.PI) / 180) * 46)], + })), +); +assert.equal(irregularFiveArm.topology.arms.length, 5); +const irregularFiveArmGraph = buildJunctionBoundaryGraph( + irregularFiveArm.topology, + point(0, 0), + { outerRadiusFor: () => 29, innerRadiusFor: () => 10 }, + irregularFiveArm.helpers, +); +assertCoreGeometry(irregularFiveArm.topology, irregularFiveArmGraph, point(0, 0));