SurfaceAreaMoments

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

Syntax

Rhino.SurfaceAreaMoments (strObject [, intFaceIndex])

Parameters

strObject

Required.  String.  The object's identifier.

intFaceIndex

Optional.  Number.  If the object is a polysurface, then the index of the face to query.

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 rhObjectSurface = 8

Dim strObject, arrMP

strObject = Rhino.GetObject("Select a surface", rhObjectSurface)

If Not IsNull(strObject) Then

arrMP = Rhino.SurfaceAreaMoments(strObject)

If IsArray(arrMP) Then

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

End If

End If

Also See

SurfaceArea

SurfaceAreaCentroid