Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-28 09:19:13

0001 // Created on: 1998-02-18
0002 // Created by: Jeanine PANCIATICI
0003 // Copyright (c) 1998-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 _Adaptor3d_InterFunc_HeaderFile
0018 #define _Adaptor3d_InterFunc_HeaderFile
0019 
0020 #include <math_FunctionWithDerivative.hxx>
0021 
0022 class Adaptor2d_Curve2d;
0023 
0024 //! Used to find the points U(t) = U0 or V(t) = V0 in
0025 //! order to determine the Cn discontinuities of an
0026 //! Adpator_CurveOnSurface relatively to the
0027 //! discontinuities of the surface. Used to
0028 //! find the roots of the functions
0029 class Adaptor3d_InterFunc : public math_FunctionWithDerivative
0030 {
0031 public:
0032   DEFINE_STANDARD_ALLOC
0033 
0034   //! build the function U(t)=FixVal if Fix =1 or
0035   //! V(t)=FixVal if Fix=2
0036   Standard_EXPORT Adaptor3d_InterFunc(const occ::handle<Adaptor2d_Curve2d>& C,
0037                                       const double                          FixVal,
0038                                       const int                             Fix);
0039 
0040   //! computes the value <F>of the function for the variable <X>.
0041   //! Returns True if the calculation were successfully done,
0042   //! False otherwise.
0043   Standard_EXPORT bool Value(const double X, double& F) override;
0044 
0045   //! computes the derivative <D> of the function
0046   //! for the variable <X>.
0047   //! Returns True if the calculation were successfully done,
0048   //! False otherwise.
0049   Standard_EXPORT bool Derivative(const double X, double& D) override;
0050 
0051   //! computes the value <F> and the derivative <D> of the
0052   //! function for the variable <X>.
0053   //! Returns True if the calculation were successfully done,
0054   //! False otherwise.
0055   Standard_EXPORT bool Values(const double X, double& F, double& D) override;
0056 
0057 private:
0058   occ::handle<Adaptor2d_Curve2d> myCurve2d;
0059   double                         myFixVal;
0060   int                            myFix;
0061 };
0062 
0063 #endif // _Adaptor3d_InterFunc_HeaderFile