Orientation of edges


I am linking OCC with an external mesher.

To do so, for each face of a solid, I have to know an orientation :

taking the first edge of this face, I have to know wether the face is on the left or on the right of this edge.

I tried to use the Orientation() method of TopoDS_Edge, but it gives sometimes the right result, sometimes not.

So I assume that there is something related with the orientation of the underlying Geom2d_Curve ?

Can someone explain me how to get this information ?



Patrik Mueller's picture


I've done the same for using OCC with OpenInventor, VTK or OpenScenegraph (build an kind of MesherClass). You have to check Orientation() for each TopoDS_Face. If you build the Triangulation for the mesh you have to look for the face orientation.