/
snapToRigid

snapToRigid

Description

Snaps a named node to a position and/or rotation formed by a rigid body defined from the currently selected nodes.

Use snapToRigid when you need to constrain a node to a location defined by a rigid body operation.

If neither option for allTime or ranges is used, then the operation will affect the current frame only.

The units for the -absolute option are millimeters.

Values for the default relative option are a percentage of the distance from the first selected node to the second selected node.

Use of the -positionOnly option prevents rigid body rotations from being applied to the target node. This option can be useful when you want to snap an object, like a baseball bat to a new location while maintaining the rotational orientation of the bat.

snapToRigid is different from snapToSystem and snapToSystemAlign in that snapToRigid defines a rigid body out of the selected markers and uses its coordinate system. The rigid body is defined at a frame the command determines. snapToSystem and snapToSystemAlgin do not use a rigid body, they refine the coordinate system at each frame.

Functional area

Snap

Command syntax

Syntax

snapToRigid "targetNodeName" xOffset yOffset zOffset [-allTime] [-ranges] [-absolute] [-positionOnly]

Arguments

NameTypeRequiredComments
zOffsetfloatyesSpecifies the position offset to apply to the object being snapped on the Z axis of the space defined by the selected markers.
yOffsetfloatyesSpecifies the position offset to apply to the object being snapped on the Y axis of the space defined by the selected markers.
xOffsetfloatyesSpecifies the position offset to apply to the object being snapped on the X axis of the space defined by the selected markers.
targetNodeNamestringyesName of the node that will be snapped.

Flags

NameFlag argumentsArgument typeExclusive toComments
all time0rangesPerforms the snap over the entire animation range.
positionOnly0rotationOnlyOnly modifies the position of the node being snapped.
rotationOnly0positionOnlyOnly modifies the rotation of the node being snapped.
absolute0Specifies the offset is in mm rather then a percentage of the distance between the first two nodes that define the system.
ranges0allTimePerforms the snap over the selected time ranges.

Return value

void

Examples

// This sequence of commands will create a new Marker node
// and snap its position over all time to a position offset by
// the indicated number of millimeters ( -50 in X, 50 in Y, 
// and 50 in Z) calculated from the origin of a temporary rigid
// body created from LFWT, LMWT, and LBWT. The offset is applied
// in the local coordinate system of the temporary rigid body.
// The rigid body coordinate system is then expressed in rotations
// relative to world space and applied to the target node,
// snapRigidTest.
create Marker snapRigidTest;
select LFWT LMWT LBWT;
snapToRigid -allTime -absolute snapRigidTest -50 50 50;

Additional information

Related commands

Related content


© Copyright Vicon Motion Systems. All rights reserved.

Vicon trademarks