Model.springsosupdate#

Model.springsosupdate(collection, property_flag, property_name, vector_flag, vector_entity, direction_node_entity, orient_x, orient_y, orient_z, orient_comps_flag, system_entity, update_orient_flag)#

Updates a spring element using various orientation methods. The orientation may be specified using either vector_entity, direction_node_entity, system_entity or individual components (orient_x, orient_y, orient_z).

Parameters:
  • collection (Collection) – The collection containing the spring element entities to update.

  • property_flag (int) –

    0 - Do not update property_name.

    1 - Update property_name.

  • property_name (hwString) – The name of the property to assign to the element.

  • vector_flag (int) –

    0 - Do not update the orientation vector.

    1 - Update the orientation vector.

  • 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.

  • update_orient_flag (int) –

    0 - Do not update the orientation vector’s component or system.

    1 - Update the orientation vector’s component or system.

Example#

Update spring element with IDs 16, 17, and 18 to have property “sprate”, and an orientation vector with components (10.0, 11.0, 12.0)#
import hm
import hm.entities as ent

model = hm.Model()

model.springsosupdate(
    collection=hm.Collection(model, ent.Element, [16, 17, 18]),
    property_flag=1,
    property_name="sprate",
    vector_flag=1,
    vector_entity=None,
    direction_node_entity=None,
    orient_x=10.0,
    orient_y=11.0,
    orient_z=12.0,
    orient_comps_flag=1,
    system_entity=None,
    update_orient_flag=1,
)