is edge belong TopoDS_Face

Hi,all
tell me please how i can know is edge belong to TopoDS_Face

Sorry of my english

Serge's picture

Hi,

One of the possible way is the following:

TopoDS_Edge anEdge = ...;
TopoDS_Face aFace = ...;

for( TopExp_Explorer anExp(aFace, TopAbs_EDGE); anExp.More(); anExp.Next()) {
if(anExp.Current() == anEdge) {
//The edge belongs to the face
}
}

Regards,
Serge

Marina's picture

I have TopoDS_Wire. It has some edges, more then face.
I must make wire of edges belonging to my face.
Across wires may be...

Serge's picture

Hi,

Try this:

TopoDS_Face aFace = ...;
TopoDS_Wire aWire = ...
TopTools_MapOfShape aMap;
TopExp_Explorer anExp(aFace, TopAbs_EDGE);

for(; anExp.More(); anExp.Next()) {
aMap.Add(anExp.Current())
}

for(anExp.Init(aWire, TopAbs_Edge); anExp.More(); anExp.Next()) {
if(aMap.Contains(anExp.Current()) {
//the edge belongs to the face
}
}

Regards