Model.morphmaprecalc#

Model.morphmaprecalc(nlist, nmark, collectionedge, collectionface, mode)#

Recalculates influences and prepare for mapping.

Parameters:
  • nlist (EntityList) – The list containing the node entities affected by mapping.

  • nmark (int) –

    0 - Use input list 0

    1 - Use input list 1

  • collectionedge (Collection) – The collection containing the node entities on edge domains where handles will be created.

  • collectionface (Collection) – The collection containing the node entities on 2D domains where handles will be created.

  • mode (int) –

    0 - Create temporary handles and calculate new influences

    1 - Delete temporary handles and restore old influences

Example#

The function makes influence recalculation necessary only once, when entering the panel, rather than each time the user wishes to place a handle or edge.#
import hm
import hm.entities as ent

model = hm.Model()

model.morphmaprecalc(
    nlist=[ent.Node(model, 1), ent.Node(model, 2)],
    nmark=0,
    collectionedge=hm.CollectionByInteractiveSelection(model, ent.Node),
    collectionface=hm.CollectionByInteractiveSelection(model, ent.Node),
    mode=0,
)

Note

This function is called before and after mapping operations in the user control sub-panel to enhance mapping speed.