Model.modifyicelement#

Model.modifyicelement(entity, mode, node_entity)#

Modifies a dependent node of an IC element.

Parameters:
  • entity (Entity) – The object describing the IC element entity to modify.

  • mode (int) –

    1 - Move up in the order.

    2 - Move down in the order.

    3 - Delete.

  • node_entity (Entity) – The object describing the node entity to modify.

Example#

Create an IC element with independent node with ID 15, and dependent nodes with IDs 16, 17, 18, 19 with DOF’s 123, 345, 1234, 123456, then remove node with ID 18#
import hm
import hm.entities as ent

model = hm.Model()

# Get the IC element
model.icelementcreate()
_, result = model.hm_latestentityid(entity_type=ent.Element)
ic_element = ent.Element(model, result.entity)

# Adding connectivity to IC element
model.addicconnectivity(
    entity=ic_element,
    inode_entity=ent.Nodel(model, 15),
    dependency_array=[[4, 16, 17, 18, 19], [123, 345, 1234, 123456]],
)

# Modify connectivity of IC element
model.modifyicelement(entity=ic_element, mode=3, node_entity=ent.Node(model, 18))