Open CASCADE Technology Reference Manual 8.0.0
Loading...
Searching...
No Matches
Data Structures | Namespaces | Functions
GeomLProp_SurfaceUtils.hxx File Reference
#include <Adaptor3d_Surface.hxx>
#include <CSLib.hxx>
#include <CSLib_DerivativeStatus.hxx>
#include <Geom_Surface.hxx>
#include <LProp_NotDefined.hxx>
#include <LProp_Status.hxx>
#include <Standard_Handle.hxx>
#include <gp_Dir.hxx>
#include <gp_Pnt.hxx>
#include <gp_Vec.hxx>
#include <math_DirectPolynomialRoots.hxx>
#include <cmath>

Data Structures

struct  LProp_SurfaceUtils::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  LProp_SurfaceUtils::ToolAccess< Tool >
 Tool-based access policy: delegates to static Tool methods. Used for HLRBRep types where Tool class provides the interface. More...
 

Namespaces

namespace  LProp_SurfaceUtils
 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.
 

Functions

template<typename T >
T & LProp_SurfaceUtils::Deref (T &theObj)
 Dereference by-value or reference types (identity).
 
template<typename T >
T & LProp_SurfaceUtils::Deref (occ::handle< T > &theHandle)
 Dereference occ::handle types.
 
template<typename T >
const T & LProp_SurfaceUtils::Deref (const occ::handle< T > &theHandle)
 Dereference const occ::handle types.
 
void LProp_SurfaceUtils::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 LProp_SurfaceUtils::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 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.
 
bool LProp_SurfaceUtils::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 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.
 
bool LProp_SurfaceUtils::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 LProp_SurfaceUtils::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 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.
 
template<typename Access , typename Surface >
const gp_VecLProp_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.
 
template<typename Props >
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.
 
template<typename Props >
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.
 
template<typename Access , typename Props , typename Surface >
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.
 
template<typename Access , typename Props , typename Surface >
void LProp_SurfaceUtils::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 LProp_SurfaceUtils::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_DirLProp_SurfaceUtils::Normal (Props &theProps, const gp_Dir &theNormal)
 Normal: checks IsNormalDefined (via theProps), then returns normal.
 
template<typename Props >
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.
 
template<typename Props >
double LProp_SurfaceUtils::RequireCurvature (Props &theProps, double theValue)
 Require curvature to be defined, throw if not. Returns the given value.
 
template<typename Props >
bool LProp_SurfaceUtils::IsUmbilic (Props &theProps, double theMaxCurv, double theMinCurv)
 IsUmbilic: checks curvature, then compares min/max.
 
template<typename Props >
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.