Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-09-26 09:02:22

0001 // Created on: 1997-09-11
0002 // Created by: Philippe MANGIN
0003 // Copyright (c) 1997-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 _AppDef_SmoothCriterion_HeaderFile
0018 #define _AppDef_SmoothCriterion_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <Standard_Transient.hxx>
0023 #include <NCollection_Array1.hxx>
0024 #include <NCollection_HArray1.hxx>
0025 #include <Standard_Real.hxx>
0026 #include <Standard_Integer.hxx>
0027 #include <NCollection_Array2.hxx>
0028 #include <NCollection_HArray2.hxx>
0029 #include <math_Vector.hxx>
0030 class FEmTool_Curve;
0031 class math_Matrix;
0032 
0033 //! defined criterion to smooth points in curve
0034 class AppDef_SmoothCriterion : public Standard_Transient
0035 {
0036 
0037 public:
0038   Standard_EXPORT virtual void SetParameters(
0039     const occ::handle<NCollection_HArray1<double>>& Parameters) = 0;
0040 
0041   Standard_EXPORT virtual void SetCurve(const occ::handle<FEmTool_Curve>& C) = 0;
0042 
0043   //! Returns the curve associated with this criterion.
0044   //! @return handle to the FEmTool curve
0045   [[nodiscard]] occ::handle<FEmTool_Curve> Curve() const
0046   {
0047     occ::handle<FEmTool_Curve> aCurve;
0048     GetCurve(aCurve);
0049     return aCurve;
0050   }
0051 
0052   Standard_EXPORT virtual void GetCurve(occ::handle<FEmTool_Curve>& C) const = 0;
0053 
0054   Standard_EXPORT virtual void SetEstimation(const double E1, const double E2, const double E3) = 0;
0055 
0056   Standard_EXPORT virtual double& EstLength() = 0;
0057 
0058   Standard_EXPORT virtual void GetEstimation(double& E1, double& E2, double& E3) const = 0;
0059 
0060   Standard_EXPORT virtual occ::handle<NCollection_HArray2<occ::handle<NCollection_HArray1<int>>>>
0061     AssemblyTable() const = 0;
0062 
0063   Standard_EXPORT virtual occ::handle<NCollection_HArray2<int>> DependenceTable() const = 0;
0064 
0065   Standard_EXPORT virtual int QualityValues(const double J1min,
0066                                             const double J2min,
0067                                             const double J3min,
0068                                             double&      J1,
0069                                             double&      J2,
0070                                             double&      J3) = 0;
0071 
0072   Standard_EXPORT virtual void ErrorValues(double& MaxError,
0073                                            double& QuadraticError,
0074                                            double& AverageError) = 0;
0075 
0076   Standard_EXPORT virtual void Hessian(const int    Element,
0077                                        const int    Dimension1,
0078                                        const int    Dimension2,
0079                                        math_Matrix& H) = 0;
0080 
0081   Standard_EXPORT virtual void Gradient(const int Element, const int Dimension, math_Vector& G) = 0;
0082 
0083   //! Convert the assembly Vector in an Curve;
0084   Standard_EXPORT virtual void InputVector(
0085     const math_Vector&                                                             X,
0086     const occ::handle<NCollection_HArray2<occ::handle<NCollection_HArray1<int>>>>& AssTable) = 0;
0087 
0088   Standard_EXPORT virtual void SetWeight(const double QuadraticWeight,
0089                                          const double QualityWeight,
0090                                          const double percentJ1,
0091                                          const double percentJ2,
0092                                          const double percentJ3) = 0;
0093 
0094   Standard_EXPORT virtual void GetWeight(double& QuadraticWeight, double& QualityWeight) const = 0;
0095 
0096   Standard_EXPORT virtual void SetWeight(const NCollection_Array1<double>& Weight) = 0;
0097 
0098   DEFINE_STANDARD_RTTIEXT(AppDef_SmoothCriterion, Standard_Transient)
0099 };
0100 
0101 #endif // _AppDef_SmoothCriterion_HeaderFile