Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-10-02 09:12:16

0001 // Created on: 1998-07-09
0002 // Created by: Stephanie HUMEAU
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 _GeomFill_FunctionGuide_HeaderFile
0018 #define _GeomFill_FunctionGuide_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023 
0024 #include <Standard_Boolean.hxx>
0025 #include <Standard_Real.hxx>
0026 #include <math_FunctionSetWithDerivatives.hxx>
0027 #include <Standard_Integer.hxx>
0028 #include <math_Vector.hxx>
0029 
0030 class Adaptor3d_Curve;
0031 class GeomFill_SectionLaw;
0032 class Geom_Curve;
0033 class Geom_Surface;
0034 class gp_Pnt;
0035 class math_Matrix;
0036 class gp_Vec;
0037 
0038 class GeomFill_FunctionGuide : public math_FunctionSetWithDerivatives
0039 {
0040 public:
0041   DEFINE_STANDARD_ALLOC
0042 
0043   Standard_EXPORT GeomFill_FunctionGuide(const occ::handle<GeomFill_SectionLaw>& S,
0044                                          const occ::handle<Adaptor3d_Curve>&     Guide,
0045                                          const double                            ParamOnLaw = 0.0);
0046 
0047   Standard_EXPORT void SetParam(const double  Param,
0048                                 const gp_Pnt& Centre,
0049                                 const gp_XYZ& Dir,
0050                                 const gp_XYZ& XDir);
0051 
0052   //! returns the number of variables of the function.
0053   Standard_EXPORT int NbVariables() const override;
0054 
0055   //! returns the number of equations of the function.
0056   Standard_EXPORT int NbEquations() const override;
0057 
0058   //! computes the values <F> of the Functions for the
0059   //! variable <X>.
0060   //! Returns True if the computation was done successfully,
0061   //! False otherwise.
0062   Standard_EXPORT bool Value(const math_Vector& X, math_Vector& F) override;
0063 
0064   //! returns the values <D> of the derivatives for the
0065   //! variable <X>.
0066   //! Returns True if the computation was done successfully,
0067   //! False otherwise.
0068   Standard_EXPORT bool Derivatives(const math_Vector& X, math_Matrix& D) override;
0069 
0070   //! returns the values <F> of the functions and the derivatives
0071   //! <D> for the variable <X>.
0072   //! Returns True if the computation was done successfully,
0073   //! False otherwise.
0074   Standard_EXPORT bool Values(const math_Vector& X, math_Vector& F, math_Matrix& D) override;
0075 
0076   //! returns the values <F> of the T derivatives for
0077   //! the parameter Param .
0078   Standard_EXPORT bool DerivT(const math_Vector& X,
0079                               const gp_XYZ&      DCentre,
0080                               const gp_XYZ&      DDir,
0081                               math_Vector&       DFDT);
0082 
0083   //! returns the values <F> of the T2 derivatives for
0084   //! the parameter Param .
0085   //! returns the values <D> of the TX derivatives for
0086   //! the parameter Param .
0087   //! returns Boolean is static;
0088   //! returns the values <T> of the X2 derivatives for
0089   //! the parameter Param .
0090   //! returns Boolean is static;
0091   Standard_EXPORT bool Deriv2T(const gp_XYZ& DCentre,
0092                                const gp_XYZ& DDir,
0093                                math_Vector&  DFDT,
0094                                math_Vector&  D2FT);
0095 
0096 private:
0097   Standard_EXPORT void DSDT(const double  U,
0098                             const double  V,
0099                             const gp_XYZ& DCentre,
0100                             const gp_XYZ& DDir,
0101                             gp_Vec&       DSDT) const;
0102 
0103   occ::handle<Adaptor3d_Curve>     TheGuide;
0104   occ::handle<GeomFill_SectionLaw> TheLaw;
0105   bool                             isconst;
0106   occ::handle<Geom_Curve>          TheCurve;
0107   occ::handle<Geom_Curve>          TheConst;
0108   occ::handle<Geom_Surface>        TheSurface;
0109   double                           First;
0110   double                           Last;
0111   double                           TheUonS;
0112   gp_XYZ                           Centre;
0113   gp_XYZ                           Dir;
0114 };
0115 
0116 #endif // _GeomFill_FunctionGuide_HeaderFile