When I compute AreaMassProperties on a brep, the Centroid seems to be different from Rhino’s VolumeCentroid command. Can anybody explain to me why that is or what the difference is?
You can try with this C# script in scripteditor:
using System;
using Rhino;
using Rhino.Input.Custom;
using Rhino.Geometry;
var go = new GetObject();
go.Get();
var brep = go.Object(0).Brep();
var amp = AreaMassProperties.Compute(brep);
Rhino.RhinoDoc.ActiveDoc.Objects.AddPoint(amp.Centroid);
Using pythonscriptsyntax’ SurfaceVolumeCentroid seems to give the same result as the Rhino command.
231221 VolumeCentroid.3dm (69.0 KB)