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."
rhinoscriptsyntax.SurfaceVolumeMoments (surface_id)
rhinoscript.surface.SurfaceVolumeMoments (surface_id)
surface_id |
Required. String or Guid. The object's identifier. |
Tuple |
A tuple of volume moments of inertia information if successful. The array will contain the following information:
|
||||||||||||||||||||||||||||||||||||||||||
None |
If not successful, or on error. |
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]