Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/opencascade/HLRBRep_SLProps.hxx was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // Created on: 1992-10-14
0002 // Created by: Christophe MARION
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _HLRBRep_SLProps_HeaderFile
0018 #define _HLRBRep_SLProps_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <Standard_Integer.hxx>
0024 #include <gp_Pnt.hxx>
0025 #include <gp_Vec.hxx>
0026 #include <gp_Dir.hxx>
0027 #include <LProp_Status.hxx>
0028 class LProp_BadContinuity;
0029 class Standard_DomainError;
0030 class Standard_OutOfRange;
0031 class LProp_NotDefined;
0032 class HLRBRep_SLPropsATool;
0033 class gp_Pnt;
0034 class gp_Vec;
0035 class gp_Dir;
0036 
0037 
0038 
0039 class HLRBRep_SLProps 
0040 {
0041 public:
0042 
0043   DEFINE_STANDARD_ALLOC
0044 
0045   
0046   //! Initializes the local properties of the surface <S>
0047   //! for the parameter values (<U>, <V>).
0048   //! The current point and the derivatives are
0049   //! computed at the same time, which allows an
0050   //! optimization of the computation time.
0051   //! <N> indicates the maximum number of derivations to
0052   //! be done (0, 1, or 2). For example, to compute
0053   //! only the tangent, N should be equal to 1.
0054   //! <Resolution> is the linear tolerance (it is used to test
0055   //! if a vector is null).
0056   Standard_EXPORT HLRBRep_SLProps(const Standard_Address& S, const Standard_Real U, const Standard_Real V, const Standard_Integer N, const Standard_Real Resolution);
0057   
0058   //! idem as previous constructor but without setting the value
0059   //! of parameters <U> and <V>.
0060   Standard_EXPORT HLRBRep_SLProps(const Standard_Address& S, const Standard_Integer N, const Standard_Real Resolution);
0061   
0062   //! idem as previous constructor but without setting the value
0063   //! of parameters <U> and <V> and the surface.
0064   //! the surface can have an empty constructor.
0065   Standard_EXPORT HLRBRep_SLProps(const Standard_Integer N, const Standard_Real Resolution);
0066   
0067   //! Initializes the local properties of the surface S
0068   //! for the new surface.
0069   Standard_EXPORT void SetSurface (const Standard_Address& S);
0070   
0071   //! Initializes the local properties of the surface S
0072   //! for the new parameter values (<U>, <V>).
0073   Standard_EXPORT void SetParameters (const Standard_Real U, const Standard_Real V);
0074   
0075   //! Returns the point.
0076   Standard_EXPORT const gp_Pnt& Value() const;
0077   
0078   //! Returns the first U derivative.
0079   //! The derivative is computed if it has not been yet.
0080   Standard_EXPORT const gp_Vec& D1U();
0081   
0082   //! Returns the first V derivative.
0083   //! The derivative is computed if it has not been yet.
0084   Standard_EXPORT const gp_Vec& D1V();
0085   
0086   //! Returns the second U derivatives
0087   //! The derivative is computed if it has not been yet.
0088   Standard_EXPORT const gp_Vec& D2U();
0089   
0090   //! Returns the second V derivative.
0091   //! The derivative is computed if it has not been yet.
0092   Standard_EXPORT const gp_Vec& D2V();
0093   
0094   //! Returns the second UV cross-derivative.
0095   //! The derivative is computed if it has not been yet.
0096   Standard_EXPORT const gp_Vec& DUV();
0097   
0098   //! returns True if the U tangent is defined.
0099   //! For example, the tangent is not defined if the
0100   //! two first U derivatives are null.
0101   Standard_EXPORT Standard_Boolean IsTangentUDefined();
0102   
0103   //! Returns the tangent direction <D> on the iso-V.
0104   Standard_EXPORT void TangentU (gp_Dir& D);
0105   
0106   //! returns if the V tangent is defined.
0107   //! For example, the tangent is not defined if the
0108   //! two first V derivatives are null.
0109   Standard_EXPORT Standard_Boolean IsTangentVDefined();
0110   
0111   //! Returns the tangent direction <D> on the iso-V.
0112   Standard_EXPORT void TangentV (gp_Dir& D);
0113   
0114   //! Tells if the normal is defined.
0115   Standard_EXPORT Standard_Boolean IsNormalDefined();
0116   
0117   //! Returns the normal direction.
0118   Standard_EXPORT const gp_Dir& Normal();
0119   
0120   //! returns True if the curvature is defined.
0121   Standard_EXPORT Standard_Boolean IsCurvatureDefined();
0122   
0123   //! returns True if the point is umbilic (i.e. if the
0124   //! curvature is constant).
0125   Standard_EXPORT Standard_Boolean IsUmbilic();
0126   
0127   //! Returns the maximum curvature
0128   Standard_EXPORT Standard_Real MaxCurvature();
0129   
0130   //! Returns the minimum curvature
0131   Standard_EXPORT Standard_Real MinCurvature();
0132   
0133   //! Returns the direction of the maximum and minimum curvature
0134   //! <MaxD> and <MinD>
0135   Standard_EXPORT void CurvatureDirections (gp_Dir& MaxD, gp_Dir& MinD);
0136   
0137   //! Returns the mean curvature.
0138   Standard_EXPORT Standard_Real MeanCurvature();
0139   
0140   //! Returns the Gaussian curvature
0141   Standard_EXPORT Standard_Real GaussianCurvature();
0142 
0143 
0144 
0145 
0146 protected:
0147 
0148 
0149 
0150 
0151 
0152 private:
0153 
0154 
0155 
0156   Standard_Address mySurf;
0157   Standard_Real myU;
0158   Standard_Real myV;
0159   Standard_Integer myDerOrder;
0160   Standard_Integer myCN;
0161   Standard_Real myLinTol;
0162   gp_Pnt myPnt;
0163   gp_Vec myD1u;
0164   gp_Vec myD1v;
0165   gp_Vec myD2u;
0166   gp_Vec myD2v;
0167   gp_Vec myDuv;
0168   gp_Dir myNormal;
0169   Standard_Real myMinCurv;
0170   Standard_Real myMaxCurv;
0171   gp_Dir myDirMinCurv;
0172   gp_Dir myDirMaxCurv;
0173   Standard_Real myMeanCurv;
0174   Standard_Real myGausCurv;
0175   Standard_Integer mySignificantFirstDerivativeOrderU;
0176   Standard_Integer mySignificantFirstDerivativeOrderV;
0177   LProp_Status myUTangentStatus;
0178   LProp_Status myVTangentStatus;
0179   LProp_Status myNormalStatus;
0180   LProp_Status myCurvatureStatus;
0181 
0182 
0183 };
0184 
0185 
0186 
0187 
0188 
0189 
0190 
0191 #endif // _HLRBRep_SLProps_HeaderFile