Model.rigidlinkupdatebycollector#

Model.rigidlinkupdatebycollector(element_entity, node_entity, collection_set, entity_type)#

Updates the rigid link with one independent node and dependent node by collection.

Parameters:
  • element_entity (Entity) – The object describing the rigid element entity.

  • node_entity (Entity) – The object describing the independent node entity.

  • collection_set (CollectionSet) – The set of collections containing possibly multiple type of entities.

  • entity_type (EntityFullType) – Entity type of collector. Valid entity types are components, materials, parts (representing assemblies), properties and sets.

Example#

Update a rigid link element ID 7 with independent node ID 10 and dependent node specified by comps ID 1 and 2 put on a collection set#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains the components
component_collection = hm.Collection(model, ent.Component, [1, 2])

# Creating the collection set that contains the collection with the components
collection_set_comps = hm.CollectionSet(model)
collection_set_comps.set(component_collection)

model.rigidlinkupdatebycollector(
    element_entity=ent.Element(model, 7),
    node_entity=ent.Node(model, 10),
    collection_set=collection_set_comps,
    entity_type=ent.Component,
)