SurfaceAreaCentroid

Calculates the area centroid of a surface or polysurface object.

Syntax

rhinoscriptsyntax.SurfaceAreaCentroid (object_id)

rhinoscript.surface.SurfaceAreaCentroid (object_id)

Parameters

object_id

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

Returns

List

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

Element

Type

Description

0

Point3d

The centroid point.

1

Tuple (X,Y,Z)

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

None

If not successful, or on error.

Example

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] )

Also See

SurfaceArea

SurfaceAreaMoments