Calculates the volume of closed surface or polysurface objects.
rhinoscriptsyntax.SurfaceVolume (object_id)
rhinoscript.surface.SurfaceVolume (object_id)
object_id |
Required. String or Guid. The object's identifier. |
List |
A list of volume information if successful. The list 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.SurfaceVolume(obj)
if massprop:
print "The polysurface volume is: ", massprop[0]