Find closest face to a surface

I have revolved shape A with multiple faces and a separate face B. I need to find the closest face of shape A from B. Is there a way to achieve this?

Any help would be appreciated. Thanks.

 

Benjamin Bihler's picture

You could use TopExp_Explorer for iterating over the faces and BRepExtrema_DistShapeShape for computing the distances.

Benjamin

Madz T's picture

Thank you. I will try it.