OCCT3D About OCCT
Open CASCADE Technology Reference Manual 8.0.1
Loading...
Searching...
No Matches
Data Structures | Public Member Functions
BRepGraph Class Reference

Topology-geometry graph over TopoDS / BRep. More...

#include <BRepGraph.hxx>

Data Structures

class  EditorView
 Non-const view for programmatic graph construction and structural editing. More...
 
class  MeshView
 Read/write view over mesh data. More...
 
class  RefsView
 Read-only view for RefId/RefUID-based reference storage. More...
 
class  ShapesView
 View for TopoDS_Shape ingestion, reconstruction and lookup. More...
 
class  TopoView
 Unified read-only view over topology definitions, adjacency, and representations. More...
 
class  UIDsView
 Read-only view for persistent node and reference identifiers. More...
 

Public Member Functions

 BRepGraph (const BRepGraph &)=delete
 Copying is intentionally disabled: BRepGraph is the unique owner of graph data.
 
BRepGraphoperator= (const BRepGraph &)=delete
 Copying is intentionally disabled: BRepGraph is the unique owner of graph data.
 
 BRepGraph ()
 Default constructor. Creates an empty graph with default allocator.
 
 ~BRepGraph ()
 Destructor.
 
 BRepGraph (BRepGraph &&) noexcept
 Move constructor.
 
BRepGraphoperator= (BRepGraph &&) noexcept
 Move assignment operator.
 
void Clear ()
 Reset the graph to an empty state. Increments generation and regenerates the graph GUID.
 
bool IsEmpty () const
 Return true when the graph contains no topology definitions.
 
bool ValidateRelations () const
 Verify relation consistency against entity / reference-entry tables. Intended for debug builds and regression tests of incremental mutation paths.
 
const NCollection_LinearVector< BRepGraph_ProductId > & RootProductIds () const
 Return root product identifiers (products not referenced by any active occurrence). Maintained incrementally by Editor/EditorView mutations. Returns empty vector if the graph has not been built.
 
const occ::handle< NCollection_BaseAllocator > & Allocator () const
 Return the current allocator.
 
bool IsValid () const noexcept
 Return true when this wrapper references graph data.
 
bool IsNull () const noexcept
 Return true when this wrapper does not reference graph data.
 
const TopoViewTopo () const
 Access topology definitions, representation access, adjacency queries, raw Product/Occurrence definition storage, and assembly classification.
 
const UIDsViewUIDs () const
 Access unique identifiers.
 
const RefsViewRefs () const
 Access reference entries and their UIDs.
 
ShapesViewShapes ()
 Access cached and fresh shape reconstruction.
 
const ShapesViewShapes () const
 Access shape ingestion, cached shape reconstruction and fresh shape reconstruction.
 
EditorViewEditor ()
 Access programmatic graph construction and mutation.
 
const EditorViewEditor () const
 Const access to editor-specific state queries. Exposes IsDeferredMode() and ValidateMutationBoundary() on a const graph. All structural mutation methods require the non-const Editor() overload.
 
const MeshViewMesh () const
 Access mesh data with explicit Cache()/Persistent() sub-views and Editor() for cache mutations. Persistent rep creation lives on Editor().Edges(), Editor().CoEdges(), Editor().Faces() (since reps back the topology defs).
 
MeshViewMesh ()
 Non-const access to mesh view (required to call Editor() sub-view for cache mutations).
 
BRepGraph_LayerRegistryLayerRegistry ()
 Access registered graph layers.
 
const BRepGraph_LayerRegistryLayerRegistry () const
 Access registered graph layers (const).
 
BRepGraph_CacheRegistryCacheRegistry ()
 Access registered graph cache services.
 
const BRepGraph_CacheRegistryCacheRegistry () const
 Access registered graph cache services (const).
 

Detailed Description

Topology-geometry graph over TopoDS / BRep.

Stores B-Rep topology as flat entity vectors (incidence-table model) with integer cross-references, enabling cache-friendly traversal, relation-table parent navigation, and parallel face-level geometry extraction.

Key design concepts:

Per-occurrence data (orientation, location) lives on incidence refs. Definition types are aliases to BRepGraphInc entity structs.

Grouped View API

Related methods are grouped behind lightweight view objects. Include the corresponding header (e.g. BRepGraph_TopoView.hxx) to use.

Thread safety

Const query methods are safe for concurrent reads. Concurrent reads during active mutation still require external synchronization. Deferred invalidation (BRepGraph_DeferredScope) batches SubtreeGen propagation; concurrent Editor().Mut*() calls during deferred mode still require external serialization. Shapes().Add() is internally parallel when requested.

UID persistence

UIDs use monotonic counters (not vector indices), persisting across Compact() and node removal. Only BRepGraph::Clear() resets counters (new generation). See BRepGraph_UID.hxx for the serialization contract.

Extension model

