File indexing completed on 2025-01-18 10:03:22
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _Contap_SurfFunction_HeaderFile
0018 #define _Contap_SurfFunction_HeaderFile
0019
0020 #include <Adaptor3d_Surface.hxx>
0021 #include <Contap_TFunction.hxx>
0022 #include <gp_Dir.hxx>
0023 #include <gp_Pnt.hxx>
0024 #include <gp_Dir2d.hxx>
0025 #include <gp_Vec.hxx>
0026 #include <math_FunctionSetWithDerivatives.hxx>
0027 #include <math_Vector.hxx>
0028
0029 class math_Matrix;
0030
0031
0032
0033
0034
0035
0036 class Contap_SurfFunction : public math_FunctionSetWithDerivatives
0037 {
0038 public:
0039
0040 DEFINE_STANDARD_ALLOC
0041
0042
0043 Standard_EXPORT Contap_SurfFunction();
0044
0045 Standard_EXPORT void Set (const Handle(Adaptor3d_Surface)& S);
0046
0047 void Set (const gp_Pnt& Eye);
0048
0049 void Set (const gp_Dir& Dir);
0050
0051 void Set (const gp_Dir& Dir, const Standard_Real Angle);
0052
0053 void Set (const gp_Pnt& Eye, const Standard_Real Angle);
0054
0055 void Set (const Standard_Real Tolerance);
0056
0057
0058 Standard_EXPORT Standard_Integer NbVariables() const;
0059
0060
0061 Standard_EXPORT Standard_Integer NbEquations() const;
0062
0063
0064 Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
0065
0066
0067 Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D);
0068
0069 Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D);
0070
0071
0072
0073 Standard_Real Root() const;
0074
0075
0076
0077 Standard_Real Tolerance() const;
0078
0079
0080 const gp_Pnt& Point() const;
0081
0082 Standard_EXPORT Standard_Boolean IsTangent();
0083
0084 const gp_Vec& Direction3d();
0085
0086 const gp_Dir2d& Direction2d();
0087
0088 Contap_TFunction FunctionType() const;
0089
0090 const gp_Pnt& Eye() const;
0091
0092 const gp_Dir& Direction() const;
0093
0094 Standard_Real Angle() const;
0095
0096 const Handle(Adaptor3d_Surface)& Surface() const;
0097
0098
0099 const Handle(Adaptor3d_Surface)& PSurface() const
0100 {
0101 return Surface();
0102 }
0103
0104
0105 protected:
0106
0107
0108
0109
0110
0111 private:
0112
0113
0114
0115 Handle(Adaptor3d_Surface) mySurf;
0116 Standard_Real myMean;
0117 Contap_TFunction myType;
0118 gp_Dir myDir;
0119 gp_Pnt myEye;
0120 Standard_Real myAng;
0121 Standard_Real myCosAng;
0122 Standard_Real tol;
0123 gp_Pnt solpt;
0124 Standard_Real valf;
0125 Standard_Real Usol;
0126 Standard_Real Vsol;
0127 Standard_Real Fpu;
0128 Standard_Real Fpv;
0129 gp_Dir2d d2d;
0130 gp_Vec d3d;
0131 Standard_Boolean tangent;
0132 Standard_Boolean computed;
0133 Standard_Boolean derived;
0134
0135
0136 };
0137
0138
0139 #include <Contap_SurfFunction.lxx>
0140
0141
0142
0143
0144
0145 #endif