Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:03:34

0001 // Created on: 1992-02-20
0002 // Created by: Remy GILET
0003 // Copyright (c) 1992-1999 Matra Datavision
0004 // Copyright (c) 1999-2014 OPEN CASCADE SAS
0005 //
0006 // This file is part of Open CASCADE Technology software library.
0007 //
0008 // This library is free software; you can redistribute it and/or modify it under
0009 // the terms of the GNU Lesser General Public License version 2.1 as published
0010 // by the Free Software Foundation, with special exception defined in the file
0011 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
0012 // distribution for complete text of the license and disclaimer of any warranty.
0013 //
0014 // Alternatively, this file may be used under the terms of Open CASCADE
0015 // commercial license or contractual agreement.
0016 
0017 #ifndef _Geom2dGcc_FunctionTanCuCu_HeaderFile
0018 #define _Geom2dGcc_FunctionTanCuCu_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 
0023 #include <Geom2dAdaptor_Curve.hxx>
0024 #include <gp_Circ2d.hxx>
0025 #include <Geom2dGcc_Type3.hxx>
0026 #include <math_FunctionSetWithDerivatives.hxx>
0027 #include <math_Vector.hxx>
0028 class gp_Pnt2d;
0029 class gp_Vec2d;
0030 class math_Matrix;
0031 
0032 
0033 //! This abstract class describes a Function of 1 Variable
0034 //! used to find a line tangent to two curves.
0035 class Geom2dGcc_FunctionTanCuCu  : public math_FunctionSetWithDerivatives
0036 {
0037 public:
0038 
0039   DEFINE_STANDARD_ALLOC
0040 
0041   
0042   Standard_EXPORT Geom2dGcc_FunctionTanCuCu(const Geom2dAdaptor_Curve& Curv1, const Geom2dAdaptor_Curve& Curv2);
0043   
0044   Standard_EXPORT Geom2dGcc_FunctionTanCuCu(const gp_Circ2d& Circ1, const Geom2dAdaptor_Curve& Curv2);
0045   
0046   Standard_EXPORT void InitDerivative (const math_Vector& X, gp_Pnt2d& Point1, gp_Pnt2d& Point2, gp_Vec2d& Tan1, gp_Vec2d& Tan2, gp_Vec2d& D21, gp_Vec2d& D22);
0047   
0048   //! returns the number of variables of the function.
0049   Standard_EXPORT Standard_Integer NbVariables() const;
0050   
0051   //! returns the number of equations of the function.
0052   Standard_EXPORT Standard_Integer NbEquations() const;
0053   
0054   //! Computes the value of the function F for the variable X.
0055   //! It returns True if the computation is successfully done,
0056   //! False otherwise.
0057   Standard_EXPORT Standard_Boolean Value (const math_Vector& X, math_Vector& F);
0058   
0059   //! Computes the derivative of the function F for the variable X.
0060   //! It returns True if the computation is successfully done,
0061   //! False otherwise.
0062   Standard_EXPORT Standard_Boolean Derivatives (const math_Vector& X, math_Matrix& Deriv);
0063   
0064   //! Computes the value and the derivative of the function F
0065   //! for the variable X.
0066   //! It returns True if the computation is successfully done,
0067   //! False otherwise.
0068   Standard_EXPORT Standard_Boolean Values (const math_Vector& X, math_Vector& F, math_Matrix& Deriv);
0069 
0070 
0071 
0072 
0073 protected:
0074 
0075 
0076 
0077 
0078 
0079 private:
0080 
0081 
0082 
0083   Geom2dAdaptor_Curve TheCurve1;
0084   Geom2dAdaptor_Curve TheCurve2;
0085   gp_Circ2d TheCirc1;
0086   Geom2dGcc_Type3 TheType;
0087 
0088 
0089 };
0090 
0091 
0092 
0093 
0094 
0095 
0096 
0097 #endif // _Geom2dGcc_FunctionTanCuCu_HeaderFile