Returns the approximate volume of one or more closed mesh objects.
rhinoscriptsyntax.MeshVolume (object_ids)
rhinoscript.mesh.MeshVolume (object_ids)
object_ids |
Required. String or Guid. The object's identifier (or list of identifiers). |
Tuple |
A tupe containing three numbers if successful. The three elements of the array are as follows:
|
||||||||||||
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select mesh", rs.filter.mesh )
if obj and rs.IsMeshClosed(obj):
volume = rs.MeshVolume(obj)
if volume: print "Mesh volume:", volume[1]