Model.baroffsetupdate#

Model.baroffsetupdate(collection, update_offset_a, offset_x_a, offset_y_a, offset_z_a, update_offset_b, offset_x_b, offset_y_b, offset_z_b)#

Updates the offsets in the global system for multiple bar and/or bar3 elements.

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

  • update_offset_a (int) – If non-zero, the offsets at end a are updated.

  • offset_x_a (double) – The offset in the x-direction at end a. This is defined in the global system.

  • offset_y_a (double) – The offset in the y-direction at end a. This is defined in the global system.

  • offset_z_a (double) – The offset in the z-direction at end a. This is defined in the global system.

  • update_offset_b (int) – If non-zero, the offsets at end b are updated.

  • offset_x_b (double) – The offset in the x-direction at end b. This is defined in the global system.

  • offset_y_b (double) – The offset in the y-direction at end b. This is defined in the global system.

  • offset_z_b (double) – The offset in the z-direction at end b. This is defined in the global system.

Example#

Update bar elements with IDs 23 with offset vector at end a defined as (1.0, 2.0, 3.0) and at end b as (4.0, 5.0, 6.0)#
import hm
import hm.entities as ent

model = hm.Model()

elem = hm.Collection(ent.Element, [23])

model.baroffsetupdate(
    collection=elem,
    update_offset_a=1,
    offset_x_a=1.0,
    offset_y_a=2.0,
    offset_z_a=3.0,
    update_offset_b=1,
    offset_x_b=4.0,
    offset_y_b=5.0,
    offset_z_b=6.0
)