0026595: Lost some comments in OCCT-code after cdl elimination
[occt.git] / src / GeomInt / GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx
1 // Created on: 1995-01-27
2 // Created by: Jacques GOUSSARD
3 // Copyright (c) 1995-1999 Matra Datavision
4 // Copyright (c) 1999-2014 OPEN CASCADE SAS
5 //
6 // This file is part of Open CASCADE Technology software library.
7 //
8 // This library is free software; you can redistribute it and/or modify it under
9 // the terms of the GNU Lesser General Public License version 2.1 as published
10 // by the Free Software Foundation, with special exception defined in the file
11 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 // distribution for complete text of the license and disclaimer of any warranty.
13 //
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
16
17 #ifndef _GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox_HeaderFile
18 #define _GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox_HeaderFile
19
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
22 #include <Standard_Handle.hxx>
23
24 #include <Standard_Address.hxx>
25 #include <Standard_Real.hxx>
26 #include <gp_Pnt.hxx>
27 #include <Standard_Boolean.hxx>
28 #include <gp_Vec.hxx>
29 #include <gp_Dir2d.hxx>
30 #include <math_FunctionSetWithDerivatives.hxx>
31 #include <Standard_Integer.hxx>
32 #include <math_Vector.hxx>
33 class StdFail_UndefinedDerivative;
34 class Adaptor3d_HSurface;
35 class Adaptor3d_HSurfaceTool;
36 class IntSurf_Quadric;
37 class IntSurf_QuadricTool;
38 class math_Matrix;
39 class gp_Pnt;
40 class gp_Vec;
41 class gp_Dir2d;
42
43
44
45 class GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox  : public math_FunctionSetWithDerivatives
46 {
47 public:
48
49   DEFINE_STANDARD_ALLOC
50
51   
52   Standard_EXPORT GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox();
53   
54   Standard_EXPORT GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox(const Handle(Adaptor3d_HSurface)& PS, const IntSurf_Quadric& IS);
55   
56   Standard_EXPORT GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox(const IntSurf_Quadric& IS);
57   
58     void Set (const Handle(Adaptor3d_HSurface)& PS);
59   
60     void SetImplicitSurface (const IntSurf_Quadric& IS);
61   
62     void Set (const Standard_Real Tolerance);
63   
64   Standard_EXPORT Standard_Integer NbVariables() const;
65   
66   Standard_EXPORT Standard_Integer NbEquations() const;
67   
68   Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
69   
70   Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D);
71   
72   Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& D);
73   
74     Standard_Real Root() const;
75   
76   //! Returns the value Tol so that if Abs(Func.Root())<Tol
77   //! the function is considered null.
78     Standard_Real Tolerance() const;
79   
80     const gp_Pnt& Point() const;
81   
82   Standard_EXPORT Standard_Boolean IsTangent();
83   
84     const gp_Vec& Direction3d();
85   
86     const gp_Dir2d& Direction2d();
87   
88     const Handle(Adaptor3d_HSurface)& PSurface() const;
89   
90     const IntSurf_Quadric& ISurface() const;
91
92
93
94
95 protected:
96
97
98
99
100
101 private:
102
103
104
105   Standard_Address surf;
106   Standard_Address func;
107   Standard_Real u;
108   Standard_Real v;
109   Standard_Real tol;
110   gp_Pnt pntsol;
111   Standard_Real valf;
112   Standard_Boolean computed;
113   Standard_Boolean tangent;
114   Standard_Real tgdu;
115   Standard_Real tgdv;
116   gp_Vec gradient;
117   Standard_Boolean derived;
118   gp_Vec d1u;
119   gp_Vec d1v;
120   gp_Vec d3d;
121   gp_Dir2d d2d;
122
123
124 };
125
126 #define ThePSurface Handle(Adaptor3d_HSurface)
127 #define ThePSurface_hxx <Adaptor3d_HSurface.hxx>
128 #define ThePSurfaceTool Adaptor3d_HSurfaceTool
129 #define ThePSurfaceTool_hxx <Adaptor3d_HSurfaceTool.hxx>
130 #define TheISurface IntSurf_Quadric
131 #define TheISurface_hxx <IntSurf_Quadric.hxx>
132 #define TheISurfaceTool IntSurf_QuadricTool
133 #define TheISurfaceTool_hxx <IntSurf_QuadricTool.hxx>
134 #define IntImp_ZerImpFunc GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox
135 #define IntImp_ZerImpFunc_hxx <GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox.hxx>
136
137 #include <IntImp_ZerImpFunc.lxx>
138
139 #undef ThePSurface
140 #undef ThePSurface_hxx
141 #undef ThePSurfaceTool
142 #undef ThePSurfaceTool_hxx
143 #undef TheISurface
144 #undef TheISurface_hxx
145 #undef TheISurfaceTool
146 #undef TheISurfaceTool_hxx
147 #undef IntImp_ZerImpFunc
148 #undef IntImp_ZerImpFunc_hxx
149
150
151
152
153 #endif // _GeomInt_TheZerImpFuncOfTheImpPrmSvSurfacesOfWLApprox_HeaderFile