![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Cached mesh data storage for BRepGraph. More...
Data Structures | |
| struct | CoEdgeMeshEntry |
| Cached mesh entry for a coedge: polygon-on-triangulation and polygon-2D rep references. More... | |
| struct | EdgeMeshEntry |
| Cached mesh entry for an edge: polygon-3D rep reference. More... | |
| struct | FaceMeshEntry |
| Cached mesh entry for a face: triangulation rep references. More... | |
Cached mesh data storage for BRepGraph.
Stores mesh RepId references (triangulations for faces, polygons for edges and coedges) separately from topology definitions. This cache holds algorithm-derived mesh data written by BRepGraphMesh, as opposed to persistent mesh data stored in definition structs (imported from STEP, etc.).
Priority rule: cached mesh takes precedence over persistent mesh in definitions. Persistent mesh is the fallback when no fresh cache exists.
Freshness is validated by comparing StoredOwnGen against the entity's current OwnGen. A mismatch means the geometry changed since meshing, so the cached mesh is stale.
Writing to the cache does NOT trigger markModified() or mutation tracking.
The cache relies on the following invariants upheld by BRepGraph mutations:
Editor().Faces().Mut(FaceId) guard bumps FaceDef.OwnGen on scope exit, invalidating cached face mesh entries.markRepModified(SurfaceRepId | TriangulationRepId) iterates every Face referencing the rep and calls markModified(FaceId), so geometry edits through Editor().Reps().MutSurface/MutTriangulation() also invalidate cached face meshes.markRepModified(TriangulationRepId) additionally scans the cache itself (not just persistent FaceDef.TriangulationRepId) so that cached-only triangulations are bumped along with their owning Face's OwnGen. Edge/CoEdge caches follow the analogous pattern for EdgeDef/CoEdgeDef and the corresponding Polygon3D/Polygon2D/PolygonOnTri reps.