Model.rigidsconnectivityupdate#
- Model.rigidsconnectivityupdate(element, update_independent_node, independent_node, update_dependent_node, dependent_collection, dependent_type_change, config_change, attach_set)#
Updates a rigid/rigidlink element with the given independent and/or dependent nodes. When
attach_setis set to 1, the attached set is created or updated from a given mark of dependent nodes.- Parameters:
element (Entity) – The entity object representing the RBE3 element.
update_independent_node (int) – If set to 1, the independent node of the element is updated with the given
independent_nodeentity.independent_node (Entity) – The entity object representing the independent node.
update_dependent_node (int) – If set to 1, the dependent node of the element is updated with the given nodes in
dependent_collection.dependent_collection (Collection) – The collection containing the dependent nodes or sets of nodes.
dependent_type_change (int) – If set to 1, the dependent selection type changed between multiple and single node selection considering the valid node counts.
config_change (int) – If set to 1, the config of the element is changed between 5 (rigid) and 55 (rigidlink) considering the valid node counts.
attach_set (int) – If set to 1, the attached set is created or updated from a given mark of dependent nodes.
Example#
Update a rigidlink element with ID 1752 with independent node with ID 1743 and dependent nodes with IDs 1792, 1832, 1833 and 1835#import hm import hm.entities as ent model = hm.Model() node_col = hm.Collection(model, ent.Node, [1792, 1832, 1833, 1835]) model.rigidsconnectivityupdate( element=ent.Element(model, 1752), update_independent_node=1, independent_node=ent.Node(model, 1743), update_dependent_node=1, dependent_collection=node_col, dependent_type_change=0, config_change=0, attach_set=0 )
Update a rigidlink element with ID 1752 with dependent set of nodes “set9”#import hm import hm.entities as ent model = hm.Model() set_col = hm.Collection(model, ent.Set, "name=set9") model.rigidsconnectivityupdate( element=ent.Element(model, 1752), update_independent_node=0, independent_node=None, update_dependent_node=1, dependent_collection=set_col, dependent_type_change=0, config_change=0, attach_set=0 )
Change a rigidlink element with ID 1752 to a rigid with dependent node ID 1576#import hm import hm.entities as ent model = hm.Model() node_col = hm.Collection(model, ent.Node, [1576]) model.rigidsconnectivityupdate( element=ent.Element(model, 1752), update_independent_node=0, independent_node=None, update_dependent_node=1, dependent_collection=node_col, dependent_type_change=1, config_change=1, attach_set=0 )