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_ConstThroatInv_HeaderFile 16 #define _BlendFunc_ConstThroatInv_HeaderFile 17 18 #include <Standard.hxx> 19 #include <Standard_DefineAlloc.hxx> 20 #include <Standard_Handle.hxx> 21 22 #include <Standard_Integer.hxx> 23 #include <Standard_Boolean.hxx> 24 #include <BlendFunc_GenChamfInv.hxx> 25 #include <math_Vector.hxx> 26 #include <Standard_Real.hxx> 27 class Adaptor3d_HSurface; 28 class Adaptor3d_HCurve; 29 class Adaptor2d_HCurve2d; 30 class math_Matrix; 31 32 33 34 //! Class for a function used to compute a ConstThroat chamfer on a surface's boundary 35 class BlendFunc_ConstThroatInv : public BlendFunc_GenChamfInv 36 { 37 public: 38 39 DEFINE_STANDARD_ALLOC 40 41 42 Standard_EXPORT BlendFunc_ConstThroatInv(const Handle(Adaptor3d_HSurface)& S1, const Handle(Adaptor3d_HSurface)& S2, const Handle(Adaptor3d_HCurve)& C); 43 44 Standard_EXPORT Standard_Boolean IsSolution (const math_Vector& Sol, const Standard_Real Tol) Standard_OVERRIDE; 45 46 //! computes the values <F> of the Functions for the 47 //! variable <X>. 48 //! Returns True if the computation was done successfully, 49 //! False otherwise. 50 Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F) Standard_OVERRIDE; 51 52 //! returns the values <D> of the derivatives for the 53 //! variable <X>. 54 //! Returns True if the computation was done successfully, 55 //! False otherwise. 56 Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& D) Standard_OVERRIDE; 57 58 using Blend_FuncInv::Set; 59 60 Standard_EXPORT virtual void Set (const Standard_Real theThroat, 61 const Standard_Real, 62 const Standard_Integer Choix) Standard_OVERRIDE; 63 64 65 66 67 protected: 68 69 Standard_Real Throat; 70 71 Standard_Real param; 72 Standard_Real sign1; 73 Standard_Real sign2; 74 75 gp_Pnt ptgui; 76 gp_Vec nplan; 77 Standard_Real normtg; 78 Standard_Real theD; 79 gp_Vec d1gui; 80 gp_Vec d2gui; 81 82 gp_Pnt pts1; 83 gp_Pnt pts2; 84 gp_Vec d1u1; 85 gp_Vec d1v1; 86 gp_Vec d1u2; 87 gp_Vec d1v2; 88 89 90 private: 91 92 }; 93 94 95 96 97 98 99 100 #endif // _BlendFunc_ConstThroatInv_HeaderFile 101