Model.meshtopologyadjust#

Model.meshtopologyadjust(collection, flags)#

This function is intended to work with 2D meshes created by QI meshing, batchmeshing, element remeshing and manual editing tools. Very often such meshes have multiple elements intersected by the surfaces selection boundary edges. This function attempts to adjust the mesh on selected surfaces to its boundary by moving nodes to the boundary, splitting elements or suppressing geometry edges or vertices.

Parameters:
  • collection (Collection) – The collection containing the input surface entities.

  • flags (int) –

    A flag that controls the level of mesh adjustment to topology. Valid values are:

    0 - Adjustment ensures that all elements within the selection are not intersected by the selection boundary edges. It’s not guaranteed that there are no geometry vertices in the middle of boundary element edges. There are no topology changes for this value.

    1 - Adjustment ensures that all elements within the selection are not intersected by the selection boundary edges. All boundary element edges shared with any adjacent mesh do not have any geometry vertices in the middle. Some topology changes may occur for this case such as the suppression of geometry edges and vertices.

    3 - Adjustment provides that all elements within the selection are not intersected by the selection boundary edges. All boundary element edges (both those shared and not shared with any adjacent mesh) do not have any geometry vertices in the middle. Some topology changes may occur for this case such as the suppression of geometry edges and vertices.

Example#

Adjust the elements for surface with ID 143 with full adjustment to topology edges of elements edges shared with adjacent mesh#
import hm
import hm.entities as ent

model = hm.Model()

surface_collection = hm.Collection(model, ent.Surface, [143])

model.meshtopologyadjust(collection=surface_collection,flags=3)