The next step is to draw a polygon on top of that face. I have the code working using UDOs to do this, but the call to UserDefinedObjectDisplayContext::drawPolygon(std::vector<NXOpen::NXPoint3d>) needs the points of the polygon to be ordered, so I get something very ugly because I can't control the order of the nodes obtained with the SmartSelectionManager.
Therefore, now I need the list of nodes of a CAEFace in an ordered manner.
Is there a way, in NXOpen, to:
obtain the extreme nodes included in the CAEFace? or
method to calculate the Convex Hull of a set of NXPoint3d?
If not, I will need to write myself an algorithm to calculate the convex hull of the set of points. I came across an older post here, but it was suggested to use the convex hull algorithm included in scipy, but I work in C++, so I don't want to use Python.