In the attached file which has one closed planar curve, if I use the Rhino command _AreaCentroid, it gives a correct result, but if in RhinoScript I use the CurveAreaCentroid function, it returns 0,0,0 which is wrong.
In Python/RhinoCommon/rhinoscriptsyntax this does appear to be returning the correct value:
import rhinoscriptsyntax as rs
objID=rs.GetObject("Select curve",4,preselect=True)
if objID:
cent=rs.CurveAreaCentroid(objID)
#returns (centroid, error)
if cent: rs.AddPoint(cent[0])
Which returns the same point as the Rhino command CurvAreaCentroid.
In VB Rhinoscript, it does look like it’s buggy - returning 0,0,0… @dale ?