Skip to content
Open
Changes from 1 commit
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
4 changes: 4 additions & 0 deletions src/geouned/GEOUNED/conversion/cell_definition.py
Original file line number Diff line number Diff line change
Expand Up @@ -894,6 +894,10 @@ def no_overlapping_cell(metaList, surfaces, options):
comp.clean()

m.set_definition(new_def)
for i in range(len(m.Definition.elements)):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the index i should be reversed otherwise if there are more than one element to remove, the module pop(i) will not remove the correct element
the line should be :
for i in reversed(range(len(m.Definition.elements))):

if type(m.Definition.elements[i].elements) is bool:
logger.info(f"Removed a Solid {i} from cell {m.__id__}")
m.Solids.pop(i)
m.Definition.join_operators()
m.Definition.level_update()

Expand Down