Previous section-----Next section

2.4.4 $MechProcessFunction

$MechProcessFunction is a function that is applied to all of the mechanism equations that are generated by SetConstraints as they are created. The default setting, $MechProcessFunction = Chop, can reduce the size of the constraint expressions substantially if any of the constraints involve the local origins of bodies in the model which have local coordinates of  or  . Setting $MechProcessFunction = Identity disables this action.

Set $MechProcessFunction equal to Identity to disable chopping.

In[21]:=

Here the model is built without chopping the constraints.

Here is the Revolute2 constraint.

Obviously, the run time of the model is increased by increasing the size of the constraint expressions. However, if the model contains very small physical dimensions, it may not be acceptable to apply Chop to the constraints.