SurfaceVolume

Calculates the volume of closed surface or polysurface objects.

Syntax

rhinoscriptsyntax.SurfaceVolume (object_id)

rhinoscript.surface.SurfaceVolume (object_id)

Parameters

object_id

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

Returns

List

A list of volume information if successful.  The list will contain the following information:

Number

The volume.

Number

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

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.SurfaceVolume(obj)

    if massprop:

        print "The polysurface volume is: ", massprop[0]

Also See

SurfaceVolume

SurfaceVolumeCentroid

SurfaceVolumeMoments