Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Public Member Functions | Static Public Member Functions
BRepGraph_LayerRegularity Class Reference

Persistent edge-continuity store, keyed by (edge, F1, F2). More...

#include <BRepGraph_LayerRegularity.hxx>

Inheritance diagram for BRepGraph_LayerRegularity:
Inheritance graph
[legend]

Data Structures

struct  EdgeRegularities
 
struct  RegularityEntry
 

Public Member Functions

const Standard_GUIDID () const override
 Return this layer type GUID.
 
const EdgeRegularitiesFindEdgeRegularities (const BRepGraph_EdgeId theEdge) const
 
bool FindContinuity (const BRepGraph_EdgeId theEdge, const BRepGraph_FaceId theFace1, const BRepGraph_FaceId theFace2, GeomAbs_Shape *const theContinuity=nullptr) const
 
uint32_t NbRegularities (const BRepGraph_EdgeId theEdge) const
 
GeomAbs_Shape MaxContinuity (const BRepGraph_EdgeId theEdge) const
 
bool HasBindings () const
 
void SetRegularity (const BRepGraph_EdgeId theEdge, const BRepGraph_FaceId theFace1, const BRepGraph_FaceId theFace2, const GeomAbs_Shape theContinuity)
 
void CopyRegularities (const BRepGraph_EdgeId theSourceEdge, const BRepGraph_EdgeId theTargetEdge)
 Copy all regularity entries from one edge to another.
 
void RemoveRegularities (const BRepGraph_EdgeId theEdge) noexcept
 Remove all regularity entries bound to the edge.
 
const TCollection_AsciiStringName () const override
 Layer identity (unique within a graph).
 
void OnNodeRemoved (const BRepGraph_NodeId theNode, const BRepGraph_NodeId theReplacement) noexcept override
 Called when a node is soft-removed.
 
void OnCompact (const NCollection_DataMap< BRepGraph_NodeId, BRepGraph_NodeId > &theRemapMap) noexcept override
 Called after Compact with a unified old->new remap map. Layer must remap all internal NodeId references using this map. The map covers all node kinds (Vertex through CompSolid and future extensions). Nodes absent from the map were removed during compaction - layers should drop data associated with those nodes.
 
void InvalidateAll () noexcept override
 Mark all cached values dirty (bulk invalidation).
 
void Clear () noexcept override
 Clear all stored data.
 
- Public Member Functions inherited from BRepGraph_Layer
virtual int SubscribedKinds () const
 Return a bitmask of BRepGraph_NodeId::Kind values this layer subscribes to. Only modification events matching subscribed kinds are dispatched. Default: 0 (no subscription - no modification events received). Override to receive OnNodeModified/OnNodesModified callbacks. The returned value must be constant for the lifetime of the layer.
 
virtual void OnNodeModified (const BRepGraph_NodeId theNode) noexcept
 Called in immediate (non-deferred) mode after a single node is modified. Only dispatched if the node's kind matches SubscribedKinds(). Default: no-op.
 
virtual void OnNodesModified (const NCollection_DynamicArray< BRepGraph_NodeId > &theModifiedNodes) noexcept
 Called after EndDeferredInvalidation() with all nodes modified during the deferred scope. Only dispatched if at least one modified node's kind matches SubscribedKinds(). The vector may contain nodes of kinds not subscribed to - layers should filter internally if needed. Default: no-op.
 
virtual int SubscribedRefKinds () const
 Return a bitmask of BRepGraph_RefId::Kind values this layer subscribes to. Only modification events matching subscribed ref kinds are dispatched. Default: 0 (no subscription). Must be constant for the layer's lifetime.
 
virtual void OnRefRemoved (const BRepGraph_RefId theRef) noexcept
 Called when a reference is soft-deleted via RemoveRef(). No replacement concept - refs are simply removed (unlike nodes which can have a replacement during sewing or deduplication). Dispatched to all layers regardless of SubscribedRefKinds(). Default: no-op.
 
virtual void OnRefModified (const BRepGraph_RefId theRef) noexcept
 Called in immediate (non-deferred) mode after a single ref is mutated. Only dispatched if the ref's kind matches SubscribedRefKinds(). Default: no-op.
 
