|
|
|||
File indexing completed on 2026-09-27 09:16:45
0001 // Copyright (c) 1995-1999 Matra Datavision 0002 // Copyright (c) 1999-2014 OPEN CASCADE SAS 0003 // 0004 // This file is part of Open CASCADE Technology software library. 0005 // 0006 // This library is free software; you can redistribute it and/or modify it under 0007 // the terms of the GNU Lesser General Public License version 2.1 as published 0008 // by the Free Software Foundation, with special exception defined in the file 0009 // OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT 0010 // distribution for complete text of the license and disclaimer of any warranty. 0011 // 0012 // Alternatively, this file may be used under the terms of Open CASCADE 0013 // commercial license or contractual agreement. 0014 0015 #ifndef AppCont_Function_HeaderFile 0016 #define AppCont_Function_HeaderFile 0017 0018 #include <gp_Pnt.hxx> 0019 #include <gp_Pnt2d.hxx> 0020 #include <gp_Vec.hxx> 0021 #include <gp_Vec2d.hxx> 0022 #include <NCollection_Array1.hxx> 0023 #include <Standard_Integer.hxx> 0024 0025 //! Class describing a continuous 3d and/or function f(u). 0026 //! This class must be provided by the user to use the approximation algorithm FittingCurve. 0027 class AppCont_Function 0028 { 0029 public: 0030 AppCont_Function() 0031 { 0032 myNbPnt = -1; 0033 myNbPnt2d = -1; 0034 } 0035 0036 //! Get number of 3d and 2d points returned by "Value" and "D1" functions. 0037 void GetNumberOfPoints(int& theNbPnt, int& theNbPnt2d) const 0038 { 0039 theNbPnt = myNbPnt; 0040 theNbPnt2d = myNbPnt2d; 0041 } 0042 0043 //! Get number of 3d points returned by "Value" and "D1" functions. 0044 int GetNbOf3dPoints() const { return myNbPnt; } 0045 0046 //! Get number of 2d points returned by "Value" and "D1" functions. 0047 int GetNbOf2dPoints() const { return myNbPnt2d; } 0048 0049 //! Destructor 0050 virtual ~AppCont_Function() = default; 0051 0052 //! Returns the first parameter of the function. 0053 virtual double FirstParameter() const = 0; 0054 0055 //! Returns the last parameter of the function. 0056 virtual double LastParameter() const = 0; 0057 0058 //! Returns the point at parameter <theU>. 0059 virtual bool Value(const double theU, 0060 NCollection_Array1<gp_Pnt2d>& thePnt2d, 0061 NCollection_Array1<gp_Pnt>& thePnt) const = 0; 0062 0063 //! Returns the derivative at parameter <theU>. 0064 virtual bool D1(const double theU, 0065 NCollection_Array1<gp_Vec2d>& theVec2d, 0066 NCollection_Array1<gp_Vec>& theVec) const = 0; 0067 0068 //! Return information about peridicity in output paramateters space. 0069 //! @param theDimIdx Defines index in output parameters space. 1 <= theDimIdx <= 3 * myNbPnt + 2 * 0070 //! myNbPnt2d. 0071 virtual void PeriodInformation(const int /*theDimIdx*/, bool& IsPeriodic, double& thePeriod) const 0072 { 0073 IsPeriodic = false; 0074 thePeriod = 0.0; 0075 }; 0076 0077 protected: 0078 int myNbPnt; 0079 int myNbPnt2d; 0080 }; 0081 0082 #endif
| [ Source navigation ] | [ Diff markup ] | [ Identifier search ] | [ general search ] |
|
This page was automatically generated by the 2.3.7 LXR engine. The LXR team |
|