Model.segmentsetaddmixedfaces#

Model.segmentsetaddmixedfaces(name, elem_collection, node_collection, break_angle, reverse_normals)#

Adds element faces to a segment set.

Parameters:
  • name (hwString) – The name of the segment set to update.

  • elem_collection (Collection) – The collection containing the element entities to add.

  • node_collection (Collection) – The collection containing the node entities that define and adge 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

Example#

Add elements with IDs 1 - 100 with faces defined by nodes with IDs 1 - 5 to the segment set “ test “ with a break_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.segmentsetaddmixedfaces(
    name="test",
    elem_collection=add_elements_collection,
    node_collection=node_define_collection,
    break_angle=30.0,
    reverse_normals=0,
)