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