BRepMesh_IncrementalMesh faceMesh(face, .05);
TopLoc_Location loc;
Handle(Poly_Triangulation) tri = BRep_Tool::Triangulation(face, loc);
if (tri)
{
// get the nodes
if (tri->HasUVNodes())
{
const Poly_Array1OfTriangle &tris = tri->Triangles();
const TColgp_Array1OfPnt &triPos = tri->Nodes();
const TColgp_Array1OfPnt2d &triUV = tri->UVNodes();
for (Standard_Integer iCount = tris.Lower(); iCount < tris.Length(); ++iCount)
{
// get the node indexes for this triangle
const Poly_Triangle& tri = tris(iCount);
Standard_Integer indexPos0 = tri(1);
Standard_Integer indexPos1 = tri(2);
Standard_Integer indexPos2 = tri(3);
gp_Pnt v0 = triPos(indexPos0);
gp_Pnt2d uv0 = triUV(indexPos0);
gp_Pnt v1 = triPos(indexPos1);
gp_Pnt2d uv1 = triUV(indexPos1);
gp_Pnt v2 = triPos(indexPos2);
gp_Pnt2d uv2 = triUV(indexPos2);
}
}
}
}
I also found in the OCCT email list a function for point inversion that could be helpful as well