Model.springos#
- Model.springos(node_entity1, node_entity2, property_name, vector_entity, direction_node_entity, orient_x, orient_y, orient_z, orient_comps_flag, system_entity)#
Creates a spring element between two nodes using various orientation methods. The orientation may be specified using either
vector_entity,direction_node_entity,system_entityor individual components (orient_x,orient_y,orient_z).- Parameters:
node_entity1 (Entity) – The object describing the first node entity.
node_entity2 (Entity) – The object describing the second node entity.
property_name (hwString) – The name of the property to assign to the element.
vector_entity (Entity) – The object describing the orientation vector entity assigned to the element.
direction_node_entity (Entity) – The object describing the direction node entity assigned to the element.
orient_x (double) – The x-component of the orientation vector.
orient_y (double) – The y-component of the orientation vector.
orient_z (double) – The z-component of the orientation vector.
orient_comps_flag (int) –
0 - Do not use individual components to define the orientation
1 - Use individual components to define the orientation
system_entity (Entity) – The object describing the orientation system entity assigned to the element.
Example#
Create a spring element between the nodes with IDs 100 and node with ID 101 with property “springprop” , use the node with ID 51 as the orientation node#import hm import hm.entities as ent model = hm.Model() model.springos( node_entity1=ent.Node(model, 100), node_entity2=ent.Node(model, 101), property_name="springprop", vector_entity=None, direction_node_entity=ent.Node(model, 51), orient_x=0.0, orient_y=0.0, orient_z=0.0, orient_comps_flag=0, system_entity=None, )