Skip to content

Commit 80e0ad9

Browse files
committed
Add bbox property to Abstract.Multi
It returns the bounding box of the multi object
1 parent 097b39e commit 80e0ad9

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

geomdl/Abstract.py

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1438,6 +1438,17 @@ def evalpts(self):
14381438
ret.append(evalpts)
14391439
return ret
14401440

1441+
@property
1442+
def bbox(self):
1443+
""" Bounding box.
1444+
1445+
:getter: Gets the bounding box of all contained shapes
1446+
"""
1447+
all_box = []
1448+
for elem in self._elements:
1449+
all_box += list(elem.bbox)
1450+
return utilities.evaluate_bounding_box(all_box)
1451+
14411452
@property
14421453
def vis(self):
14431454
""" Visualization component.

0 commit comments

Comments
 (0)