Model.contactsurfcreatewithshells#

Model.contactsurfcreatewithshells(name, color, collection, reverse_normals)#

Creates a contact surface using 1D or 2D elements.

Parameters:
  • name (hwString) – The name of the contact surface to create.

  • color (int) – The color of the contact surface. Valid values are 1 through 64.

  • collection (Collection) – The collection containing the 1D or 2D element entities to use.

  • reverse_normals (int) –

    0 - Create contact surface along element normal.

    1 - Create contact surface opposite element normal.

Example#

Create a contact surface named “test” with elements with IDs 1-100#
import hm
import hm.entities as ent

model = hm.Model()

model.contactsurfcreatewithshells(
    name="test",
    color=5,
    collection=hm.Collection(model, ent.Element, list(range(1, 101))),
    reverse_normals=0,
)