Model.segmentsetcreatewithfaces#
- Model.segmentsetcreatewithfaces(name, color, elem_collection, node_collection, break_angle, reverse_normals, face_or_edge)#
Creates a segment set using 2D element edges or 2D/3D element faces.
- Parameters:
name (hwString) – The name of the segment set to create.
color (int) – The color of the segment set. Valid values are 1-64.
elem_collection (Collection) – The collection containing the element entities to use.
node_collection (Collection) – The collection 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) –
Create segment set:
0 - Along element normal
1 - Opposite element normal
face_or_edge (int) –
Create segment set:
0 - On edge
1 - On face
Example#
Create a segment set named “ test “ with elements with IDs 1 - 100 with faces defined by nodes with IDs 1 - 5 and a` break_angle=30.0`#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the elements to use filter_add_elements = hm.FilterByEnumeration(ent.Element, list(range(1, 101))) add_elements_collection = hm.Collection(model, filter_add_elements) # Creating a collection that contains the nodes that define the faces filter_nodes = hm.FilterByEnumeration(ent.Node, list(range(1, 6))) node_define_collection = hm.Collection(model, filter_nodes) model.segmentsetcreatewithfaces( name="test", color=5 elem_collection=add_elements_collection, node_collection=node_define_collection, break_angle=30.0, reverse_normals=0, face_or_edge=1, )