Does anyone know a way of creating an indexed face set from a TopoDS_Solid object (or TopoDS_Shell)?
By indexed face set, I mean a representation like that in VRML or OpenInventor. What I want is coordinates of all the vertices stored in an array and a list of all the faces in terms of the indices into the array of vertices. For example, if my shape contains a triangle (for the sake of simplicity), I would like the following:
// array of vertices contains the following coordinates:
0: (1.0, 0.0, 0.0)
1: (0.0, 1.0, 0.0)
2: (0.0, 0.0, 1.0)
// array of faces contains the following:
0: (0, 1, 2)
i.e. the face consists of 0th vertex, 1st vertex, and 2nd vertex.
I know how to iterate over the vertices in the