![]() |
Open CASCADE Technology Reference Manual 8.0.1
|
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. | |
| BRepGraph & | operator= (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. | |
| BRepGraph & | operator= (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 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. | |
| const RefsView & | Refs () const |
| Access reference entries and their UIDs. | |
| ShapesView & | Shapes () |
| Access cached and fresh shape reconstruction. | |
| const ShapesView & | Shapes () const |
| Access shape ingestion, cached shape reconstruction 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 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). | |
| MeshView & | Mesh () |
| Non-const access to mesh view (required to call Editor() sub-view for cache mutations). | |
| BRepGraph_LayerRegistry & | LayerRegistry () |
| Access registered graph layers. | |
| const BRepGraph_LayerRegistry & | LayerRegistry () const |
| Access registered graph layers (const). | |
| BRepGraph_CacheRegistry & | CacheRegistry () |
| Access registered graph cache services. | |
| const BRepGraph_CacheRegistry & | CacheRegistry () const |
| Access registered graph cache services (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, 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.
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. Shapes().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 (persistent metadata / observers) or BRepGraph_CacheRegistry (typed algorithm-computed transient cache services). Direct storage extension is not supported.
Four ID types with different stability guarantees:
Choose the iterator that matches your traversal need:
|
delete |
Copying is intentionally disabled: BRepGraph is the unique owner of graph data.
| BRepGraph::BRepGraph | ( | ) |
Default constructor. Creates an empty graph with default allocator.
| BRepGraph::~BRepGraph | ( | ) |
Destructor.
|
noexcept |
Move constructor.
| const occ::handle< NCollection_BaseAllocator > & BRepGraph::Allocator | ( | ) | const |
Return the current allocator.
| BRepGraph_CacheRegistry & BRepGraph::CacheRegistry | ( | ) |
Access registered graph cache services.
| const BRepGraph_CacheRegistry & BRepGraph::CacheRegistry | ( | ) | const |
Access registered graph cache services (const).
| 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.
| bool BRepGraph::IsEmpty | ( | ) | const |
Return true when the graph contains no topology definitions.
|
inlinenoexcept |
Return true when this wrapper does not reference graph data.
|
noexcept |
Return true when this wrapper references graph data.
| BRepGraph_LayerRegistry & BRepGraph::LayerRegistry | ( | ) |
Access registered graph layers.
| const BRepGraph_LayerRegistry & BRepGraph::LayerRegistry | ( | ) | const |
Access registered graph layers (const).
| MeshView & BRepGraph::Mesh | ( | ) |
Non-const access to mesh view (required to call Editor() sub-view for cache mutations).
| const MeshView & BRepGraph::Mesh | ( | ) | const |
Copying is intentionally disabled: BRepGraph is the unique owner of graph data.
| const RefsView & BRepGraph::Refs | ( | ) | const |
Access reference entries and their UIDs.
| 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.
| ShapesView & BRepGraph::Shapes | ( | ) |
Access cached and fresh shape reconstruction.
| const ShapesView & BRepGraph::Shapes | ( | ) | const |
Access shape ingestion, cached shape reconstruction 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::ValidateRelations | ( | ) | const |
Verify relation consistency against entity / reference-entry tables. Intended for debug builds and regression tests of incremental mutation paths.