test(junction): cover skew four-arm closure
This commit is contained in:
1 parent
9df315ec16
commit
173296e348
1 file changed
+16
@@ -486,3 +486,19 @@ const skewThreeArmGraph = buildJunctionBoundaryGraph(
|
|||||||
skewThreeArm.helpers,
|
skewThreeArm.helpers,
|
||||||
);
|
);
|
||||||
assertCoreGeometry(skewThreeArm.topology, skewThreeArmGraph, point(0, 0));
|
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));
|
||||||
Reference in new issue
Block a user