Model.morphhypermorphnormal#

Model.morphhypermorphnormal(collection_hand, collection_elem, sym, con, mag, ucollection=0)#

Creates shapes in the normal direction for handles on the collection.

Parameters:
  • collection_hand (Collection) – The collection containing the handle entities to create shapes.

  • collection_elem (Collection) – The collection containing the element entities that the handles are normal to.

  • sym (int) –

    0 - Do not use symmetry

    1 - Use symmetry

  • con (int) –

    0 - Do not use constraints

    1 - Use constraints

  • mag (double) – Magnitude of perturbation.

  • ucollection (int) – Reserved for future use.

Example#

Create a shape for each handle on the collection in the direction of the normal for the handle node at the given magnitude. If symmetry is used, all handles linked to handles in the entity by symmetry will also be perturbed. If constraints are used, they will be applied to the perturbations.#
import hm
import hm.entities as ent

model = hm.Model()

model.morphhypermorphnormal(
collection_hand=hm.CollectionByInteractiveSelection(model, ent.Handle),
collection_elem=hm.CollectionByInteractiveSelection(model, ent.Element),
sym=1,
con=1,
mag=5.0,
ucollection=0,
)