virtual void OnRefsModified (const NCollection_DynamicArray< BRepGraph_RefId > &theModifiedRefs, const int theModifiedRefKindsMask) noexcept
 Called after EndDeferredInvalidation() with all refs modified during the deferred scope. Only dispatched if at least one modified ref's kind matches SubscribedRefKinds(). The vector may contain refs of kinds not subscribed to - layers should filter internally if needed. Default: no-op.
 
uint64_t Revision () const noexcept
 Monotonic revision counter incremented by touch() on every observable state change. Consumers compare stored revisions to detect staleness in O(1). Derived layers MUST call touch() from their mutators.
 
const BRepGraphOwningGraph () const noexcept
 Owning graph, set by the registry on RegisterLayer() and cleared on Unregister(). Nullptr before registration or after unregistration.
 
BRepGraphOwningMutableGraph () const noexcept
 Mutable accessor for layers that drive graph mutations (e.g. meshing).
 
- Public Member Functions inherited from Standard_Transient
 Standard_Transient ()
 Empty constructor.
 
 Standard_Transient (const Standard_Transient &)
 Copy constructor – does nothing.
 
Standard_Transientoperator= (const Standard_Transient &)
 Assignment operator, needed to avoid copying reference counter.
 
virtual ~Standard_Transient ()=default
 Destructor must be virtual.
 
virtual const opencascade::handle< Standard_Type > & DynamicType () const
 Returns a type descriptor about this object.
 
bool IsInstance (const opencascade::handle< Standard_Type > &theType) const
 Returns a true value if this is an instance of Type.
 
bool IsInstance (const char *const theTypeName) const
 Returns a true value if this is an instance of TypeName.
 
bool IsKind (const opencascade::handle< Standard_Type > &theType) const
 Returns true if this is an instance of Type or an instance of any class that inherits from Type. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
bool IsKind (const char *const theTypeName) const
 Returns true if this is an instance of TypeName or an instance of any class that inherits from TypeName. Note that multiple inheritance is not supported by OCCT RTTI mechanism.
 
Standard_TransientThis () const
 Returns non-const pointer to this object (like const_cast). For protection against creating handle to objects allocated in stack or call from constructor, it will raise exception Standard_ProgramError if reference counter is zero.
 
int GetRefCount () const noexcept
 Get the reference counter of this object.
 
void IncrementRefCounter () noexcept
 Increments the reference counter of this object. Uses relaxed memory ordering since incrementing only requires atomicity, not synchronization with other memory operations.
 
int DecrementRefCounter () noexcept
 Decrements the reference counter of this object; returns the decremented value. Uses release ordering for the decrement to ensure all writes to the object are visible before the count reaches zero. An acquire fence is added only when the count reaches zero, ensuring proper synchronization before deletion. This is more efficient than using acq_rel for every decrement.
 
virtual void Delete () const
 Memory deallocator for transient classes.
 

Static Public Member Functions

static const Standard_GUIDGetID ()
 Return fixed layer type GUID.
 
- Static Public Member Functions inherited from BRepGraph_Layer
static int KindBit (const BRepGraph_NodeId::Kind theKind)
 Convenience: return bitmask bit for a given Kind.
 
static int RefKindBit (const BRepGraph_RefId::Kind theKind)
 Convenience: return bitmask bit for a given RefId::Kind.
 
- Static Public Member Functions inherited from Standard_Transient
static constexpr const charget_type_name ()
 Returns a type descriptor about this object.
 
static const opencascade::handle< Standard_Type > & get_type_descriptor ()
 Returns type descriptor of Standard_Transient class.
 

Additional Inherited Members

- Public Types inherited from Standard_Transient
typedef void base_type
 Returns a type descriptor about this object.
 
- Protected Member Functions inherited from BRepGraph_Layer
void touch () noexcept
 Bump the revision counter.
 

Detailed Description

Persistent edge-continuity store, keyed by (edge, F1, F2).

Each entry holds the geometric continuity (C^k / G^k) across the face pair at a given edge. F1 == F2 represents seam continuity across a closed surface's seam line; F1 != F2 represents inter-face regularity. The schema mirrors classical BRep_Tool::Continuity(edge, F1, F2).

