![]() |
Open CASCADE Technology Reference Manual 8.0.0
|
Provides functions for basic geometric computation on curves and surfaces. More...
#include <CSLib.hxx>
Static Public Member Functions | |
| static void | Normal (const gp_Vec &theD1U, const gp_Vec &theD1V, double theSinTol, CSLib_DerivativeStatus &theStatus, gp_Dir &theNormal) |
| Computes the normal direction of a surface as the cross product D1U ^ D1V. | |
| static void | Normal (const gp_Vec &theD1U, const gp_Vec &theD1V, const gp_Vec &theD2U, const gp_Vec &theD2V, const gp_Vec &theD2UV, double theSinTol, bool &theDone, CSLib_NormalStatus &theStatus, gp_Dir &theNormal) |
| Computes an approximate normal direction at a singular point using second derivatives. | |
| static void | Normal (const gp_Vec &theD1U, const gp_Vec &theD1V, double theMagTol, CSLib_NormalStatus &theStatus, gp_Dir &theNormal) |
| Computes the normal direction using magnitude tolerance. | |
| static void | Normal (int theMaxOrder, const NCollection_Array2< gp_Vec > &theDerNUV, double theMagTol, double theU, double theV, double theUmin, double theUmax, double theVmin, double theVmax, CSLib_NormalStatus &theStatus, gp_Dir &theNormal, int &theOrderU, int &theOrderV) |
| Computes the normal at a singular point using higher-order derivatives. | |
| static gp_Vec | DNNUV (int theNu, int theNv, const NCollection_Array2< gp_Vec > &theDerSurf) |
| Computes the derivative of order (theNu, theNv) of the non-normalized normal vector. | |
| static gp_Vec | DNNUV (int theNu, int theNv, const NCollection_Array2< gp_Vec > &theDerSurf1, const NCollection_Array2< gp_Vec > &theDerSurf2) |
| Computes the derivative of the non-normalized vector N = dS1/du ^ dS2/dv. | |
| static gp_Vec | DNNormal (int theNu, int theNv, const NCollection_Array2< gp_Vec > &theDerNUV, int theIduref=0, int theIdvref=0) |
| Computes the derivative of order (theNu, theNv) of the normalized normal vector. | |
Provides functions for basic geometric computation on curves and surfaces.
This package implements functions for computing surface normals and their derivatives at parametric points. The tolerance criteria used are Resolution from gp and RealEpsilon from double.
Key functionality:
|
static |
Computes the derivative of order (theNu, theNv) of the normalized normal vector.
| [in] | theNu | Derivative order in U direction |
| [in] | theNv | Derivative order in V direction |
| [in] | theDerNUV | Array of derivatives of the non-normalized normal. Contains derivatives d^(i+j)(D1U^D1V)/(du^i * dv^j) for i = theIduref..theNu+theIduref, j = theIdvref..theNv+theIdvref |
| [in] | theIduref | Reference index offset in U (default 0 for regular cases) |
| [in] | theIdvref | Reference index offset in V (default 0 for regular cases) |
|
static |
Computes the derivative of order (theNu, theNv) of the non-normalized normal vector.
The non-normalized normal is N = dS/du ^ dS/dv. This function computes d^(Nu+Nv)N / (du^Nu * dv^Nv).
| [in] | theNu | Derivative order in U direction |
| [in] | theNv | Derivative order in V direction |
| [in] | theDerSurf | Surface derivatives array where theDerSurf(i,j) = d^(i+j)S/(du^i * dv^j) for i = 0..theNu+1, j = 0..theNv+1 |
|
static |
Computes the derivative of the non-normalized vector N = dS1/du ^ dS2/dv.
This variant is used for osculating surfaces where the normal is computed from derivatives of two different surfaces.
| [in] | theNu | Derivative order in U direction |
| [in] | theNv | Derivative order in V direction |
| [in] | theDerSurf1 | Derivatives of the first surface S1 |
| [in] | theDerSurf2 | Derivatives of the second surface S2 |
|
static |
Computes an approximate normal direction at a singular point using second derivatives.
When the standard method cannot compute the normal (D1U ^ D1V is null or too small), this method uses a limited Taylor expansion: N(u0+du, v0+dv) = N0 + dN/du * du + dN/dv * dv + O(du^2, dv^2)
The normal is approximated from dN/du and dN/dv where N = D1U ^ D1V.
| [in] | theD1U | First derivative in U direction |
| [in] | theD1V | First derivative in V direction |
| [in] | theD2U | Second derivative in U direction (d^2S/du^2) |
| [in] | theD2V | Second derivative in V direction (d^2S/dv^2) |
| [in] | theD2UV | Mixed second derivative (d^2S/dudv) |
| [in] | theSinTol | Sine tolerance for parallelism check |
| [out] | theDone | True if normal was successfully computed |
| [out] | theStatus | Result status with detailed information |
| [out] | theNormal | Computed normal direction (valid only if theDone is true) |
|
static |
Computes the normal direction using magnitude tolerance.
A simpler version that checks if the cross product magnitude and derivative magnitudes exceed the given tolerance.
| [in] | theD1U | First derivative in U direction |
| [in] | theD1V | First derivative in V direction |
| [in] | theMagTol | Magnitude tolerance for singularity detection |
| [out] | theStatus | Result status (CSLib_Defined or CSLib_Singular) |
| [out] | theNormal | Computed normal direction (valid only if theStatus == CSLib_Defined) |
|
static |
Computes the normal direction of a surface as the cross product D1U ^ D1V.
The normal is undefined if:
To check parallelism, the sine of the angle between D1U and D1V is computed and compared with theSinTol.
| [in] | theD1U | First derivative in U direction |
| [in] | theD1V | First derivative in V direction |
| [in] | theSinTol | Sine tolerance for parallelism check |
| [out] | theStatus | Result status indicating success or failure reason |
| [out] | theNormal | Computed normal direction (valid only if theStatus == CSLib_Done) |
|
static |
Computes the normal at a singular point using higher-order derivatives.
Finds the first order k0 where the derivatives of N = D1U ^ D1V become non-null and collinear, ensuring a unique normal direction.
| [in] | theMaxOrder | Maximum derivative order to examine |
| [in] | theDerNUV | Array of derivatives of N (indices correspond to derivative orders) |
| [in] | theMagTol | Magnitude tolerance |
| [in] | theU,theV | Current parameter values |
| [in] | theUmin,theUmax,theVmin,theVmax | Parameter bounds |
| [out] | theStatus | Result status |
| [out] | theNormal | Computed normal direction |
| [out] | theOrderU,theOrderV | Orders of the first non-null derivative used |