opencascade for loop order

Question: when using TopExp_Explorer to loop all the wires for a particular surface, does it always find the outer wire first?
ie. when using
TopExp_Explorer expw;
for(expw.Init(aface,TopAbs_WIRE);expw.More(); expw.Next())
{

Thank you.

Cauchy Ding's picture

Hi Kent,

I don't think so. You can trace the source code into BRepTools::OuterWire, you will find the outer wire is calculated using 2D bounds.

-Ding

jelle's picture

Apart from that you can use BRep_Tools.WireExplorer to loop through a wire' vertices & edges in an ordered manner.

Kent Zhou's picture

Hi, Cauchy. Thanks for replying, really appreciated.
By the way, im not really sure how to check the source code on a particular part.Could you please tell me how?

Regards
Kent

Cauchy Ding's picture

Hi Kent,

The simple way is to use the class name + .cxx or .hxx to search it, such as BRep_Tool.cxx or BRep_Too.hxx. Another way is to install the document of occ, and use the Reference Documentation.

-Ding