BRepGraph (page 2 of 2)
OCCT package BRepGraph: BRepGraph, BRepGraph_Builder, BRepGraph_CacheKind, BRepGraph_CacheKindRegistry, and 180 more bound classes.
BRepGraph_RefsIterator_CoEdgeOfWireTraits
Constructors(1)
Static methods(4)
- IsParentValid(theGraph: BRepGraph, theParent: BRepGraph_WireId): booleanParameters (2)
theGraphtheParent
- RefIds(theGraph: BRepGraph, theParent: BRepGraph_WireId): anyParameters (2)
theGraphtheParent
- Ref(theGraph: BRepGraph, theRefId: BRepGraph_CoEdgeRefId): BRepGraphInc_CoEdgeRefParameters (2)
theGraphtheRefId
- ChildIdOf(argNo0: BRepGraph, theRef: BRepGraphInc_CoEdgeRef): BRepGraph_CoEdgeIdParameters (2)
argNo0theRef
BRepGraph_RefsIterator_FaceOfShellTraits
Constructors(1)
Static methods(4)
- IsParentValid(theGraph: BRepGraph, theParent: BRepGraph_ShellId): booleanParameters (2)
theGraphtheParent
- RefIds(theGraph: BRepGraph, theParent: BRepGraph_ShellId): anyParameters (2)
theGraphtheParent
- Ref(theGraph: BRepGraph, theRefId: BRepGraph_FaceRefId): BRepGraphInc_FaceRefParameters (2)
theGraphtheRefId
- ChildIdOf(argNo0: BRepGraph, theRef: BRepGraphInc_FaceRef): BRepGraph_FaceIdParameters (2)
argNo0theRef
BRepGraph_RefsIterator_OccurrenceOfProductTraits
Constructors(1)
Static methods(4)
- IsParentValid(theGraph: BRepGraph, theParent: BRepGraph_ProductId): booleanParameters (2)
theGraphtheParent
- RefIds(theGraph: BRepGraph, theParent: BRepGraph_ProductId): anyParameters (2)
theGraphtheParent
- Ref(theGraph: BRepGraph, theRefId: BRepGraph_OccurrenceRefId): BRepGraphInc_OccurrenceRefParameters (2)
theGraphtheRefId
- ChildIdOf(argNo0: BRepGraph, theRef: BRepGraphInc_OccurrenceRef): BRepGraph_OccurrenceIdParameters (2)
argNo0theRef
BRepGraph_RefsIterator_RefsVertexOfEdge
Constructors(1)
- constructor(theGraph: BRepGraph, theEdgeId: BRepGraph_EdgeId): BRepGraph_RefsIterator_RefsVertexOfEdgeParameters (2)
theGraphtheEdgeId
Instance methods(5)
BRepGraph_RefsIterator_ShellOfSolidTraits
Constructors(1)
Static methods(4)
- IsParentValid(theGraph: BRepGraph, theParent: BRepGraph_SolidId): booleanParameters (2)
theGraphtheParent
- RefIds(theGraph: BRepGraph, theParent: BRepGraph_SolidId): anyParameters (2)
theGraphtheParent
- Ref(theGraph: BRepGraph, theRefId: BRepGraph_ShellRefId): BRepGraphInc_ShellRefParameters (2)
theGraphtheRefId
- ChildIdOf(argNo0: BRepGraph, theRef: BRepGraphInc_ShellRef): BRepGraph_ShellIdParameters (2)
argNo0theRef
BRepGraph_RefsIterator_SolidOfCompSolidTraits
Constructors(1)
Static methods(4)
- IsParentValid(theGraph: BRepGraph, theParent: BRepGraph_CompSolidId): booleanParameters (2)
theGraphtheParent
- RefIds(theGraph: BRepGraph, theParent: BRepGraph_CompSolidId): anyParameters (2)
theGraphtheParent
- Ref(theGraph: BRepGraph, theRefId: BRepGraph_SolidRefId): BRepGraphInc_SolidRefParameters (2)
theGraphtheRefId
- ChildIdOf(argNo0: BRepGraph, theRef: BRepGraphInc_SolidRef): BRepGraph_SolidIdParameters (2)
argNo0theRef
BRepGraph_RefsIterator_VertexOfFaceTraits
Constructors(1)
Static methods(4)
- IsParentValid(theGraph: BRepGraph, theParent: BRepGraph_FaceId): booleanParameters (2)
theGraphtheParent
- RefIds(theGraph: BRepGraph, theParent: BRepGraph_FaceId): anyParameters (2)
theGraphtheParent
- Ref(theGraph: BRepGraph, theRefId: BRepGraph_VertexRefId): BRepGraphInc_VertexRefParameters (2)
theGraphtheRefId
- ChildIdOf(argNo0: BRepGraph, theRef: BRepGraphInc_VertexRef): BRepGraph_VertexIdParameters (2)
argNo0theRef
BRepGraph_RefsIterator_WireOfFaceTraits
Constructors(1)
Static methods(4)
- IsParentValid(theGraph: BRepGraph, theParent: BRepGraph_FaceId): booleanParameters (2)
theGraphtheParent
- RefIds(theGraph: BRepGraph, theParent: BRepGraph_FaceId): anyParameters (2)
theGraphtheParent
- Ref(theGraph: BRepGraph, theRefId: BRepGraph_WireRefId): BRepGraphInc_WireRefParameters (2)
theGraphtheRefId
- ChildIdOf(argNo0: BRepGraph, theRef: BRepGraphInc_WireRef): BRepGraph_WireIdParameters (2)
argNo0theRef
BRepGraph_RefsOccurrenceOfProduct
Constructors(1)
- constructor(theGraph: BRepGraph, theParent: unknown): BRepGraph_RefsOccurrenceOfProductParameters (2)
theGraphtheParent
Instance methods(5)
BRepGraph_RefsProductsOfOccurrence
Constructors(1)
- constructor(theGraph: BRepGraph, theParents: any, theChild: unknown): BRepGraph_RefsProductsOfOccurrenceParameters (3)
theGraphtheParentstheChild
Instance methods(7)
- More(): boolean
- Next(): void
- Current(): any
- CurrentParentId(): unknown
- CurrentRefId(): unknown
- Index(): number
BRepGraph_RefsShellOfSolid
Constructors(1)
- constructor(theGraph: BRepGraph, theParent: unknown): BRepGraph_RefsShellOfSolidParameters (2)
theGraphtheParent
Instance methods(5)
BRepGraph_RefsShellsOfFace
Constructors(1)
- constructor(theGraph: BRepGraph, theParents: any, theChild: unknown): BRepGraph_RefsShellsOfFaceParameters (3)
theGraphtheParentstheChild
Instance methods(7)
- More(): boolean
- Next(): void
- Current(): any
- CurrentParentId(): unknown
- CurrentRefId(): unknown
- Index(): number
BRepGraph_RefsSolidOfCompSolid
Constructors(1)
- constructor(theGraph: BRepGraph, theParent: unknown): BRepGraph_RefsSolidOfCompSolidParameters (2)
theGraphtheParent
Instance methods(5)
BRepGraph_RefsSolidsOfShell
Constructors(1)
- constructor(theGraph: BRepGraph, theParents: any, theChild: unknown): BRepGraph_RefsSolidsOfShellParameters (3)
theGraphtheParentstheChild
Instance methods(7)
- More(): boolean
- Next(): void
- Current(): any
- CurrentParentId(): unknown
- CurrentRefId(): unknown
- Index(): number
BRepGraph_RefsVertexOfFace
Constructors(1)
- constructor(theGraph: BRepGraph, theParent: unknown): BRepGraph_RefsVertexOfFaceParameters (2)
theGraphtheParent
Instance methods(5)
BRepGraph_RefsView
Instance methods(13)
- RefAtStep(theParent: BRepGraph_NodeId, theStep: number): BRepGraph_RefIdParameters (2)
theParenttheStep
- ChildNode(theRef: BRepGraph_RefId): BRepGraph_NodeIdParameters (1)
theRef
- IsRemoved(theRef: BRepGraph_RefId): booleanParameters (1)
theRef
- LocalLocation(theRef: BRepGraph_RefId): TopLoc_LocationParameters (1)
theRef
- Orientation(theRef: BRepGraph_RefId): TopAbs_OrientationParameters (1)
theRef
BRepGraph_RefsView_ChildOps
Instance methods(6)
- Nb(): number
- NbActive(): number
- Entry(theRefId: BRepGraph_ChildRefId): BRepGraphInc_ChildRefParameters (1)
theRefId
- IdsOf(theCompound: BRepGraph_CompoundId): anyParameters (1)
theCompound
BRepGraph_RefsView_CoEdgeOps
Instance methods(6)
- Nb(): number
- NbActive(): number
- Entry(theRefId: BRepGraph_CoEdgeRefId): BRepGraphInc_CoEdgeRefParameters (1)
theRefId
- IdsOf(theWire: BRepGraph_WireId): anyParameters (1)
theWire
BRepGraph_RefsView_FaceOps
Instance methods(6)
- Nb(): number
- NbActive(): number
- Entry(theRefId: BRepGraph_FaceRefId): BRepGraphInc_FaceRefParameters (1)
theRefId
- IdsOf(theShell: BRepGraph_ShellId): anyParameters (1)
theShell
BRepGraph_RefsView_OccurrenceOps
Instance methods(6)
- Nb(): number
- NbActive(): number
- Entry(theRefId: BRepGraph_OccurrenceRefId): BRepGraphInc_OccurrenceRefParameters (1)
theRefId
- IdsOf(theProduct: BRepGraph_ProductId): anyParameters (1)
theProduct
BRepGraph_RefsView_ShellOps
Instance methods(6)
- Nb(): number
- NbActive(): number
- Entry(theRefId: BRepGraph_ShellRefId): BRepGraphInc_ShellRefParameters (1)
theRefId
- IdsOf(theSolid: BRepGraph_SolidId): anyParameters (1)
theSolid
BRepGraph_RefsView_SolidOps
Instance methods(6)
- Nb(): number
- NbActive(): number
- Entry(theRefId: BRepGraph_SolidRefId): BRepGraphInc_SolidRefParameters (1)
theRefId
- IdsOf(theCompSolid: BRepGraph_CompSolidId): anyParameters (1)
theCompSolid
BRepGraph_RefsView_VertexOps
Instance methods(5)
- Nb(): number
- NbActive(): number
- Entry(theRefId: BRepGraph_VertexRefId): BRepGraphInc_VertexRefParameters (1)
theRefId
BRepGraph_RefsView_WireOps
Instance methods(6)
- Nb(): number
- NbActive(): number
- Entry(theRefId: BRepGraph_WireRefId): BRepGraphInc_WireRefParameters (1)
theRefId
- IdsOf(theFace: BRepGraph_FaceId): anyParameters (1)
theFace
BRepGraph_RefsWireOfFace
Constructors(1)
- constructor(theGraph: BRepGraph, theParent: unknown): BRepGraph_RefsWireOfFaceParameters (2)
theGraphtheParent
Instance methods(5)
BRepGraph_RefsWiresOfCoEdge
Constructors(1)
- constructor(theGraph: BRepGraph, theParents: any, theChild: unknown): BRepGraph_RefsWiresOfCoEdgeParameters (3)
theGraphtheParentstheChild
Instance methods(7)
- More(): boolean
- Next(): void
- Current(): any
- CurrentParentId(): unknown
- CurrentRefId(): unknown
- Index(): number
BRepGraph_RefTransientCache
Centralized transient cache for algorithm-computed per-reference values.
Symmetric counterpart of BRepGraph_TransientCache, keyed by BRepGraph_RefId instead of BRepGraph_NodeId. Freshness is tracked via BaseRef::OwnGen rather than BaseDef::SubtreeGen, because references do not own subtrees.
Shares the same BRepGraph_CacheKind descriptors and BRepGraph_CacheKindRegistry as the node cache; the same kind GUID can address values in both caches.
OwnGen-based freshness
Each stored slot records OwnGen at write time. On read, if the stored OwnGen differs from the reference's current OwnGen the cached value is considered stale.
Lifecycle
NOT a Layer. Cleared on BRepGraph_Builder::Add() and Compact(). No explicit removal callback
- stale data is auto-detected by OwnGen mismatch.
Thread safety
AfterReserve(),Get()andSet()for in-range indices bypass the mutex entirely. Out-of-range access falls back to mutex-protected vector growth.
Constructors(1)
Instance methods(10)
- Set(theRef: BRepGraph_RefId, theKind: BRepGraph_CacheKind, theValue: BRepGraph_CacheValue, theCurrentOwnGen: number): void
Store a cached value for a reference and cache kind.
Parameters (4)theReftheKindtheValuetheCurrentOwnGen
- Set(theRef: BRepGraph_RefId, theKindSlot: number, theValue: BRepGraph_CacheValue, theCurrentOwnGen: number): void
Store a cached value using a pre-resolved kind slot index. Bypasses
BRepGraph_CacheKindRegistrylookup - use in hot parallel paths.Parameters (4)theReftheKindSlot—slot fromBRepGraph_CacheKindRegistry::Register()theValuetheCurrentOwnGen
- Get(theRef: BRepGraph_RefId, theKind: BRepGraph_CacheKind, theCurrentOwnGen: number): BRepGraph_CacheValue
Retrieve a cached value for a reference and cache kind. Returns null handle if no value is stored or if OwnGen has changed.
Parameters (3)theReftheKindtheCurrentOwnGen
- Get(theRef: BRepGraph_RefId, theKindSlot: number, theCurrentOwnGen: number): BRepGraph_CacheValue
Retrieve a cached value using a pre-resolved kind slot index.
Parameters (3)theReftheKindSlottheCurrentOwnGen
- Remove(theRef: BRepGraph_RefId, theKind: BRepGraph_CacheKind): boolean
Remove a cached value for a reference and cache kind.
Parameters (2)theReftheKind
- Remove(theRef: BRepGraph_RefId, theKindSlot: number): boolean
Remove a cached value using a pre-resolved cache-kind slot.
Parameters (2)theReftheKindSlot
- CollectCacheKindSlots(theRef: BRepGraph_RefId, theCurrentOwnGen: number, theSlots: number[]): number
Collect fresh cache-kind slot indices for a reference (zero heap allocation). Used internally by CacheView::CacheKindIterator.
Parameters (3)theRef—reference to querytheCurrentOwnGen—freshness stamp to matchtheSlots—output array (caller-allocated, must hold THE_DEFAULT_RESERVED_KIND_COUNT)
Returnsnumber of populated slots written to theSlots
- Reserve(theKindCount: number, theCounts: [number, number, number, number, number, number, number, number]): void
Pre-allocate storage for lock-free parallel access.
Parameters (2)theKindCounttheCounts
- IsReserved(): boolean
True if
Reserve()has been called and storage is pre-allocated. - Clear(): void
Clear all cached data. Called on
BRepGraph_Builder::Add()and Compact().
BRepGraph_RefUID
Unique reference identifier within a BRepGraph.
Identity = (RefKind, Counter). Generation is excluded from equality/hash. Counter 0 is an invalid sentinel.
Serialization Contract
Entity UIDs (BRepGraph_UID) and reference UIDs (BRepGraph_RefUID) share a single monotonic counter (BRepGraph_Data::myNextUIDCounter). To persist a BRepGraph across sessions:
- Write: for each reference entry, serialize (RefKind, Counter, OwnGen).
- Read: reconstruct reference entries, populate RefUID vectors with deserialized (RefKind, Counter) values, set myNextUIDCounter to max(all_entity_counters, all_ref_counters) + 1.
- myGeneration resets to 0 on load (session-scoped).
- VersionStamps from a previous session will correctly detect staleness via Generation mismatch.
Constructors(2)
- constructor(theKind: BRepGraph_RefId_Kind, theCounter: number, theGeneration: number): BRepGraph_RefUIDParameters (3)
theKindtheCountertheGeneration
Static methods(1)
Instance methods(5)
- IsValid(): boolean
- Kind(): BRepGraph_RefId_Kind
- Counter(): number
- Generation(): number
- HashValue(): number
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)
- constructor(theGraph: BRepGraph, theNode: BRepGraph_NodeId): BRepGraph_RelatedIteratorParameters (2)
theGraphtheNode
Instance methods(5)
- More(): boolean
- Next(): void
- CurrentRelation(): BRepGraph_RelatedIterator_RelationKind
Returns a sentinel marking the end of iteration.
BRepGraph_RepId
Lightweight typed index into a per-kind representation vector inside BRepGraph.
The pair (Kind, Index) forms a unique representation identifier within one graph instance. Default-constructed RepId has Index = UINT32_MAX (invalid).
Representations are NOT topology nodes - they hold geometry or mesh data referenced by topology entities. They do not participate in BFS traversal, reverse index, or parent-child relationships.
RepId is a value type: cheap to copy, compare, hash.
Constructors(2)
Default: invalid RepId (Index = UINT32_MAX). RepKind is set to
Kind::Surfacebut is meaningless when !IsValid().- constructor(theKind: BRepGraph_RepId_Kind, theIdx: number): BRepGraph_RepIdParameters (2)
theKindtheIdx
Static methods(4)
- IsGeometryKind(theKind: BRepGraph_RepId_Kind): boolean
True if the kind is a geometry kind (Surface, Curve3D, Curve2D).
Parameters (1)theKind
- IsMeshKind(theKind: BRepGraph_RepId_Kind): boolean
True if the kind is a mesh kind (Triangulation, Polygon3D, Polygon2D, PolygonOnTri).
Parameters (1)theKind
- Start(theKind: BRepGraph_RepId_Kind): BRepGraph_RepId
First valid id in a dense sequence for the specified kind.
Parameters (1)theKind
- Invalid(theKind?: BRepGraph_RepId_Kind): BRepGraph_RepId
Invalid sentinel id for the specified kind.
Parameters (1)theKind
Instance methods(2)
Properties(2)
BRepGraph_ReverseIterator_CompoundOfChildRefTraits
Constructors(1)
Static methods(1)
- FindRef(theGraph: BRepGraph, theParent: BRepGraph_CompoundId, theChild: BRepGraph_NodeId): BRepGraph_ChildRefIdParameters (3)
theGraphtheParenttheChild
BRepGraph_ReverseIterator_CompSolidOfSolidRefTraits
Constructors(1)
Static methods(1)
- FindRef(theGraph: BRepGraph, theParent: BRepGraph_CompSolidId, theChild: BRepGraph_SolidId): BRepGraph_SolidRefIdParameters (3)
theGraphtheParenttheChild
BRepGraph_ReverseIterator_EdgeOfVertexRefTraits
Constructors(1)
Static methods(1)
- FindRef(theGraph: BRepGraph, theParent: BRepGraph_EdgeId, theChild: BRepGraph_VertexId): BRepGraph_VertexRefIdParameters (3)
theGraphtheParenttheChild
BRepGraph_ReverseIterator_FaceOfWireRefTraits
Constructors(1)
Static methods(1)
- FindRef(theGraph: BRepGraph, theParent: BRepGraph_FaceId, theChild: BRepGraph_WireId): BRepGraph_WireRefIdParameters (3)
theGraphtheParenttheChild
BRepGraph_ReverseIterator_ProductOfOccurrenceRefTraits
Constructors(1)
Static methods(1)
- FindRef(theGraph: BRepGraph, theParent: BRepGraph_ProductId, theChild: BRepGraph_OccurrenceId): BRepGraph_OccurrenceRefIdParameters (3)
theGraphtheParenttheChild
BRepGraph_ReverseIterator_ShellOfFaceRefTraits
Constructors(1)
Static methods(1)
- FindRef(theGraph: BRepGraph, theParent: BRepGraph_ShellId, theChild: BRepGraph_FaceId): BRepGraph_FaceRefIdParameters (3)
theGraphtheParenttheChild
BRepGraph_ReverseIterator_SolidOfShellRefTraits
Constructors(1)
Static methods(1)
- FindRef(theGraph: BRepGraph, theParent: BRepGraph_SolidId, theChild: BRepGraph_ShellId): BRepGraph_ShellRefIdParameters (3)
theGraphtheParenttheChild
BRepGraph_ReverseIterator_WireOfCoEdgeRefTraits
Constructors(1)
Static methods(1)
- FindRef(theGraph: BRepGraph, theParent: BRepGraph_WireId, theChild: BRepGraph_CoEdgeId): BRepGraph_CoEdgeRefIdParameters (3)
theGraphtheParenttheChild
BRepGraph_RootProductIterator
Allocation-free iterator over root product identifiers.
Iterates directly over BRepGraph::RootProductIds() - products not referenced by any active occurrence.
Constructors(1)
- constructor(theGraph: BRepGraph): BRepGraph_RootProductIteratorParameters (1)
theGraph
Instance methods(4)
BRepGraph_ShapesView
Instance methods(7)
- Shape(theNode: BRepGraph_NodeId): TopoDS_ShapeParameters (1)
theNode
- HasOriginal(theNode: BRepGraph_NodeId): booleanParameters (1)
theNode
- FindOriginal(theNode: BRepGraph_NodeId): TopoDS_ShapeParameters (1)
theNode
- OriginalOf(theNode: BRepGraph_NodeId): TopoDS_ShapeParameters (1)
theNode
- Reconstruct(theRoot: BRepGraph_NodeId): TopoDS_ShapeParameters (1)
theRoot
- FindNode(theShape: TopoDS_Shape): BRepGraph_NodeIdParameters (1)
theShape
- HasNode(theShape: TopoDS_Shape): booleanParameters (1)
theShape
BRepGraph_ShellId
Constructors(3)
- constructor(theIdx: number): BRepGraph_ShellIdParameters (1)
theIdx
- constructor(theId: BRepGraph_NodeId): BRepGraph_ShellIdParameters (1)
theId
Static methods(3)
- Start(): BRepGraph_NodeId_Typed
- Invalid(): BRepGraph_NodeId_Typed
- FromNodeId(theId: BRepGraph_NodeId): BRepGraph_NodeId_TypedParameters (1)
theId
Instance methods(2)
Properties(1)
BRepGraph_ShellRefId
Constructors(3)
- constructor(theIdx: number): BRepGraph_ShellRefIdParameters (1)
theIdx
- constructor(theRefId: BRepGraph_RefId): BRepGraph_ShellRefIdParameters (1)
theRefId
Static methods(3)
- Start(): BRepGraph_RefId_Typed
- Invalid(): BRepGraph_RefId_Typed
- FromRefId(theRefId: BRepGraph_RefId): BRepGraph_RefId_TypedParameters (1)
theRefId
Instance methods(2)
Properties(1)
BRepGraph_ShellsOfFace
Constructors(2)
- constructor(theGraph: BRepGraph, theParents: any): BRepGraph_ShellsOfFaceParameters (2)
theGraphtheParents
- constructor(theGraph: BRepGraph, theParents: any, theStartIndex: number): BRepGraph_ShellsOfFaceParameters (3)
theGraphtheParentstheStartIndex
Instance methods(10)
- More(): boolean
- Next(): void
- Definition(): unknown
- Index(): number
- Length(): number
- Size(): number
- Value(theIndex: number): BRepGraph_ShellIdParameters (1)
theIndex
BRepGraph_SolidId
Constructors(3)
- constructor(theIdx: number): BRepGraph_SolidIdParameters (1)
theIdx
- constructor(theId: BRepGraph_NodeId): BRepGraph_SolidIdParameters (1)
theId
Static methods(3)
- Start(): BRepGraph_NodeId_Typed
- Invalid(): BRepGraph_NodeId_Typed
- FromNodeId(theId: BRepGraph_NodeId): BRepGraph_NodeId_TypedParameters (1)
theId
Instance methods(2)
Properties(1)
BRepGraph_SolidRefId
Constructors(3)
- constructor(theIdx: number): BRepGraph_SolidRefIdParameters (1)
theIdx
- constructor(theRefId: BRepGraph_RefId): BRepGraph_SolidRefIdParameters (1)
theRefId
Static methods(3)
- Start(): BRepGraph_RefId_Typed
- Invalid(): BRepGraph_RefId_Typed
- FromRefId(theRefId: BRepGraph_RefId): BRepGraph_RefId_TypedParameters (1)
theRefId
Instance methods(2)
Properties(1)
BRepGraph_SolidsOfShell
Constructors(2)
- constructor(theGraph: BRepGraph, theParents: any): BRepGraph_SolidsOfShellParameters (2)
theGraphtheParents
- constructor(theGraph: BRepGraph, theParents: any, theStartIndex: number): BRepGraph_SolidsOfShellParameters (3)
theGraphtheParentstheStartIndex
Instance methods(10)
- More(): boolean
- Next(): void
- Definition(): unknown
- Index(): number
- Length(): number
- Size(): number
- Value(theIndex: number): BRepGraph_SolidIdParameters (1)
theIndex
BRepGraph_SurfaceRepId
Constructors(3)
- constructor(theIdx: number): BRepGraph_SurfaceRepIdParameters (1)
theIdx
- Parameters (1)
theId
Static methods(3)
- Start(): BRepGraph_RepId_Typed
- Invalid(): BRepGraph_RepId_Typed
- FromRepId(theId: BRepGraph_RepId): BRepGraph_RepId_TypedParameters (1)
theId
Instance methods(2)
Properties(1)
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.
BRepGraph_Tool_CoEdge
Constructors(1)
Static methods(15)
- Orientation(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId): TopAbs_OrientationParameters (2)
theGraphtheCoEdge
- IsReversed(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId): booleanParameters (2)
theGraphtheCoEdge
- EdgeOf(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId): BRepGraph_EdgeIdParameters (2)
theGraphtheCoEdge
- FaceOf(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId): BRepGraph_FaceIdParameters (2)
theGraphtheCoEdge
- SeamPair(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId): BRepGraph_CoEdgeIdParameters (2)
theGraphtheCoEdge
- IsSeam(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId): booleanParameters (2)
theGraphtheCoEdge
- HasPCurve(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId): booleanParameters (2)
theGraphtheCoEdge
- PCurve(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId): Geom2d_CurveParameters (2)
theGraphtheCoEdge
- PCurve(theGraph: BRepGraph, theCoEdge: BRepGraphInc_CoEdgeDef): Geom2d_CurveParameters (2)
theGraphtheCoEdge
- PCurveAdaptor(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId): Geom2dAdaptor_CurveParameters (2)
theGraphtheCoEdge
- PCurveAdaptor(theGraph: BRepGraph, theRef: any): Geom2dAdaptor_CurveParameters (2)
theGraphtheRef
- UVPoints(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId): [gp_Pnt2d, gp_Pnt2d]Parameters (2)
theGraphtheCoEdge
- Range(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId): [number, number]Parameters (2)
theGraphtheCoEdge
- HasPolygonOnSurface(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId): booleanParameters (2)
theGraphtheCoEdge
- PolygonOnSurface(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId): Poly_Polygon2DParameters (2)
theGraphtheCoEdge
BRepGraph_Tool_Edge
Constructors(1)
Static methods(26)
- Tolerance(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): numberParameters (2)
theGraphtheEdge
- Degenerated(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): booleanParameters (2)
theGraphtheEdge
- SameParameter(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): booleanParameters (2)
theGraphtheEdge
- SameRange(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): booleanParameters (2)
theGraphtheEdge
- Range(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): [number, number]Parameters (2)
theGraphtheEdge
- StartVertexRef(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): BRepGraphInc_VertexRefParameters (2)
theGraphtheEdge
- EndVertexRef(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): BRepGraphInc_VertexRefParameters (2)
theGraphtheEdge
- StartVertexId(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): BRepGraph_VertexIdParameters (2)
theGraphtheEdge
- EndVertexId(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): BRepGraph_VertexIdParameters (2)
theGraphtheEdge
- HasCurve(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): booleanParameters (2)
theGraphtheEdge
- Curve(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): Geom_CurveParameters (2)
theGraphtheEdge
- Curve(theGraph: BRepGraph, theRef: any): Geom_CurveParameters (2)
theGraphtheRef
- CurveAdaptor(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): GeomAdaptor_TransformedCurveParameters (2)
theGraphtheEdge
- CurveAdaptor(theGraph: BRepGraph, theRef: any): GeomAdaptor_TransformedCurveParameters (2)
theGraphtheRef
- HasPolygon3D(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): booleanParameters (2)
theGraphtheEdge
- Polygon3D(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): Poly_Polygon3DParameters (2)
theGraphtheEdge
- HasContinuity(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId, theFace1: BRepGraph_FaceId, theFace2: BRepGraph_FaceId): booleanParameters (4)
theGraphtheEdgetheFace1theFace2
- Continuity(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId, theFace1: BRepGraph_FaceId, theFace2: BRepGraph_FaceId): GeomAbs_ShapeParameters (4)
theGraphtheEdgetheFace1theFace2
- MaxContinuity(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): GeomAbs_ShapeParameters (2)
theGraphtheEdge
- NbFaces(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): numberParameters (2)
theGraphtheEdge
- IsManifold(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): booleanParameters (2)
theGraphtheEdge
- IsBoundary(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): booleanParameters (2)
theGraphtheEdge
- IsClosedOnFace(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId, theFace: BRepGraph_FaceId): booleanParameters (3)
theGraphtheEdgetheFace
- FindPCurve(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId, theFace: BRepGraph_FaceId): BRepGraphInc_CoEdgeDefParameters (3)
theGraphtheEdgetheFace
- FindPCurve(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId, theFace: BRepGraph_FaceId, theOri: TopAbs_Orientation): BRepGraphInc_CoEdgeDefParameters (4)
theGraphtheEdgetheFacetheOri
- CurveOnSurface(theGraph: BRepGraph, theRef: any, theFace: BRepGraph_FaceId): Adaptor3d_CurveOnSurfaceParameters (3)
theGraphtheReftheFace
BRepGraph_Tool_Face
Constructors(1)
Static methods(12)
- Tolerance(theGraph: BRepGraph, theFace: BRepGraph_FaceId): numberParameters (2)
theGraphtheFace
- NaturalRestriction(theGraph: BRepGraph, theFace: BRepGraph_FaceId): booleanParameters (2)
theGraphtheFace
- HasSurface(theGraph: BRepGraph, theFace: BRepGraph_FaceId): booleanParameters (2)
theGraphtheFace
- HasTriangulation(theGraph: BRepGraph, theFace: BRepGraph_FaceId): booleanParameters (2)
theGraphtheFace
- OuterWire(theGraph: BRepGraph, theFace: BRepGraph_FaceId): BRepGraphInc_WireRefParameters (2)
theGraphtheFace
- OuterWireId(theGraph: BRepGraph, theFace: BRepGraph_FaceId): BRepGraph_WireIdParameters (2)
theGraphtheFace
- Surface(theGraph: BRepGraph, theFace: BRepGraph_FaceId): Geom_SurfaceParameters (2)
theGraphtheFace
- SurfaceAdaptor(theGraph: BRepGraph, theFace: BRepGraph_FaceId): GeomAdaptor_TransformedSurfaceParameters (2)
theGraphtheFace
- SurfaceAdaptor(theGraph: BRepGraph, theFace: BRepGraph_FaceId, theUFirst: number, theULast: number, theVFirst: number, theVLast: number): GeomAdaptor_TransformedSurfaceParameters (6)
theGraphtheFacetheUFirsttheULasttheVFirsttheVLast
- Triangulation(theGraph: BRepGraph, theFace: BRepGraph_FaceId): Poly_TriangulationParameters (2)
theGraphtheFace
- NbWires(theGraph: BRepGraph, theFace: BRepGraph_FaceId): numberParameters (2)
theGraphtheFace
- Bounds(theGraph: BRepGraph, theFace: BRepGraph_FaceId, theUMin: number, theUMax: number, theVMin: number, theVMax: number): { theUMin: number; theUMax: number; theVMin: number; theVMax: number }Parameters (6)
theGraphtheFacetheUMintheUMaxtheVMintheVMax
BRepGraph_Tool_Mesh
Constructors(1)
Static methods(10)
- CreateTriangulationRep(theGraph: BRepGraph, theTriangulation: Poly_Triangulation): BRepGraph_TriangulationRepIdParameters (2)
theGraphtheTriangulation
- CreatePolygon3DRep(theGraph: BRepGraph, thePolygon: Poly_Polygon3D): BRepGraph_Polygon3DRepIdParameters (2)
theGraphthePolygon
- CreatePolygonOnTriRep(theGraph: BRepGraph, thePolygon: Poly_PolygonOnTriangulation, theTriRepId: BRepGraph_TriangulationRepId): BRepGraph_PolygonOnTriRepIdParameters (3)
theGraphthePolygontheTriRepId
- AppendCachedTriangulation(theGraph: BRepGraph, theFace: BRepGraph_FaceId, theTriRepId: BRepGraph_TriangulationRepId): voidParameters (3)
theGraphtheFacetheTriRepId
- SetCachedActiveIndex(theGraph: BRepGraph, theFace: BRepGraph_FaceId, theActiveIndex: number): voidParameters (3)
theGraphtheFacetheActiveIndex
- ClearFaceCache(theGraph: BRepGraph, theFace: BRepGraph_FaceId): voidParameters (2)
theGraphtheFace
- SetCachedPolygon3D(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId, thePolyRepId: BRepGraph_Polygon3DRepId): voidParameters (3)
theGraphtheEdgethePolyRepId
- ClearEdgeCache(theGraph: BRepGraph, theEdge: BRepGraph_EdgeId): voidParameters (2)
theGraphtheEdge
- AppendCachedPolygonOnTri(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId, thePolyRepId: BRepGraph_PolygonOnTriRepId): voidParameters (3)
theGraphtheCoEdgethePolyRepId
- SetCachedPolygon2D(theGraph: BRepGraph, theCoEdge: BRepGraph_CoEdgeId, thePolyRepId: BRepGraph_Polygon2DRepId): voidParameters (3)
theGraphtheCoEdgethePolyRepId
BRepGraph_Tool_Shell
Constructors(1)
Static methods(2)
- IsClosed(theGraph: BRepGraph, theShell: BRepGraph_ShellId): booleanParameters (2)
theGraphtheShell
- NbFaces(theGraph: BRepGraph, theShell: BRepGraph_ShellId): numberParameters (2)
theGraphtheShell
BRepGraph_Tool_Vertex
Constructors(1)
Static methods(7)
- Parameters (2)
theGraphtheRef
- Pnt(theGraph: BRepGraph, theVertex: BRepGraph_VertexId): gp_PntParameters (2)
theGraphtheVertex
- Tolerance(theGraph: BRepGraph, theVertex: BRepGraph_VertexId): numberParameters (2)
theGraphtheVertex
- Parameter(theGraph: BRepGraph, theVertex: BRepGraph_VertexId, theEdge: BRepGraph_EdgeId): numberParameters (3)
theGraphtheVertextheEdge
- Parameters(theGraph: BRepGraph, theVertex: BRepGraph_VertexId, theFace: BRepGraph_FaceId): gp_Pnt2dParameters (3)
theGraphtheVertextheFace
- PCurveParameter(theGraph: BRepGraph, theVertex: BRepGraph_VertexId, theCoEdge: BRepGraph_CoEdgeId): numberParameters (3)
theGraphtheVertextheCoEdge
- NbEdges(theGraph: BRepGraph, theVertex: BRepGraph_VertexId): numberParameters (2)
theGraphtheVertex
BRepGraph_Tool_Wire
Constructors(1)
Static methods(5)
- IsClosed(theGraph: BRepGraph, theWire: BRepGraph_WireId): booleanParameters (2)
theGraphtheWire
- NbCoEdges(theGraph: BRepGraph, theWire: BRepGraph_WireId): numberParameters (2)
theGraphtheWire
- NbDistinctEdges(theGraph: BRepGraph, theWire: BRepGraph_WireId): numberParameters (2)
theGraphtheWire
- FaceOf(theGraph: BRepGraph, theWire: BRepGraph_WireId): BRepGraph_FaceIdParameters (2)
theGraphtheWire
- IsOuter(theGraph: BRepGraph, theWire: BRepGraph_WireId): booleanParameters (2)
theGraphtheWire
BRepGraph_TopoView
Instance methods(13)
BRepGraph_TopoView_CoEdgeOps
Instance methods(10)
- Nb(): number
- NbActive(): number
- Definition(theCoEdge: BRepGraph_CoEdgeId): BRepGraphInc_CoEdgeDefParameters (1)
theCoEdge
- Wires(theCoEdge: BRepGraph_CoEdgeId): anyParameters (1)
theCoEdge
- Edge(theCoEdge: BRepGraph_CoEdgeId): BRepGraph_EdgeIdParameters (1)
theCoEdge
- Face(theCoEdge: BRepGraph_CoEdgeId): BRepGraph_FaceIdParameters (1)
theCoEdge
- Curve2DRepId(theCoEdge: BRepGraph_CoEdgeId): BRepGraph_Curve2DRepIdParameters (1)
theCoEdge
- SeamPair(theCoEdge: BRepGraph_CoEdgeId): BRepGraph_CoEdgeIdParameters (1)
theCoEdge
BRepGraph_TopoView_CompoundOps
Instance methods(6)
- Nb(): number
- NbActive(): number
- Definition(theCompound: BRepGraph_CompoundId): BRepGraphInc_CompoundDefParameters (1)
theCompound
- Parameters (1)
theCompound
BRepGraph_TopoView_CompSolidOps
Instance methods(6)
- Nb(): number
- NbActive(): number
- Definition(theCompSolid: BRepGraph_CompSolidId): BRepGraphInc_CompSolidDefParameters (1)
theCompSolid
- Parameters (1)
theCompSolid
BRepGraph_TopoView_EdgeOps
Instance methods(17)
- Nb(): number
- NbActive(): number
- Definition(theEdge: BRepGraph_EdgeId): BRepGraphInc_EdgeDefParameters (1)
theEdge
- NbFaces(theEdge: BRepGraph_EdgeId): numberParameters (1)
theEdge
- Wires(theEdge: BRepGraph_EdgeId): anyParameters (1)
theEdge
- Parameters (1)
theEdge
- Parameters (1)
theEdge
- Curve3DRepId(theEdge: BRepGraph_EdgeId): BRepGraph_Curve3DRepIdParameters (1)
theEdge
- Adjacent(theEdge: BRepGraph_EdgeId, theAllocator: NCollection_BaseAllocator): NCollection_DynamicArray_BRepGraph_EdgeIdParameters (2)
theEdgetheAllocator
- IsBoundary(theEdge: BRepGraph_EdgeId): booleanParameters (1)
theEdge
- IsManifold(theEdge: BRepGraph_EdgeId): booleanParameters (1)
theEdge
- FindPCurve(theEdge: BRepGraph_EdgeId, theFace: BRepGraph_FaceId): BRepGraphInc_CoEdgeDefParameters (2)
theEdgetheFace
- FindPCurve(theEdge: BRepGraph_EdgeId, theFace: BRepGraph_FaceId, theOrientation: TopAbs_Orientation): BRepGraphInc_CoEdgeDefParameters (3)
theEdgetheFacetheOrientation
- FindCoEdgeId(theEdge: BRepGraph_EdgeId, theFace: BRepGraph_FaceId): BRepGraph_CoEdgeIdParameters (2)
theEdgetheFace
- FindCoEdgeId(theEdge: BRepGraph_EdgeId, theFace: BRepGraph_FaceId, theOrientation: TopAbs_Orientation): BRepGraph_CoEdgeIdParameters (3)
theEdgetheFacetheOrientation
BRepGraph_TopoView_FaceOps
Instance methods(13)
- Nb(): number
- NbActive(): number
- Definition(theFace: BRepGraph_FaceId): BRepGraphInc_FaceDefParameters (1)
theFace
- Shells(theFace: BRepGraph_FaceId): anyParameters (1)
theFace
- Parameters (1)
theFace
- SurfaceRepId(theFace: BRepGraph_FaceId): BRepGraph_SurfaceRepIdParameters (1)
theFace
- Parameters (1)
theFace
- SameDomain(theFace: BRepGraph_FaceId, theAllocator: NCollection_BaseAllocator): NCollection_DynamicArray_BRepGraph_FaceIdParameters (2)
theFacetheAllocator
- Adjacent(theFace: BRepGraph_FaceId, theAllocator: NCollection_BaseAllocator): NCollection_DynamicArray_BRepGraph_FaceIdParameters (2)
theFacetheAllocator
- OuterWire(theFace: BRepGraph_FaceId): BRepGraph_WireIdParameters (1)
theFace
BRepGraph_TopoView_GenOps
Instance methods(3)
- Parameters (1)
theId
- NbNodes(): number
- IsRemoved(theNode: BRepGraph_NodeId): booleanParameters (1)
theNode
BRepGraph_TopoView_GeometryOps
Instance methods(9)
- NbSurfaces(): number
- NbCurves3D(): number
- NbCurves2D(): number
- NbActiveSurfaces(): number
- NbActiveCurves3D(): number
- NbActiveCurves2D(): number
- Parameters (1)
theRep
- Parameters (1)
theRep
- Parameters (1)
theRep
BRepGraph_TopoView_OccurrenceOps
Instance methods(8)
- Nb(): number
- NbActive(): number
- Definition(theOccurrence: BRepGraph_OccurrenceId): BRepGraphInc_OccurrenceDefParameters (1)
theOccurrence
- Product(theOccurrence: BRepGraph_OccurrenceId): BRepGraph_ProductIdParameters (1)
theOccurrence
- ParentProduct(theOccurrence: BRepGraph_OccurrenceId): BRepGraph_ProductIdParameters (1)
theOccurrence
- OccurrenceLocation(theOccurrence: BRepGraph_OccurrenceId): TopLoc_LocationParameters (1)
theOccurrence
BRepGraph_TopoView_ProductOps
Instance methods(12)
- Nb(): number
- NbActive(): number
- Definition(theProduct: BRepGraph_ProductId): BRepGraphInc_ProductDefParameters (1)
theProduct
- Instances(theProduct: BRepGraph_ProductId): anyParameters (1)
theProduct
- ShapeRoot(theProduct: BRepGraph_ProductId): BRepGraph_NodeIdParameters (1)
theProduct
- IsAssembly(theProduct: BRepGraph_ProductId): booleanParameters (1)
theProduct
- IsPart(theProduct: BRepGraph_ProductId): booleanParameters (1)
theProduct
- ShapeRootNode(theProduct: BRepGraph_ProductId): BRepGraph_NodeIdParameters (1)
theProduct
- NbComponents(theProduct: BRepGraph_ProductId): numberParameters (1)
theProduct
- Component(theProduct: BRepGraph_ProductId, theComponentIdx: number): BRepGraph_OccurrenceIdParameters (2)
theProducttheComponentIdx
BRepGraph_TopoView_ShellOps
Instance methods(7)
- Nb(): number
- NbActive(): number
- Definition(theShell: BRepGraph_ShellId): BRepGraphInc_ShellDefParameters (1)
theShell
- Solids(theShell: BRepGraph_ShellId): anyParameters (1)
theShell
- Parameters (1)
theShell
BRepGraph_TopoView_SolidOps
Instance methods(7)
- Nb(): number
- NbActive(): number
- Definition(theSolid: BRepGraph_SolidId): BRepGraphInc_SolidDefParameters (1)
theSolid
- Parameters (1)
theSolid
- Parameters (1)
theSolid
BRepGraph_TopoView_VertexOps
Instance methods(6)
- Nb(): number
- NbActive(): number
- Definition(theVertex: BRepGraph_VertexId): BRepGraphInc_VertexDefParameters (1)
theVertex
- Parameters (1)
theVertex
BRepGraph_TopoView_WireOps
Instance methods(6)
- Nb(): number
- NbActive(): number
- Definition(theWire: BRepGraph_WireId): BRepGraphInc_WireDefParameters (1)
theWire
- Parameters (1)
theWire
BRepGraph_Transform
Graph-to-graph transformation.
Produces a new BRepGraph by copying and then applying a geometric transformation to vertex points and geometry node locations.
Two geometry modes (matching BRepBuilderAPI_Transform semantics):
- theCopyGeom = true (geometry-level): deep-copy geometry, transform handles in-place via
Geom_Surface::Transform()etc., reset locations to identity. - theCopyGeom = false (root-level): light-copy with shared geometry, apply transform via location modification only.
Mesh handling (theCopyMesh parameter): - theCopyMesh = false (default): triangulations and polygons are discarded after a geometry-level transform and must be recomputed.
- theCopyMesh = true: all mesh data (
Poly_Triangulationon FaceDefs and the MeshLayer cache,Poly_Polygon3Don edges,Poly_PolygonOnTriangulationon 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
Static methods(3)
- Perform(theGraph: BRepGraph, theTrsf: gp_Trsf, theCopyGeom: boolean, theCopyMesh: boolean): BRepGraph
Transform the entire graph.
Parameters (4)theGraph—a pre-builtBRepGraph(must have IsDone() == true)theTrsf—the transformation to applytheCopyGeom—if true, geometry is deep-copied before transforming; if false, light-copy then transform locations/points onlytheCopyMesh—if true, mesh data (triangulations, polygons) is copied and transformed; if false, meshes are discarded after transform
Returnsa new
BRepGraphwith the transformation applied - TransformNode(theGraph: BRepGraph, theNodeId: BRepGraph_NodeId, theTrsf: gp_Trsf, theCopyGeom: boolean, theCopyMesh: boolean): BRepGraph
Transform a single node sub-graph of any kind (Face, Shell, Solid, Wire, Edge, Vertex). Produces a new
BRepGraphcontaining only the specified node and its referenced sub-graph. The transform is applied to all copied geometry (same rules asPerform()).Parameters (5)theGraph—a pre-builtBRepGraphtheNodeId—node identifier (any kind: Face, Shell, Solid, Wire, Edge, Vertex, Compound, CompSolid, Product, Occurrence)theTrsf—the transformation to applytheCopyGeom—if true, geometry is deep-copied before transformingtheCopyMesh—if true, mesh data is copied and transformed
Returnsa new
BRepGraphcontaining only the specified sub-graph, transformed - MoveRef(theGraph: BRepGraph, theRefId: BRepGraph_RefId, theTrsf: gp_Trsf): boolean
Apply an in-place location-only transform to a single reference. Composes theTrsf into the reference's LocalLocation field without copying any geometry. This is O(1) and equivalent to TopoDS_Shape::Moved(trsf). 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 referencetheRefId—reference to move (any ref kind)theTrsf—the transformation to compose into the location
Returnstrue on success; false if theTrsf has a non-unit scale factor
RemarksNote: Only pure rotation/translation transforms (scale == 1) are supported. The method is a no-op and returns false if |scaleFactor| != 1.
BRepGraph_TransientCache
Centralized transient cache for algorithm-computed per-node values.
Stores short-lived cached data (BndBox, UVBounds, etc.) in dense per-cache-kind vectors indexed by entity index. O(1) access by direct indexing - no hashing.
SubtreeGen-based freshness
Each stored slot records SubtreeGen at write time. On read, if stored SubtreeGen differs from entity's current SubtreeGen the cached value is considered stale - the caller decides how to handle it.
Lifecycle
NOT a Layer. Cleared on BRepGraph_Builder::Add() and Compact(). No OnNodeRemoved handling - stale data is auto-detected by SubtreeGen mismatch.
Thread safety
After Reserve(), Get() and Set() for in-range indices bypass the mutex entirely - safe because parallel algorithms access different entity slots. Out-of-range access (entities added after construction) falls back to mutex.
Constructors(1)
Instance methods(10)
- Set(theNode: BRepGraph_NodeId, theKind: BRepGraph_CacheKind, theValue: BRepGraph_CacheValue, theCurrentSubtreeGen: number): void
Store a cached value for a node and cache kind.
Parameters (4)theNodetheKindtheValuetheCurrentSubtreeGen
- Set(theNode: BRepGraph_NodeId, theKindSlot: number, theValue: BRepGraph_CacheValue, theCurrentSubtreeGen: number): void
Store a cached value using a pre-resolved kind slot index. Bypasses
BRepGraph_CacheKindRegistrylookup - use in hot parallel paths.Parameters (4)theNodetheKindSlot—slot fromBRepGraph_CacheKindRegistry::Register()theValuetheCurrentSubtreeGen
- Get(theNode: BRepGraph_NodeId, theKind: BRepGraph_CacheKind, theCurrentSubtreeGen: number): BRepGraph_CacheValue
Retrieve a cached value for a node and cache kind.
Parameters (3)theNodetheKindtheCurrentSubtreeGen
- Get(theNode: BRepGraph_NodeId, theKindSlot: number, theCurrentSubtreeGen: number): BRepGraph_CacheValue
Retrieve a cached value using a pre-resolved kind slot index. Bypasses
BRepGraph_CacheKindRegistrylookup - use in hot parallel paths.Parameters (3)theNodetheKindSlot—slot fromBRepGraph_CacheKindRegistry::Register()theCurrentSubtreeGen
- Remove(theNode: BRepGraph_NodeId, theKind: BRepGraph_CacheKind): boolean
Remove a cached value for a node and cache kind.
Parameters (2)theNodetheKind
- Remove(theNode: BRepGraph_NodeId, theKindSlot: number): boolean
Remove a cached value using a pre-resolved cache-kind slot.
Parameters (2)theNodetheKindSlot
- CollectCacheKindSlots(theNode: BRepGraph_NodeId, theCurrentSubtreeGen: number, theSlots: number[]): number
Collect fresh cache-kind slot indices for a node (zero heap allocation). Used internally by CacheView::CacheKindIterator.
Parameters (3)theNode—node to querytheCurrentSubtreeGen—freshness stamp to matchtheSlots—output array (caller-allocated, must hold THE_DEFAULT_RESERVED_KIND_COUNT)
Returnsnumber of populated slots written to theSlots
- Reserve(theKindCount: number, theCounts: [number, number, number, number, number, number, number, number, number, number, number, number]): void
Pre-allocate storage for lock-free parallel access.
Parameters (2)theKindCounttheCounts
- IsReserved(): boolean
True if
Reserve()has been called and storage is pre-allocated. - Clear(): void
Clear all cached data. Called on
BRepGraph_Builder::Add()and Compact().
BRepGraph_TriangulationRepId
Constructors(3)
- constructor(theIdx: number): BRepGraph_TriangulationRepIdParameters (1)
theIdx
- Parameters (1)
theId
Static methods(3)
- Start(): BRepGraph_RepId_Typed
- Invalid(): BRepGraph_RepId_Typed
- FromRepId(theId: BRepGraph_RepId): BRepGraph_RepId_TypedParameters (1)
theId
Instance methods(2)
Properties(1)
BRepGraph_UID
Unique 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).
Generation is NOT part of identity; it indicates which BRepGraph::Clear() cycle produced this UID (for stale-reference detection).
Trivially copyable, cheap to pass by value.
Serialization Contract
Entity UIDs (BRepGraph_UID) and reference UIDs (BRepGraph_RefUID) share a single monotonic counter (BRepGraph_Data::myNextUIDCounter). To persist a BRepGraph across sessions:
- Write: for each entity, serialize (Kind, Counter, OwnGen).
- Read: reconstruct entities, populate UID vectors with deserialized (Kind, Counter) values, set myNextUIDCounter to max(all_entity_counters, all_ref_counters) + 1.
- myGeneration resets to 0 on load (session-scoped).
- VersionStamps from a previous session will correctly detect staleness via Generation mismatch.
Constructors(2)
Default: invalid UID (counter = 0 is the invalid sentinel).
- constructor(theKind: BRepGraph_NodeId_Kind, theCounter: number, theGeneration: number): BRepGraph_UID
Construct a valid UID. Called internally by BRepGraph::allocateUID().
Parameters (3)theKindtheCountertheGeneration
Static methods(1)
Factory: returns an explicitly invalid UID.
Instance methods(7)
- IsValid(): boolean
- Kind(): BRepGraph_NodeId_Kind
- Counter(): number
- Generation(): number
- IsTopology(): boolean
- IsAssembly(): boolean
- HashValue(): number
Hash value: f(Kind, Counter).
BRepGraph_UIDsView
Instance methods(11)
- Of(theNode: BRepGraph_NodeId): BRepGraph_UIDParameters (1)
theNode
- Of(theRefId: BRepGraph_RefId): BRepGraph_RefUIDParameters (1)
theRefId
- NodeIdFrom(theUID: BRepGraph_UID): BRepGraph_NodeIdParameters (1)
theUID
- RefIdFrom(theUID: BRepGraph_RefUID): BRepGraph_RefIdParameters (1)
theUID
- Has(theUID: BRepGraph_UID): booleanParameters (1)
theUID
- Has(theUID: BRepGraph_RefUID): booleanParameters (1)
theUID
- Generation(): number
- StampOf(theNode: BRepGraph_NodeId): BRepGraph_VersionStampParameters (1)
theNode
- StampOf(theRefId: BRepGraph_RefId): BRepGraph_VersionStampParameters (1)
theRefId
- IsStale(theStamp: BRepGraph_VersionStamp): booleanParameters (1)
theStamp
BRepGraph_Validate
Structural invariant checker for BRepGraph.
Read-only algorithm that verifies the graph's internal consistency: cross-reference bounds, reverse index 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 Cross-reference bounds-YES Reverse-index consistency-YES Face-count cache consistency-YES Incidence ref consistency-YES Geometry representation refs-YES Removed-node isolation-YES 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 onlyLowHot-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)
- Perform(theGraph: BRepGraph): BRepGraph_Validate_Result
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)
Returnsvalidation 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
Returnsvalidation result with all detected issues
- Perform(theGraph: BRepGraph, theOptions: BRepGraph_Validate_Options): BRepGraph_Validate_Result
Run structural checks on a built graph with explicit options.
Parameters (2)theGraph—graph to validate (const, read-only)theOptions—validation profile/options
Returnsvalidation result with all detected issues
BRepGraph_Validate_Options
Constructors(1)
Static methods(2)
Properties(1)
BRepGraph_Validate_Result
Constructors(1)
Instance methods(2)
Properties(1)
BRepGraph_VersionStamp
Snapshot of an entity/ref identity and version at a point in time.
Combines a persistent UID (entity or reference entry) with OwnGen (own-data version counter) and graph Generation (BRepGraph::Clear() cycle). Computed on demand via BRepGraph::UIDs().StampOf().
Usage pattern:
Constructors(3)
Default constructor. Creates an invalid stamp (invalid UID, zero counters).
- constructor(theUID: BRepGraph_UID, theMutationGen: number, theGeneration: number): BRepGraph_VersionStamp
Construct an entity-domain stamp from components.
Parameters (3)theUID—persistent entity identitytheMutationGen—OwnGen counter (own-data mutation counter)theGeneration—graphBRepGraph::Clear()generation
- constructor(theRefUID: BRepGraph_RefUID, theMutationGen: number, theGeneration: number): BRepGraph_VersionStamp
Construct a reference-domain stamp from components.
Parameters (3)theRefUID—persistent reference identitytheMutationGen—OwnGen counter (own-data mutation counter)theGeneration—graphBRepGraph::Clear()generation
Instance methods(6)
- IsValid(): boolean
Check if the stamp has a valid identity in its domain.
- IsEntityStamp(): boolean
True when this is an entity-domain stamp.
- IsRefStamp(): boolean
True when this is a reference-domain stamp.
- IsSameNode(theOther: BRepGraph_VersionStamp): boolean
Check if two stamps refer to the same entity/reference regardless of version. Compares active UID only, ignoring OwnGen and Generation.
Parameters (1)theOther—stamp to compare with
Returnstrue if both stamps have the same domain and UID
- ToGUID(theGraphGUID: Standard_GUID): Standard_GUID
Derive a deterministic
Standard_GUIDfrom 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
Returnsdeterministic
Standard_GUIDderived from stamp + graph GUID - HashValue(): number
Compute hash value consistent with operator==.
Returnshash combining active UID, domain, OwnGen, and Generation
Properties(7)
BRepGraph_VertexId
Constructors(3)
- constructor(theIdx: number): BRepGraph_VertexIdParameters (1)
theIdx
- Parameters (1)
theId
Static methods(3)
- Start(): BRepGraph_NodeId_Typed
- Invalid(): BRepGraph_NodeId_Typed
- FromNodeId(theId: BRepGraph_NodeId): BRepGraph_NodeId_TypedParameters (1)
theId
Instance methods(2)
Properties(1)
BRepGraph_VertexRefId
Constructors(3)
- constructor(theIdx: number): BRepGraph_VertexRefIdParameters (1)
theIdx
- constructor(theRefId: BRepGraph_RefId): BRepGraph_VertexRefIdParameters (1)
theRefId
Static methods(3)
- Start(): BRepGraph_RefId_Typed
- Invalid(): BRepGraph_RefId_Typed
- FromRefId(theRefId: BRepGraph_RefId): BRepGraph_RefId_TypedParameters (1)
theRefId
Instance methods(2)
Properties(1)
BRepGraph_WireExplorer
Iterator for traversing wire edges in connection order using graph data.
Reorders wire coedges by vertex adjacency: the end vertex of each edge matches the start vertex of the next. This is the graph equivalent of BRepTools_WireExplorer, operating on pre-built BRepGraph data.
The coedges are reordered on construction (O(N^2) worst case for N coedges). For most wires this is fast since N is small (4-8 edges typically).
Internal storage uses NCollection_LocalArray with stack allocation for wires with up to 16 edges (the common case), falling back to heap for larger wires.
Usage:
Constructors(1)
- constructor(theGraph: BRepGraph, theWire: BRepGraph_WireId): BRepGraph_WireExplorer
Initialize the explorer from a pre-built
BRepGraphand wire identifier. Collects coedge IDs from graph iterators and reorders them by vertex connectivity.Parameters (2)theGraph—pre-builtBRepGraph(IsDone() == true)theWire—wire definition identifier
Instance methods(7)
- More(): boolean
Returns true if there are more edges to iterate.
- Next(): void
Advance to the next edge.
- Reset(): void
Reset the iterator to the beginning (for re-iteration).
Current coedge definition identifier in connection order.
- NbEdges(): number
Number of coedges in the ordered sequence.
Current coedge identifier (alias for
CurrentCoEdgeId(), enables range-for).Returns a sentinel marking the end of iteration.
BRepGraph_WireId
Constructors(3)
- constructor(theIdx: number): BRepGraph_WireIdParameters (1)
theIdx
- constructor(theId: BRepGraph_NodeId): BRepGraph_WireIdParameters (1)
theId
Static methods(3)
- Start(): BRepGraph_NodeId_Typed
- Invalid(): BRepGraph_NodeId_Typed
- FromNodeId(theId: BRepGraph_NodeId): BRepGraph_NodeId_TypedParameters (1)
theId
Instance methods(2)
Properties(1)
BRepGraph_WireRefId
Constructors(3)
- constructor(theIdx: number): BRepGraph_WireRefIdParameters (1)
theIdx
- constructor(theRefId: BRepGraph_RefId): BRepGraph_WireRefIdParameters (1)
theRefId
Static methods(3)
- Start(): BRepGraph_RefId_Typed
- Invalid(): BRepGraph_RefId_Typed
- FromRefId(theRefId: BRepGraph_RefId): BRepGraph_RefId_TypedParameters (1)
theRefId
Instance methods(2)
Properties(1)
BRepGraph_WiresOfCoEdge
Constructors(2)
- constructor(theGraph: BRepGraph, theParents: any): BRepGraph_WiresOfCoEdgeParameters (2)
theGraphtheParents
- constructor(theGraph: BRepGraph, theParents: any, theStartIndex: number): BRepGraph_WiresOfCoEdgeParameters (3)
theGraphtheParentstheStartIndex
Instance methods(10)
- More(): boolean
- Next(): void
- Definition(): unknown
- Index(): number
- Length(): number
- Size(): number
- Value(theIndex: number): BRepGraph_WireIdParameters (1)
theIndex