Model.segmentsetadjustnormal#

Model.segmentsetadjustnormal(name, elem_collection, elem_flag, orientation_element, reverse_normals)#

Adjusts a segment set normal using an orientation element.

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

  • elem_collection (Collection) – The collection containing the element entities to adjust when elem_flag=1.

  • elem_flag (int) –

    Flag for reversing the contact normal of all or individual elements of the segment set:

    0 - Adjust all elements, elem_collection is ignored

    1 - Adjust individual elements, elem_collection is used

  • orientation_element (unsigned int) – The ID of the shell element used to define the segment set normal correction.

  • reverse_normals (int) –

    0 - Correct contact normal along orientation_element normal. (default)

    1 - Correct contact normal opposite orientation_element normal

Examples#

Adjust the normal of segment set “ test “ for the elements with IDs 12 , 23 , 29 , 53 in the normal direction of reference element with ID 23#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains the elements to adjust
elements_collection = hm.Collection(model, ent.Element, [12, 23, 29, 53])

model.segmentsetadjustnormal(
    name="test",
    elem_collection=elements_collection,
    elem_flag=1,
    orientation_element=23,
    reverse_normals=0,
)
Adjust the normal of segment set “ test “ for the elements with IDs 12 , 23 , 29 , 53 in the reverse normal direction of reference element with ID 23#
import hm
import hm.entities as ent

model = hm.Model()

# Creating a collection that contains the elements to adjust
elements_collection = hm.Collection(model, ent.Element, [12, 23, 29, 53])

model.segmentsetadjustnormal(
    name="test",
    elem_collection=elements_collection,
    elem_flag=1,
    orientation_element=23,
    reverse_normals=1,
)