libcascade
API ReferenceModelingDataTKBRep

BRepGraphInc

OCCT package BRepGraphInc: BRepGraphInc_BaseDef, BRepGraphInc_BaseRef, BRepGraphInc_BitFlags, BRepGraphInc_ChildRef, and 50 more bound classes.

BRepGraphInc_BitFlags

Contiguous bit-vector for per-entity boolean flags.
Stores one bit per entity index in a flat array of 64-bit blocks. Provides O(1) Set/Clear/Test operations and cache-friendly sequential traversal (512 flags per 64-byte cache line via eight 64-bit blocks).
Used by BRepGraphInc_Storage to store IsRemoved and IsOwned flags outside the entity structs, improving cache locality during traversal and reducing struct size by eliminating bool-field padding.
Public helpers in BRepGraphInc_Storage validate indices before reaching this low-level container. Set, Clear, and Test remain unchecked for hot internal paths that already proved the index is in range.

BRepGraphInc_BitFlagsaFlags; aFlags.Resize(1000); aFlags.Set(42); if(aFlags.Test(42)){...} aFlags.Clear(42);

Constructors(1)

Instance methods(11)

  • Resize(theCount: number): void

    Resize the bit-vector to hold at least theCount bits. Newly added bits are initialized to false.

    Parameters (1)
    • theCount
  • Set(theIndex: number): void

    Set the bit at theIndex to true.

    Parameters (1)
    • theIndex
  • Clear(theIndex: number): void

    Clear the bit at theIndex to false.

    Parameters (1)
    • theIndex
  • Test(theIndex: number): boolean

    Return the value of the bit at theIndex.

    Parameters (1)
    • theIndex
  • SetAll(): void

    Set all bits to true.

  • ClearAll(): void

    Clear all bits to false.

  • HasAnyBitSet(): boolean

    Return true if any bit is set.

  • NbBlocks(): number

    Return the number of blocks allocated.

  • BitCount(): number

    Return the number of valid bits represented by this vector.

  • IsValidIndex(theIndex: number): boolean

    Return true if theIndex is inside the valid bit range.

    Parameters (1)
    • theIndex
  • Blocks(): number

    Return the raw block array for direct iteration.

BRepGraphInc_Load_Counts

Constructors(1)

Properties(26)

BRepGraphInc_Populate

Backend topology/geometry population for BRepGraph.
This class is part of the BRepGraphInc backend and is intended for backend maintenance, tests, and low-level infrastructure only. External code should enter through BRepGraph::ShapesView::Add(), which owns the public lifecycle, cache invalidation, and layer coordination.
The builder stores forward child relations only. Reverse relations are rebuilt by BRepGraphInc_Storage after population.

Static methods(3)

  • Perform(theGraph: BRepGraph, theShape: TopoDS_Shape, theParallel: boolean, theOptions?: BRepGraphInc_Populate_Options): BRepGraphInc_Populate_BuildStatus

    Build backend incidence storage from a TopoDS_Shape.

    Parameters (4)
    • theGraph
      graph whose storage to populate (cleared first)
    • theShape
      root shape
    • theParallel
      if true, face-level extraction runs in parallel
    • theOptions
      optional post-pass controls
    Returns

    build status indicating success, warnings, or failure

  • AppendFlattened(theGraph: BRepGraph, theShape: TopoDS_Shape, theParallel: boolean, theAppendedRoots: BRepGraph_NodeId[], theOptions: BRepGraphInc_Populate_Options): BRepGraphInc_Populate_BuildStatus

    Extend existing backend storage with additional shapes (no clear). Flattens hierarchy containers away; Solid/Shell/Compound/CompSolid inputs contribute appended face roots instead of container entities. Recomputes the built-in metadata layers from the populated storage.

    Parameters (5)
    • theGraph
      graph whose storage to extend
    • theShape
      shape to append
    • theParallel
      if true, face-level extraction runs in parallel
    • theAppendedRoots
      collected root NodeIds for non-container shapes Mutated in place; read the updated value from this argument after the call.
    • theOptions
      optional post-pass controls
    Returns

    build status indicating success, warnings, or failure

  • Append(theGraph: BRepGraph, theShape: TopoDS_Shape, theParallel: boolean, theOptions?: BRepGraphInc_Populate_Options): BRepGraphInc_Populate_BuildStatus

    Extend existing backend storage with additional shapes (no clear). Preserves the full shape hierarchy: Solid/Shell/Compound/CompSolid nodes are created alongside Face/Edge/Vertex nodes. Shapes already present in the storage with the same definition identity (TShape + Location, orientation ignored) are deduplicated and not re-added.

    Parameters (4)
    • theGraph
      graph whose storage to extend
    • theShape
      shape to append
    • theParallel
      if true, face-level extraction runs in parallel
    • theOptions
      optional post-pass controls
    Returns

    build status indicating success, warnings, or failure

