MeshAreaMoments

Calculates the area moments of inertia of a mesh object.  For more information, see the Rhino help file for "Mass Properties Calculation Details."

Syntax

Rhino.MeshAreaMoments (strObject)

Parameters

strObject

Required.  String.  The object's identifier.

Returns

Array

An array of area moments of inertia information if successful.  The array will contain the following information:

Element

Type

Description

0

Array (X,Y,Z)

First Moments.

1

Array (X,Y,Z)

The absolute (+/-) error bound for the First Moments.

2

Array (X,Y,Z)

Second Moments.

3

Array (X,Y,Z)

The absolute (+/-) error bound for the Second Moments.

4

Array (X,Y,Z)

Product Moments.

5

Array (X,Y,Z)

The absolute (+/-) error bound for the Product Moments.

6

Array (X,Y,Z) 

Area Moments of Inertia about the World Coordinate Axes.

7

Array (X,Y,Z)

The absolute (+/-) error bound for the Area Moments of Inertia about World Coordinate Axes.

8

Array (X,Y,Z)

Area Radii of Gyration about the World Coordinate Axes.

9

Array (X,Y,Z)

The absolute (+/-) error bound for the Area Radii of Gyration about World Coordinate Axes.

10

Array (X,Y,Z)

Area Moments of Inertia about the Centroid Coordinate Axes.

11

Array (X,Y,Z)

The absolute (+/-) error bound for the Area Moments of Inertia about the Centroid Coordinate Axes.

12

Array (X,Y,Z)

Area Radii of Gyration about the Centroid Coordinate Axes.

13

Array (X,Y,Z)

The absolute (+/-) error bound for the Area Radii of Gyration about the Centroid Coordinate Axes.

14

Array (X,Y,Z)

Area Principal Moments of Inertia about Centroid and Principal Axes

15

Array (X,Y,Z)

The X direction of the Area Principal Moments of Inertia about Centroid and Principal Axes.

16

Array (X,Y,Z)

The Y direction of the Area Principal Moments of Inertia about Centroid and Principal Axes.

17

Array (X,Y,Z)

The Z direction of the Area Principal Moments of Inertia about Centroid and Principal Axes.

Null

If not successful, or on error.

Example

Const rhObjectMesh = 32

Dim strObject, arrMP

strObject = Rhino.GetObject("Select a mesh", rhObjectPolySurface)

If Not IsNull(strObject) Then

  arrMP = Rhino.MeshAreaMoments(strObject)

  If IsArray(arrMP) Then

    Rhino.Print "Volume Moments of Inertia about the World Coordinate Axes: " & Rhino.Pt2Str(arrMP(6), 4)

  End If

End If

Also See

MeshArea

MeshAreaCentroid