libcascade
PackageApiModeling dataTkb repB rep graph

BRepGraph (page 2 of 2)

OCCT package BRepGraph: BRepGraph, BRepGraph_Cache, BRepGraph_CacheDerivedState, BRepGraph_CacheIterator, and 179 more bound classes.

BRepGraph_RefsIterator_ChildOfCompoundTraits

Constructors(1)

Static methods(4)

BRepGraph_RefsIterator_FaceOfShellTraits

Constructors(1)

Static methods(4)

BRepGraph_RefsIterator_OccurrenceOfProductTraits

Constructors(1)

Static methods(4)

BRepGraph_RefsIterator_ShellOfSolidTraits

Constructors(1)

Static methods(4)

BRepGraph_RefsIterator_SolidOfCompSolidTraits

Constructors(1)

Static methods(4)

BRepGraph_RefsIterator_WireOfFaceTraits

Constructors(1)

Static methods(4)

BRepGraph_RefsShellsOfFace

Constructors(2)

Instance methods(9)

BRepGraph_RefsSolidsOfShell

Constructors(2)

Instance methods(9)

BRepGraph_RefsView_GenOps

Instance methods(8)

BRepGraph_RelatedIterator

Single-level iterator over semantically related topology nodes.
The iterator yields immediate related nodes for one source node together with the relation kind explaining why each node is returned. Results are not deduplicated; callers that need uniqueness should filter on top.

Constructors(1)

Instance methods(5)

BRepGraph_ShapesView

Instance methods(18)

BRepGraph_ShellId

Constructors(3)

Static methods(3)

Instance methods(4)

Properties(1)

BRepGraph_ShellRefId

Constructors(3)

Static methods(3)

Instance methods(4)

Properties(1)

BRepGraph_SolidId

Constructors(3)

Static methods(3)

Instance methods(4)

Properties(1)

BRepGraph_SolidRefId

Constructors(3)

Static methods(3)

Instance methods(4)

Properties(1)

BRepGraph_SupplementEditor

Lightweight mutation facade for runtime supplement attachments.

Constructors(1)

