Model.spring#
- Model.spring(node_entity1, node_entity2, dof, property_name, vector_entity)#
Creates a spring element between two nodes using an orientation vector.
- Parameters:
node_entity1 (Entity) – The object describing the first node entity.
node_entity2 (Entity) – The object describing the second node entity.
dof (hwBoolList) – The degree of freedom for the element.
property_name (hwString) – The name of the property to assign to the element.
vector_entity (Entity) – The object describing the entity.
Example#
Create a spring element between the node with ID 100 and the node with ID 101 with DOF 2 , property “springprop” , and orientation vector with ID 51#import hm import hm.entities as ent model = hm.Model() model.spring( node_entity1=ent.Node(model, 100), node_entity2=ent.Node(model, 102), dof=[False, True, False, False, False, False], property_name="springprop", vector_entity=ent.Vector(model, 51), )