Model.morphmaptshp#

Model.morphmaptshp(hptr, x, y, z, clear, sym, con)#

Adds a handle perturbation to the current temporary shape.

Parameters:
  • hptr (Entity) – The ID of handle.

  • x (double) – x perturbation of handle

  • y (double) – y perturbation of handle

  • z (double) – z perturbation of handle

  • clear (int) –

    0 - Add perturbation

    1- Clear temporary shape and add perturbation

    2 - Unapply temporary shape

  • sym (int) – 0 - Do not use symmetry (only option)

  • con (int) – 1 - Use constraints (only option)

Example#

Add a handle perturbation to the current temprory shape, in the handle with ID 21#
import hm
import hm.entities as ent

model = hm.Model()

model.morphmaptshp(
    hptr=ent.Handle(model, 21), x=1.0, y=2.0, z=3.0, clear=0, sym=0, con=1
)

Note

This function is part of the map to geometry function which consists of multiple functions. This function is called any number of times, first with clear=1, then subsequently clear=1, followed either by one of the many Model.morphmapto* functions. If clear=1 then the last Model.morphmaptshp() function is rejected.