Model.set_flags_for_2dmesh_context#

Model.set_flags_for_2dmesh_context(automatic=0, interactive=0)#

Preserves selection topology used by 2D meshing. This is useful while doing 2D meshing iteratively on fixed selections, but modifying edge and face settings iteratively.

Parameters:
  • automatic (unsigned int) –

    0 - Does not delete FE for failed surface selection and continues to retain previous topology

    1 - Does not populate topology information, but ensures that when meshing fails, existing FE is deleted for given surface selection to ease identifying failed surfaces

  • interactive (unsigned int) –

    0 - Clear the last preserved topology information.

    1 - The next meshing function will populate topology information and preserve it for subsequent meshing calls. This allows changing meshing parameters on edges and faces. This also ensures that when meshing fails, existing FE is deleted for a given surface selection to ease identifying failed surfaces.

Example#

Set interactive meshing option to 1#
import hm
import hm.entities as ent

model = hm.Model()

model.set_flags_for_2dmesh_context(interactive=1)