Model.altgapelementupdate#

Model.altgapelementupdate(collection, propertyname, vector, orientnode, x1, x2, x3, coords, orientsys, useprop, useorient)#

Updates property and orientation of node-to-node (CGAP) or node-to-element (CGAPG) gap elements.

Parameters:
  • collection (Collection) – The collection containing the gap element entities.

  • propertyname (hwString) – The name of the property which should be assigned to the gap element. User can directly supply a Python string.

  • vector (Entity) – The object describing the vector entity associated with the gap element.

  • orientnode (Entity) – The object describing the entity associated with the gap element.

  • x1 (double) – x-component of the orientation vector.

  • x2 (double) – y-component of the orientation vector.

  • x3 (double) – z-component of the orientation vector.

  • coords (int) –

    Flag to indicate whether individual components are used in defining the orientation of the element. Valid values are:

    0 - Components are not used.

    1 - Components are used.

  • orientsys (Entity) – The object describing the system entity used to orient the gap element.

  • useprop (int) –

    Flag to indicate whether or not to update the property. Valid values are:

    0 - Do not update.

    1 - Update.

  • useorient (int) –

    Flag to indicate whether or not to update the vector. Valide values are:

    0 - Do not update.

    1 - Update.

Example#

Update gap elements with ID 25 , 26 and 27 with property * pgap1 * , use system with ID 15 as orientation system#
import hm
import hm.entities as ent

model = hm.Model()

elem_collection = hm.Collection(model, ent.Element, [25, 26, 27])

model.altgapelementupdate(
    collection=elem_collection,
    propertyname="pgap1",
    vector=None,
    orientnode=None,
    x1=0.0,
    x2=0.0,
    x3=0.0,
    coords=0,
    orientsys=ent.System(model, 15),
    useprop=1,
    useorient=1,
)