interior/exterior edge

Dear All,

When iterating the edges of a ring-shaped face, how to know which edge is from the interior circle or the exterior one, as shown in the attached screenshot?

Thanks a lot.

Mikhail Sazonov's picture

You need to know which of wires is the outer one. Use the method ShapeAnalysis::OuterWire().

Boqing Dong's picture

Dear Mikhail,

Thank you for the answer.

I looked into the function's description and it says "Returns the first wire oriented as outer...".
It's hard for me to image any surface with outer wires more than 1. Do you have any case of it?

The typical case I cope with is something like a surface with several holes in it.
Under this circumstance, can I take it safely that the wire returned by this method "ShapeAnalysis::OuterWire()" is the only outer wire, and all the other ones of the surface are inner ones?

Thanks a lot.

Mikhail Sazonov's picture

With OCCT BRep data structures it is possible to create a face with more than one wire having outer orientation. It will be invalid face. For a regular valid face your last sentence is always true.

Boqing Dong's picture

If I want to make sure whether or not my surface is valid, can I use "BRepCheck_Analyzer::IsValid" or a better method is available?

Mikhail Sazonov's picture

Yes, you can.