OCCT3D OCCT 8.0.1
OCCT documentation

Search guides and API reference

Enter at least two characters.

    Open CASCADE Technology Reference Manual 8.0.1
    TopoDS_Iterator Class Reference

    Iterates on the underlying shape underlying a given TopoDS_Shape object, providing access to its component sub-shapes. Each component shape is returned as a TopoDS_Shape with an orientation, and a compound of the original values and the relative values. More...

    #include <TopoDS_Iterator.hxx>

    Public Member Functions

     TopoDS_Iterator ()
     Creates an empty Iterator.
     TopoDS_Iterator (const TopoDS_Shape &S, const bool cumOri=true, const bool cumLoc=true)
     Creates an Iterator on sub-shapes. Note:
    void Initialize (const TopoDS_Shape &S, const bool cumOri=true, const bool cumLoc=true)
     Initializes this iterator with shape S. Note:
    bool More () const
     Returns true if there is another sub-shape in the shape which this iterator is scanning.
    void Next ()
     Moves on to the next sub-shape in the shape which this iterator is scanning. Exceptions Standard_NoMoreObject if there are no more sub-shapes in the shape.
    const TopoDS_ShapeValue () const
     Returns the current sub-shape in the shape which this iterator is scanning. Exceptions Standard_NoSuchObject if there is no current sub-shape.
    NCollection_ForwardRangeIterator< TopoDS_Iteratorbegin ()
     Returns an STL-compatible iterator for range-based for loops.
    NCollection_ForwardRangeSentinel end () const
     Returns a sentinel marking the end of iteration.

    Detailed Description

    Iterates on the underlying shape underlying a given TopoDS_Shape object, providing access to its component sub-shapes. Each component shape is returned as a TopoDS_Shape with an orientation, and a compound of the original values and the relative values.

    Constructor & Destructor Documentation

    ◆ TopoDS_Iterator() [1/2]

    TopoDS_Iterator::TopoDS_Iterator ( )
    inline

    Creates an empty Iterator.

    ◆ TopoDS_Iterator() [2/2]

    TopoDS_Iterator::TopoDS_Iterator ( const TopoDS_Shape & S,
    const bool cumOri = true,
    const bool cumLoc = true )
    inline

    Creates an Iterator on sub-shapes. Note:

    • If cumOri is true, the function composes all sub-shapes with the orientation of S.
    • If cumLoc is true, the function multiplies all sub-shapes by the location of S, i.e. it applies to each sub-shape the transformation that is associated with S.

    Member Function Documentation

    ◆ begin()

    NCollection_ForwardRangeIterator< TopoDS_Iterator > TopoDS_Iterator::begin ( )
    inline

    Returns an STL-compatible iterator for range-based for loops.

    Warning
    Do not call Next() or Initialize() externally during range-for iteration.

    ◆ end()

    NCollection_ForwardRangeSentinel TopoDS_Iterator::end ( ) const
    inline

    Returns a sentinel marking the end of iteration.

    ◆ Initialize()

    void TopoDS_Iterator::Initialize ( const TopoDS_Shape & S,
    const bool cumOri = true,
    const bool cumLoc = true )

    Initializes this iterator with shape S. Note:

    • If cumOri is true, the function composes all sub-shapes with the orientation of S.
    • If cumLoc is true, the function multiplies all sub-shapes by the location of S, i.e. it applies to each sub-shape the transformation that is associated with S.

    ◆ More()

    bool TopoDS_Iterator::More ( ) const
    inline

    Returns true if there is another sub-shape in the shape which this iterator is scanning.

    ◆ Next()

    void TopoDS_Iterator::Next ( )

    Moves on to the next sub-shape in the shape which this iterator is scanning. Exceptions Standard_NoMoreObject if there are no more sub-shapes in the shape.

    ◆ Value()

    const TopoDS_Shape & TopoDS_Iterator::Value ( ) const
    inline

    Returns the current sub-shape in the shape which this iterator is scanning. Exceptions Standard_NoSuchObject if there is no current sub-shape.


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