How to find the centroid of a NURBS surface using C APIs of Hoops exchange?

I am trying to find the centroid of NURB surface using Hoops exchange APIs. Please suggest some ideas. I used A3DComputePhysicalProperties to compute the centroid. It required converting of A3DRiBrepModel from a A3DTopoFace. But the in general this method is very slow (though i got the correct centroid) because this API is loaded with other computation of physical properties and I do not know the resolution of integration . can anybody suggest a better way to compute centroid of NURBS surface using Hoops API or we need to integrate manually.

Hello @chandras
It looks like A3DComputePhysicalProperties is the current API for getting the centroid (A3DPhysicalPropertiesData::m_sGravityCenter). However, you mentioned that this method is slow. Can you provide more details, such as CAD data, specific results you obtained? This information will help us investigate further and possibly suggest optimizations or alternative approaches for your use case. Thank you.

Best Regards,
Man

Hi man

Thank you for your response. You can take any complex model and adapt it to have only NURB surfaces using the A3DAdaptAndReplaceAllBrepInModelFile function, ensuring all surfaces are converted to NURB. Then, measure the computation time required to determine the gravity center (A3DPhysicalPropertiesData::m_sGravityCenter). For some models, this process takes an exceptionally long time (up to 50 minutes for the model I have) to compute the centroid of all the NURB surfaces.

If ‘m_sGravityCenter’ is computed using an iterative method, it is possible that the process takes a long time to converge. This could explain the delays observed. If you are interested in discussing this further, feel free to email me at my provided email address to arrange a meeting.

chandra