Model.segmentsetaddshells#

Model.segmentsetaddshells(name, collection, reverse_normals)#

Adds selected 1D and 2D elements to a segment set.

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

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

  • reverse_normals (int) –

    Create segment set:

    0 - Along element normal

    1 - Opposite element normal

Example#

Add elements with IDs 10 - 13 to segment set “ test “#
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(10, 14)))
add_elements_collection = hm.Collection(model, filter_add_elements)

model.segmentsetaddshells(
    name="test", collection=add_elements_collection, reverse_normals=0
)