Model.segmentsetaddfaces#
- Model.segmentsetaddfaces(name, elem_collection, node_collection, break_angle, reverse_normals, face_or_edge)#
Adds elements using the face/edge option to a segment set.
- Parameters:
name (hwString) – Name of the segment set to update.
elem_collection (Collection) – The collection containing the solid element entities to add.
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
10 - On edge for shells, do not consider break angle
11 - On face for solids, do not consider break angle
20 - On edge for shells, consider hidden entities
21 - On face for solids, consider hidden entities
30 - On edge for shell, do not consider break angle, consider hidden entities
31 - On face for solid, do not consider break angle, consider hidden entities
Example#
Add elements with IDs 1 - 100 with faces defined by nodes with IDs 1 - 5 to the segment set * “ test “ * with abreak_angle=30.0#import hm import hm.entities as ent model = hm.Model() # Creating a collection that contains the elements to add 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.segmentsetaddfaces( name="test", elem_collection=add_elements_collection, node_collection=node_define_collection, break_angle=30.0, reverse_normals=0, face_or_edge=1, )