Calculates the volume centroid of a mesh object.
rhinoscriptsyntax.MeshVolumeCentroid (object_id)
rhinoscript.mesh.MeshVolumeCentroid (object_id)
object_id |
Required. String or Guid. The identifier of a mesh object. |
Point3d |
A 3-D point identifying the volume centroid if successful. |
None |
If not successful, or on error. |
import rhinoscriptsyntax as rs
obj = rs.GetObject("Select mesh", rs.filter.mesh )
centroid = rs.MeshVolumeCentroid(obj)
rs.AddPoint( centroid )