Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-11-28 10:20:49

0001 // Created on: 1995-02-03
0002 // Created by: Laurent BOURESCHE
0003 // Copyright (c) 1995-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 _Law_Interpol_HeaderFile
0018 #define _Law_Interpol_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_Type.hxx>
0022 
0023 #include <Law_BSpFunc.hxx>
0024 #include <gp_Pnt2d.hxx>
0025 #include <NCollection_Array1.hxx>
0026 
0027 //! Provides an evolution law that interpolates a set
0028 //! of parameter and value pairs (wi, radi)
0029 class Law_Interpol : public Law_BSpFunc
0030 {
0031 
0032 public:
0033   //! Constructs an empty interpolative evolution law.
0034   //! The function Set is used to define the law.
0035   Standard_EXPORT Law_Interpol();
0036 
0037   //! Defines this evolution law by interpolating the set of 2D
0038   //! points ParAndRad. The Y coordinate of a point of
0039   //! ParAndRad is the value of the function at the parameter
0040   //! point given by its X coordinate.
0041   //! If Periodic is true, this function is assumed to be periodic.
0042   //! Warning
0043   //! -   The X coordinates of points in the table ParAndRad
0044   //! must be given in ascendant order.
0045   //! -   If Periodic is true, the first and last Y coordinates of
0046   //! points in the table ParAndRad are assumed to be
0047   //! equal. In addition, with the second syntax, Dd and Df
0048   //! are also assumed to be equal. If this is not the case,
0049   //! Set uses the first value(s) as last value(s).
0050   Standard_EXPORT void Set(const NCollection_Array1<gp_Pnt2d>& ParAndRad,
0051                            const bool                          Periodic = false);
0052 
0053   Standard_EXPORT void SetInRelative(const NCollection_Array1<gp_Pnt2d>& ParAndRad,
0054                                      const double                        Ud,
0055                                      const double                        Uf,
0056                                      const bool                          Periodic = false);
0057 
0058   //! Defines this evolution law by interpolating the set of 2D
0059   //! points ParAndRad. The Y coordinate of a point of
0060   //! ParAndRad is the value of the function at the parameter
0061   //! point given by its X coordinate.
0062   //! If Periodic is true, this function is assumed to be periodic.
0063   //! In the second syntax, Dd and Df define the values of
0064   //! the first derivative of the function at its first and last points.
0065   //! Warning
0066   //! -   The X coordinates of points in the table ParAndRad
0067   //! must be given in ascendant order.
0068   //! -   If Periodic is true, the first and last Y coordinates of
0069   //! points in the table ParAndRad are assumed to be
0070   //! equal. In addition, with the second syntax, Dd and Df
0071   //! are also assumed to be equal. If this is not the case,
0072   //! Set uses the first value(s) as last value(s).
0073   Standard_EXPORT void Set(const NCollection_Array1<gp_Pnt2d>& ParAndRad,
0074                            const double                        Dd,
0075                            const double                        Df,
0076                            const bool                          Periodic = false);
0077 
0078   Standard_EXPORT void SetInRelative(const NCollection_Array1<gp_Pnt2d>& ParAndRad,
0079                                      const double                        Ud,
0080                                      const double                        Uf,
0081                                      const double                        Dd,
0082                                      const double                        Df,
0083                                      const bool                          Periodic = false);
0084 
0085   DEFINE_STANDARD_RTTIEXT(Law_Interpol, Law_BSpFunc)
0086 };
0087 
0088 #endif // _Law_Interpol_HeaderFile