Represents the Inertia object.
The Inertia object can be associated with any relevant object of a document
in order to get or compute its inertia data. It takes into account all bodies of a part.
This version allows you to compute the following data:
mass
density
position of the center of gravity
inertia matrix
principal axes
principal moments
of a product.
The units are:
Kilogram (Kg) for Mass
Square meter (M^2) for Wet Area
Cubic meter (M^3) for Volume
Meter (M) for Position
Square Kilogram meter ((KgM)^2) for Inertia Matrix and Principal Moments
Kilogram per cubic meter (Kg/M^3) for Density
The method GetTechnologicalObject("Inertia") on the product to analyze, allows you to retrieve this object.
Properties
Property Density() As
Returns or sets the density for the computation.
The density value is set to:
0: the computation must use densities attached to each object.
any positive value: the computation has to use this value.
The density value is returned as:
1: a default value is used (there is no density attached to objects).
-1: the density is not homogeneous for each object.
other positive values: the density attached to all objects.
Example:
The first example gets the density of NewInertia inertia.
Dim ADensity As double
ADensity = NewInertia.Density
The second example sets the density of NewInertia inertia.
NewInertia.Density = 10.
Property GranularityMode() As
Returns or sets the Granularity Mode for Inertia Computation.
The Granularity value is set to:
0: Only main bodies option is selected => the computation must not use All bodies.
1: Only main bodies option is not selected => the computation must use All bodies.
The Granularity value is returned as:
0: the computation had considered only main bodies.
1: the computation had not considered only main bodies.
Example:
The first example gets the Granularity of NewInertia inertia.
Dim AGranularityMode As Integer
AGranularityMode = NewInertia.GranularityMode
The second example sets the Granularity of NewInertia inertia to deselect the "only main bodies".
NewInertia.GranularityMode = 1
Property Mass() As (Read Only)
Returns the mass.
Example:
This example retrieves the mass of NewInertia inertia.
Dim AMass As double
AMass = NewInertia.Mass
Methods
Sub GetCOGPosition( oCoordinates)
Retrieves the position of the center of gravity.
Parameters:
oCoordinates
The position of the center of gravity with respect to the product coordinate system:
oCoordinates(0) is the X coordinate
oCoordinates(1) is the Y coordinate
oCoordinates(2) is the Z coordinate
dd>
Example:
This example retrieves the position of the center of gravity of NewInertia inertia.
Dim Coordinates (2)
NewInertia.GetCOGPosition Coordinates
Sub GetInertiaMatrix( oMatrix)
Retrieves the matrix of inertia.
Parameters:
oMatrix
The matrix of inertia array:
oMatrix(0) is the Ixx component
oMatrix(1) is the Ixy component
oMatrix(2) is the Ixz component
oMatrix(3) is the Iyx component
oMatrix(4) is the Iyy component
oMatrix(5) is the Iyz component
oMatrix(6) is the Izx component
oMatrix(7) is the Izy component
oMatrix(8) is the Izz component
dd>
Example:
This example retrieves the matrix of inertia of NewInertia inertia.
Dim Matrix (8)
NewInertia.GetInertiaMatrix Matrix
Sub GetPrincipalAxes( oComponents)
Retrieves the the principal axes of inertia.
Parameters:
oComponents
The principal axes of inertia array (A1, A2 and A3 are the principal axes of inertia):
oComponents(0) is the A1x component
oComponents(1) is the A2x component
oComponents(2) is the A3x component
oComponents(3) is the A1y component
oComponents(4) is the A2y component
oComponents(5) is the A3y component
oComponents(6) is the A1z component
oComponents(7) is the A2z component
oComponents(8) is the A3z component
dd>
Example:
This example retrieves the principal axes of inertia of NewInertia inertia.
Dim Components (8)
NewInertia.GetPrincipalAxes Components
Sub GetPrincipalMoments( oValues)
Retrieves the principal moments of inertia.
Parameters:
oValues
The principal moments of inertia array:
oValues(0) is the M1 value with respect to the first principal exes of inertia
oValues(1) is the M2 value with respect to the second principal exes of inertia
oValues(2) is the M3 value with respect to the third principal exes of inertia
dd>
Example:
This example retrieves principal moments of inertia of NewInertia inertia.
Dim Values (2)
NewInertia.GetPrincipalMoments Values