CreateCoMRefNode

CreateCoMRefNode#

Class template to create a reference node at the center of mass of a segment with its axis aligned with the principal axes of inertia.

Listing 8 Include this file this file to use#
#include "<AMMR_TOOLS>\ModelUtilities/SegmentCoM/CreateCoMRefNode.any"`

#CreateCoMRefNode#

Creates a reference node at the center of mass of the segment. The orientation of the reference node is determined from the principal axes of inertia, which are determined from the Jmatrix of the segment. This class template must be used inside the scope of AnySeg.

This class template calculates the Jmatrix about the center of mass and its eigenvectors and eigenvalues
to determine the principal axes of inertia. In cases with symmetric shape, for example a sphere, cylinder, etc., some of the eigenvalue terms are duplicated. Therefore, the principal axes may not be uniquely defined in these cases.

In the example below a reference node is created inside a segment.

Example

AnySeg MySegment = {
  CreateCoMRefNode CoMNode () = {
    viewRefFrame.Visible = On;
  };
};

Full signature

CreateCoMRefNode <ObjectName>(
  SUPPRESS_SYMMETRY_NOTICE="Off",
) = {};

Arguments

__CLASS__:

AnyRefNode

SUPPRESS_SYMMETRY_NOTICE:

Switch to suppress the notice detecting duplicate eigenvalues of the Jmatrix about the center of mass, indicating that two or three axes of the center of mass node may not be uniquely defined. (Default: “Off”)

Optional initialization members

SymmetryTolerance = 1e-10;
class type:

AnyFloat

Tolerance for checking duplicate eigenvalues