Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-01-18 10:02:57

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_LinearCriteria_HeaderFile
0018 #define _AppDef_LinearCriteria_HeaderFile
0019 
0020 #include <Standard.hxx>
0021 
0022 #include <AppDef_MultiLine.hxx>
0023 #include <Standard_Real.hxx>
0024 #include <Standard_Integer.hxx>
0025 #include <AppDef_SmoothCriterion.hxx>
0026 #include <FEmTool_HAssemblyTable.hxx>
0027 #include <TColStd_HArray2OfInteger.hxx>
0028 #include <math_Vector.hxx>
0029 class FEmTool_ElementaryCriterion;
0030 class FEmTool_Curve;
0031 class math_Matrix;
0032 
0033 
0034 class AppDef_LinearCriteria;
0035 DEFINE_STANDARD_HANDLE(AppDef_LinearCriteria, AppDef_SmoothCriterion)
0036 
0037 //! defined an Linear Criteria to used in variational
0038 //! Smoothing of points.
0039 class AppDef_LinearCriteria : public AppDef_SmoothCriterion
0040 {
0041 
0042 public:
0043 
0044   
0045   Standard_EXPORT AppDef_LinearCriteria(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint);
0046   
0047   Standard_EXPORT void SetParameters (const Handle(TColStd_HArray1OfReal)& Parameters) Standard_OVERRIDE;
0048   
0049   Standard_EXPORT void SetCurve (const Handle(FEmTool_Curve)& C) Standard_OVERRIDE;
0050   
0051   Standard_EXPORT void GetCurve (Handle(FEmTool_Curve)& C) const Standard_OVERRIDE;
0052   
0053   Standard_EXPORT void SetEstimation (const Standard_Real E1, const Standard_Real E2, const Standard_Real E3) Standard_OVERRIDE;
0054   
0055   Standard_EXPORT Standard_Real& EstLength() Standard_OVERRIDE;
0056   
0057   Standard_EXPORT void GetEstimation (Standard_Real& E1, Standard_Real& E2, Standard_Real& E3) const Standard_OVERRIDE;
0058   
0059   Standard_EXPORT Handle(FEmTool_HAssemblyTable) AssemblyTable() const Standard_OVERRIDE;
0060   
0061   Standard_EXPORT Handle(TColStd_HArray2OfInteger) DependenceTable() const Standard_OVERRIDE;
0062   
0063   Standard_EXPORT Standard_Integer QualityValues (const Standard_Real J1min, const Standard_Real J2min, const Standard_Real J3min, Standard_Real& J1, Standard_Real& J2, Standard_Real& J3) Standard_OVERRIDE;
0064   
0065   Standard_EXPORT void ErrorValues (Standard_Real& MaxError, Standard_Real& QuadraticError, Standard_Real& AverageError) Standard_OVERRIDE;
0066   
0067   Standard_EXPORT void Hessian (const Standard_Integer Element, const Standard_Integer Dimension1, const Standard_Integer Dimension2, math_Matrix& H) Standard_OVERRIDE;
0068   
0069   Standard_EXPORT void Gradient (const Standard_Integer Element, const Standard_Integer Dimension, math_Vector& G) Standard_OVERRIDE;
0070   
0071   //! Convert the assembly Vector in an Curve;
0072   Standard_EXPORT void InputVector (const math_Vector& X, const Handle(FEmTool_HAssemblyTable)& AssTable) Standard_OVERRIDE;
0073   
0074   Standard_EXPORT void SetWeight (const Standard_Real QuadraticWeight, const Standard_Real QualityWeight, const Standard_Real percentJ1, const Standard_Real percentJ2, const Standard_Real percentJ3) Standard_OVERRIDE;
0075   
0076   Standard_EXPORT void GetWeight (Standard_Real& QuadraticWeight, Standard_Real& QualityWeight) const Standard_OVERRIDE;
0077   
0078   Standard_EXPORT void SetWeight (const TColStd_Array1OfReal& Weight) Standard_OVERRIDE;
0079 
0080 
0081 
0082 
0083   DEFINE_STANDARD_RTTIEXT(AppDef_LinearCriteria,AppDef_SmoothCriterion)
0084 
0085 protected:
0086 
0087 
0088 
0089 
0090 private:
0091 
0092   
0093   Standard_EXPORT void BuildCache (const Standard_Integer E);
0094 
0095   AppDef_MultiLine mySSP;
0096   Handle(TColStd_HArray1OfReal) myParameters;
0097   Handle(TColStd_HArray1OfReal) myCache;
0098   Handle(FEmTool_ElementaryCriterion) myCriteria[3];
0099   Standard_Real myEstimation[3];
0100   Standard_Real myQuadraticWeight;
0101   Standard_Real myQualityWeight;
0102   Standard_Real myPercent[3];
0103   TColStd_Array1OfReal myPntWeight;
0104   Handle(FEmTool_Curve) myCurve;
0105   Standard_Real myLength;
0106   Standard_Integer myE;
0107   Standard_Integer IF;
0108   Standard_Integer IL;
0109 
0110 
0111 };
0112 
0113 
0114 
0115 
0116 
0117 
0118 
0119 #endif // _AppDef_LinearCriteria_HeaderFile