AnsweredAssumed Answered

Get the normal direction at the centroid of non-planar face

Question asked by J. R. on Jan 22, 2019
Latest reply on Jan 24, 2019 by Matthew Cempa

Hi,

 

I am trying to get the normal direction of a non-planar face through API. For planar face, there are numerous ways - Face.Normal, or GetSectionProperties2(Face.GetSurface)... But for a non-planar face, the only call I found was Face.GetSurface.EvaluateAtPoint(x,y,z), where xyz are the coordinates of a point on that face at which the Normal direction should be measured. In my case, the most logical point for doing this would be at the centroid (center of area) of the face. However, I am unable to find any API calls that will tell me the coordinates of that centroid, and the EvaluateAtPoint won't accept coordinates "close enough" to that face - it needs them exact.
Question - how can I determine that centroid so that I can call EvaluateAtPoint and find the Normal of the face? Or is there a better way to do this?

Outcomes