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
6 // This file is part of Open CASCADE Technology software library.
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.
14 // Alternatively, this file may be used under the terms of Open CASCADE
15 // commercial license or contractual agreement.
17 #ifndef _BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox_HeaderFile
18 #define _BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox_HeaderFile
20 #include <Standard.hxx>
21 #include <Standard_DefineAlloc.hxx>
25 #include <gp_Dir2d.hxx>
26 #include <math_FunctionSetWithDerivatives.hxx>
27 #include <math_Vector.hxx>
28 class StdFail_UndefinedDerivative;
29 class BRepAdaptor_Surface;
30 class BRepApprox_SurfaceTool;
31 class IntSurf_Quadric;
32 class IntSurf_QuadricTool;
38 class BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox : public math_FunctionSetWithDerivatives
43 Standard_EXPORT BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox();
45 Standard_EXPORT BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox(
46 const BRepAdaptor_Surface& PS,
47 const IntSurf_Quadric& IS);
49 Standard_EXPORT BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox(const IntSurf_Quadric& IS);
51 void Set(const BRepAdaptor_Surface& PS);
53 void SetImplicitSurface(const IntSurf_Quadric& IS);
55 void Set(const Standard_Real Tolerance);
57 Standard_EXPORT Standard_Integer NbVariables() const;
59 Standard_EXPORT Standard_Integer NbEquations() const;
61 Standard_EXPORT Standard_Boolean Value(const math_Vector& X, math_Vector& F);
63 Standard_EXPORT Standard_Boolean Derivatives(const math_Vector& X, math_Matrix& D);
65 Standard_EXPORT Standard_Boolean Values(const math_Vector& X, math_Vector& F, math_Matrix& D);
67 Standard_Real Root() const;
69 //! Returns the value Tol so that if Abs(Func.Root())<Tol
70 //! the function is considered null.
71 Standard_Real Tolerance() const;
73 const gp_Pnt& Point() const;
75 Standard_EXPORT Standard_Boolean IsTangent();
77 const gp_Vec& Direction3d();
79 const gp_Dir2d& Direction2d();
81 const BRepAdaptor_Surface& PSurface() const;
83 const IntSurf_Quadric& ISurface() const;
87 Standard_Address surf;
88 Standard_Address func;
94 Standard_Boolean computed;
95 Standard_Boolean tangent;
99 Standard_Boolean derived;
106 #define ThePSurface BRepAdaptor_Surface
107 #define ThePSurface_hxx <BRepAdaptor_Surface.hxx>
108 #define ThePSurfaceTool BRepApprox_SurfaceTool
109 #define ThePSurfaceTool_hxx <BRepApprox_SurfaceTool.hxx>
110 #define TheISurface IntSurf_Quadric
111 #define TheISurface_hxx <IntSurf_Quadric.hxx>
112 #define TheISurfaceTool IntSurf_QuadricTool
113 #define TheISurfaceTool_hxx <IntSurf_QuadricTool.hxx>
114 #define IntImp_ZerImpFunc BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox
115 #define IntImp_ZerImpFunc_hxx <BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox.hxx>
117 #include <IntImp_ZerImpFunc.lxx>
120 #undef ThePSurface_hxx
121 #undef ThePSurfaceTool
122 #undef ThePSurfaceTool_hxx
124 #undef TheISurface_hxx
125 #undef TheISurfaceTool
126 #undef TheISurfaceTool_hxx
127 #undef IntImp_ZerImpFunc
128 #undef IntImp_ZerImpFunc_hxx
130 #endif // _BRepApprox_TheZerImpFuncOfTheImpPrmSvSurfacesOfApprox_HeaderFile