BRepGraph: A New Topology-Geometry Graph Coming in OCCT 8.0

OCCT 8.0 will introduce BRepGraph - a new way to work with B-Rep topology. Instead of traversing shape trees with TopExp_Explorer and building indexed maps for every adjacency query, BRepGraph stores topology as flat entity vectors with O(1) reverse indices. Edge-to-face, vertex-to-edge, wire-to-face - all direct lookups.

Key changes from the current TopoDS/BRep model:

  • Incidence tables instead of occurrence trees. Each unique entity (vertex, edge, face...) exists once. Parent-child relationships are lightweight refs carrying orientation and location. Reverse indices give instant upward navigation.
  • CoEdge entity for PCurve ownership. Each use of an edge on a face gets its own CoEdge that directly holds the parametric curve, UV endpoints, and seam pairing. No more iterating BRep_TEdge curve representations to match by surface handle and location.
  • RAII mutation with automatic invalidation. Scoped guards track changes, increment per-node mutation counters, clear caches, and propagate modifications upward through the graph. No manual cache management.
  • Intrinsic assembly support. Products and Occurrences are first-class node kinds. Every graph has a root Product - algorithms always see a uniform model whether the input is a single solid or a multi-level assembly.
  • Parallel build pipeline. Face-level geometry extraction runs in parallel. All containers use a bump-pointer allocator for O(1) allocation and bulk-free destruction.

Early benchmarks show spatial adjacency queries 97% faster, sewing up to 58% faster (parallel), and deduplication 43% faster.

The API shown here reflects the current development state and may evolve before the final 8.0 release.

Full details and discussion: https://github.com/Open-Cascade-SAS/OCCT/discussions/1170

Best regards, OCCT3D Development team.