Model.baroffset#

Model.baroffset(element_entity, offset_x_a, offset_y_a, offset_z_a, offset_x_b, offset_y_b, offset_z_b)#

Updates the offsets in the global system for a single bar or bar3 element.

Parameters:
  • element_entity (Entity) – The object describing the bar or bar3 element entity to update.

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

  • 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 = ent.Element(model, 23)

model.baroffset(
    element_entity=elem,
    offset_x_a=1.0,
    offset_y_a=2.0,
    offset_z_a=3.0,
    offset_x_b=4.0,
    offset_y_b=5.0,
    offset_z_b=6.0
)