How to find out overlapping faces in Opencascade?

Hi all,

I am working with Boolean operations of two solids. After the resultant geometry, i need to find out whether there is any existing faces, edges and vertices in the resultant geometry which are already there in the existing two solids.

I tried CheckOverlapping function for overlapping edges and it worked find.
I tried BRepTools::Compare (V1, V2) to find out duplicate vertices and it also worked find.

Now, I Tried BRepAlgoAPI_Common to check overlapping faces. But it does not work for all cases.

Please anybody can provide any workaround to find out common between two faces.

Any help will be highly appreciated.

Regards,
Sharad Verma

jelle's picture

isn't overlapping edges sufficient information to check overlapping faces?

Sharad Verma's picture

But what if a smaller face lies inside a bigger face?

Then there is no overlapping boundaries of those two faces.

If i am wrong, please correct me. And If you have other solution then tell me with some pseudo code.

One more thing, o am not comparing the complete loop of the Faces. If there is such case then how to compare this?

Sharad Verma's picture

Anybody here to help me. I am stuck with this issue. Please provide me any hint or any suggestion.

Cauchy Ding's picture

Hi Sharad,

In my app, searching duplicated or overlapped faces is by distance measuring of two faces'meshes. You can firstly filter out lots of false face pairs using bounding box or specified surface type. Then using vertices in one face to measure distance to another face mesh, if it's larger than a given tolerance, it's also a false duplicated pair. Next using all points of one face mesh to measure distance to another face mesh.

Ding

Sharad Verma's picture

Hi Ding,

Actually in my application, i am not using meshing. And for large solids, comparing all nodes of the meshes will be very time consuming. Is there anything else, you may suggest me. It will be very useful.

Thanks and Regards,
Sharad Verna