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