Go to: Synopsis. Return value. Related. Flags. MEL examples.

Synopsis

rigidSolver [-autoTolerances boolean] [-bounciness boolean] [-cacheData boolean] [-collide] [-collisionTolerance float] [-contactData boolean] [-create] [-current] [-deleteCache] [-displayCenterOfMass boolean] [-displayConstraint boolean] [-displayVelocity boolean] [-dynamics boolean] [-friction boolean] [-interpenetrate] [-interpenetrationCheck] [-name string] [-rigidBodies] [-rigidBodyCount] [-showCollision] [-showInterpenetration] [-solverMethod int] [-startTime float] [-state boolean] [-statistics boolean] [-stepSize float] [-velocityVectorScale float]

rigidSolver is undoable, queryable, and editable.

This command sets the attributes for the rigid solver

Return value

None

In query mode, return type is based on queried flag.

Related

constrain, rigidBody

Flags

autoTolerances, bounciness, cacheData, collide, collisionTolerance, contactData, create, current, deleteCache, displayCenterOfMass, displayConstraint, displayVelocity, dynamics, friction, interpenetrate, interpenetrationCheck, name, rigidBodies, rigidBodyCount, showCollision, showInterpenetration, solverMethod, startTime, state, statistics, stepSize, velocityVectorScale
Long name (short name) Argument types Properties
-autoTolerances(-at) boolean queryedit
Turns the auto tolerance calculation on and off. The auto tolerances calculation will override the default or user defined values of the step size and collision tolerance value that is calculated based on the objects in the scene. Default: 0 (off)
-bounciness(-b) boolean queryedit
Turns bounciness on and off for the an the objects in the simulation. Default value: on
-cacheData(-cd) boolean queryedit
Turns the cache on fall all rigid bodies in the system. Default value: off
-collide(-c) queryedit
Disallows the interpenetration of the two rigid bodies listed. Default: Collide is on for all bodies.
-collisionTolerance(-ct) float queryedit
Sets the collision tolerance. This is the error at which two objects are considered to have collided. Range: 0.0005 - 1.000 Default: 0.02
-contactData(-ctd) boolean queryedit
Turns the contact data information on/off for all rigid bodies. Default value: off
-create(-cr) create
Creates a new rigid solver.
-current(-cu) create
Sets rigid solver as the current solver.
-deleteCache(-del) queryedit
Deletes the cache for all rigid bodies in the system.
-displayCenterOfMass(-dcm) boolean queryedit
Displays the center of mass icon. Default value: on
-displayConstraint(-dc) boolean queryedit
Displays the constraint vectors. Default value: on
-displayVelocity(-dv) boolean queryedit
Displays the velocity vectors. Default value: off
-dynamics(-d) boolean queryedit
Turns dynamics on and off for the an the objects in the simulation. Default value: on
-friction(-f) boolean queryedit
Turns friction on and off for the an the objects in the simulation. Default value: on
-interpenetrate(-i) queryedit
Allows the two rigid bodies listed to interpenetrate. Default: interpenetration is off for all bodies.
-interpenetrationCheck(-ic) edit
Checks for interpenetrating rigid bodies in the scene.
-name(-n) string createqueryedit
Name of the new object
-rigidBodies(-rb) query
Returns a list of rigid bodies in the solver.
-rigidBodyCount(-rbc) query
Returns the number of rigid bodies in the solver.
-showCollision(-sc) queryedit
Displays the colliding objects in a different color.
-showInterpenetration(-si) queryedit
Displays the interpenetrating objects in a different color.
-solverMethod(-sm) int queryedit
Sets the solver method. The choices are 0 | 1 | 2. 0 = Euler (fastest/least acurate), 1 = Runge-Kutta ( slower/more acurate), 2 = adaptive Runge-Kutta (slowest/most acurate). The default is 2 (adaptive Runge-Kutta)
-startTime(-stt) float createqueryedit
Sets the start time for the solver.
-state(-st) boolean queryedit
Turns the rigid solver on or off.
-statistics(-sta) boolean queryedit
Turns the statistic information on/off for all rigid bodies. Default value: off
-stepSize(-s) float queryedit
Sets the solvers step size. This is the maximum size of a single step the solver will take at one time. Range: 0.0004 - 0.100 Default: 0.0333
-velocityVectorScale(-vs) float queryedit
scales the velocity vector display. Default value: 1.0

Flag can appear in Create mode of command Flag can appear in Edit mode of command
Flag can appear in Query mode of command Flag can be used more than once in a command.

MEL examples

// Set the playback time range to [1, 100]
playbackOptions -min 1 -max 100;
// Create a poly cube named "floor"
polyCube -w 10 -h 0.10 -d 10 -sx 10 -sy 1 -sz 10 -ax 0 1 0 -name floor;
// Create a poly sphere named "ball", then move it to 0 9 0
polySphere -r 1 -sx 20 -sy 20 -ax 0 1 0 -name ball;
move -r 0 9.0 0;
// Create a new rigid body solver
rigidSolver -create -name rigidSolver1;
// Set the floor to passive rigid body
select floor;
rigidBody -passive -solver rigidSolver1 -name passiveRigidBody;
// Set the ball to active rigid body
select ball;
rigidBody -active -solver rigidSolver1 -name activeRigidBody;
// Add a gravity field, and connect it to ball
gravity -pos 0 0 0 -m 9.8 -dx 0 -dy -1 -dz 0 -name gravityField;
connectDynamic -f gravityField activeRigidBody;
// Play
play -w;

// Set the rigid solver to allow the ball to interpenetrate the floor, then replay
currentTime -e 1;
rigidSolver -e -interpenetrate passiveRigidBody activeRigidBody rigidSolver1;
play -w;

// Set the rigid solver to disallow the ball to interpenetrate the floor, replay
currentTime -e 1;
rigidSolver -e -collide passiveRigidBody activeRigidBody rigidSolver1;
play -w;

// Set the rigid solver to turn off the bounciness, replay
currentTime -e 1;
rigidSolver -e -bounciness 0 rigidSolver1;
play -w;