Model.morphhyperpreview#
- Model.morphhyperpreview(collectionhand, collectionelem, xi, yi, zi, xx, yy, zz, sys, sym, con, vvec, mag, type, ucollection)#
Draws vectors for shapes to be created.
- Parameters:
collectionhand (Collection) – The collection containing the handle entities.
collectionelem (Collection) – The collection containing the entities.
xi (int) –
0 - Do not create x perturbation
1 - Create x perturbation
yi (int) –
0 - Do not create y perturbation
1 - Create y perturbation
zi (int) –
0 - Do not create z perturbation
1 - Create z perturbation
xx (double) – x perturbation magnitude.
yy (double) – y perturbation magnitude.
zz (double) – z perturbation magnitude.
sys (int) – System to create perturbations in (default = global).
sym (int) –
0 - Do not use symmetry
1 - Use symmetry
con (int) –
0 - Do not use constraints
1 - Use constraints
vvec (hwTriple) – The hwTriple object defining the vector components. User can also supply a Python list of three doubles.
mag (double) – magnitude of perturbation.
type (int) –
0 - XYZ directions
1 - Vector direction
2 - Normal directions
ucollection (int) – Reserved for future use.
Example#
Draw a vector for each handle on the collection in either the xyz directions, the vector direction, or the normal direction. This is used to preview the shapes that will be created in the autoshape panel before creating them. If symmetry is used, all handles linked to marked handles 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.morphhyperpreview( collectionhand=hm.CollectionByInteractiveSelection(model, ent.Handle), collectionelem=hm.CollectionByInteractiveSelection(model, ent.Element), xi=0, yi=0, zi=1, xx=1.0, yy=1.0, zz=5.0, sym=3, con=1, vvec=[1.0, 0.0, 0.0], mag=0.0, type=1, ucollection=0, )