![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Topology-geometry graph over TopoDS / BRep. More...
#include <BRepGraph.hxx>
Data Structures | |
| class | CacheView |
| Non-const view for managing transient cache values on nodes. More... | |
| class | EditorView |
| Non-const view for programmatic graph construction and structural editing. More... | |
| class | MeshView |
| Read-only view over mesh data with cache-first, persistent-fallback priority. More... | |
| class | RefsView |
| Read-only view for RefId/RefUID-based reference storage. More... | |
| class | ShapesView |
| Read-only view for TopoDS_Shape reconstruction from graph data. More... | |
| class | TopoView |
| Unified read-only view over topology definitions, adjacency, and representations. More... | |
| class | UIDsView |
| Read-only view for persistent unique identifiers. More... | |
Public Types | |
| using | ReconstructCache = NCollection_DataMap<BRepGraph_NodeId, TopoDS_Shape> |
| Shared cache for edge/vertex shapes during multi-face reconstruction. | |
Public Member Functions | |
| BRepGraph (const BRepGraph &)=delete | |
| BRepGraph & | operator= (const BRepGraph &)=delete |
| BRepGraph () | |
| Default constructor. Creates an empty graph with default allocator. | |
| BRepGraph (const occ::handle< NCollection_BaseAllocator > &theAlloc) | |
| Construct with a custom allocator for internal collections. | |
| ~BRepGraph () | |
| Destructor. | |
| BRepGraph (BRepGraph &&) noexcept | |
| Move constructor. | |
| BRepGraph & | operator= (BRepGraph &&) noexcept |
| Move assignment operator. | |
| void | Clear () |
| Reset the graph to an empty state. Increments generation and regenerates the graph GUID. | |
| bool | IsDone () const |
| Return true if the graph was successfully built. | |
| bool | ValidateReverseIndex () const |
| Verify reverse-index consistency against forward entity / reference-entry tables. Intended for debug builds and regression tests of incremental mutation paths. | |
| const NCollection_DynamicArray< 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. | |
| void | SetAllocator (const occ::handle< NCollection_BaseAllocator > &theAlloc) |
| Replace the internal allocator and re-create all storage. | |
| const occ::handle< NCollection_BaseAllocator > & | Allocator () const |
| Return the current allocator. | |
| const TopoView & | Topo () const |
| Access topology definitions, representation access, adjacency queries, raw Product/Occurrence definition storage, and assembly classification. | |
| const UIDsView & | UIDs () const |
| Access unique identifiers. | |
| CacheView & | Cache () |
| Access transient cache values through the stable grouped-view API. This is the only public cache interface. | |
| const CacheView & | Cache () const |
| Access transient cache values (const, read-only Get/Has/CacheKinds). This is the only public cache interface. | |
| const RefsView & | Refs () const |
| Access reference entries and their UIDs. | |
| const ShapesView & | Shapes () const |
| Access cached and fresh shape reconstruction. | |
| EditorView & | Editor () |
| Access programmatic graph construction and mutation. | |
| const EditorView & | 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. | |
| const MeshView & | Mesh () const |
| Access mesh data with cache-first, persistent-fallback priority. For mesh cache writes and rep creation, use BRepGraph_Tool::Mesh. | |
| BRepGraph_History & | History () |
| Access history subsystem directly. History is returned directly rather than through a lightweight view because it is already a self-contained query and recording subsystem with no per-view cached state. | |
| const BRepGraph_History & | History () const |
| Access history subsystem directly (const). | |
| BRepGraph_LayerRegistry & | LayerRegistry () |
| Access registered graph layers. | |
| const BRepGraph_LayerRegistry & | LayerRegistry () const |
| Access registered graph layers (const). | |
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, O(1) upward navigation via reverse indices, 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.
Related methods are grouped behind lightweight view objects. Include the corresponding header (e.g. BRepGraph_TopoView.hxx) to use.
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. BRepGraph_Builder::Add() is internally parallel when requested.
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.
Extend via BRepGraph_Layer (per-node attributes) or BRepGraph_TransientCache (algorithm-computed caches). Direct storage extension is not supported.
Four ID types with different stability guarantees:
Choose the iterator that matches your traversal need:
Shared cache for edge/vertex shapes during multi-face reconstruction.
|
delete |
| BRepGraph::BRepGraph | ( | ) |
Default constructor. Creates an empty graph with default allocator.
|
explicit |
Construct with a custom allocator for internal collections.
| [in] | theAlloc | allocator for internal collections (null uses CommonBaseAllocator) |
| BRepGraph::~BRepGraph | ( | ) |
Destructor.
|
noexcept |
Move constructor.
| const occ::handle< NCollection_BaseAllocator > & BRepGraph::Allocator | ( | ) | const |
Return the current allocator.
| CacheView & BRepGraph::Cache | ( | ) |
Access transient cache values through the stable grouped-view API. This is the only public cache interface.
| const CacheView & BRepGraph::Cache | ( | ) | const |
Access transient cache values (const, read-only Get/Has/CacheKinds). This is the only public cache interface.
| void BRepGraph::Clear | ( | ) |
Reset the graph to an empty state. Increments generation and regenerates the graph GUID.
| EditorView & BRepGraph::Editor | ( | ) |
Access programmatic graph construction and mutation.
| 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.
| BRepGraph_History & BRepGraph::History | ( | ) |
Access history subsystem directly. History is returned directly rather than through a lightweight view because it is already a self-contained query and recording subsystem with no per-view cached state.
| const BRepGraph_History & BRepGraph::History | ( | ) | const |
Access history subsystem directly (const).
| bool BRepGraph::IsDone | ( | ) | const |
Return true if the graph was successfully built.
| BRepGraph_LayerRegistry & BRepGraph::LayerRegistry | ( | ) |
Access registered graph layers.
| const BRepGraph_LayerRegistry & BRepGraph::LayerRegistry | ( | ) | const |
Access registered graph layers (const).
| const MeshView & BRepGraph::Mesh | ( | ) | const |
Access mesh data with cache-first, persistent-fallback priority. For mesh cache writes and rep creation, use BRepGraph_Tool::Mesh.
| const RefsView & BRepGraph::Refs | ( | ) | const |
Access reference entries and their UIDs.
| const NCollection_DynamicArray< 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.
| void BRepGraph::SetAllocator | ( | const occ::handle< NCollection_BaseAllocator > & | theAlloc | ) |
Replace the internal allocator and re-create all storage.
| const ShapesView & BRepGraph::Shapes | ( | ) | const |
Access cached and fresh shape reconstruction.
| const TopoView & BRepGraph::Topo | ( | ) | const |
Access topology definitions, representation access, adjacency queries, raw Product/Occurrence definition storage, and assembly classification.
| const UIDsView & BRepGraph::UIDs | ( | ) | const |
Access unique identifiers.
| bool BRepGraph::ValidateReverseIndex | ( | ) | const |
Verify reverse-index consistency against forward entity / reference-entry tables. Intended for debug builds and regression tests of incremental mutation paths.