get the contact face between solids of a compound shape

Hi Forum,
I try to use opencascade to get the contact faces between solids of a compound shape.
Are there any fast method to get the contact faces including surfaces and plane?
I have already realized the slowest method to traverse every face of two pair solids.