![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Template utility functions for SLProps surface local property computation. Provides access policies (DirectAccess, ToolAccess), surface bounds helpers, and shared algorithms for evaluating derivatives, tangents, normals, and curvatures. More...
Data Structures | |
| struct | DirectAccess |
| Direct access policy: calls D0/D1/D2 methods on the surface object. Works with occ::handle<T> and by-value surface types. More... | |
| struct | ToolAccess |
| Tool-based access policy: delegates to static Tool methods. Used for HLRBRep types where Tool class provides the interface. More... | |
Functions | |
| template<typename T > | |
| T & | Deref (T &theObj) |
| Dereference by-value or reference types (identity). | |
| template<typename T > | |
| T & | Deref (occ::handle< T > &theHandle) |
| Dereference occ::handle types. | |
| template<typename T > | |
| const T & | Deref (const occ::handle< T > &theHandle) |
| Dereference const occ::handle types. | |
| void | GetSurfBounds (const Geom_Surface &theSurf, double &theU1, double &theV1, double &theU2, double &theV2) |
| Get bounds from Geom_Surface (uses Bounds method with U1, U2, V1, V2 order). | |
| void | GetSurfBounds (const Adaptor3d_Surface &theSurf, double &theU1, double &theV1, double &theU2, double &theV2) |
| Get bounds from Adaptor3d_Surface (uses individual parameter methods). Also works for BRepAdaptor_Surface which inherits from Adaptor3d_Surface. | |
| template<typename Access , typename Surface > | |
| void | EvalSurfDerivatives (Surface &theSurf, double theU, double theV, int theOrder, gp_Pnt &thePnt, gp_Vec &theD1u, gp_Vec &theD1v, gp_Vec &theD2u, gp_Vec &theD2v, gp_Vec &theDuv) |
| Evaluate surface derivatives at parameters (theU, theV) up to specified order. | |
| bool | FindSurfTangentOrder (const gp_Vec &theD1, const gp_Vec &theD2, int theCN, double theTolSq, int &theOrder, LProp_Status &theStatus) |
| Check if the surface tangent is defined for a given derivative direction. Searches for the first non-null derivative in either U or V direction. | |
| template<typename Access , typename Surface > | |
| void | ComputeSurfTangent (Surface &theSurf, double theU, double theV, const gp_Vec &theFirstDeriv, const gp_Vec &theSecDeriv, int theSigOrder, bool theIsU, gp_Dir &theDir) |
| Compute surface tangent direction with sign correction for higher-order derivatives. When the first significant derivative has order > 1, the sign is determined by comparing with the chord direction near the point. | |
| bool | ComputeSurfNormal (const gp_Vec &theD1u, const gp_Vec &theD1v, double theLinTol, gp_Dir &theNormal) |
| Check if surface normal is defined, and compute it via CSLib::Normal. | |
| bool | ComputeSurfCurvatures (const gp_Vec &theD1u, const gp_Vec &theD1v, const gp_Vec &theD2u, const gp_Vec &theD2v, const gp_Vec &theDuv, const gp_Dir &theNormal, double &theMinCurv, double &theMaxCurv, gp_Dir &theDirMin, gp_Dir &theDirMax, double &theMeanCurv, double &theGausCurv) |
| Compute principal curvatures and directions via fundamental forms. Solves the eigenvalue problem for the shape operator using first and second fundamental form coefficients. | |
| template<typename Access , typename Surface > | |
| void | SetParameters (Surface &theSurf, double theU, double theV, double &theStoredU, double &theStoredV, int theDerOrder, gp_Pnt &thePnt, gp_Vec &theD1u, gp_Vec &theD1v, gp_Vec &theD2u, gp_Vec &theD2v, gp_Vec &theDuv, LProp_Status &theUTanSt, LProp_Status &theVTanSt, LProp_Status &theNormSt, LProp_Status &theCurvSt) |
| SetParameters: sets parameters, evaluates derivatives, resets all statuses. | |
| template<typename Access , typename Surface > | |
| const gp_Vec & | EnsureSurfDeriv (Surface &theSurf, double theU, double theV, int &theDerOrder, int theRequired, gp_Pnt &thePnt, gp_Vec &theD1u, gp_Vec &theD1v, gp_Vec &theD2u, gp_Vec &theD2v, gp_Vec &theDuv, const gp_Vec &theResult) |
| Ensure surface derivatives up to the required order. Returns the specified result field. | |
| template<typename Props > | |
| bool | IsTangentUDefined (Props &theProps, int theCN, double theLinTol, int &theSigOrder, LProp_Status &theTanStatus) |
| IsTangentUDefined: checks U tangent status, then searches via D1U/D2U. | |
| template<typename Props > | |
| bool | IsTangentVDefined (Props &theProps, int theCN, double theLinTol, int &theSigOrder, LProp_Status &theTanStatus) |
| IsTangentVDefined: checks V tangent status, then searches via D1V/D2V. | |
| template<typename Access , typename Props , typename Surface > | |
| void | TangentU (Props &theProps, Surface &theSurf, double theU, double theV, const gp_Vec &theD1u, const gp_Vec &theD2u, int theSigOrder, gp_Dir &theDir) |
| TangentU: checks IsTangentUDefined, then computes U tangent direction. | |
| template<typename Access , typename Props , typename Surface > | |
| void | TangentV (Props &theProps, Surface &theSurf, double theU, double theV, const gp_Vec &theD1v, const gp_Vec &theD2v, int theSigOrder, gp_Dir &theDir) |
| TangentV: checks IsTangentVDefined, then computes V tangent direction. | |
| bool | IsNormalDefined (const gp_Vec &theD1u, const gp_Vec &theD1v, double theLinTol, gp_Dir &theNormal, LProp_Status &theNormStatus) |
| IsNormalDefined: checks normal status, then computes via CSLib. | |
| template<typename Props > | |
| const gp_Dir & | Normal (Props &theProps, const gp_Dir &theNormal) |
| Normal: checks IsNormalDefined (via theProps), then returns normal. | |
| template<typename Props > | |
| bool | IsCurvatureDefined (Props &theProps, int theCN, int &theDerOrder, const gp_Vec &theD1u, const gp_Vec &theD1v, const gp_Vec &theD2u, const gp_Vec &theD2v, const gp_Vec &theDuv, const gp_Dir &theNormal, double &theMinCurv, double &theMaxCurv, gp_Dir &theDirMin, gp_Dir &theDirMax, double &theMeanCurv, double &theGausCurv, LProp_Status &theCurvStatus) |
| IsCurvatureDefined: full check including continuity, normal, tangents, and curvature computation. | |
| template<typename Props > | |
| double | RequireCurvature (Props &theProps, double theValue) |
| Require curvature to be defined, throw if not. Returns the given value. | |
| template<typename Props > | |
| bool | IsUmbilic (Props &theProps, double theMaxCurv, double theMinCurv) |
| IsUmbilic: checks curvature, then compares min/max. | |
| template<typename Props > | |
| void | CurvatureDirections (Props &theProps, const gp_Dir &theDirMax, const gp_Dir &theDirMin, gp_Dir &theMax, gp_Dir &theMin) |
| CurvatureDirections: checks curvature, then returns max/min directions. | |
Template utility functions for SLProps surface local property computation. Provides access policies (DirectAccess, ToolAccess), surface bounds helpers, and shared algorithms for evaluating derivatives, tangents, normals, and curvatures.
|
inline |
Compute principal curvatures and directions via fundamental forms. Solves the eigenvalue problem for the shape operator using first and second fundamental form coefficients.
| [in] | theD1u | first U derivative |
| [in] | theD1v | first V derivative |
| [in] | theD2u | second U derivative |
| [in] | theD2v | second V derivative |
| [in] | theDuv | mixed UV derivative |
| [in] | theNormal | surface normal direction |
| [out] | theMinCurv | minimum principal curvature |
| [out] | theMaxCurv | maximum principal curvature |
| [out] | theDirMin | direction of minimum curvature |
| [out] | theDirMax | direction of maximum curvature |
| [out] | theMeanCurv | mean curvature |
| [out] | theGausCurv | Gaussian curvature |
|
inline |
Check if surface normal is defined, and compute it via CSLib::Normal.
| [in] | theD1u | first U derivative |
| [in] | theD1v | first V derivative |
| [in] | theLinTol | linear tolerance |
| [out] | theNormal | computed normal direction (if defined) |
| void LProp_SurfaceUtils::ComputeSurfTangent | ( | Surface & | theSurf, |
| double | theU, | ||
| double | theV, | ||
| const gp_Vec & | theFirstDeriv, | ||
| const gp_Vec & | theSecDeriv, | ||
| int | theSigOrder, | ||
| bool | theIsU, | ||
| gp_Dir & | theDir ) |
Compute surface tangent direction with sign correction for higher-order derivatives. When the first significant derivative has order > 1, the sign is determined by comparing with the chord direction near the point.
| [in,out] | theSurf | surface object |
| [in] | theU | current U parameter |
| [in] | theV | current V parameter |
| [in] | theFirstDeriv | first derivative in this direction (D1U or D1V) |
| [in] | theSecDeriv | second derivative in this direction (D2U or D2V) |
| [in] | theSigOrder | order of first significant derivative |
| [in] | theIsU | true for U direction, false for V direction |
| [out] | theDir | computed tangent direction |
| void LProp_SurfaceUtils::CurvatureDirections | ( | Props & | theProps, |
| const gp_Dir & | theDirMax, | ||
| const gp_Dir & | theDirMin, | ||
| gp_Dir & | theMax, | ||
| gp_Dir & | theMin ) |
CurvatureDirections: checks curvature, then returns max/min directions.
| const T & LProp_SurfaceUtils::Deref | ( | const occ::handle< T > & | theHandle | ) |
Dereference const occ::handle types.
| T & LProp_SurfaceUtils::Deref | ( | occ::handle< T > & | theHandle | ) |
Dereference occ::handle types.
| T & LProp_SurfaceUtils::Deref | ( | T & | theObj | ) |
Dereference by-value or reference types (identity).
| const gp_Vec & LProp_SurfaceUtils::EnsureSurfDeriv | ( | Surface & | theSurf, |
| double | theU, | ||
| double | theV, | ||
| int & | theDerOrder, | ||
| int | theRequired, | ||
| gp_Pnt & | thePnt, | ||
| gp_Vec & | theD1u, | ||
| gp_Vec & | theD1v, | ||
| gp_Vec & | theD2u, | ||
| gp_Vec & | theD2v, | ||
| gp_Vec & | theDuv, | ||
| const gp_Vec & | theResult ) |
Ensure surface derivatives up to the required order. Returns the specified result field.
| void LProp_SurfaceUtils::EvalSurfDerivatives | ( | Surface & | theSurf, |
| double | theU, | ||
| double | theV, | ||
| int | theOrder, | ||
| gp_Pnt & | thePnt, | ||
| gp_Vec & | theD1u, | ||
| gp_Vec & | theD1v, | ||
| gp_Vec & | theD2u, | ||
| gp_Vec & | theD2v, | ||
| gp_Vec & | theDuv ) |
Evaluate surface derivatives at parameters (theU, theV) up to specified order.
| [in,out] | theSurf | surface object |
| [in] | theU | U parameter value |
| [in] | theV | V parameter value |
| [in] | theOrder | maximum derivative order (0-2) |
| [out] | thePnt | evaluated point |
| [out] | theD1u | first U derivative |
| [out] | theD1v | first V derivative |
| [out] | theD2u | second U derivative |
| [out] | theD2v | second V derivative |
| [out] | theDuv | mixed UV derivative |
|
inline |
Check if the surface tangent is defined for a given derivative direction. Searches for the first non-null derivative in either U or V direction.
| [in] | theD1 | first derivative (D1U for U direction, D1V for V direction) |
| [in] | theD2 | second derivative (D2U for U direction, D2V for V direction) |
| [in] | theCN | continuity order |
| [in] | theTolSq | squared linear tolerance |
| [out] | theOrder | order of first significant derivative |
| [out] | theStatus | resulting tangent status |
|
inline |
Get bounds from Adaptor3d_Surface (uses individual parameter methods). Also works for BRepAdaptor_Surface which inherits from Adaptor3d_Surface.
|
inline |
Get bounds from Geom_Surface (uses Bounds method with U1, U2, V1, V2 order).
| bool LProp_SurfaceUtils::IsCurvatureDefined | ( | Props & | theProps, |
| int | theCN, | ||
| int & | theDerOrder, | ||
| const gp_Vec & | theD1u, | ||
| const gp_Vec & | theD1v, | ||
| const gp_Vec & | theD2u, | ||
| const gp_Vec & | theD2v, | ||
| const gp_Vec & | theDuv, | ||
| const gp_Dir & | theNormal, | ||
| double & | theMinCurv, | ||
| double & | theMaxCurv, | ||
| gp_Dir & | theDirMin, | ||
| gp_Dir & | theDirMax, | ||
| double & | theMeanCurv, | ||
| double & | theGausCurv, | ||
| LProp_Status & | theCurvStatus ) |
IsCurvatureDefined: full check including continuity, normal, tangents, and curvature computation.
|
inline |
IsNormalDefined: checks normal status, then computes via CSLib.
| bool LProp_SurfaceUtils::IsTangentUDefined | ( | Props & | theProps, |
| int | theCN, | ||
| double | theLinTol, | ||
| int & | theSigOrder, | ||
| LProp_Status & | theTanStatus ) |
IsTangentUDefined: checks U tangent status, then searches via D1U/D2U.
| bool LProp_SurfaceUtils::IsTangentVDefined | ( | Props & | theProps, |
| int | theCN, | ||
| double | theLinTol, | ||
| int & | theSigOrder, | ||
| LProp_Status & | theTanStatus ) |
IsTangentVDefined: checks V tangent status, then searches via D1V/D2V.
IsUmbilic: checks curvature, then compares min/max.
Normal: checks IsNormalDefined (via theProps), then returns normal.
Require curvature to be defined, throw if not. Returns the given value.
| void LProp_SurfaceUtils::SetParameters | ( | Surface & | theSurf, |
| double | theU, | ||
| double | theV, | ||
| double & | theStoredU, | ||
| double & | theStoredV, | ||
| int | theDerOrder, | ||
| gp_Pnt & | thePnt, | ||
| gp_Vec & | theD1u, | ||
| gp_Vec & | theD1v, | ||
| gp_Vec & | theD2u, | ||
| gp_Vec & | theD2v, | ||
| gp_Vec & | theDuv, | ||
| LProp_Status & | theUTanSt, | ||
| LProp_Status & | theVTanSt, | ||
| LProp_Status & | theNormSt, | ||
| LProp_Status & | theCurvSt ) |
SetParameters: sets parameters, evaluates derivatives, resets all statuses.
| void LProp_SurfaceUtils::TangentU | ( | Props & | theProps, |
| Surface & | theSurf, | ||
| double | theU, | ||
| double | theV, | ||
| const gp_Vec & | theD1u, | ||
| const gp_Vec & | theD2u, | ||
| int | theSigOrder, | ||
| gp_Dir & | theDir ) |
TangentU: checks IsTangentUDefined, then computes U tangent direction.