Skip to content

Commit

Permalink
fix(geometry): catch errors in case instance geometry is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
yschindel committed Jun 20, 2022
1 parent 7f246bf commit 501d7ef
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions revitron/geometry.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,17 @@ def getSolids(self):
solids = []
try:
for geo in self._geometry:
for item in geo.GetInstanceGeometry():
try:
for item in geo.GetInstanceGeometry():
try:
if item.Volume:
solids.append(item)
except:
pass
except:
try:
if item.Volume:
solids.append(item)
if geo.Volume:
solids.append(geo)
except:
pass
except:
Expand Down

0 comments on commit 501d7ef

Please sign in to comment.