File indexing completed on 2025-01-18 10:03:06
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox_HeaderFile
0018 #define _BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <BRepApprox_TheMultiLineOfApprox.hxx>
0025 #include <Standard_Integer.hxx>
0026 #include <Standard_Real.hxx>
0027 #include <BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox.hxx>
0028 #include <TColStd_HArray1OfInteger.hxx>
0029 #include <AppParCurves_HArray1OfConstraintCouple.hxx>
0030 #include <math_MultipleVarFunctionWithGradient.hxx>
0031 #include <TColStd_Array1OfReal.hxx>
0032 #include <TColStd_Array1OfInteger.hxx>
0033 #include <math_IntegerVector.hxx>
0034 #include <AppParCurves_Constraint.hxx>
0035 class BRepApprox_TheMultiLineOfApprox;
0036 class BRepApprox_TheMultiLineToolOfApprox;
0037 class BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox;
0038 class AppParCurves_MultiBSpCurve;
0039 class math_Matrix;
0040
0041
0042
0043 class BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox : public math_MultipleVarFunctionWithGradient
0044 {
0045 public:
0046
0047 DEFINE_STANDARD_ALLOC
0048
0049
0050
0051
0052 Standard_EXPORT BRepApprox_BSpParFunctionOfMyBSplGradientOfTheComputeLineOfApprox(const BRepApprox_TheMultiLineOfApprox& SSP, const Standard_Integer FirstPoint, const Standard_Integer LastPoint, const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const math_Vector& Parameters, const TColStd_Array1OfReal& Knots, const TColStd_Array1OfInteger& Mults, const Standard_Integer NbPol);
0053
0054
0055
0056 Standard_EXPORT Standard_Integer NbVariables() const;
0057
0058
0059
0060
0061
0062 Standard_EXPORT Standard_Boolean Value (const math_Vector& X, Standard_Real& F);
0063
0064
0065
0066 Standard_EXPORT Standard_Boolean Gradient (const math_Vector& X, math_Vector& G);
0067
0068
0069
0070 Standard_EXPORT Standard_Boolean Values (const math_Vector& X, Standard_Real& F, math_Vector& G);
0071
0072
0073 Standard_EXPORT const math_Vector& NewParameters() const;
0074
0075
0076
0077 Standard_EXPORT AppParCurves_MultiBSpCurve CurveValue();
0078
0079
0080
0081 Standard_EXPORT Standard_Real Error (const Standard_Integer IPoint, const Standard_Integer CurveIndex);
0082
0083
0084
0085 Standard_EXPORT Standard_Real MaxError3d() const;
0086
0087
0088
0089 Standard_EXPORT Standard_Real MaxError2d() const;
0090
0091
0092
0093 Standard_EXPORT const math_Matrix& FunctionMatrix() const;
0094
0095
0096
0097 Standard_EXPORT const math_Matrix& DerivativeFunctionMatrix() const;
0098
0099
0100
0101
0102
0103 Standard_EXPORT const math_IntegerVector& Index() const;
0104
0105 Standard_EXPORT AppParCurves_Constraint FirstConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer FirstPoint) const;
0106
0107 Standard_EXPORT AppParCurves_Constraint LastConstraint (const Handle(AppParCurves_HArray1OfConstraintCouple)& TheConstraints, const Standard_Integer LastPoint) const;
0108
0109 Standard_EXPORT void SetFirstLambda (const Standard_Real l1);
0110
0111 Standard_EXPORT void SetLastLambda (const Standard_Real l2);
0112
0113
0114
0115
0116 protected:
0117
0118
0119
0120
0121 Standard_EXPORT void Perform (const math_Vector& X);
0122
0123
0124
0125
0126 private:
0127
0128
0129
0130 Standard_Boolean Done;
0131 BRepApprox_TheMultiLineOfApprox MyMultiLine;
0132 AppParCurves_MultiBSpCurve MyMultiBSpCurve;
0133 Standard_Integer nbpoles;
0134 math_Vector myParameters;
0135 Standard_Real FVal;
0136 math_Vector ValGrad_F;
0137 math_Matrix MyF;
0138 math_Matrix PTLX;
0139 math_Matrix PTLY;
0140 math_Matrix PTLZ;
0141 math_Matrix A;
0142 math_Matrix DA;
0143 BRepApprox_BSpParLeastSquareOfMyBSplGradientOfTheComputeLineOfApprox MyLeastSquare;
0144 Standard_Boolean Contraintes;
0145 Standard_Integer NbP;
0146 Standard_Integer NbCu;
0147 Standard_Integer Adeb;
0148 Standard_Integer Afin;
0149 Handle(TColStd_HArray1OfInteger) tabdim;
0150 Standard_Real ERR3d;
0151 Standard_Real ERR2d;
0152 Standard_Integer FirstP;
0153 Standard_Integer LastP;
0154 Handle(AppParCurves_HArray1OfConstraintCouple) myConstraints;
0155 Standard_Real mylambda1;
0156 Standard_Real mylambda2;
0157
0158
0159 };
0160
0161
0162
0163
0164
0165
0166
0167 #endif