1 // Created by: Julia GERASIMOVA
2 // Copyright (c) 2015 OPEN CASCADE SAS
3 //
4 // This file is part of Open CASCADE Technology software library.
5 //
6 // This library is free software; you can redistribute it and/or modify it under
7 // the terms of the GNU Lesser General Public License version 2.1 as published
8 // by the Free Software Foundation, with special exception defined in the file
9 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
10 // distribution for complete text of the license and disclaimer of any warranty.
11 //
12 // Alternatively, this file may be used under the terms of Open CASCADE
13 // commercial license or contractual agreement.
14 
15 #ifndef _BlendFunc_GenChamfInv_HeaderFile
16 #define _BlendFunc_GenChamfInv_HeaderFile
17 
18 #include <Adaptor3d_Surface.hxx>
19 #include <BlendFunc_Corde.hxx>
20 #include <Blend_FuncInv.hxx>
21 #include <math_Vector.hxx>
22 
23 class math_Matrix;
24 
25 //! Deferred class for a function used to compute a general chamfer on a surface's boundary
26 class BlendFunc_GenChamfInv  : public Blend_FuncInv
27 {
28 public:
29 
30   DEFINE_STANDARD_ALLOC
31 
32   Standard_EXPORT BlendFunc_GenChamfInv(const Handle(Adaptor3d_Surface)& S1,
33                                         const Handle(Adaptor3d_Surface)& S2,
34                                         const Handle(Adaptor3d_Curve)& C);
35 
36   Standard_EXPORT virtual void Set (const Standard_Boolean OnFirst,
37                                     const Handle(Adaptor2d_Curve2d)& COnSurf) Standard_OVERRIDE;
38 
39   Standard_EXPORT void GetTolerance (math_Vector& Tolerance,
40                                      const Standard_Real Tol) const Standard_OVERRIDE;
41 
42   Standard_EXPORT void GetBounds (math_Vector& InfBound,
43                                   math_Vector& SupBound) const Standard_OVERRIDE;
44 
45   //! returns the number of equations of the function.
46   Standard_EXPORT Standard_Integer NbEquations() const Standard_OVERRIDE;
47 
48   //! returns the values <F> of the functions and the derivatives
49   //! <D> for the variable <X>.
50   //! Returns True if the computation was done successfully,
51   //! False otherwise.
52   Standard_EXPORT Standard_Boolean Values (const math_Vector& X,
53                                            math_Vector& F,
54                                            math_Matrix& D) Standard_OVERRIDE;
55 
56   Standard_EXPORT virtual void Set (const Standard_Real Dist1,
57                                     const Standard_Real Dist2,
58                                     const Standard_Integer Choix) = 0;
59 
60 
61 
62 
63 protected:
64 
65   Handle(Adaptor3d_Surface) surf1;
66   Handle(Adaptor3d_Surface) surf2;
67   Handle(Adaptor3d_Curve) curv;
68   Handle(Adaptor2d_Curve2d) csurf;
69   Standard_Integer choix;
70   Standard_Boolean first;
71 
72 
73 private:
74 
75 
76 };
77 
78 
79 
80 
81 
82 
83 
84 #endif // _BlendFunc_GenChamfInv_HeaderFile
85