face-edge graph

How can I get the face-edge graph related to the B-rep model?Thanks.

Rob Bachrach's picture

Typically, you would just use a TopExp_Explorer to visit the faces in a shape and then the edges in each face. You could, in theory, build a TopTools_IndexedDataMapOfShapeListOfShape if you only want to do this once. If you need to build the opposite reference (edges->faces), look at TopExp::MapShapesAndAncestors.