0026377: Passing Handle objects as arguments to functions as non-const reference...
[occt.git] / src / AppDef / AppDef_LinearCriteria.hxx
CommitLineData
42cf5bc1 1// Created on: 1997-09-11
2// Created by: Philippe MANGIN
3// Copyright (c) 1997-1999 Matra Datavision
4// Copyright (c) 1999-2014 OPEN CASCADE SAS
5//
6// This file is part of Open CASCADE Technology software library.
7//
8// This library is free software; you can redistribute it and/or modify it under
9// the terms of the GNU Lesser General Public License version 2.1 as published
10// by the Free Software Foundation, with special exception defined in the file
11// OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12// distribution for complete text of the license and disclaimer of any warranty.
13//
14// Alternatively, this file may be used under the terms of Open CASCADE
15// commercial license or contractual agreement.
16
17#ifndef _AppDef_LinearCriteria_HeaderFile
18#define _AppDef_LinearCriteria_HeaderFile
19
20#include <Standard.hxx>
21#include <Standard_Type.hxx>
22
23#include <AppDef_MultiLine.hxx>
24#include <TColStd_HArray1OfReal.hxx>
25#include <Standard_Real.hxx>
26#include <TColStd_Array1OfReal.hxx>
27#include <Standard_Integer.hxx>
28#include <AppDef_SmoothCriterion.hxx>
29#include <FEmTool_HAssemblyTable.hxx>
30#include <TColStd_HArray2OfInteger.hxx>
31#include <math_Vector.hxx>
32class FEmTool_ElementaryCriterion;
33class FEmTool_Curve;
34class Standard_NotImplemented;
35class Standard_DomainError;
36class AppDef_MultiLine;
37class math_Matrix;
38
39
40class AppDef_LinearCriteria;
41DEFINE_STANDARD_HANDLE(AppDef_LinearCriteria, AppDef_SmoothCriterion)
42
43//! defined an Linear Criteria to used in variational
44//! Smoothing of points.
45class AppDef_LinearCriteria : public AppDef_SmoothCriterion
46{
47
48public:
49
50
51 Standard_EXPORT AppDef_LinearCriteria(const AppDef_MultiLine& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint);
52
79104795 53 Standard_EXPORT void SetParameters (const Handle(TColStd_HArray1OfReal)& Parameters) Standard_OVERRIDE;
42cf5bc1 54
79104795 55 Standard_EXPORT void SetCurve (const Handle(FEmTool_Curve)& C) Standard_OVERRIDE;
42cf5bc1 56
79104795 57 Standard_EXPORT void GetCurve (Handle(FEmTool_Curve)& C) const Standard_OVERRIDE;
42cf5bc1 58
79104795 59 Standard_EXPORT void SetEstimation (const Standard_Real E1, const Standard_Real E2, const Standard_Real E3) Standard_OVERRIDE;
42cf5bc1 60
79104795 61 Standard_EXPORT Standard_Real& EstLength() Standard_OVERRIDE;
42cf5bc1 62
79104795 63 Standard_EXPORT void GetEstimation (Standard_Real& E1, Standard_Real& E2, Standard_Real& E3) const Standard_OVERRIDE;
42cf5bc1 64
79104795 65 Standard_EXPORT Handle(FEmTool_HAssemblyTable) AssemblyTable() const Standard_OVERRIDE;
42cf5bc1 66
79104795 67 Standard_EXPORT Handle(TColStd_HArray2OfInteger) DependenceTable() const Standard_OVERRIDE;
42cf5bc1 68
79104795 69 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;
42cf5bc1 70
79104795 71 Standard_EXPORT void ErrorValues (Standard_Real& MaxError, Standard_Real& QuadraticError, Standard_Real& AverageError) Standard_OVERRIDE;
42cf5bc1 72
79104795 73 Standard_EXPORT void Hessian (const Standard_Integer Element, const Standard_Integer Dimension1, const Standard_Integer Dimension2, math_Matrix& H) Standard_OVERRIDE;
42cf5bc1 74
79104795 75 Standard_EXPORT void Gradient (const Standard_Integer Element, const Standard_Integer Dimension, math_Vector& G) Standard_OVERRIDE;
42cf5bc1 76
77 //! Convert the assembly Vector in an Curve;
79104795 78 Standard_EXPORT void InputVector (const math_Vector& X, const Handle(FEmTool_HAssemblyTable)& AssTable) Standard_OVERRIDE;
42cf5bc1 79
79104795 80 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;
42cf5bc1 81
79104795 82 Standard_EXPORT void GetWeight (Standard_Real& QuadraticWeight, Standard_Real& QualityWeight) const Standard_OVERRIDE;
42cf5bc1 83
79104795 84 Standard_EXPORT void SetWeight (const TColStd_Array1OfReal& Weight) Standard_OVERRIDE;
42cf5bc1 85
86
87
88
92efcf78 89 DEFINE_STANDARD_RTTIEXT(AppDef_LinearCriteria,AppDef_SmoothCriterion)
42cf5bc1 90
91protected:
92
93
94
95
96private:
97
98
99 Standard_EXPORT void BuildCache (const Standard_Integer E);
100
101 AppDef_MultiLine mySSP;
102 Handle(TColStd_HArray1OfReal) myParameters;
103 Handle(TColStd_HArray1OfReal) myCache;
104 Handle(FEmTool_ElementaryCriterion) myCriteria[3];
105 Standard_Real myEstimation[3];
106 Standard_Real myQuadraticWeight;
107 Standard_Real myQualityWeight;
108 Standard_Real myPercent[3];
109 TColStd_Array1OfReal myPntWeight;
110 Handle(FEmTool_Curve) myCurve;
111 Standard_Real myLength;
112 Standard_Integer myE;
113 Standard_Integer IF;
114 Standard_Integer IL;
115
116
117};
118
119
120
121
122
123
124
125#endif // _AppDef_LinearCriteria_HeaderFile