Commit 75ddb658 authored by Michiel Cottaar's avatar Michiel Cottaar
Browse files

BUG: test new triangle code

parent 42b38735
......@@ -116,7 +116,14 @@ def test_radius_center():
tria = sp.rand(1000, 3, 3)
req = request.VertexRequest(tria)
assert (req.center() == tria.mean(-1)).all()
assert (req.radius() <= sp.sqrt(3) / 2).all()
assert req.radius() <= sp.sqrt(3) / 2
tria = sp.zeros((1, 3, 3))
assert request.VertexRequest(tria).radius() == 0.
tria[0, 1:, :] = 1.
assert request.VertexRequest(tria).radius() == 0.
tria[0, :, 0] = 1.
assert_allclose(request.VertexRequest(tria).radius(), 2/3.)
req = request.MultRequest([request.PositionRequest(pos1),
request.VoxelRequest(pos1 * 2, size=37., nsplit=5)])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment