Skip to content

Bounding box only accept 4 or 6 elements. #1305

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 20, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions _unittest/test_02_2D_modeler.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,3 +167,6 @@ def test_12_objects_in_bounding_box(self):
with pytest.raises(ValueError):
bounding_box = [3, 4, 5]
self.aedtapp.modeler.objects_in_bounding_box(bounding_box)
with pytest.raises(ValueError):
bounding_box_5_elements = [1, 2, 3, 4, 5]
self.aedtapp.modeler.objects_in_bounding_box(bounding_box_5_elements)
2 changes: 1 addition & 1 deletion pyaedt/modeler/Model2D.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def objects_in_bounding_box(self, bounding_box, check_lines=True, check_sheets=T
list of :class:`pyaedt.modeler.Object3d`
"""

if len(bounding_box) not in [4, 6]:
if len(bounding_box) != 4 and len(bounding_box) != 6:
raise ValueError("Bounding box must be a list of 4 or 6 elements.")

if len(bounding_box) == 4:
Expand Down