![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
A cache class for Bezier and B-spline surfaces. More...
#include <BSplSLib_Cache.hxx>

Public Member Functions | |
| BSplSLib_Cache (const int &theDegreeU, const bool &thePeriodicU, const NCollection_Array1< double > &theFlatKnotsU, const int &theDegreeV, const bool &thePeriodicV, const NCollection_Array1< double > &theFlatKnotsV, const NCollection_Array2< double > *theWeights=nullptr) | |
| Constructor for caching of the span for the surface. | |
| bool | IsCacheValid (double theParameterU, double theParameterV) const |
| Verifies validity of the cache using parameters of the point. | |
| void | BuildCache (const double &theParameterU, const double &theParameterV, const NCollection_Array1< double > &theFlatKnotsU, const NCollection_Array1< double > &theFlatKnotsV, const NCollection_Array2< gp_Pnt > &thePoles, const NCollection_Array2< double > *theWeights=nullptr) |
| Recomputes the cache data. Does not verify validity of the cache. | |
| void | D0 (const double &theU, const double &theV, gp_Pnt &thePoint) const |
| Calculates the point on the surface for specified parameters. | |
| void | D1 (const double &theU, const double &theV, gp_Pnt &thePoint, gp_Vec &theTangentU, gp_Vec &theTangentV) const |
| Calculates the point on the surface and its first derivative. | |
| void | D2 (const double &theU, const double &theV, gp_Pnt &thePoint, gp_Vec &theTangentU, gp_Vec &theTangentV, gp_Vec &theCurvatureU, gp_Vec &theCurvatureV, gp_Vec &theCurvatureUV) const |
| Calculates the point on the surface and derivatives till second order. | |
| void | D0Local (double theLocalU, double theLocalV, gp_Pnt &thePoint) const |
| Calculates the point using pre-computed local parameters in [-1, 1] range. This bypasses periodic normalization and local parameter calculation. | |
| void | D1Local (double theLocalU, double theLocalV, gp_Pnt &thePoint, gp_Vec &theTangentU, gp_Vec &theTangentV) const |
| Calculates the point and first derivatives using pre-computed local parameters in [-1, 1] range. This bypasses periodic normalization and local parameter calculation. | |
| void | D2Local (double theLocalU, double theLocalV, gp_Pnt &thePoint, gp_Vec &theTangentU, gp_Vec &theTangentV, gp_Vec &theCurvatureU, gp_Vec &theCurvatureV, gp_Vec &theCurvatureUV) const |
| Calculates the point and derivatives till second order using pre-computed local parameters. This bypasses periodic normalization and local parameter calculation. | |
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. | |
Additional Inherited Members | |
Public Types inherited from Standard_Transient | |
| typedef void | base_type |
| Returns a type descriptor about this object. | |
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. | |
A cache class for Bezier and B-spline surfaces.
Defines all data, that can be cached on a span of the surface. The data should be recalculated in going from span to span.
| BSplSLib_Cache::BSplSLib_Cache | ( | const int & | theDegreeU, |
| const bool & | thePeriodicU, | ||
| const NCollection_Array1< double > & | theFlatKnotsU, | ||
| const int & | theDegreeV, | ||
| const bool & | thePeriodicV, | ||
| const NCollection_Array1< double > & | theFlatKnotsV, | ||
| const NCollection_Array2< double > * | theWeights = nullptr ) |
Constructor for caching of the span for the surface.
| theDegreeU | degree along the first parameter (U) of the surface |
| thePeriodicU | identify the surface is periodical along U axis |
| theFlatKnotsU | knots of the surface (with repetition) along U axis |
| theDegreeV | degree along the second parameter (V) of the surface |
| thePeriodicV | identify the surface is periodical along V axis |
| theFlatKnotsV | knots of the surface (with repetition) along V axis |
| theWeights | array of weights of corresponding poles |
| void BSplSLib_Cache::BuildCache | ( | const double & | theParameterU, |
| const double & | theParameterV, | ||
| const NCollection_Array1< double > & | theFlatKnotsU, | ||
| const NCollection_Array1< double > & | theFlatKnotsV, | ||
| const NCollection_Array2< gp_Pnt > & | thePoles, | ||
| const NCollection_Array2< double > * | theWeights = nullptr ) |
Recomputes the cache data. Does not verify validity of the cache.
| theParameterU | the parametric value on the U axis to identify the span |
| theParameterV | the parametric value on the V axis to identify the span |
| theDegreeU | degree along U axis |
| thePeriodicU | identify whether the surface is periodic along U axis |
| theFlatKnotsU | flat knots of the surface along U axis |
| theDegreeV | degree along V axis |
| thePeriodicV | identify whether the surface is periodic along V axis |
| theFlatKnotsV | flat knots of the surface along V axis |
| thePoles | array of poles of the surface |
| theWeights | array of weights of corresponding poles |
Calculates the point on the surface for specified parameters.
| [in] | theU | first parameter for calculation of the value |
| [in] | theV | second parameter for calculation of the value |
| [out] | thePoint | the result of calculation (the point on the surface) |
Calculates the point using pre-computed local parameters in [-1, 1] range. This bypasses periodic normalization and local parameter calculation.
| [in] | theLocalU | pre-computed local U parameter: (U - SpanMid) / SpanHalfLen |
| [in] | theLocalV | pre-computed local V parameter: (V - SpanMid) / SpanHalfLen |
| [out] | thePoint | the result of calculation (the point on the surface) |
| void BSplSLib_Cache::D1 | ( | const double & | theU, |
| const double & | theV, | ||
| gp_Pnt & | thePoint, | ||
| gp_Vec & | theTangentU, | ||
| gp_Vec & | theTangentV ) const |
Calculates the point on the surface and its first derivative.
| [in] | theU | first parameter of calculation of the value |
| [in] | theV | second parameter of calculation of the value |
| [out] | thePoint | the result of calculation (the point on the surface) |
| [out] | theTangentU | tangent vector along U axis in the calculated point |
| [out] | theTangentV | tangent vector along V axis in the calculated point |
| void BSplSLib_Cache::D1Local | ( | double | theLocalU, |
| double | theLocalV, | ||
| gp_Pnt & | thePoint, | ||
| gp_Vec & | theTangentU, | ||
| gp_Vec & | theTangentV ) const |
Calculates the point and first derivatives using pre-computed local parameters in [-1, 1] range. This bypasses periodic normalization and local parameter calculation.
| [in] | theLocalU | pre-computed local U parameter: (U - SpanMid) / SpanHalfLen |
| [in] | theLocalV | pre-computed local V parameter: (V - SpanMid) / SpanHalfLen |
| [out] | thePoint | the result of calculation (the point on the surface) |
| [out] | theTangentU | tangent vector along U axis in the calculated point |
| [out] | theTangentV | tangent vector along V axis in the calculated point |
| void BSplSLib_Cache::D2 | ( | const double & | theU, |
| const double & | theV, | ||
| gp_Pnt & | thePoint, | ||
| gp_Vec & | theTangentU, | ||
| gp_Vec & | theTangentV, | ||
| gp_Vec & | theCurvatureU, | ||
| gp_Vec & | theCurvatureV, | ||
| gp_Vec & | theCurvatureUV ) const |
Calculates the point on the surface and derivatives till second order.
| [in] | theU | first parameter of calculation of the value |
| [in] | theV | second parameter of calculation of the value |
| [out] | thePoint | the result of calculation (the point on the surface) |
| [out] | theTangentU | tangent vector along U axis in the calculated point |
| [out] | theTangentV | tangent vector along V axis in the calculated point |
| [out] | theCurvatureU | curvature vector (2nd derivative on U) along U axis |
| [out] | theCurvatureV | curvature vector (2nd derivative on V) along V axis |
| [out] | theCurvatureUV | 2nd mixed derivative on U anv V |
| void BSplSLib_Cache::D2Local | ( | double | theLocalU, |
| double | theLocalV, | ||
| gp_Pnt & | thePoint, | ||
| gp_Vec & | theTangentU, | ||
| gp_Vec & | theTangentV, | ||
| gp_Vec & | theCurvatureU, | ||
| gp_Vec & | theCurvatureV, | ||
| gp_Vec & | theCurvatureUV ) const |
Calculates the point and derivatives till second order using pre-computed local parameters. This bypasses periodic normalization and local parameter calculation.
| [in] | theLocalU | pre-computed local U parameter: (U - SpanMid) / SpanHalfLen |
| [in] | theLocalV | pre-computed local V parameter: (V - SpanMid) / SpanHalfLen |
| [out] | thePoint | the result of calculation (the point on the surface) |
| [out] | theTangentU | tangent vector along U axis in the calculated point |
| [out] | theTangentV | tangent vector along V axis in the calculated point |
| [out] | theCurvatureU | curvature vector (2nd derivative on U) along U axis |
| [out] | theCurvatureV | curvature vector (2nd derivative on V) along V axis |
| [out] | theCurvatureUV | 2nd mixed derivative on U and V |
Verifies validity of the cache using parameters of the point.
| theParameterU | first parameter of the point placed in the span |
| theParameterV | second parameter of the point placed in the span |