Model.morphhandlescalexyz#
- Model.morphhandlescalexyz(h_collection, node_id, x, y, z, system_id, sym, con)#
Scales the positions of the selected handles with respect to a reference node and system. Scaling factors can be assigned for the x, y, and z directions independently. If no system is specified, the scaling factors will apply in the global x, y, and z directions. If a node is not specified, the handle positions will be averaged to determine the position of the reference node. A scaling factor of 1.0 will produce no movement of the handle in that direction while a scaling factor of 0.0 will move the handle to the x, y, or z position of the node or system origin.
- Parameters:
h_collection (Collection) – The collection containing the handle entities to scale their positions.
node_id (unsigned int) – The ID of the scaling reference node (or 0).
x (double) – Scaling factor in the x direction (1.0 is no scaling).
y (double) – Scaling factor in the y direction (1.0 is no scaling).
z (double) – Scaling factor in the z direction (1.0 is no scaling).
system_id (unsigned int) – ID of the scaling reference system (or 0).
sym (int) –
0 - Do not use symmetry links between handles
1 - Use symmetry links between handles
con (int) –
0 - Do not apply constraints
1 - Apply constraints
Examples#
Scale a collection of handles relative to a node with ID 5 and system with ID 2#import hm import hm.entities as ent model = hm.Model() model.morphhandlescalexyz( h_collection=hm.Collection(model, ent.Handle), node_id=5, x=2.0, y=2.0, z=2.0, system_id=2, sym=1, con=1, )
Scale a collection of handles relative to the average position of the handles use the global system for x, y, and z#import hm import hm.entities as ent model = hm.Model() model.morphhandlescalexyz( h_collection=hm.Collection(model, ent.Handle), node_id=0, x=2.0, y=2.0, z=2.0, system_id=0, sym=1, con=1, )