BRepGraphInc_Reconstruct

Backend reconstruction helpers over incidence-table storage.
Converts BRepGraphInc_Storage entity data back into TopoDS shapes. This class is part of the BRepGraphInc backend; external callers should prefer BRepGraph::Shapes() so reconstruction stays behind the facade. Supports single-node and cached multi-face reconstruction with shared edge/vertex reuse via the Cache.

Static methods(3)

  • Reconstruct a TopoDS_Shape from an entity node. Creates a local cache internally; shared vertices/edges are not reused across calls.

    Parameters (2)
    • theGraph
      graph owning the storage and caches
    • theNode
      entity node id
    Returns

    reconstructed shape

  • Reconstruct a TopoDS_Shape with a shared cache for sub-shape reuse. Vertices and edges already in theCache are returned directly.

    Parameters (3)
    • theGraph
      graph owning the storage and caches
    • theNode
      entity node id
    • theCache
      shared cache for vertex/edge/face shapes Mutated in place; read the updated value from this argument after the call.
    Returns

    reconstructed shape

  • Reconstruct a face with shared edge/vertex cache for multi-face contexts.

    Parameters (3)
    • theGraph
      graph owning the storage and caches
    • theFaceId
      face entity id
    • theCache
      shared cache for edge and vertex shapes Mutated in place; read the updated value from this argument after the call.
    Returns

    reconstructed face shape

BRepGraphInc_Storage

Central backend storage container for the incidence-table topology model.
Holds all entity vectors (Vertex through Occurrence), representation vectors (Surface, Curve3D, Curve2D, Triangulation, Polygon), relation tables for connectivity navigation, TShape deduplication maps, original shape bindings, and per-kind UID vectors. Provides typed accessors enforcing compile-time safety for backend code. External callers should normally use the BRepGraph facade rather than reaching into this storage directly. BRepGraphInc_Populate has friend access for efficient bulk writes during graph population.

Constructors(1)

Instance methods(246)

BRepGraph_RepId

Lightweight typed index into a per-kind use-record vector inside BRepGraph.
The pair (Kind, Index) forms a unique use-record identifier within one graph instance. Default-constructed RepId has Index = UINT32_MAX (invalid).
Use records are session-local representation slots with no public stable UID, graph-level lock state, independent mutation generation, or layer callbacks. They do have a soft-removed state so an owner can clear and later reuse its slot.

Constructors(2)

Static methods(1)

  • IsValidKind(theKind: BRepGraph_RepId_Kind): boolean

    True if the kind value is one of the supported use-record kinds.

    Parameters (1)
    • theKind

Instance methods(3)

  • IsValid(): boolean

    True if this id points to an allocated slot.

  • IsValid(theMaxCount: number): boolean

    True if this id is within [0, theMaxCount).

    Parameters (1)
    • theMaxCount
  • IsRemoved(theGraph: BRepGraph): boolean

    Return true if this use entry has been soft-removed in the given graph.

    Parameters (1)
    • theGraph

Properties(2)