OCCT3D About OCCT
Open CASCADE Technology Reference Manual 8.0.1
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions
BRepGraph_CacheDerivedState Class Reference

Cache for derived edge, wire, and shell properties. More...

#include <BRepGraph_CacheDerivedState.hxx>

Inheritance diagram for BRepGraph_CacheDerivedState:
Inheritance graph
[legend]

Public Member Functions

const Standard_GUIDID () const override
 Returns the unique cache service GUID.
 
const TCollection_AsciiStringName () const override
 Returns the cache service display name.
 
void Clear () noexcept override
 Clears all cached entries.
 
void CopyFreshTo (const BRepGraph_CopyRemap &theCopy) const override
 Copy fresh, remappable derived-state entries into the target graph.
 
bool IsDegenerated (BRepGraph_EdgeId theEdge)
 Test if an edge is degenerate (no 3D curve and vertex collapse). Computes and caches only Status - does NOT compute SameParameter/SameRange.
 
bool SameParameter (BRepGraph_CoEdgeId theCoEdge)
 Test if a single coedge has SameParameter.
 
bool SameRange (BRepGraph_CoEdgeId theCoEdge)
 Test if a single coedge has SameRange.
 
bool IsClosed (BRepGraph_EdgeId theEdge)
 Test if an edge is closed (start vertex == end vertex). Computes and caches only IsClosed.
 
bool GetWireIsClosed (BRepGraph_WireId theWire, bool &theClosed)
 Return wire closure, computing and storing a fresh entry.
 
void SetWireIsClosed (BRepGraph_WireId theWire, bool theClosed)
 Store a pre-computed wire closure value.
 
bool IsShellClosed (BRepGraph_ShellId theShell)
 Test if a shell is closed.
 
- 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 ()
 Returns the unique cache service GUID.
 
static bool ComputeEdgeProperties (const BRepGraph &theGraph, BRepGraph_EdgeId theEdge, bool &theIsDegenerated, bool &theIsClosed)
 Compute edge-own derived state (Status, IsClosed). SameRange/SameParameter are per-CoEdge - use the per-CoEdge cache directly.
 
static bool ComputeShellIsClosed (const BRepGraph &theGraph, BRepGraph_ShellId theShell)
 Compute shell closure directly from a BRepGraph without caching.
 
static bool ComputeWireIsClosed (const BRepGraph &theGraph, BRepGraph_WireId theWire)
 Compute wire closure directly from a BRepGraph without caching.
 
- 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_Cache
 BRepGraph_Cache ()
 
bool IsAttached () const noexcept
 True while this cache is registered in a live graph registry.
 
const BRepGraphGraph () const
 Attached graph for read-only cache services. Raises Standard_ProgramError if detached.
 
BRepGraphAttachedGraph () const noexcept
 Attached mutable graph for graph-owned cache services. Returns null if detached.
 
virtual void OnAttached () noexcept
 Called after the cache is attached to a graph registry.
 
virtual void OnDetached () noexcept
 Called before the cache is detached from a graph registry.
 
bool NodeSubtreeGen (const BRepGraph_NodeId theNode, uint32_t &theGen) const noexcept
 Return current SubtreeGen for an active node.
 
bool NodeOwnGen (const BRepGraph_NodeId theNode, uint32_t &theGen) const noexcept
 Return current OwnGen for an active node.
 
bool RefOwnGen (const BRepGraph_RefId theRef, uint32_t &theGen) const noexcept
 Return current OwnGen for an active reference.
 
bool ItemOwnGen (const BRepGraph_ItemId theItem, uint32_t &theGen) const noexcept
 Return current OwnGen for an active graph item.
 
bool ResolveActiveRefChild (const BRepGraph_RefId theRef, BRepGraph_NodeId &theNode) const noexcept
 Resolve an active reference to its active child node.
 
bool ResolveActiveFaceRef (const BRepGraph_FaceRefId theRef, BRepGraph_FaceId &theFace) const noexcept
 Resolve an active face reference to its active face node.
 

Detailed Description

Cache for derived edge, wire, and shell properties.

Each query is independent and caches only its own result. Callers request specific values (IsDegenerated, SameParameter, etc.) and the cache computes + stores only what is needed.

Member Function Documentation

◆ Clear()

void BRepGraph_CacheDerivedState::Clear ( )
overridevirtualnoexcept

