![]() |
Open CASCADE Technology Reference Manual 8.0.1
|
Cache for derived edge, wire, and shell properties. More...
#include <BRepGraph_CacheDerivedState.hxx>

Public Member Functions | |
| const Standard_GUID & | ID () const override |
| Returns the unique cache service GUID. | |
| const TCollection_AsciiString & | Name () 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_Transient & | operator= (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_Transient * | This () 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_GUID & | GetID () |
| 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 char * | get_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 BRepGraph & | Graph () const |
| Attached graph for read-only cache services. Raises Standard_ProgramError if detached. | |
| BRepGraph * | AttachedGraph () 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. | |
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.
|
overridevirtualnoexcept |
Clears all cached entries.
Reimplemented from BRepGraph_Cache.
|
static |
Compute edge-own derived state (Status, IsClosed). SameRange/SameParameter are per-CoEdge - use the per-CoEdge cache directly.
| [in] | theGraph | source graph |
| [in] | theEdge | edge definition identifier |
| [out] | theIsDegenerated | true if edge is degenerate |
| [out] | theIsClosed | true if edge is closed |
|
static |
Compute shell closure directly from a BRepGraph without caching.
| [in] | theGraph | source graph |
| [in] | theShell | shell definition identifier |
|
static |
Compute wire closure directly from a BRepGraph without caching.
| [in] | theGraph | source graph |
| [in] | theWire | wire definition identifier |
|
overridevirtual |
Copy fresh, remappable derived-state entries into the target graph.
Reimplemented from BRepGraph_Cache.
|
static |
Returns the unique cache service GUID.
| bool BRepGraph_CacheDerivedState::GetWireIsClosed | ( | BRepGraph_WireId | theWire, |
| bool & | theClosed ) |
Return wire closure, computing and storing a fresh entry.
| [in] | theWire | wire definition identifier |
| [out] | theClosed | filled with the fresh derived value |
|
overridevirtual |
Returns the unique cache service GUID.
Implements BRepGraph_Cache.
| bool BRepGraph_CacheDerivedState::IsClosed | ( | BRepGraph_EdgeId | theEdge | ) |
Test if an edge is closed (start vertex == end vertex). Computes and caches only IsClosed.
| [in] | theEdge | edge definition identifier |
| 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.
| [in] | theEdge | edge definition identifier |
| bool BRepGraph_CacheDerivedState::IsShellClosed | ( | BRepGraph_ShellId | theShell | ) |
Test if a shell is closed.
| [in] | theShell | shell definition identifier |
|
overridevirtual |
Returns the cache service display name.
Implements BRepGraph_Cache.
| bool BRepGraph_CacheDerivedState::SameParameter | ( | BRepGraph_CoEdgeId | theCoEdge | ) |
Test if a single coedge has SameParameter.
| [in] | theCoEdge | coedge definition identifier |
| bool BRepGraph_CacheDerivedState::SameRange | ( | BRepGraph_CoEdgeId | theCoEdge | ) |
Test if a single coedge has SameRange.
| [in] | theCoEdge | coedge definition identifier |
| void BRepGraph_CacheDerivedState::SetWireIsClosed | ( | BRepGraph_WireId | theWire, |
| bool | theClosed ) |
Store a pre-computed wire closure value.
| [in] | theWire | wire definition identifier |
| [in] | theClosed | pre-computed closure value |