Model.contactsurfcreatewithfaces#
- Model.contactsurfcreatewithfaces(name, color, elem_collection, node_collection, break_angle, reverse_normals, on_face)#
Creates a contact surface using 2D element edges or 2D/3D element faces.
- 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.
elem_collection (Collection) – The collection containing the element entities to use.
node_collection (Collection) – The collection containing the containing the node entities that define an edge or a face of an element.
break_angle (double) – The break angle for finding adjacent elements.
reverse_normals (int) –
0 - Create contact surface along element normal.
1 - Create contact surface opposite element normal.
on_face (int) –
0 - Create contact surface on edge.
1 - Create contact surface on face.
Example#
Create a contact surface named “test” with elements with IDs 1-100 with faces defined by nodes with IDs 1-5 and a breakangle of 30.0#import hm import hm.entities as ent model = hm.Model() model.contactsurfcreatewithfaces( name="test", color=5, elem_collection=hm.Collection(model, ent.Element, list(range(1, 101))), node_collection=hm.Collection(model, ent.Node(model, list(range(1, 6)))), break_angle=30.0, reverse_normals=0, on_face=1, )