Instance methods(9)

  • Attach(theOwner: BRepGraph_NodeId, theKind: BRepGraph_LayerTopoSupplement_AttachmentKind, theShape: TopoDS_Shape): number

    Attach one supplemental shape to an arbitrary supported core owner.

    Parameters (3)
    • theOwner
      active owner node
    • theKind
      semantic attachment kind
    • theShape
      supplemental shape to attach
    Returns

    non-zero attachment uid on success, 0 on rejection

  • AttachToVertex(theVertex: BRepGraph_VertexId, theShape: TopoDS_Shape, theKind?: BRepGraph_LayerTopoSupplement_AttachmentKind): number

    Attach a supplemental shape to a vertex owner.

    Parameters (3)
    • theVertex
      active vertex owner
    • theShape
      supplemental shape to attach
    • theKind
      semantic attachment kind
    Returns

    non-zero attachment uid on success, 0 on rejection

  • AttachToEdge(theEdge: BRepGraph_EdgeId, theShape: TopoDS_Shape, theKind?: BRepGraph_LayerTopoSupplement_AttachmentKind): number

    Attach a supplemental shape to an edge owner.

    Parameters (3)
    • theEdge
      active edge owner
    • theShape
      supplemental shape to attach
    • theKind
      semantic attachment kind
    Returns

    non-zero attachment uid on success, 0 on rejection

  • AttachToFace(theFace: BRepGraph_FaceId, theShape: TopoDS_Shape, theKind?: BRepGraph_LayerTopoSupplement_AttachmentKind): number

    Attach a supplemental shape to a face owner.

    Parameters (3)
    • theFace
      active face owner
    • theShape
      supplemental shape to attach
    • theKind
      semantic attachment kind
    Returns

    non-zero attachment uid on success, 0 on rejection

  • AttachToSolid(theSolid: BRepGraph_SolidId, theShape: TopoDS_Shape, theKind?: BRepGraph_LayerTopoSupplement_AttachmentKind): number

    Attach a supplemental shape to a solid owner.

    Parameters (3)
    • theSolid
      active solid owner
    • theShape
      supplemental shape to attach
    • theKind
      semantic attachment kind
    Returns

    non-zero attachment uid on success, 0 on rejection

  • AttachToCompSolid(theCompSolid: BRepGraph_CompSolidId, theShape: TopoDS_Shape, theKind?: BRepGraph_LayerTopoSupplement_AttachmentKind): number

    Attach a supplemental shape to a compsolid owner.

    Parameters (3)
    • theCompSolid
      active compsolid owner
    • theShape
      supplemental shape to attach
    • theKind
      semantic attachment kind
    Returns

    non-zero attachment uid on success, 0 on rejection

  • AttachToShell(theShell: BRepGraph_ShellId, theShape: TopoDS_Shape, theKind?: BRepGraph_LayerTopoSupplement_AttachmentKind): number

    Attach a supplemental shape to a shell owner.

    Parameters (3)
    • theShell
      active shell owner
    • theShape
      supplemental shape to attach
    • theKind
      semantic attachment kind
    Returns

    non-zero attachment uid on success, 0 on rejection

  • AttachToCompound(theCompound: BRepGraph_CompoundId, theShape: TopoDS_Shape, theKind?: BRepGraph_LayerTopoSupplement_AttachmentKind): number

    Attach a supplemental shape to a compound owner.

    Parameters (3)
    • theCompound
      active compound owner
    • theShape
      supplemental shape to attach
    • theKind
      semantic attachment kind
    Returns

    non-zero attachment uid on success, 0 on rejection

  • RemoveAttachment(theUid: number): boolean

    Remove one attachment by uid.

    Parameters (1)
    • theUid
      layer-local attachment uid
    Returns

    true when the attachment existed and was removed

BRepGraph_SupplementIterator

Iterator over supplemental TopoDS attachments owned by one core node.
The iterator resolves BRepGraph_LayerTopoSupplement through the graph layer registry and yields only explicit supplement attachments. Core traversal remains core-only and does not surface these entries.

Constructors(1)

Instance methods(5)

  • More(): boolean

    Return true when the iterator currently points to an attachment.

  • Next(): void

    Advance to the next attachment.

  • Uid(): number

    Return the current layer-local attachment uid.

  • Value(): BRepGraph_LayerTopoSupplement_Entry

    Return the current attachment entry.

  • Sentinel marking end of iteration.

BRepGraph_Tool

Centralized geometry access for BRepGraph - analogue of BRep_Tool.
Geometry in BRepGraph is stored in the definition frame (representation Location baked via applyRepresentationLocation). Instance Locations live on topology Instance/Ref structs (VertexInstance, CoEdgeInstance, WireInstance, FaceInstance, ShellInstance, SolidInstance, OccurrenceInstance). This class applies ref Locations automatically when accessing 3D geometry.
Instance structs are lightweight read-only projections produced during traversal, while Ref structs are stored reference entries from RefsView; this API accepts whichever form naturally carries the required context for the queried property.
Methods are grouped by topology kind via nested classes: BRepGraph_Tool::Vertex, Edge, CoEdge, Face, Wire, Shell.

BRepGraph_Tool_CoEdge

Constructors(1)

Static methods(14)

BRepGraph_Tool_Edge

Constructors(1)

Static methods(21)

BRepGraph_Tool_Face

Constructors(1)

Static methods(19)

BRepGraph_Tool_Shell

Constructors(1)

Static methods(5)

BRepGraph_Tool_Vertex

Constructors(1)

Static methods(7)

BRepGraph_Tool_Wire

Constructors(1)

Static methods(11)

BRepGraph_TopoView

Instance methods(13)

