CurveAreaCentroid

Returns that area centroid of closed, planar curves. The results are based on the current drawing units.

Syntax

rhinoscriptsyntax.CurveAreaCentroid ( object_id )

rhinoscript.curve.CurveAreaCentroid ( object_id )

Parameters

object_id

Required.  String or Guid.  The identifier of a closed, planar curve object.

Returns

Tuple

Area centroid information if successful.  The list will contain the following information:

Element

Type

Description

0

Point3d

The centroid point.

1

(X,Y,Z)

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

None

If not successful, or on error.

Example

import rhinoscriptsyntax as rs

id = rs.GetObject("Select a curve", rs.filter.curve)

if id:

    props = rs.CurveAreaCentroid(id)

    if props:

        print "The curve area centroid is:", props[0]

Also See

IsCurve

IsCurveClosed

IsCurvePlanar