0024002: Overall code and build procedure refactoring -- automatic
[occt.git] / src / BRepApprox / BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx
CommitLineData
42cf5bc1 1// Created on: 1995-06-06
2// Created by: Jean Yves LEBEY
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 _BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox_HeaderFile
18#define _BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox_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>
33class StdFail_UndefinedDerivative;
34class BRepAdaptor_Surface;
35class BRepApprox_SurfaceTool;
36class IntSurf_Quadric;
37class IntSurf_QuadricTool;
38class math_Matrix;
39class gp_Pnt;
40class gp_Vec;
41class gp_Dir2d;
42
43
44
45class BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox : public math_FunctionSetWithDerivatives
46{
47public:
48
49 DEFINE_STANDARD_ALLOC
50
51
52 Standard_EXPORT BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox();
53
54 Standard_EXPORT BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox(const BRepAdaptor_Surface& PS, const IntSurf_Quadric& IS);
55
56 Standard_EXPORT BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox(const IntSurf_Quadric& IS);
57
58 void Set (const BRepAdaptor_Surface& 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 Standard_Real Tolerance() const;
77
78 const gp_Pnt& Point() const;
79
80 Standard_EXPORT Standard_Boolean IsTangent();
81
82 const gp_Vec& Direction3d();
83
84 const gp_Dir2d& Direction2d();
85
86 const BRepAdaptor_Surface& PSurface() const;
87
88 const IntSurf_Quadric& ISurface() const;
89
90
91
92
93protected:
94
95
96
97
98
99private:
100
101
102
103 Standard_Address surf;
104 Standard_Address func;
105 Standard_Real u;
106 Standard_Real v;
107 Standard_Real tol;
108 gp_Pnt pntsol;
109 Standard_Real valf;
110 Standard_Boolean computed;
111 Standard_Boolean tangent;
112 Standard_Real tgdu;
113 Standard_Real tgdv;
114 gp_Vec gradient;
115 Standard_Boolean derived;
116 gp_Vec d1u;
117 gp_Vec d1v;
118 gp_Vec d3d;
119 gp_Dir2d d2d;
120
121
122};
123
124#define ThePSurface BRepAdaptor_Surface
125#define ThePSurface_hxx <BRepAdaptor_Surface.hxx>
126#define ThePSurfaceTool BRepApprox_SurfaceTool
127#define ThePSurfaceTool_hxx <BRepApprox_SurfaceTool.hxx>
128#define TheISurface IntSurf_Quadric
129#define TheISurface_hxx <IntSurf_Quadric.hxx>
130#define TheISurfaceTool IntSurf_QuadricTool
131#define TheISurfaceTool_hxx <IntSurf_QuadricTool.hxx>
132#define IntImp_ZerImpFunc BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox
133#define IntImp_ZerImpFunc_hxx <BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx>
134
135#include <IntImp_ZerImpFunc.lxx>
136
137#undef ThePSurface
138#undef ThePSurface_hxx
139#undef ThePSurfaceTool
140#undef ThePSurfaceTool_hxx
141#undef TheISurface
142#undef TheISurface_hxx
143#undef TheISurfaceTool
144#undef TheISurfaceTool_hxx
145#undef IntImp_ZerImpFunc
146#undef IntImp_ZerImpFunc_hxx
147
148
149
150
151#endif // _BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox_HeaderFile