BRepGraph_TopoView_CoEdgeOps

Instance methods(9)

BRepGraph_TopoView_EdgeOps

Instance methods(13)

BRepGraph_TopoView_GenOps

Instance methods(10)

BRepGraph_TopoView_OccurrenceOps

Instance methods(9)

BRepGraph_TopoView_ProductOps

Instance methods(12)

BRepGraph_Transform

Graph-to-graph transformation.
Applies a geometric transformation to vertex points and geometry node locations by copying into a target graph, then transforming in-place.
Two geometry modes (matching BRepBuilderAPI_Transform semantics):

  • GeomPolicy::Copy (geometry-level): deep-copy geometry, create new transformed handles via Geom_Geometry::Transformed(), reset locations to identity.
  • GeomPolicy::Share (root-level): light-copy with shared geometry, apply transform via location modification only.
    Mesh handling (MeshPolicy parameter):
  • MeshPolicy::Drop (default for Transform): triangulations and polygons are discarded after a geometry-level transform and must be recomputed.
  • MeshPolicy::Copy: all mesh data (Poly_Triangulation on FaceDefs and the MeshLayer cache, Poly_Polygon3D on edges, Poly_PolygonOnTriangulation on coedges) is copied and transformed in sync with the geometry. In location-only mode the mesh data is copied as-is (nodes stay in the graph coordinate system, which is unaffected by a pure location compose).
    Typical usage
BRepGraphaGraph; aGraph.Shapes().Add(myShape); gp_TrsfaTrsf; aTrsf.SetTranslation(gp_Vec(10.0,0.0,0.0)); BRepGraphaTransformed; BRepGraph_Transform::Perform(aGraph,aTransformed,aTrsf); TopoDS_ShapeaShape=aTransformed.Shapes().Shape();

Static methods(4)

  • Perform(theSourceGraph: BRepGraph, theTargetGraph: BRepGraph, theTrsf: gp_Trsf, theGeomPolicy?: BRepGraph_Copy_GeomPolicy, theMeshPolicy?: BRepGraph_Copy_MeshPolicy): boolean

    Transform the entire graph into a target graph.
    Self-transform (theSourceGraph == theTargetGraph): Applies transform in-place on theTargetGraph.
    External transform to empty target (theTargetGraph.IsEmpty()): Copies source into target, then transforms.
    External transform to non-empty target: Appends source entities into target with explicit mapping, then transforms.

    Parameters (5)
    • theSourceGraph
      a pre-built BRepGraph (must not be empty)
    • theTargetGraph
      destination graph (may already contain data)
    • theTrsf
      the transformation to apply
    • theGeomPolicy
      geometry handle policy (default: Copy)
    • theMeshPolicy
      mesh data policy (default: Drop)
    Returns

    true on success, false on failure (empty source, or Drop + geometry-modification-required)

  • TransformNode(theSourceGraph: BRepGraph, theTargetGraph: BRepGraph, theNodeId: BRepGraph_NodeId, theTrsf: gp_Trsf, theGeomPolicy?: BRepGraph_Copy_GeomPolicy, theMeshPolicy?: BRepGraph_Copy_MeshPolicy): BRepGraph_NodeId

    Transform a single node sub-graph of any kind. Topology nodes are copied and transformed by baking the transform into their definitions.
    Self-transform (theSourceGraph == theTargetGraph): Duplicates the sub-graph with new entity IDs, then transforms the copy.
    External transform: Copies the sub-graph into theTargetGraph, then transforms.

    Parameters (6)
    • theSourceGraph
      a pre-built BRepGraph
    • theTargetGraph
      destination graph (may already contain data)
    • theNodeId
      node identifier (any kind)
    • theTrsf
      the transformation to apply
    • theGeomPolicy
      geometry handle policy (default: Copy; Drop is invalid for topology)
    • theMeshPolicy
      mesh data policy (default: Drop)
    Returns

    the mapped root NodeId in theTargetGraph, or invalid NodeId on failure

  • MoveRef(theGraph: BRepGraph, theRefId: BRepGraph_ChildRefId, theTrsf: gp_Trsf): boolean

    Apply an in-place location-only transform to a child reference. Composes theTrsf into ChildRef placement without copying any geometry. Cached mesh data on entities downstream of the moved ref is stored in the entity's local frame and is unaffected; callers that bake a world transform into a cache key own the invalidation responsibility.

    Parameters (3)
    • theGraph
      the graph containing the reference
    • theRefId
      child reference to move
    • theTrsf
      the transformation to compose into the location
    Returns

    true on success; false if the ref is invalid/removed or theTrsf has non-unit scale

    Remarks

    Note: Only pure rotation/translation transforms (scale == 1) are supported. The method returns false if |scaleFactor| != 1.

  • MoveRef(theGraph: BRepGraph, theRefId: BRepGraph_OccurrenceRefId, theTrsf: gp_Trsf): boolean

    Apply an in-place location-only transform to a child reference. Composes theTrsf into ChildRef placement without copying any geometry. Cached mesh data on entities downstream of the moved ref is stored in the entity's local frame and is unaffected; callers that bake a world transform into a cache key own the invalidation responsibility.

    Parameters (3)
    • theGraph
      the graph containing the reference
    • theRefId
      child reference to move
    • theTrsf
      the transformation to compose into the location
    Returns

    true on success; false if the ref is invalid/removed or theTrsf has non-unit scale

    Remarks

    Note: Only pure rotation/translation transforms (scale == 1) are supported. The method returns false if |scaleFactor| != 1.

