Shape is part of other shape

Does OCC can check for me if some shape is part of other shape? For example I have edgeI selected and I want to check if this edge is part of face.

Maili's picture

I don't know if there is better method but TopExp::MapShapesAndAncestors should work