File indexing completed on 2026-09-11 09:16:52
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute_HeaderFile
0018 #define _AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <AppParCurves_Constraint.hxx>
0025 #include <AppParCurves_MultiBSpCurve.hxx>
0026 #include <NCollection_Array1.hxx>
0027 #include <NCollection_HArray1.hxx>
0028 #include <Standard_Integer.hxx>
0029 #include <math_Matrix.hxx>
0030 #include <math_Vector.hxx>
0031 #include <math_IntegerVector.hxx>
0032 class StdFail_NotDone;
0033 class Standard_OutOfRange;
0034 class Standard_DimensionError;
0035 class Standard_NoSuchObject;
0036 class AppDef_MultiLine;
0037 class AppDef_MyLineTool;
0038 class AppParCurves_MultiCurve;
0039 class AppParCurves_MultiBSpCurve;
0040 class math_Matrix;
0041
0042 class AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute
0043 {
0044 public:
0045 DEFINE_STANDARD_ALLOC
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063 Standard_EXPORT AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(
0064 const AppDef_MultiLine& SSP,
0065 const int FirstPoint,
0066 const int LastPoint,
0067 const AppParCurves_Constraint FirstCons,
0068 const AppParCurves_Constraint LastCons,
0069 const math_Vector& Parameters,
0070 const int NbPol);
0071
0072
0073 Standard_EXPORT AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(
0074 const AppDef_MultiLine& SSP,
0075 const int FirstPoint,
0076 const int LastPoint,
0077 const AppParCurves_Constraint FirstCons,
0078 const AppParCurves_Constraint LastCons,
0079 const int NbPol);
0080
0081
0082
0083
0084
0085
0086
0087
0088
0089
0090
0091
0092
0093
0094
0095
0096 Standard_EXPORT AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(
0097 const AppDef_MultiLine& SSP,
0098 const NCollection_Array1<double>& Knots,
0099 const NCollection_Array1<int>& Mults,
0100 const int FirstPoint,
0101 const int LastPoint,
0102 const AppParCurves_Constraint FirstCons,
0103 const AppParCurves_Constraint LastCons,
0104 const math_Vector& Parameters,
0105 const int NbPol);
0106
0107
0108 Standard_EXPORT AppDef_BSpParLeastSquareOfMyBSplGradientOfBSplineCompute(
0109 const AppDef_MultiLine& SSP,
0110 const NCollection_Array1<double>& Knots,
0111 const NCollection_Array1<int>& Mults,
0112 const int FirstPoint,
0113 const int LastPoint,
0114 const AppParCurves_Constraint FirstCons,
0115 const AppParCurves_Constraint LastCons,
0116 const int NbPol);
0117
0118
0119
0120 Standard_EXPORT void Perform(const math_Vector& Parameters);
0121
0122
0123 Standard_EXPORT void Perform(const math_Vector& Parameters, const double l1, const double l2);
0124
0125
0126
0127
0128 Standard_EXPORT void Perform(const math_Vector& Parameters,
0129 const math_Vector& V1t,
0130 const math_Vector& V2t,
0131 const double l1,
0132 const double l2);
0133
0134
0135
0136
0137
0138
0139 Standard_EXPORT void Perform(const math_Vector& Parameters,
0140 const math_Vector& V1t,
0141 const math_Vector& V2t,
0142 const math_Vector& V1c,
0143 const math_Vector& V2c,
0144 const double l1,
0145 const double l2);
0146
0147
0148 Standard_EXPORT bool IsDone() const;
0149
0150
0151
0152
0153 Standard_EXPORT AppParCurves_MultiCurve BezierValue();
0154
0155
0156
0157
0158 Standard_EXPORT const AppParCurves_MultiBSpCurve& BSplineValue();
0159
0160
0161
0162 Standard_EXPORT const math_Matrix& FunctionMatrix() const;
0163
0164
0165
0166 Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const;
0167
0168
0169
0170
0171
0172 Standard_EXPORT void ErrorGradient(math_Vector& Grad, double& F, double& MaxE3d, double& MaxE2d);
0173
0174
0175
0176 Standard_EXPORT const math_Matrix& Distance();
0177
0178
0179
0180
0181 Standard_EXPORT void Error(double& F, double& MaxE3d, double& MaxE2d);
0182
0183
0184
0185 Standard_EXPORT double FirstLambda() const;
0186
0187
0188
0189 Standard_EXPORT double LastLambda() const;
0190
0191
0192 Standard_EXPORT const math_Matrix& Points() const;
0193
0194
0195 Standard_EXPORT const math_Matrix& Poles() const;
0196
0197
0198
0199
0200
0201 Standard_EXPORT const math_IntegerVector& KIndex() const;
0202
0203 protected:
0204
0205 Standard_EXPORT void Init(const AppDef_MultiLine& SSP, const int FirstPoint, const int LastPoint);
0206
0207
0208
0209 Standard_EXPORT int NbBColumns(const AppDef_MultiLine& SSP) const;
0210
0211
0212 Standard_EXPORT int TheFirstPoint(const AppParCurves_Constraint FirstCons,
0213 const int FirstPoint) const;
0214
0215
0216 Standard_EXPORT int TheLastPoint(const AppParCurves_Constraint LastCons,
0217 const int LastPoint) const;
0218
0219
0220 Standard_EXPORT void Affect(const AppDef_MultiLine& SSP,
0221 const int Index,
0222 AppParCurves_Constraint& Cons,
0223 math_Vector& Vt,
0224 math_Vector& Vc);
0225
0226 Standard_EXPORT void ComputeFunction(const math_Vector& Parameters);
0227
0228 Standard_EXPORT void SearchIndex(math_IntegerVector& Index);
0229
0230
0231 Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Vector& TheB);
0232
0233
0234 Standard_EXPORT void MakeTAA(math_Vector& TheA);
0235
0236
0237 Standard_EXPORT void MakeTAA(math_Vector& TheA, math_Matrix& TheB);
0238
0239 private:
0240 AppParCurves_Constraint FirstConstraint;
0241 AppParCurves_Constraint LastConstraint;
0242 AppParCurves_MultiBSpCurve SCU;
0243 occ::handle<NCollection_HArray1<double>> myknots;
0244 occ::handle<NCollection_HArray1<int>> mymults;
0245 math_Matrix mypoles;
0246 math_Matrix A;
0247 math_Matrix DA;
0248 math_Matrix B2;
0249 math_Matrix mypoints;
0250 math_Vector Vflatknots;
0251 math_Vector Vec1t;
0252 math_Vector Vec1c;
0253 math_Vector Vec2t;
0254 math_Vector Vec2c;
0255 math_Matrix theError;
0256 math_IntegerVector myindex;
0257 double lambda1;
0258 double lambda2;
0259 int FirstP;
0260 int LastP;
0261 int Nlignes;
0262 int Ninc;
0263 int NA;
0264 int myfirstp;
0265 int mylastp;
0266 int resinit;
0267 int resfin;
0268 int nbP2d;
0269 int nbP;
0270 int nbpoles;
0271 int deg;
0272 bool done;
0273 bool iscalculated;
0274 bool isready;
0275 };
0276
0277 #endif