Calculates the area centroid of a surface or polysurface object.
rhinoscriptsyntax.SurfaceAreaCentroid (object_id)
rhinoscript.surface.SurfaceAreaCentroid (object_id)
object_id |
Required. String or Guid. The object's identifier. |
List |
A list of area centroid 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.surface)
if obj:
massprop = rs.SurfaceAreaCentroid(obj)
if massprop: rs.AddPoint( massprop[0] )