File indexing completed on 2024-11-15 09:45:44
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017 #ifndef _AdvApprox_ApproxAFunction_HeaderFile
0018 #define _AdvApprox_ApproxAFunction_HeaderFile
0019
0020 #include <Standard.hxx>
0021 #include <Standard_DefineAlloc.hxx>
0022 #include <Standard_Handle.hxx>
0023
0024 #include <Standard_Integer.hxx>
0025 #include <TColStd_HArray1OfReal.hxx>
0026 #include <Standard_Real.hxx>
0027 #include <GeomAbs_Shape.hxx>
0028 #include <Standard_Boolean.hxx>
0029 #include <TColStd_HArray2OfReal.hxx>
0030 #include <TColgp_HArray2OfPnt2d.hxx>
0031 #include <TColgp_HArray2OfPnt.hxx>
0032 #include <TColStd_HArray1OfInteger.hxx>
0033 #include <Standard_Address.hxx>
0034 #include <AdvApprox_EvaluatorFunction.hxx>
0035 #include <TColStd_Array1OfInteger.hxx>
0036 #include <TColStd_Array1OfReal.hxx>
0037 #include <TColgp_Array1OfPnt2d.hxx>
0038 #include <TColgp_Array1OfPnt.hxx>
0039 #include <Standard_OStream.hxx>
0040 class AdvApprox_Cutting;
0041
0042
0043
0044
0045 class AdvApprox_ApproxAFunction
0046 {
0047 public:
0048
0049 DEFINE_STANDARD_ALLOC
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071 Standard_EXPORT AdvApprox_ApproxAFunction(const Standard_Integer Num1DSS, const Standard_Integer Num2DSS, const Standard_Integer Num3DSS, const Handle(TColStd_HArray1OfReal)& OneDTol, const Handle(TColStd_HArray1OfReal)& TwoDTol, const Handle(TColStd_HArray1OfReal)& ThreeDTol, const Standard_Real First, const Standard_Real Last, const GeomAbs_Shape Continuity, const Standard_Integer MaxDeg, const Standard_Integer MaxSeg, const AdvApprox_EvaluatorFunction& Func);
0072
0073
0074 Standard_EXPORT AdvApprox_ApproxAFunction(const Standard_Integer Num1DSS, const Standard_Integer Num2DSS, const Standard_Integer Num3DSS, const Handle(TColStd_HArray1OfReal)& OneDTol, const Handle(TColStd_HArray1OfReal)& TwoDTol, const Handle(TColStd_HArray1OfReal)& ThreeDTol, const Standard_Real First, const Standard_Real Last, const GeomAbs_Shape Continuity, const Standard_Integer MaxDeg, const Standard_Integer MaxSeg, const AdvApprox_EvaluatorFunction& Func, const AdvApprox_Cutting& CutTool);
0075
0076 Standard_EXPORT static void Approximation (const Standard_Integer TotalDimension, const Standard_Integer TotalNumSS, const TColStd_Array1OfInteger& LocalDimension, const Standard_Real First, const Standard_Real Last, AdvApprox_EvaluatorFunction& Evaluator, const AdvApprox_Cutting& CutTool, const Standard_Integer ContinuityOrder, const Standard_Integer NumMaxCoeffs, const Standard_Integer MaxSegments, const TColStd_Array1OfReal& TolerancesArray, const Standard_Integer code_precis, Standard_Integer& NumCurves, TColStd_Array1OfInteger& NumCoeffPerCurveArray, TColStd_Array1OfReal& LocalCoefficientArray, TColStd_Array1OfReal& IntervalsArray, TColStd_Array1OfReal& ErrorMaxArray, TColStd_Array1OfReal& AverageErrorArray, Standard_Integer& ErrorCode);
0077
0078 Standard_Boolean IsDone() const;
0079
0080 Standard_Boolean HasResult() const;
0081
0082
0083 Handle(TColStd_HArray2OfReal) Poles1d() const;
0084
0085
0086 Handle(TColgp_HArray2OfPnt2d) Poles2d() const;
0087
0088
0089 Handle(TColgp_HArray2OfPnt) Poles() const;
0090
0091
0092 Standard_EXPORT Standard_Integer NbPoles() const;
0093
0094
0095 Standard_EXPORT void Poles1d (const Standard_Integer Index, TColStd_Array1OfReal& P) const;
0096
0097
0098 Standard_EXPORT void Poles2d (const Standard_Integer Index, TColgp_Array1OfPnt2d& P) const;
0099
0100
0101 Standard_EXPORT void Poles (const Standard_Integer Index, TColgp_Array1OfPnt& P) const;
0102
0103 Standard_Integer Degree() const;
0104
0105 Standard_Integer NbKnots() const;
0106
0107 Standard_Integer NumSubSpaces (const Standard_Integer Dimension) const;
0108
0109 Handle(TColStd_HArray1OfReal) Knots() const;
0110
0111 Handle(TColStd_HArray1OfInteger) Multiplicities() const;
0112
0113
0114 Standard_EXPORT Handle(TColStd_HArray1OfReal) MaxError (const Standard_Integer Dimension) const;
0115
0116
0117 Standard_EXPORT Handle(TColStd_HArray1OfReal) AverageError (const Standard_Integer Dimension) const;
0118
0119 Standard_EXPORT Standard_Real MaxError (const Standard_Integer Dimension, const Standard_Integer Index) const;
0120
0121 Standard_EXPORT Standard_Real AverageError (const Standard_Integer Dimension, const Standard_Integer Index) const;
0122
0123
0124 Standard_EXPORT void Dump (Standard_OStream& o) const;
0125
0126
0127
0128
0129 protected:
0130
0131
0132
0133
0134
0135 private:
0136
0137
0138 Standard_EXPORT void Perform (const Standard_Integer Num1DSS, const Standard_Integer Num2DSS, const Standard_Integer Num3DSS, const AdvApprox_Cutting& CutTool);
0139
0140
0141 Standard_Integer myNumSubSpaces[3];
0142 Handle(TColStd_HArray1OfReal) my1DTolerances;
0143 Handle(TColStd_HArray1OfReal) my2DTolerances;
0144 Handle(TColStd_HArray1OfReal) my3DTolerances;
0145 Standard_Real myFirst;
0146 Standard_Real myLast;
0147 GeomAbs_Shape myContinuity;
0148 Standard_Integer myMaxDegree;
0149 Standard_Integer myMaxSegments;
0150 Standard_Boolean myDone;
0151 Standard_Boolean myHasResult;
0152 Handle(TColStd_HArray2OfReal) my1DPoles;
0153 Handle(TColgp_HArray2OfPnt2d) my2DPoles;
0154 Handle(TColgp_HArray2OfPnt) my3DPoles;
0155 Handle(TColStd_HArray1OfReal) myKnots;
0156 Handle(TColStd_HArray1OfInteger) myMults;
0157 Standard_Integer myDegree;
0158 Standard_Address myEvaluator;
0159 Handle(TColStd_HArray1OfReal) my1DMaxError;
0160 Handle(TColStd_HArray1OfReal) my1DAverageError;
0161 Handle(TColStd_HArray1OfReal) my2DMaxError;
0162 Handle(TColStd_HArray1OfReal) my2DAverageError;
0163 Handle(TColStd_HArray1OfReal) my3DMaxError;
0164 Handle(TColStd_HArray1OfReal) my3DAverageError;
0165
0166
0167 };
0168
0169
0170 #include <AdvApprox_ApproxAFunction.lxx>
0171
0172
0173
0174
0175
0176 #endif