Model.morphupdateshapes#

Model.morphupdateshapes(collection, mode)#

Converts shapes to node, handle, or morph volume perturbations, convert shapes to load collectors and vice-versa, or correct shapes after perturbations are found on duplicate nodes or handles due to various operations.

Parameters:
  • collection (Collection) – The collection containing the input shape or load collector entities.

  • mode (int) –

    0 - Convert shape to handle perturbations

    1 - Convert shape to node perturbations

    2 - Add duplicate perturbations

    3 - Average duplicate perturbations

    4 - Convert shapes to forces

    5 - Convert forces to shapes

    6 - Convert shapes to temperatures

    7 - Convert temperatures to shapes

    8 - Convert shapes to pressures

    9 - Convert pressures to shapes

    10 - Converts all shapes and morphs on undo/redo list to node perturbations

    11 - Convert shapes to enforced displacements

    12 - Convert enforced displacements to shapes

    13 - Convert shapes to morph volume handle perturbations

    14 - Convert shapes to pressures. This creates pressures in the normal direction on all elements touching perturbed nodes.

    15 - Convert shapes to pressures. This creates pressures in the direction of the perturbation only on elements with all nodes perturbed.

    16 - Convert shapes to pressures. This creates pressures in the normal direction only on elements with all nodes perturbed.

    17 - Convert shapes to enforced displacements. This constrains the XYZ directions with zero perturbations.

Example#

Convert all shapes for the mesh into force type load collectors#
import hm
import hm.entities as ent

model = hm.Model()

model.morphupdateshapes(collection=hm.Collection(model, ent.Shape), mode=4)