Model.morphalteranglevec#
- Model.morphalteranglevec(h1collection, h2collection, n1, n2, n3, hold, ang, sym, con, vec)#
Alters the angle for three nodes using morphing and measuring perpendicular to a vector.
- Parameters:
h1collection (Collection) – The collection containing the handle entities - end a.
h2collection (Collection) – The collection containing the handle entities - end b.
n1 (Entity) – The object defining the node entity - end a.
n2 (Entity) – The object defining the node entity - vertex.
n3 (Entity) – The object defining the node entity - end b.
hold (int) –
Determines which of the three nodes should be held:
0 - Hold end a
1 - Hold end b
2 - Hold middle
ang (double) – New angle between
n1andn3withn2as the vertexsym (int) –
Flag to determine whether or not to use symmetry:
0 - Do not use symmetry
1 - Use symmetry
con (int) –
Flag to determine whether or not to use constraints:
0 - Do not use constraints
1 - Use constraints
vec (hwTriple) – The hwTriple object defining the vector. User can also supply a Python list of three doubles.
Example#
The handles on the collection selected interactively will be moved based onholdthrough an angle based on the current angle andang, measured perpendicular to vectorvec, and usingn1,n2, andn3to determine the perturbations. 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.morphalteranglevec( h1collection=hm.Collection(model, ent.Handle, populate=False), h2collection=hm.CollectionByInteractiveSelection(model, ent.Handle), n1=ent.Node(model, 132), n2=ent.Node(model,783), n3=ent.Node(model, 171), hold=0, ang=45.0, sym=1, con=1, vec=[1.0, 0.0, 0.0], )