Skip to content

Commit

Permalink
Assign global ID to groups
Browse files Browse the repository at this point in the history
  • Loading branch information
paulromano committed Jan 17, 2024
1 parent 7c3011a commit 1e3a7f4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/stellarmesh/moab.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,8 +256,11 @@ def material(self, name: str):
group.remove(self)

if not existing_group:
# Create new group, add name/category tags, add entity
# Create new group and add entity
new_group = self.model.create_group(f"mat:{name}")
new_group.global_id = (
max((g.global_id for g in self.model.groups), default=0) + 1
)
new_group.add(self)


Expand Down

0 comments on commit 1e3a7f4

Please sign in to comment.