BRepGraph_UID

Unique definition-node identifier within a BRepGraph.
Identity = (Kind, Counter). Two nodes of different kinds may share a counter value but their UIDs are distinct. Within one kind, counter values never repeat (monotonic, never resets).
Trivially copyable, cheap to pass by value.

Constructors(2)

  • Default: invalid UID (counter = 0 is the invalid sentinel).

  • constructor(theKind: BRepGraph_NodeId_Kind, theCounter: number): BRepGraph_UID

    Construct a valid UID. Called internally by BRepGraphInc_Storage::AllocateNodeUID().

    Parameters (2)
    • theKind
    • theCounter

Static methods(1)

Instance methods(4)

Properties(2)

BRepGraph_UIDsView

Instance methods(16)

BRepGraph_UsagePath

Explicit identity of a concrete usage from traversal root to selected node.
A usage path is an ordered sequence of steps that records the exact traversal from a root node down to a specific graph entity. Each step captures the node reached, the reference through which it was reached, and the sibling order (step index) at that level.
Paths are used to disambiguate multiple occurrences of the same definition reachable through different references or sibling positions.

Constructors(2)

Instance methods(10)

BRepGraph_Validate

Structural invariant checker for BRepGraph.
Read-only algorithm that verifies the graph's internal consistency: cross-reference bounds, relation symmetry, incidence ref consistency, geometry reference validity, removed-node isolation, and wire connectivity.
Distinct from BRepGraphCheck (geometric shape validity). This class checks the graph data structure itself.
Validation Mode Check Matrix
CheckLightweightAudit Active entity count boundaryYESYES Document root product sanityYESYES Cross-reference bounds-YES Reverse-index consistency-YES Face-count cache consistency-YES Incidence ref consistency-YES Geometry representation refs-YES Removed-node isolationYESYES Wire edge connectivity-YES Entity ID positional integrity-YES UID round-trip integrity-YES Assembly DAG cycle detection-YES
Mode Guidance
ModeWhat it checksCostRecommended use LightweightActive entity count boundary plus removed-node isolationLowHot-path release builds when the graph structure is already trustedAuditFull structural audit from cross-reference bounds through assembly DAG cycle detection | Higher | Default validation mode for production pipelines, test gates, and API-boundary verification |
For production pipelines, prefer Mode::Audit; Mode::Lightweight is intended for hot-path release builds where the graph structure is already trusted.

