Vicon Shogun banner

Description

The snapToSystem command positions and/orients a module based on a coordinate system defined by the positions of three selected nodes:

  • The first selected node is always the origin
  • The second selected node defines the X axis
  • The third selected node defines the Y axis
  • Z is normal to the plane XY.

This command is similar to snapToRigid with some important differences:

  • snapToSystem requires exactly three nodes, snapToRigid may use three or more nodes.
  • snapToSystem defines its coordinate system at each frame, whereas snapToRigid uses the entire frame range to establish the best coordinate system given the available data.

Use snapToSystem when you need to constrain a module to a location defined by a local coordinate system that is re-defined for each frame. If neither option for all time or ranges is used, then the operation affects the current frame only.

By default the offsets are defined as a percentage of the distance from the first selected module to the second selected module. Alternatively, the -absolute option can be used to define the offset in millimeters.

Use of the -positionOnly option prevents rigid body rotations from being applied to the target module. 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. If you want to aim an axis other than X of the module being snapped at the X axis, see snapToSystemAlign.

Functional area

Snap

Command syntax

Syntax

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

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
allTime0rangesPerforms the snap over the entire animation range.
positionOnly0rotationOnlyOnly modifies the position of the module being snapped.
rotationOnly0positionOnly
Only modifies the rotation of the module being snapped.
absolute0Specifies the offset is in mm rather then a percentage of the distance between the first two modules that define the system.
ranges0allTimePerforms the snap over the selected time ranges.

Return value

void

Examples

// This sequence of commands creates a new Marker module
// and snap its position over all time to a position offset the
// indicated number of millimeters ( -50 in X, 50 in Y, and 50 in Z)
// calculated from the origin of a coordinate system defined by the
// animation of LFWT, LMWT, and LBWT. The offset is applied in terms
// of the coordinate system defined at each frame.
// The coordinate system is then expressed in rotations relative to
// world space and applied to the target module, snapSystemTest.
create Marker snapSystemTest;
select LFWT LMWT LBWT;
snapToSystem -allTime -absolute snapSystemTest -50 50 50;

Additional information

Related commands