Wire belongs to which face?

Dear all,

I am stuck with the issue. Actually I have a Wire and a Shell.
I want to Cut one of the face with the wire, but I don't know which face the wire belongs to. I tried to check with all the edges "BRep_Tool::CurveOnSurface" but for all the faces it returned NULL.

But when I cut the face(manually found out the face from the shell, to which the wire belongs) with the wire, It works fine, I get the resultant face.

Please tell me, how will I found out the face from the shell the wire belongs to.

Thanks and Regards,
Sharad Verma

m-aronsson's picture

Not sure if there is a function to get the face, but you can always use TopExp_Explorer on the shell to find the faces in the shell and each face has a list of wires it use, so you can always track it down that way.

Sharad Verma's picture

Thanks for the reply Mikael,

But the wire is not the boundary wire, it is some other wire, through which i want to cut the face.

Sharad Verma's picture

Can Somebody please help me with this issue? I am unable to find the right face for the wire.

Forum supervisor's picture

Dear Sharad,
Follow the suggestion of Mikael.
If the specified wire really belongs to one of face of the shell you will find it.
If no - check the point where you get the wire ...
Besides I suggest you to overlook chapter "5. Topology" of Modeling Data User's Guide"

Sharad Verma's picture

Dear Forum Supervisor,

Actually, hierarchically that Wire doesn't belong to the face. I just want to Cut a Face of a Shell from that wire, but I don't know which face to Cut with that wire. How will I check that the Wire lies on which Particular Face?

Did you understand my question now?

Thanks for replies you do.

Forum supervisor's picture

Dear Sharad,
You can project the wire on the shell and get the expected information.
See also my answer at the http://www.opencascade.org/org/forum/thread_22996/?forum=3.
If you will not succeed you may contact us via the Contact Form http://www.opencascade.org/about/contacts/. We will try to find a solution/workaround acceptable for you.

Sharad Verma's picture

Thanks for the Reply forum supervisor,

I tried LocOpe_WiresOnShape to check whether the wire lies on the face, But couldn't found out the solution.

Is there any better way of finding wires or edges lying on a Face? If something is there then please tell.


Alexander Schneller's picture

Hi Sharad Verma,

just an idea you could try to get the distance between face and curve/shape.
With GeomAPI_ExtremaCurveSurface or BRepExtrema_DistShapeShape and the face with the shortest distance may be the face you are looking for.


Sharad Verma's picture

Thanks Alexander Schneller,

GeomAPI_ExtremaCurveSurface worked. I had to check for each and every curve. Atleast this is some workaround.

Thanks again.. :)