Error with Area centroid calculation


See the following file (264kB)


Rhino gives the wrong area centroid:
Cumulative Area Centroid = -954185.433,0,0.2 (+/- 1.4e+21,1.2e+20,1.6e+14) for 3 surfaces
This can not be true. There is no indication of bad objects.
(The surface can be exploded and untrimed)

Version 5 SR11 64-bit
(5.11.50226.17195, 2/26/2015)

Is it really an error and how to avoid?

Best Regards,

Explode the polysurface.
ShrinkTrimmedSrfToEdge to shrink each of the three surfaces.
Join the surfaces into a single polysurface.

Results for area centroid:
Cumulative Area Centroid = 9.7178527,-3.15895595e-15,1.122798 (+/- 1.6e-06,3.3e-08,2.1e-07) for 3 surfaces

Looks like a bug.

You may get more responses by posting in the Rhino for Windows forum rather than in the overall forum. Very little is posted in the overall forum.

This does look like some sort of bug - the centroid also takes ages to calculate here. The untrimmed surfaces seem OK and area centroid on the individual untrimmed surfaces also fast and correct looking… Running ShrinkTrimmedSurfaces on the polysurface object seems to fix it. --Mitch

(Changed category to Rhino for Windows.)

Hi Bas- thanks, I see that too- as Mitch says, shrinking the inpiuts is the way out for now.