Skip to content

Commit

Permalink
Update test_bbox.py
Browse files Browse the repository at this point in the history
  • Loading branch information
romanarust committed May 8, 2024
1 parent 16b9751 commit 6c27208
Showing 1 changed file with 12 additions and 20 deletions.
32 changes: 12 additions & 20 deletions tests/compas/geometry/test_bbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,29 +125,21 @@ def test_oriented_bounding_box_numpy(coords, expected):
assert TOL.is_allclose(result, expected_values)


@pytest.mark.parametrize(
"filename, expected",
[
[
"bbox_points_00.json",
[
[-16.324597659837302, 17.160372549942966, 3.56729],
[-16.324597659837302, 17.160372549942966, 2.45],
[-15.960798521686625, 13.229144025284555, 2.45],
[-15.960798521686625, 13.229144025284555, 3.56729],
[-18.2385089496689, 16.983257616692406, 3.56729],
[-18.2385089496689, 16.983257616692406, 2.45],
[-17.874709811518226, 13.052029092033992, 2.45],
[-17.874709811518226, 13.052029092033992, 3.56729],
],
]
],
)
def test_oriented_bounding_box_numpy_from_fixtures(filename, expected):
def test_oriented_bounding_box_numpy_from_fixtures():
if compas.IPY:
return

coords = compas.json_load(os.path.join(HERE, "fixtures", filename))
coords = compas.json_load(os.path.join(HERE, "fixtures", "bbox_points_00.json"))
expected = [
[-16.324597659837302, 17.160372549942966, 3.56729],
[-16.324597659837302, 17.160372549942966, 2.45],
[-15.960798521686625, 13.229144025284555, 2.45],
[-15.960798521686625, 13.229144025284555, 3.56729],
[-18.2385089496689, 16.983257616692406, 3.56729],
[-18.2385089496689, 16.983257616692406, 2.45],
[-17.874709811518226, 13.052029092033992, 2.45],
[-17.874709811518226, 13.052029092033992, 3.56729],
]

from compas.geometry import oriented_bounding_box_numpy

Expand Down

0 comments on commit 6c27208

Please sign in to comment.