Model.recalculaterigidmainnode#
- Model.recalculaterigidmainnode(collection)#
Computes the centroid of the secondary nodes of a rigid element or a constraint and places the main node at the centroid position.
- Parameters:
collection (Collection) – The collection containing the rigid elements or constraints.
Example#
Recalculate the location of the main node of the rigid element ID 26#import hm import hm.entities as ent model = hm.Model() rigid_elem = hm.Collection(model,ent.Element,[26]) model.recalculaterigidmainnode(rigid_elem)
recalculate the location of the main nodes of constraints “constraint1” and “constraint2”#import hm import hm.entities as ent model = hm.Model() const_col = hm.Collection(model,ent.Constraint,"name=constraint1,constraint2") model.recalculaterigidmainnode(const_col)