OCCT3D About OCCT
Open CASCADE Technology Reference Manual 8.0.1
Loading...
Searching...
No Matches
Public Types | Public Member Functions
BRepGraph_RelatedIterator Class Reference

Single-level iterator over semantically related topology nodes. More...

#include <BRepGraph_RelatedIterator.hxx>

Public Types

enum class  RelationKind {
  BoundaryEdge , AdjacentFace , OuterWire , ReferencedByFace ,
  IncidentVertex , WireCoEdge , OwningFace , IncidentEdge ,
  ParentEdge , SeamPair
}
 Topological relation kinds yielded by the iterator. Only geometry-level relations are supported (Face, Edge, Vertex, Wire, CoEdge). Assembly/container nodes (Solid, Shell, Compound, Product, Occurrence) have no topological relations - use BRepGraph_ChildExplorer / BRepGraph_ParentExplorer instead. More...
 
enum class  Stage { First , Second , Third , Finished }
 Internal traversal stage tracking which sub-iteration is active. More...
 

Public Member Functions

 BRepGraph_RelatedIterator (const BRepGraph &theGraph, const BRepGraph_NodeId theNode)
 Construct an iterator over all semantically related nodes of the given source node.
 
bool More () const
 True if another related node is available.
 
void Next ()
 Advance to the next related node.
 
const BRepGraph_NodeIdCurrent () const
 Return the current related node id.
 
RelationKind CurrentRelation () const
 Return the relation kind explaining why the current node is related.
 
NCollection_ForwardRangeIterator< BRepGraph_RelatedIteratorbegin ()
 Returns an STL-compatible iterator for range-based for loops.
 
NCollection_ForwardRangeSentinel end () const
 Returns a sentinel marking the end of iteration.
 

Detailed Description

Single-level iterator over semantically related topology nodes.

See also
BRepGraph class comment "Iterator guide" for choosing between iterator types.

The iterator yields immediate related nodes for one source node together with the relation kind explaining why each node is returned. Results are not deduplicated; callers that need uniqueness should filter on top.

Member Enumeration Documentation

◆ RelationKind

Topological relation kinds yielded by the iterator. Only geometry-level relations are supported (Face, Edge, Vertex, Wire, CoEdge). Assembly/container nodes (Solid, Shell, Compound, Product, Occurrence) have no topological relations - use BRepGraph_ChildExplorer / BRepGraph_ParentExplorer instead.

Enumerator
BoundaryEdge 

Face -> Edge bounding the face.

AdjacentFace 

Face -> Face sharing an edge.

OuterWire 

Face -> Wire (outer boundary)

ReferencedByFace 

Edge -> Face that uses this edge.

IncidentVertex 

Edge -> Vertex (start/end)

WireCoEdge 

Wire -> CoEdge (member)

OwningFace 

Wire/CoEdge -> Face (container)

IncidentEdge 

Vertex -> Edge (touching)

ParentEdge 

CoEdge -> Edge (underlying definition)

SeamPair 

CoEdge -> CoEdge (seam twin)

◆ Stage

Internal traversal stage tracking which sub-iteration is active.

Enumerator
First 

Primary relation iteration.

Second 

Secondary relation iteration.

Third 

Tertiary relation iteration.

Finished 

All relations exhausted.

Constructor & Destructor Documentation

◆ BRepGraph_RelatedIterator()

BRepGraph_RelatedIterator::BRepGraph_RelatedIterator ( const BRepGraph & theGraph,
const BRepGraph_NodeId theNode )
inline

Construct an iterator over all semantically related nodes of the given source node.

Parameters
[in]theGraphgraph containing the node
[in]theNodesource node whose relations are iterated

Member Function Documentation

◆ begin()

NCollection_ForwardRangeIterator< BRepGraph_RelatedIterator > BRepGraph_RelatedIterator::begin ( )
inline

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

◆ Current()

const BRepGraph_NodeId & BRepGraph_RelatedIterator::Current ( ) const
inline

Return the current related node id.

◆ CurrentRelation()

RelationKind BRepGraph_RelatedIterator::CurrentRelation ( ) const
inline

Return the relation kind explaining why the current node is related.

◆ end()

NCollection_ForwardRangeSentinel BRepGraph_RelatedIterator::end ( ) const
inline

Returns a sentinel marking the end of iteration.

◆ More()

bool BRepGraph_RelatedIterator::More ( ) const
inline

True if another related node is available.

◆ Next()

void BRepGraph_RelatedIterator::Next ( )
inline

Advance to the next related node.


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