i have a scripting component that creates a surface then i use AreaMasProperties to get the area of the surface. the problem is the time it takes to calculate. i used a stopwatch() to time each event.
it takes :
5ms to calc the surface
3ms to create OnMassProperties mp = new OnMassProperties();
and 400-600 ms to run the area calc , outSrf.AreaMassProperties(ref mp, true, false, false, false);
it seams that this is way to long for the area calc. the brepArea component only takes 50-60ms to run the exact same calc.
to test this i made a C# node in GH and added
OnMassProperties mp = new OnMassProperties();
x.AreaMassProperties(ref mp, true, false, false, false);
A = mp.Area();
when you compare that to the area component it evals much slower. that may not be a fair test since the c# node has to go through a compiler but i also tried the same code inside a custom component that i made in VS and compiled into a gha and got the same slow results. which makes no sense since it should do the same thing that (and similar code) the brep area component does.