Model.morphconstraintupdatefc#
- Model.morphconstraintupdatefc(ncollection, type, mcon, color)#
Updates either a fixed type morphconstraint or a cluster type morphconstraint for the selected nodes with the option of having mesh stretching around those nodes. Rotation options are also available for cluster type morphconstraints.
There are three options for rotation: in-plane, out-of-plane, and full rotation. In-plane will limit rotation of the cluster to the plane in which the cluster lies (spinning) while out-of-plane limits the rotation of the cluster to take place normal to the plane of the cluster (tilting). Full rotation allows both in-plane and out-of-plane rotation. For cluster constraints where the nodes do not lie in a discernable plane any rotation option results in full rotation.
- Parameters:
ncollection (Collection) – The collection containing the node entities that are constrained.
type (int) –
0 - Fixed type constraint without mesh stretching
6 - Fixed type constraint with mesh stretching
7 - Cluster type constraint with mesh stretching (no rotation)
9 - Cluster type constraint without mesh stretching (no rotation)
+10 - (type 17 and 19) enables out-of-plane rotation for clusters
+20 - (type 27 and 29) enables in-plane rotation for clusters
+30 - (type 37 and 39) enables full rotation for clusters
mcon (Entity) – The entity morph constraint to update.
color (int) – The color of the constraint. Valid values are 1 through 64.
Examples#
Update a cluster morphconstraint with ID 1 with mesh stretching and full rotation#import hm import hm.entities as ent model = hm.Model() model.morphconstraintupdatefc( ncollection=hm.Collection(model, ent.Node), type=37, mcon=ent.Morphconstraint(model, 1), color=12, )
Update a cluster morphconstraint with ID 1 without mesh stretching and with in - plane rotation#import hm import hm.entities as ent model = hm.Model() model.morphconstraintupdatefc( ncollection=hm.Collection(model, ent.Node), type=29, mcon=ent.Morphconstraint(model, 1), color=12, )