Lifetime policy

The layer is persistent metadata: stored values survive arbitrary mutations to the referenced edges and faces. Only the following events discard data:

Member Function Documentation

◆ Clear()

void BRepGraph_LayerRegularity::Clear ( )
overridevirtualnoexcept

Clear all stored data.

Implements BRepGraph_Layer.

◆ CopyRegularities()

void BRepGraph_LayerRegularity::CopyRegularities ( const BRepGraph_EdgeId theSourceEdge,
const BRepGraph_EdgeId theTargetEdge )

Copy all regularity entries from one edge to another.

◆ FindContinuity()

bool BRepGraph_LayerRegularity::FindContinuity ( const BRepGraph_EdgeId theEdge,
const BRepGraph_FaceId theFace1,
const BRepGraph_FaceId theFace2,
GeomAbs_Shape *const theContinuity = nullptr ) const

◆ FindEdgeRegularities()

const EdgeRegularities * BRepGraph_LayerRegularity::FindEdgeRegularities ( const BRepGraph_EdgeId theEdge) const

◆ GetID()

static const Standard_GUID & BRepGraph_LayerRegularity::GetID ( )
static

Return fixed layer type GUID.

◆ HasBindings()

bool BRepGraph_LayerRegularity::HasBindings ( ) const
inline

◆ ID()

const Standard_GUID & BRepGraph_LayerRegularity::ID ( ) const
overridevirtual

Return this layer type GUID.

Implements BRepGraph_Layer.

◆ InvalidateAll()

void BRepGraph_LayerRegularity::InvalidateAll ( )
overridevirtualnoexcept

Mark all cached values dirty (bulk invalidation).

Implements BRepGraph_Layer.

◆ MaxContinuity()

GeomAbs_Shape BRepGraph_LayerRegularity::MaxContinuity ( const BRepGraph_EdgeId theEdge) const

◆ Name()

const TCollection_AsciiString & BRepGraph_LayerRegularity::Name ( ) const
overridevirtual

Layer identity (unique within a graph).

Implements BRepGraph_Layer.

◆ NbRegularities()

uint32_t BRepGraph_LayerRegularity::NbRegularities ( const BRepGraph_EdgeId theEdge) const

◆ OnCompact()

void BRepGraph_LayerRegularity::OnCompact ( const NCollection_DataMap< BRepGraph_NodeId, BRepGraph_NodeId > & theRemapMap)
overridevirtualnoexcept

Called after Compact with a unified old->new remap map. Layer must remap all internal NodeId references using this map. The map covers all node kinds (Vertex through CompSolid and future extensions). Nodes absent from the map were removed during compaction - layers should drop data associated with those nodes.

Parameters
[in]theRemapMapmaps old NodeId to new NodeId for all surviving nodes

Implements BRepGraph_Layer.

◆ OnNodeRemoved()

void BRepGraph_LayerRegularity::OnNodeRemoved ( const BRepGraph_NodeId theNode,
const BRepGraph_NodeId theReplacement )
overridevirtualnoexcept

Called when a node is soft-removed.

Parameters
[in]theNodethe removed node
[in]theReplacementif valid, the node that replaces theNode (e.g., sewing edge merge, deduplicate). If invalid, pure deletion. Layers should migrate data from theNode to theReplacement when valid, otherwise discard or archive removed-node data. Implementations must validate theReplacement before dereferencing graph data through it.
Warning
Layer callbacks must not throw. They are called from noexcept notification paths (MutGuard destructors, deferred invalidation flush).

Implements BRepGraph_Layer.

◆ RemoveRegularities()

void BRepGraph_LayerRegularity::RemoveRegularities ( const BRepGraph_EdgeId theEdge)
noexcept

Remove all regularity entries bound to the edge.

◆ SetRegularity()

void BRepGraph_LayerRegularity::SetRegularity ( const BRepGraph_EdgeId theEdge,
const BRepGraph_FaceId theFace1,
const BRepGraph_FaceId theFace2,
const GeomAbs_Shape theContinuity )

The documentation for this class was generated from the following file: