Inherits cadex::internal::Base_NoCopy.
Iterates over subshapes in a shape.
Iterator supports two usage scenario:
- iteration over direct children;
- iteration over subshapes of a specified type.
Exploration of Direct Children
To retrive direct children of a shape, ModelData_Shape::Iterator should be used as follows:
while (i.HasNext()) {
ModelData_Type aType = aChild.
Type();
assert (aType == ModelData_ST_Edge);
}
Iterates over subshapes in a shape.
Definition: ModelData_Shape.hxx:41
Base class of topological shapes.
Definition: ModelData_Shape.hxx:37
ModelData_ShapeType Type() const
Returns a shape type.
Definition: ModelData_Shape.cxx:358
Defines a connected set of edges.
Definition: ModelData_Wire.hxx:31
Exploration of particular types
To retrive children of a particular type, ModelData_Shape::Iterator should be used by specifying a type of interest as follows:
while (i.HasNext()) {
...
}
Defines an edge.
Definition: ModelData_Edge.hxx:36
Defines a topological solid.
Definition: ModelData_Solid.hxx:31
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.
- Examples
- MTKConverter/main.cxx, advgeom/brepsimplify/Program.cs, advgeom/brepsimplify/main.cxx, exploring/brepgeometry/Program.cs, exploring/brepgeometry/main.cxx, exploring/breprepresentation/Program.cs, exploring/breprepresentation/main.cxx, helpers/shape_processor.hxx, machining/dfm_analyzer/main.cxx, machining/feature_recognizer/main.cxx, meshing/visualizationmesher/Program.cs, meshing/visualizationmesher/main.cxx, modeling/assembly/Program.cs, modeling/assembly/main.cxx, modeling/metadata/Program.cs, modeling/metadata/main.cxx, sheet_metal/dfm_analyzer/main.cxx, sheet_metal/feature_recognizer/main.cxx, sheet_metal/unfolder/main.cxx, and wall_thickness/analyzer/main.cxx.