Clears all cached entries.

Reimplemented from BRepGraph_Cache.

◆ ComputeEdgeProperties()

static bool BRepGraph_CacheDerivedState::ComputeEdgeProperties ( const BRepGraph & theGraph,
BRepGraph_EdgeId theEdge,
bool & theIsDegenerated,
bool & theIsClosed )
static

Compute edge-own derived state (Status, IsClosed). SameRange/SameParameter are per-CoEdge - use the per-CoEdge cache directly.

Parameters
[in]theGraphsource graph
[in]theEdgeedge definition identifier
[out]theIsDegeneratedtrue if edge is degenerate
[out]theIsClosedtrue if edge is closed
Returns
true if computation succeeded

◆ ComputeShellIsClosed()

static bool BRepGraph_CacheDerivedState::ComputeShellIsClosed ( const BRepGraph & theGraph,
BRepGraph_ShellId theShell )
static

Compute shell closure directly from a BRepGraph without caching.

Parameters
[in]theGraphsource graph
[in]theShellshell definition identifier
Returns
true if the shell is closed

◆ ComputeWireIsClosed()

static bool BRepGraph_CacheDerivedState::ComputeWireIsClosed ( const BRepGraph & theGraph,
BRepGraph_WireId theWire )
static

Compute wire closure directly from a BRepGraph without caching.

Parameters
[in]theGraphsource graph
[in]theWirewire definition identifier
Returns
true if the wire is closed

◆ CopyFreshTo()

void BRepGraph_CacheDerivedState::CopyFreshTo ( const BRepGraph_CopyRemap & theCopy) const
overridevirtual

Copy fresh, remappable derived-state entries into the target graph.

Reimplemented from BRepGraph_Cache.

◆ GetID()

static const Standard_GUID & BRepGraph_CacheDerivedState::GetID ( )
static

Returns the unique cache service GUID.

◆ GetWireIsClosed()

bool BRepGraph_CacheDerivedState::GetWireIsClosed ( BRepGraph_WireId theWire,
bool & theClosed )

Return wire closure, computing and storing a fresh entry.

Parameters
[in]theWirewire definition identifier
[out]theClosedfilled with the fresh derived value
Returns
true if computation succeeded

◆ ID()

const Standard_GUID & BRepGraph_CacheDerivedState::ID ( ) const
overridevirtual

Returns the unique cache service GUID.

Implements BRepGraph_Cache.

◆ IsClosed()

bool BRepGraph_CacheDerivedState::IsClosed ( BRepGraph_EdgeId theEdge)

Test if an edge is closed (start vertex == end vertex). Computes and caches only IsClosed.

Parameters
[in]theEdgeedge definition identifier
Returns
true if the edge is closed

◆ IsDegenerated()

bool BRepGraph_CacheDerivedState::IsDegenerated ( BRepGraph_EdgeId theEdge)

Test if an edge is degenerate (no 3D curve and vertex collapse). Computes and caches only Status - does NOT compute SameParameter/SameRange.

Parameters
[in]theEdgeedge definition identifier
Returns
true if the edge is degenerate

◆ IsShellClosed()

bool BRepGraph_CacheDerivedState::IsShellClosed ( BRepGraph_ShellId theShell)

Test if a shell is closed.

Parameters
[in]theShellshell definition identifier
Returns
true if the shell is closed

◆ Name()

const TCollection_AsciiString & BRepGraph_CacheDerivedState::Name ( ) const
overridevirtual

Returns the cache service display name.

Implements BRepGraph_Cache.

◆ SameParameter()

bool BRepGraph_CacheDerivedState::SameParameter ( BRepGraph_CoEdgeId theCoEdge)

Test if a single coedge has SameParameter.

Parameters
[in]theCoEdgecoedge definition identifier
Returns
true if the coedge has SameParameter

◆ SameRange()

bool BRepGraph_CacheDerivedState::SameRange ( BRepGraph_CoEdgeId theCoEdge)

Test if a single coedge has SameRange.

Parameters
[in]theCoEdgecoedge definition identifier
Returns
true if the coedge has SameRange

◆ SetWireIsClosed()

void BRepGraph_CacheDerivedState::SetWireIsClosed ( BRepGraph_WireId theWire,
bool theClosed )

Store a pre-computed wire closure value.

Parameters
[in]theWirewire definition identifier
[in]theClosedpre-computed closure value

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