Extend via BRepGraph_Layer (persistent metadata / observers) or BRepGraph_CacheRegistry (typed algorithm-computed transient cache services). Direct storage extension is not supported.

ID systems

Four ID types with different stability guarantees:

Iterator guide

Choose the iterator that matches your traversal need:

Constructor & Destructor Documentation

◆ BRepGraph() [1/3]

BRepGraph::BRepGraph ( const BRepGraph & )
delete

Copying is intentionally disabled: BRepGraph is the unique owner of graph data.

◆ BRepGraph() [2/3]

BRepGraph::BRepGraph ( )

Default constructor. Creates an empty graph with default allocator.

◆ ~BRepGraph()

BRepGraph::~BRepGraph ( )

Destructor.

◆ BRepGraph() [3/3]

BRepGraph::BRepGraph ( BRepGraph && )
noexcept

Move constructor.

Member Function Documentation

◆ Allocator()

const occ::handle< NCollection_BaseAllocator > & BRepGraph::Allocator ( ) const

Return the current allocator.

◆ CacheRegistry() [1/2]

BRepGraph_CacheRegistry & BRepGraph::CacheRegistry ( )

Access registered graph cache services.

Returns
cache registry for managing typed transient cache services

◆ CacheRegistry() [2/2]

const BRepGraph_CacheRegistry & BRepGraph::CacheRegistry ( ) const

Access registered graph cache services (const).

Returns
cache registry for managing typed transient cache services

◆ Clear()

void BRepGraph::Clear ( )

Reset the graph to an empty state. Increments generation and regenerates the graph GUID.

◆ Editor() [1/2]

EditorView & BRepGraph::Editor ( )

Access programmatic graph construction and mutation.

◆ Editor() [2/2]

const EditorView & BRepGraph::Editor ( ) const

Const access to editor-specific state queries. Exposes IsDeferredMode() and ValidateMutationBoundary() on a const graph. All structural mutation methods require the non-const Editor() overload.

◆ IsEmpty()

bool BRepGraph::IsEmpty ( ) const

Return true when the graph contains no topology definitions.

◆ IsNull()

bool BRepGraph::IsNull ( ) const
inlinenoexcept

Return true when this wrapper does not reference graph data.

◆ IsValid()

bool BRepGraph::IsValid ( ) const
noexcept

Return true when this wrapper references graph data.

◆ LayerRegistry() [1/2]

BRepGraph_LayerRegistry & BRepGraph::LayerRegistry ( )

Access registered graph layers.

Returns
layer registry for managing attribute layers

◆ LayerRegistry() [2/2]

const BRepGraph_LayerRegistry & BRepGraph::LayerRegistry ( ) const

Access registered graph layers (const).

Returns
layer registry for managing attribute layers

◆ Mesh() [1/2]

MeshView & BRepGraph::Mesh ( )

Non-const access to mesh view (required to call Editor() sub-view for cache mutations).

Returns
mutable mesh view

◆ Mesh() [2/2]

const MeshView & BRepGraph::Mesh ( ) const

Access mesh data with explicit Cache()/Persistent() sub-views and Editor() for cache mutations. Persistent rep creation lives on Editor().Edges(), Editor().CoEdges(), Editor().Faces() (since reps back the topology defs).

Returns
read-only mesh view

◆ operator=() [1/2]

BRepGraph & BRepGraph::operator= ( BRepGraph && )
noexcept

Move assignment operator.

◆ operator=() [2/2]

BRepGraph & BRepGraph::operator= ( const BRepGraph & )
delete

Copying is intentionally disabled: BRepGraph is the unique owner of graph data.

◆ Refs()

const RefsView & BRepGraph::Refs ( ) const

Access reference entries and their UIDs.

◆ RootProductIds()

const NCollection_LinearVector< BRepGraph_ProductId > & BRepGraph::RootProductIds ( ) const

Return root product identifiers (products not referenced by any active occurrence). Maintained incrementally by Editor/EditorView mutations. Returns empty vector if the graph has not been built.

◆ Shapes() [1/2]

ShapesView & BRepGraph::Shapes ( )

Access cached and fresh shape reconstruction.

◆ Shapes() [2/2]

const ShapesView & BRepGraph::Shapes ( ) const

Access shape ingestion, cached shape reconstruction and fresh shape reconstruction.

◆ Topo()

const TopoView & BRepGraph::Topo ( ) const

Access topology definitions, representation access, adjacency queries, raw Product/Occurrence definition storage, and assembly classification.

◆ UIDs()

const UIDsView & BRepGraph::UIDs ( ) const

Access unique identifiers.

◆ ValidateRelations()

bool BRepGraph::ValidateRelations ( ) const

Verify relation consistency against entity / reference-entry tables. Intended for debug builds and regression tests of incremental mutation paths.

Returns
true when every stored relation matches its endpoints.

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