Model.compactsets#

Model.compactsets(collection)#

This command simplifies the definition of sets in Radioss by removing unnecessary nesting. It transfers subobjects from child sets directly to their parent sets and deletes the child sets if they are not referenced elsewhere.

Parameters:

collection (Collection) – The collection containing the sets on which to apply the compaction.

Example#

Apply compaction on all sets in a model#
import hm
import hm.entities as ent

model = hm.Model()

all_sets = hm.Collection(model, ent.Set)

model.compactsets(collection=all_sets)