Open CASCADE Technology 6.6.0
Data Structures
TopExp_Explorer.hxx File Reference
#include <Standard.hxx>
#include <Standard_DefineAlloc.hxx>
#include <Standard_Macro.hxx>
#include <TopExp_Stack.hxx>
#include <Standard_Integer.hxx>
#include <TopoDS_Shape.hxx>
#include <Standard_Boolean.hxx>
#include <TopAbs_ShapeEnum.hxx>
#include <TopExp_Explorer.lxx>

Data Structures

class  TopExp_Explorer
 An Explorer is a Tool to visit a Topological Data
Structure form the TopoDS package.

An Explorer is built with :

* The Shape to explore.

* The type of Shapes to find : e.g VERTEX, EDGE.
This type cannot be SHAPE.

* The type of Shapes to avoid. e.g SHELL, EDGE.
By default this type is SHAPE which means no
restriction on the exploration.


The Explorer visits all the structure to find
shapes of the requested type which are not
contained in the type to avoid.

Example to find all the Faces in the Shape S :

TopExp_Explorer Ex;
for (Ex.Init(S,TopAbs_FACE); Ex.More(); Ex.Next()) {
ProcessFace(Ex.Current());
}

// an other way
TopExp_Explorer Ex(S,TopAbs_FACE);
while (Ex.More()) {
ProcessFace(Ex.Current());
Ex.Next();
}

To find all the vertices which are not in an edge :

for (Ex.Init(S,TopAbs_VERTEX,TopAbs_EDGE); ...)


To find all the faces in a SHELL, then all the
faces not in a SHELL :

TopExp_Explorer Ex1, Ex2;

for (Ex1.Init(S,TopAbs_SHELL),...) {
// visit all shells
for (Ex2.Init(Ex1.Current(),TopAbs_FACE),...) {
// visit all the faces of the current shell
}
}

for (Ex1.Init(S,TopAbs_FACE,TopAbs_SHELL),...) {
// visit all faces not in a shell
}


If the type to avoid is the same or is less
complex than the type to find it has no effect.

For example searching edges not in a vertex does
not make a difference.

More...
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines