Model.removeelemsfromcontactsurfusingnodes#

Model.removeelemsfromcontactsurfusingnodes(name, elem_collection, node_collection)#

Removes elements from a contactsurf entity using face nodes. If all elements are removed the empty contactsurf still exists.

Parameters:
  • name (hwString) – The name of the contactsurf entity.

  • elem_collection (Collection) – The collection containing the element entities to remove.

  • node_collection (Collection) – The collection containing the node entities that define the face nodes of the elements to remove.

Example#

Remove the elements with IDs 100 and 101 from the contactsurf “ test “ for the specified face defined by the nodes with IDs 201 , 202 on node_collection#
import hm
import hm.entities as ent

model = hm.Model()

model.removeelemsfromcontactsurfusingnodes(
    name="test",
    elem_collection=hm.Collection(model, ent.Element, [100, 101]),
    node_collection=hm.Collection(model, ent.Node, [201, 202]),
)