|
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_NodeId theRoot, const Config &theConfig) |
| | Preferred long-term constructor: all tuning knobs in Config.
|
| |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_NodeId theRoot) |
| |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_NodeId theRoot, TraversalMode theMode) |
| |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_NodeId theRoot, const std::optional< BRepGraph_NodeId::Kind > &theAvoidKind, bool theEmitAvoidKind, TraversalMode theMode=TraversalMode::Recursive) |
| |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_NodeId theRoot, BRepGraph_NodeId::Kind theTargetKind) |
| |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_NodeId theRoot, BRepGraph_NodeId::Kind theTargetKind, TraversalMode theMode) |
| |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_NodeId theRoot, BRepGraph_NodeId::Kind theTargetKind, const std::optional< BRepGraph_NodeId::Kind > &theAvoidKind, bool theEmitAvoidKind, TraversalMode theMode=TraversalMode::Recursive) |
| |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_ProductId theProduct, BRepGraph_NodeId::Kind theTargetKind) |
| |
| template<BRepGraph_NodeId::Kind TheKind, typename std::enable_if_t< TheKind !=BRepGraph_NodeId::Kind::Product, int > = 0> |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_NodeId::Typed< TheKind > theRoot, BRepGraph_NodeId::Kind theTargetKind) |
| | Disambiguates non-product typed ids from the ProductId-specific overload family above and keeps them on the generic NodeId traversal path.
|
| |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_ProductId theProduct, BRepGraph_NodeId::Kind theTargetKind, TraversalMode theMode) |
| |
| template<BRepGraph_NodeId::Kind TheKind, typename std::enable_if_t< TheKind !=BRepGraph_NodeId::Kind::Product, int > = 0> |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_NodeId::Typed< TheKind > theRoot, BRepGraph_NodeId::Kind theTargetKind, TraversalMode theMode) |
| | Disambiguates non-product typed ids from the ProductId-specific overload family above and keeps them on the generic NodeId traversal path.
|
| |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_NodeId theRoot, BRepGraph_NodeId::Kind theTargetKind, bool theCumLoc, bool theCumOri, TraversalMode theMode=TraversalMode::Recursive) |
| |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_ProductId theProduct, BRepGraph_NodeId::Kind theTargetKind, bool theCumLoc, bool theCumOri, TraversalMode theMode=TraversalMode::Recursive) |
| |
| template<BRepGraph_NodeId::Kind TheKind, typename std::enable_if_t< TheKind !=BRepGraph_NodeId::Kind::Product, int > = 0> |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_NodeId::Typed< TheKind > theRoot, BRepGraph_NodeId::Kind theTargetKind, bool theCumLoc, bool theCumOri, TraversalMode theMode=TraversalMode::Recursive) |
| | Disambiguates non-product typed ids from the ProductId-specific overload family above and keeps them on the generic NodeId traversal path.
|
| |
| | BRepGraph_ChildExplorer (const BRepGraph &theGraph, const BRepGraph_NodeId theRoot, BRepGraph_NodeId::Kind theTargetKind, const TopLoc_Location &theStartLoc, TopAbs_Orientation theStartOri, TraversalMode theMode=TraversalMode::DirectChildren) |
| |
| const Config & | GetConfig () const |
| | Returns the traversal configuration this explorer was constructed with. Read-only - configuration is fixed for the lifetime of the explorer.
|
| |
| bool | More () const |
| |
| void | Next () |
| |
| BRepGraphInc::NodeInstance | Current () const |
| |
| BRepGraph_NodeId | CurrentParent () const |
| | Returns the immediate parent of Current() in the explored path. Returns invalid NodeId when Current() is the root/self match.
|
| |
| LinkKind | CurrentLinkKind () const |
| | Returns how Current() is linked from CurrentParent().
|
| |
| BRepGraph_RefId | CurrentRef () const |
| | Returns the exact parent-owned RefId for Current(), when the current step is represented by a reference entry. Returns invalid RefId for structural links without a dedicated ref entry such as CoEdge->Edge, Product(part)->ShapeRoot and Occurrence->Product.
|
| |
| TopLoc_Location | LocationOf (const BRepGraph_NodeId::Kind theKind) const |
| |
| BRepGraph_NodeId | NodeOf (const BRepGraph_NodeId::Kind theKind) const |
| |
| TopLoc_Location | LocationAt (const int theLevel) const |
| |
| BRepGraph_NodeId | NodeAt (const int theLevel) const |
| |
| NCollection_ForwardRangeIterator< BRepGraph_ChildExplorer > | begin () |
| | Returns an STL-compatible iterator for range-based for loops.
|
| |
| NCollection_ForwardRangeSentinel | end () const |
| | Returns a sentinel marking the end of iteration.
|
| |
Stack-based lazy downward hierarchy walker for BRepGraph with inline location/orientation accumulation.
- See also
- BRepGraph class comment "Iterator guide" for choosing between iterator types.
Walks the graph hierarchy from a root node down to entities of a target kind, yielding one occurrence at a time via a depth-first stack. Location and orientation are composed incrementally during the walk, making Current().Location and Current().Orientation O(1) per call.
The traversal follows the actual graph structure transparently - every node kind is visited as a distinct entity (no hidden collapses): Compound -> children, CompSolid -> Solids, Solid -> Shells, Shell -> Faces, Face -> Wires (+direct Vertices), Wire -> CoEdges, CoEdge -> Edge, Edge -> Vertices, Product(assembly) -> Occurrences, Product(part) -> ShapeRoot, Occurrence -> Product.
Unlike flat definition traversal by typed ids, BRepGraph_ChildExplorer visits each occurrence. If Edge[5] is reachable through Face[0] and Face[1], it is visited twice with different accumulated transforms.
Traversal modes
- Recursive: depth-first walk through the full subgraph. Without target kind, all descendant nodes are emitted. With target kind, only matching nodes are emitted but intermediate levels are traversed to reach them.
- DirectChildren: yields only the immediate children of the root. No descent into grandchildren. With target kind, only children matching the kind are returned.