Static methods(3)

  • Run default lightweight structural checks on a built graph. Uses Mode::Lightweight; for full structural audit use Perform(theGraph, Mode::Audit).

    Parameters (1)
    • theGraph
      graph to validate (const, read-only)
    Returns

    validation result with all detected issues

  • Perform(theGraph: BRepGraph, theMode: BRepGraph_Validate_Mode): BRepGraph_Validate_Result

    Run structural checks on a built graph with explicit mode.

    Parameters (2)
    • theGraph
      graph to validate (const, read-only)
    • theMode
      validation mode
    Returns

    validation result with all detected issues

  • Run structural checks on a built graph with explicit options.

    Parameters (2)
    • theGraph
      graph to validate (const, read-only)
    • theOptions
      validation profile/options
    Returns

    validation result with all detected issues

BRepGraph_VersionStamp

Snapshot of a graph item identity and its freshness generation.
Combines a persistent node or reference UID with OwnGen (own-data mutation counter) and graph Generation (BRepGraph::Clear() cycle). It is intended for custom cache and layer freshness checks, not as a separate topology identity model.
Usage pattern:

BRepGraph_VersionStampaStamp=aGraph.UIDs().StampOf(aFaceId); //...later,aftermutations... if(aGraph.UIDs().IsStale(aStamp)) recomputeDerivedData();

Constructors(3)

  • Default constructor. Creates an invalid stamp (invalid UID, zero counters).

  • constructor(theUID: BRepGraph_UID, theMutationGen: number, theGeneration: number): BRepGraph_VersionStamp

    Construct a node-domain stamp from components.

    Parameters (3)
    • theUID
      persistent definition-node identity
    • theMutationGen
      OwnGen counter (own-data mutation counter)
    • theGeneration
      graph BRepGraph::Clear() generation
  • constructor(theRefUID: BRepGraph_RefUID, theMutationGen: number, theGeneration: number): BRepGraph_VersionStamp

    Construct a reference-domain stamp from components.

    Parameters (3)
    • theRefUID
      persistent reference identity
    • theMutationGen
      OwnGen counter (own-data mutation counter)
    • theGeneration
      graph BRepGraph::Clear() generation

Instance methods(7)

  • IsValid(): boolean

    Check if the stamp has a valid identity in its domain.

  • IsNodeStamp(): boolean

    True when this is a definition-node-domain stamp.

  • IsRefStamp(): boolean

    True when this is a reference-domain stamp.

  • Return the active generic item identity.

  • Check if two stamps refer to the same graph item regardless of version. Compares active UID only, ignoring OwnGen and Generation.

    Parameters (1)
    • theOther
      stamp to compare with
    Returns

    true if both stamps have the same domain and UID

  • Derive a deterministic Standard_GUID from this stamp. The graph GUID is incorporated into the hash, making per-node GUIDs globally unique across different graph instances. One-way: cannot reconstruct stamp fields from the resulting GUID.

    Parameters (1)
    • theGraphGUID
      the owning graph's identity GUID
    Returns

    deterministic Standard_GUID derived from stamp + graph GUID

  • HashValue(): number

    Compute hash value consistent with operator==.

    Returns

    hash combining active UID, domain, OwnGen, and Generation

Properties(7)

BRepGraph_VertexId

Constructors(3)

Static methods(3)

Instance methods(4)

Properties(1)

BRepGraph_VertexRefId

Constructors(3)

Static methods(3)

Instance methods(4)

Properties(1)

BRepGraph_WireId

Constructors(3)

Static methods(3)

Instance methods(4)

Properties(1)

BRepGraph_WireRefId

Constructors(3)

Static methods(3)

Instance methods(4)

Properties(1)