Model.addshellstocontactsurf#

Model.addshellstocontactsurf(name, elemcollection, reversenormals)#

Add selected 1D and 2D element(s) to existing contactsurf.

Parameters:
  • name (hwString) – The name of the contactsurf being created. User can directly supply a Python string.

  • elemcollection (Collection) – The collection containing the element entities.

  • reversenormals (int) –

    Direction of normal for contactsurfs.

    0 - Along element normal.

    1 - Opposite element normal. Set to 1 if normals need be opposite to element normals.

Example#

Add shell elements with ID 1 , 2 , 10 on collection to contactsurf “ test “#
import hm
import hm.entities as ent

model = hm.Model()

model.addshellstocontactsurf(
    name="test",
    elemcollection=hm.Collection(model, ent.Element, [1, 2, 10]),
    reversenormals=0,
)