Previous section-----Next section

GenConstraint
2D/3D

GenConstraint[cnum, point1, point2, rot, {sym, guess}] returns a constraint object that introduces a slave body represented by generalized coordinates into the model. A point on the slave body, point1, is constrained to be coincident with a point on the master, point2. The angular orientation of the slave with respect to the master is specified by rot.
• In Modeler2D, rot is a counterclockwise angle or a list of two degenerate Euler parameters {ei, ej}.
• In Modeler3D, rot is specified by an angle and an axis of rotation in the {ang, axis} format.
{sym, guess} or {sym1, guess1}, {sym2, guess2}, ... are generalized coordinate symbols and their associated initial guesses that are added to the model. The number of degrees of freedom added to the model is equal to the number of sym-guess pairs.

GenConstraint is used to create user-defined generalized coordinate relationships. Mech generalized coordinate constraints do not actually constrain any degrees of freedom or add any algebraic constraints to the model, they simply set up the necessary coordinate transformations so that a new slave body can be recognized appropriately by Mech's modeling engine.
• In Modeler2D, the rotation may also be specified by a list of degenerate Euler parameters {ei, ej}.
• In Modeler3D, rot can be a single rotation or a sequence of rotations of the form used by
RotationLock3.
• In Modeler3D, each successive rotation may also be specified by a list of Euler parameters {eo, ei, ej, ek} or a virtual rotation vector {vx, vy, vz}.
• See also: Constraint.