File indexing completed on 2026-12-03 10:53:50
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 <NCollection_Array1.hxx>
0026 #include <NCollection_HArray1.hxx>
0027 #include <Standard_Real.hxx>
0028 #include <GeomAbs_Shape.hxx>
0029 #include <Standard_Boolean.hxx>
0030 #include <NCollection_Array2.hxx>
0031 #include <NCollection_HArray2.hxx>
0032 #include <gp_Pnt2d.hxx>
0033 #include <gp_Pnt.hxx>
0034 #include <AdvApprox_EvaluatorFunction.hxx>
0035 #include <Standard_OStream.hxx>
0036 class AdvApprox_Cutting;
0037
0038
0039 class AdvApprox_ApproxAFunction
0040 {
0041 public:
0042 DEFINE_STANDARD_ALLOC
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063 Standard_EXPORT AdvApprox_ApproxAFunction(
0064 const int Num1DSS,
0065 const int Num2DSS,
0066 const int Num3DSS,
0067 const occ::handle<NCollection_HArray1<double>>& OneDTol,
0068 const occ::handle<NCollection_HArray1<double>>& TwoDTol,
0069 const occ::handle<NCollection_HArray1<double>>& ThreeDTol,
0070 const double First,
0071 const double Last,
0072 const GeomAbs_Shape Continuity,
0073 const int MaxDeg,
0074 const int MaxSeg,
0075 const AdvApprox_EvaluatorFunction& Func);
0076
0077
0078 Standard_EXPORT AdvApprox_ApproxAFunction(
0079 const int Num1DSS,
0080 const int Num2DSS,
0081 const int Num3DSS,
0082 const occ::handle<NCollection_HArray1<double>>& OneDTol,
0083 const occ::handle<NCollection_HArray1<double>>& TwoDTol,
0084 const occ::handle<NCollection_HArray1<double>>& ThreeDTol,
0085 const double First,
0086 const double Last,
0087 const GeomAbs_Shape Continuity,
0088 const int MaxDeg,
0089 const int MaxSeg,
0090 const AdvApprox_EvaluatorFunction& Func,
0091 const AdvApprox_Cutting& CutTool);
0092
0093 Standard_EXPORT static void Approximation(const int TotalDimension,
0094 const int TotalNumSS,
0095 const NCollection_Array1<int>& LocalDimension,
0096 const double First,
0097 const double Last,
0098 AdvApprox_EvaluatorFunction& Evaluator,
0099 const AdvApprox_Cutting& CutTool,
0100 const int ContinuityOrder,
0101 const int NumMaxCoeffs,
0102 const int MaxSegments,
0103 const NCollection_Array1<double>& TolerancesArray,
0104 const int code_precis,
0105 int& NumCurves,
0106 NCollection_Array1<int>& NumCoeffPerCurveArray,
0107 NCollection_Array1<double>& LocalCoefficientArray,
0108 NCollection_Array1<double>& IntervalsArray,
0109 NCollection_Array1<double>& ErrorMaxArray,
0110 NCollection_Array1<double>& AverageErrorArray,
0111 int& ErrorCode);
0112
0113 bool IsDone() const;
0114
0115 bool HasResult() const;
0116
0117
0118 occ::handle<NCollection_HArray2<double>> Poles1d() const;
0119
0120
0121 occ::handle<NCollection_HArray2<gp_Pnt2d>> Poles2d() const;
0122
0123
0124 occ::handle<NCollection_HArray2<gp_Pnt>> Poles() const;
0125
0126
0127 Standard_EXPORT int NbPoles() const;
0128
0129
0130 Standard_EXPORT void Poles1d(const int Index, NCollection_Array1<double>& P) const;
0131
0132
0133 Standard_EXPORT void Poles2d(const int Index, NCollection_Array1<gp_Pnt2d>& P) const;
0134
0135
0136 Standard_EXPORT void Poles(const int Index, NCollection_Array1<gp_Pnt>& P) const;
0137
0138 int Degree() const;
0139
0140 int NbKnots() const;
0141
0142 int NumSubSpaces(const int Dimension) const;
0143
0144 occ::handle<NCollection_HArray1<double>> Knots() const;
0145
0146 occ::handle<NCollection_HArray1<int>> Multiplicities() const;
0147
0148
0149 Standard_EXPORT occ::handle<NCollection_HArray1<double>> MaxError(const int Dimension) const;
0150
0151
0152 Standard_EXPORT occ::handle<NCollection_HArray1<double>> AverageError(const int Dimension) const;
0153
0154 Standard_EXPORT double MaxError(const int Dimension, const int Index) const;
0155
0156 Standard_EXPORT double AverageError(const int Dimension, const int Index) const;
0157
0158
0159 Standard_EXPORT void Dump(Standard_OStream& o) const;
0160
0161 private:
0162 Standard_EXPORT void Perform(const int Num1DSS,
0163 const int Num2DSS,
0164 const int Num3DSS,
0165 const AdvApprox_Cutting& CutTool);
0166
0167 int myNumSubSpaces[3];
0168 occ::handle<NCollection_HArray1<double>> my1DTolerances;
0169 occ::handle<NCollection_HArray1<double>> my2DTolerances;
0170 occ::handle<NCollection_HArray1<double>> my3DTolerances;
0171 double myFirst;
0172 double myLast;
0173 GeomAbs_Shape myContinuity;
0174 int myMaxDegree;
0175 int myMaxSegments;
0176 bool myDone;
0177 bool myHasResult;
0178 occ::handle<NCollection_HArray2<double>> my1DPoles;
0179 occ::handle<NCollection_HArray2<gp_Pnt2d>> my2DPoles;
0180 occ::handle<NCollection_HArray2<gp_Pnt>> my3DPoles;
0181 occ::handle<NCollection_HArray1<double>> myKnots;
0182 occ::handle<NCollection_HArray1<int>> myMults;
0183 int myDegree;
0184 void* myEvaluator;
0185 occ::handle<NCollection_HArray1<double>> my1DMaxError;
0186 occ::handle<NCollection_HArray1<double>> my1DAverageError;
0187 occ::handle<NCollection_HArray1<double>> my2DMaxError;
0188 occ::handle<NCollection_HArray1<double>> my2DAverageError;
0189 occ::handle<NCollection_HArray1<double>> my3DMaxError;
0190 occ::handle<NCollection_HArray1<double>> my3DAverageError;
0191 };
0192
0193 #include <AdvApprox_ApproxAFunction.lxx>
0194
0195 #endif