SurfaceVolumeMoments

Calculates the volume moments of inertia of closed surface or polysurface objects.  For more information, see the Rhino help file for "Mass Properties Calculation Details."

Syntax

rhinoscriptsyntax.SurfaceVolumeMoments (surface_id)

rhinoscript.surface.SurfaceVolumeMoments (surface_id)

Parameters

surface_id

Required.  String or Guid.  The object's identifier.

Returns

Tuple

A tuple of volume moments of inertia information if successful.  The array will contain the following information:

0

Tuple (X,Y,Z)

First Moments.

1

Tuple (X,Y,Z)

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

2

Tuple (X,Y,Z)

Second Moments.

3

Tuple (X,Y,Z)

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

4

Tuple (X,Y,Z)

Product Moments.

5

Tuple (X,Y,Z)

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

6

Tuple (X,Y,Z) 

Volume Moments of Inertia about the World Coordinate Axes.

7

Tuple (X,Y,Z)

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

8

Tuple (X,Y,Z)

Volume Radii of Gyration about the World Coordinate Axes.

9

Tuple (X,Y,Z)

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

10

Tuple (X,Y,Z)

Volume Moments of Inertia about the Centroid Coordinate Axes.

11

Tuple (X,Y,Z)

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

12

Tuple (X,Y,Z)

Volume Radii of Gyration about the Centroid Coordinate Axes.

13

Tuple (X,Y,Z)

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

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

obj = rs.GetObject("Select a surface", rs.filter.polysurface)

if rs.IsPolysurfaceClosed(obj):

    massprop = rs.SurfaceVolumeMoments(obj)

    if massprop:

        print "Volume Moments of Inertia about the World Coordinate Axes: ", massprop[6]

Also See

SurfaceVolume

SurfaceVolumeCentroid