42cf5bc1 |
1 | // Created on: 1995-01-27 |
2 | // Created by: Jacques GOUSSARD |
3 | // Copyright (c) 1995-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 _GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox_HeaderFile |
18 | #define _GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox_HeaderFile |
19 | |
20 | #include <Standard.hxx> |
21 | #include <Standard_DefineAlloc.hxx> |
22 | #include <Standard_Handle.hxx> |
23 | |
24 | #include <Standard_Boolean.hxx> |
25 | #include <GeomInt_TheMultiLineOfWLApprox.hxx> |
26 | #include <AppParCurves_MultiCurve.hxx> |
27 | #include <Standard_Integer.hxx> |
28 | #include <math_Vector.hxx> |
29 | #include <Standard_Real.hxx> |
30 | #include <math_Matrix.hxx> |
31 | #include <GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox.hxx> |
32 | #include <TColStd_HArray1OfInteger.hxx> |
33 | #include <AppParCurves_HArray1OfConstraintCouple.hxx> |
34 | #include <math_MultipleVarFunctionWithGradient.hxx> |
35 | #include <AppParCurves_Constraint.hxx> |
36 | class GeomInt_TheMultiLineOfWLApprox; |
37 | class GeomInt_TheMultiLineToolOfWLApprox; |
38 | class GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox; |
39 | class GeomInt_ResConstraintOfMyGradientOfTheComputeLineBezierOfWLApprox; |
40 | class AppParCurves_MultiCurve; |
41 | |
42 | |
43 | |
44 | class GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox : public math_MultipleVarFunctionWithGradient |
45 | { |
46 | public: |
47 | |
48 | DEFINE_STANDARD_ALLOC |
49 | |
50 | |
51 | Standard_EXPORT GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox(const GeomInt_TheMultiLineOfWLApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const Standard_Integer Deg); |
52 | |
53 | Standard_EXPORT Standard_Integer NbVariables() const; |
54 | |
55 | Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F); |
56 | |
57 | Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G); |
58 | |
59 | Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G); |
60 | |
61 | Standard_EXPORT const math_Vector& NewParameters() const; |
62 | |
63 | Standard_EXPORT const AppParCurves_MultiCurve& CurveValue(); |
64 | |
65 | Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex) const; |
66 | |
67 | Standard_EXPORT Standard_Real MaxError3d() const; |
68 | |
69 | Standard_EXPORT Standard_Real MaxError2d() const; |
70 | |
71 | Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const; |
72 | |
73 | Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const; |
74 | |
75 | |
76 | |
77 | |
78 | protected: |
79 | |
80 | |
81 | Standard_EXPORT void Perform (const math_Vector& X); |
82 | |
83 | |
84 | |
85 | |
86 | private: |
87 | |
88 | |
89 | |
90 | Standard_Boolean Done; |
91 | GeomInt_TheMultiLineOfWLApprox MyMultiLine; |
92 | AppParCurves_MultiCurve MyMultiCurve; |
93 | Standard_Integer Degre; |
94 | math_Vector myParameters; |
95 | Standard_Real FVal; |
96 | math_Vector ValGrad_F; |
97 | math_Matrix MyF; |
98 | math_Matrix PTLX; |
99 | math_Matrix PTLY; |
100 | math_Matrix PTLZ; |
101 | math_Matrix A; |
102 | math_Matrix DA; |
103 | GeomInt_ParLeastSquareOfMyGradientOfTheComputeLineBezierOfWLApprox MyLeastSquare; |
104 | Standard_Boolean Contraintes; |
105 | Standard_Integer NbP; |
106 | Standard_Integer NbCu; |
107 | Standard_Integer Adeb; |
108 | Standard_Integer Afin; |
109 | Handle(TColStd_HArray1OfInteger) tabdim; |
110 | Standard_Real ERR3d; |
111 | Standard_Real ERR2d; |
112 | Standard_Integer FirstP; |
113 | Standard_Integer LastP; |
114 | Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints; |
115 | |
116 | |
117 | }; |
118 | |
119 | |
120 | |
121 | |
122 | |
123 | |
124 | |
125 | #endif // _GeomInt_ParFunctionOfMyGradientOfTheComputeLineBezierOfWLApprox_HeaderFile |