Skip to content

Commit

Permalink
Merge pull request #371 from favreau/master
Browse files Browse the repository at this point in the history
Fixed get_model_bounds python API
  • Loading branch information
favreau authored May 22, 2024
2 parents 9ebce6a + fa78aca commit 552d32a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 1 addition & 5 deletions bioexplorer/pythonsdk/bioexplorer/bio_explorer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1713,11 +1713,7 @@ def get_model_bounds(self, model_id):
min_aabb = Vector3(value[0], value[1], value[2])
value = model_bounds["maxAABB"]
max_aabb = Vector3(value[0], value[1], value[2])
value = model_bounds["center"]
center = Vector3(value[0], value[1], value[2])
value = model_bounds["size"]
size = Vector3(value[0], value[1], value[2])
return Bounds(min_aabb, max_aabb, center, size)
return Bounds(min_aabb, max_aabb)

def get_model_ids(self):
"""
Expand Down
2 changes: 2 additions & 0 deletions bioexplorer/pythonsdk/bioexplorer/math_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,8 @@ def __init__(self, min_aabb, max_aabb):
assert isinstance(max_aabb, Vector3), "max_aabb must be an instance of Vector3"
self.min_aabb = min_aabb
self.max_aabb = max_aabb
self.center = Vector3()
self.size = Vector3()
self.update()

def update(self):
Expand Down

0 comments on commit 552d32a

Please sign in to comment.