Examine if the region exists before removing redundant surfaces

This commit is contained in:
Yue JIN 2020-09-03 11:09:02 +08:00
parent 726adfb46c
commit 2ace13378c

View file

@ -568,7 +568,8 @@ class Geometry:
# Iterate through all cells contained in the geometry
for cell in self.get_all_cells().values():
# Recursively remove redundant surfaces from regions
cell.region.remove_redundant_surfaces(redundant_surfaces)
if cell.region:
cell.region.remove_redundant_surfaces(redundant_surfaces)
def determine_paths(self, instances_only=False):
"""Determine paths through CSG tree for cells and materials.