DiscussionsIssue archiveOther usage issues

Archived discussion

use MapShapeAncestor

Other usage issuesFri, 01/20/2006 - 19:321 reply

Browse this forum
QuestionAuthor

Hi,

I've a map of edge and i want to find faces liable by each edge.. i'm wondering if i may use MapShapeAncestor and how to use it..
Thank you..

Discussion

1 archived reply

Posts are displayed in their archived order.

01Commenter-1

Create the map with:

TopTools_IndexedDataMapOfShapeListOfShape myEdgeFaceMap;
TopExp::MapShapesAndAncestors(myShape, TopAbs_EDGE, TopAbs_FACE, myEdgeFaceMap);

Reference it with:
const TopTools_ListOfShape &myFaces = mapEdgeFace.FindFromKey(myEdge);
TopTools_ListIteratorOfListOfShape itFace;
for (itFace.Initialize(myFaces); itFace.More(); itFace.Next()) {
// process the face
}