Iterates over subshapes in a shape. More...
#include <cadex/ModelData_Shape.hxx>
Inherits cadex::internal::Base_NoCopy.
Public Member Functions | |
Iterator (const ModelData_Shape &theShape) | |
Constructor. | |
Iterator (const ModelData_Shape &theShape, ModelData_ShapeType theType) | |
Constructor. | |
~Iterator () | |
Destructor. | |
bool | HasNext () const |
ModelData_Shape | Next () |
Iterates over subshapes in a shape.
Iterator supports two usage scenario:
To retrive direct children of a shape, ModelData_Shape::Iterator should be used as follows:
To retrive children of a particular type, ModelData_Shape::Iterator should be used by specifying a type of interest as follows:
When using the latter approach exploration is done traversing the graph of subshapes in a depth-first manner. Each subshape will be found as many times as it is registered in the parent subshape. For instance, a seam-edge will be encountered twice, with forward and reversed orientations.
The order of returned subshapes is deterministic and corresponds to the order in which the subshapes were added during construction.