Logo Search packages:      
Sourcecode: opencascade version File versions  Download package

TopExp_Explorer Class Reference

#include <TopExp_Explorer.hxx>

List of all members.

Detailed Description

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()) {

an other way
TopExp_Explorer Ex(S,TopAbs_FACE);
while (Ex.More()) {

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.

Definition at line 113 of file TopExp_Explorer.hxx.

Public Member Functions

void Clear ()
Standard_EXPORT const
Current () const
Standard_Integer Depth () const
Standard_EXPORT void Destroy ()
Standard_EXPORT void Init (const TopoDS_Shape &S, const TopAbs_ShapeEnum ToFind, const TopAbs_ShapeEnum ToAvoid=TopAbs_SHAPE)
Standard_Boolean More () const
Standard_EXPORT void Next ()
void operator delete (void *anAddress)
void * operator new (size_t size)
void * operator new (size_t, void *anAddress)
Standard_EXPORT void ReInit ()
Standard_EXPORT TopExp_Explorer (const TopoDS_Shape &S, const TopAbs_ShapeEnum ToFind, const TopAbs_ShapeEnum ToAvoid=TopAbs_SHAPE)
Standard_EXPORT TopExp_Explorer ()
 Creates an empty explorer, becomes usefull after Init.

Private Attributes

Standard_Boolean hasMore
TopoDS_Shape myShape
Standard_Integer mySizeOfStack
TopExp_Stack myStack
Standard_Integer myTop
TopAbs_ShapeEnum toAvoid
TopAbs_ShapeEnum toFind

The documentation for this class was generated from the following files:

Generated by  Doxygen 1.6.0   Back to index