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 _AdvApp2Var_ApproxAFunc2Var_HeaderFile
0018 #define _AdvApp2Var_ApproxAFunc2Var_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 <AdvApp2Var_Context.hxx>
0029 #include <AdvApp2Var_Network.hxx>
0030 #include <AdvApp2Var_Framework.hxx>
0031 #include <Standard_Boolean.hxx>
0032 #include <Geom_Surface.hxx>
0033 #include <AdvApp2Var_EvaluatorFunc2Var.hxx>
0034 #include <Standard_OStream.hxx>
0035 class AdvApprox_Cutting;
0036 class AdvApp2Var_Criterion;
0037 class Geom_BSplineSurface;
0038
0039
0040
0041
0042
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053
0054
0055
0056
0057
0058
0059
0060
0061
0062
0063
0064
0065
0066
0067
0068
0069
0070
0071
0072
0073
0074
0075
0076
0077
0078
0079
0080
0081
0082
0083
0084
0085 class AdvApp2Var_ApproxAFunc2Var
0086 {
0087 public:
0088 DEFINE_STANDARD_ALLOC
0089
0090 Standard_EXPORT AdvApp2Var_ApproxAFunc2Var(
0091 const int Num1DSS,
0092 const int Num2DSS,
0093 const int Num3DSS,
0094 const occ::handle<NCollection_HArray1<double>>& OneDTol,
0095 const occ::handle<NCollection_HArray1<double>>& TwoDTol,
0096 const occ::handle<NCollection_HArray1<double>>& ThreeDTol,
0097 const occ::handle<NCollection_HArray2<double>>& OneDTolFr,
0098 const occ::handle<NCollection_HArray2<double>>& TwoDTolFr,
0099 const occ::handle<NCollection_HArray2<double>>& ThreeDTolFr,
0100 const double FirstInU,
0101 const double LastInU,
0102 const double FirstInV,
0103 const double LastInV,
0104 const GeomAbs_IsoType FavorIso,
0105 const GeomAbs_Shape ContInU,
0106 const GeomAbs_Shape ContInV,
0107 const int PrecisCode,
0108 const int MaxDegInU,
0109 const int MaxDegInV,
0110 const int MaxPatch,
0111 const AdvApp2Var_EvaluatorFunc2Var& Func,
0112 AdvApprox_Cutting& UChoice,
0113 AdvApprox_Cutting& VChoice);
0114
0115 Standard_EXPORT AdvApp2Var_ApproxAFunc2Var(
0116 const int Num1DSS,
0117 const int Num2DSS,
0118 const int Num3DSS,
0119 const occ::handle<NCollection_HArray1<double>>& OneDTol,
0120 const occ::handle<NCollection_HArray1<double>>& TwoDTol,
0121 const occ::handle<NCollection_HArray1<double>>& ThreeDTol,
0122 const occ::handle<NCollection_HArray2<double>>& OneDTolFr,
0123 const occ::handle<NCollection_HArray2<double>>& TwoDTolFr,
0124 const occ::handle<NCollection_HArray2<double>>& ThreeDTolFr,
0125 const double FirstInU,
0126 const double LastInU,
0127 const double FirstInV,
0128 const double LastInV,
0129 const GeomAbs_IsoType FavorIso,
0130 const GeomAbs_Shape ContInU,
0131 const GeomAbs_Shape ContInV,
0132 const int PrecisCode,
0133 const int MaxDegInU,
0134 const int MaxDegInV,
0135 const int MaxPatch,
0136 const AdvApp2Var_EvaluatorFunc2Var& Func,
0137 const AdvApp2Var_Criterion& Crit,
0138 AdvApprox_Cutting& UChoice,
0139 AdvApprox_Cutting& VChoice);
0140
0141
0142
0143 bool IsDone() const;
0144
0145
0146
0147
0148 bool HasResult() const;
0149
0150
0151 occ::handle<Geom_BSplineSurface> Surface(const int Index) const;
0152
0153 int UDegree() const;
0154
0155 int VDegree() const;
0156
0157 int NumSubSpaces(const int Dimension) const;
0158
0159
0160 Standard_EXPORT occ::handle<NCollection_HArray1<double>> MaxError(const int Dimension) const;
0161
0162
0163 Standard_EXPORT occ::handle<NCollection_HArray1<double>> AverageError(const int Dimension) const;
0164
0165
0166
0167
0168 Standard_EXPORT occ::handle<NCollection_HArray1<double>> UFrontError(const int Dimension) const;
0169
0170
0171
0172
0173 Standard_EXPORT occ::handle<NCollection_HArray1<double>> VFrontError(const int Dimension) const;
0174
0175
0176 Standard_EXPORT double MaxError(const int Dimension, const int Index) const;
0177
0178
0179 Standard_EXPORT double AverageError(const int Dimension, const int Index) const;
0180
0181
0182 Standard_EXPORT double UFrontError(const int Dimension, const int Index) const;
0183
0184
0185 Standard_EXPORT double VFrontError(const int Dimension, const int Index) const;
0186
0187 Standard_EXPORT double CritError(const int Dimension, const int Index) const;
0188
0189
0190
0191 Standard_EXPORT void Dump(Standard_OStream& o) const;
0192
0193 private:
0194
0195 Standard_EXPORT void Init();
0196
0197
0198
0199 Standard_EXPORT void InitGrid(const int NbInt);
0200
0201
0202 Standard_EXPORT void Perform(const AdvApprox_Cutting& UChoice,
0203 const AdvApprox_Cutting& VChoice,
0204 const AdvApp2Var_EvaluatorFunc2Var& Func);
0205
0206
0207 Standard_EXPORT void Perform(const AdvApprox_Cutting& UChoice,
0208 const AdvApprox_Cutting& VChoice,
0209 const AdvApp2Var_EvaluatorFunc2Var& Func,
0210 const AdvApp2Var_Criterion& Crit);
0211
0212
0213 Standard_EXPORT void ComputePatches(const AdvApprox_Cutting& UChoice,
0214 const AdvApprox_Cutting& VChoice,
0215 const AdvApp2Var_EvaluatorFunc2Var& Func);
0216
0217
0218 Standard_EXPORT void ComputePatches(const AdvApprox_Cutting& UChoice,
0219 const AdvApprox_Cutting& VChoice,
0220 const AdvApp2Var_EvaluatorFunc2Var& Func,
0221 const AdvApp2Var_Criterion& Crit);
0222
0223
0224 Standard_EXPORT void ComputeConstraints(const AdvApprox_Cutting& UChoice,
0225 const AdvApprox_Cutting& VChoice,
0226 const AdvApp2Var_EvaluatorFunc2Var& Func);
0227
0228
0229 Standard_EXPORT void ComputeConstraints(const AdvApprox_Cutting& UChoice,
0230 const AdvApprox_Cutting& VChoice,
0231 const AdvApp2Var_EvaluatorFunc2Var& Func,
0232 const AdvApp2Var_Criterion& Crit);
0233
0234
0235 Standard_EXPORT void Compute3DErrors();
0236
0237
0238
0239 Standard_EXPORT void ComputeCritError();
0240
0241
0242 Standard_EXPORT void ConvertBS();
0243
0244 int myNumSubSpaces[3];
0245 occ::handle<NCollection_HArray1<double>> my1DTolerances;
0246 occ::handle<NCollection_HArray1<double>> my2DTolerances;
0247 occ::handle<NCollection_HArray1<double>> my3DTolerances;
0248 occ::handle<NCollection_HArray2<double>> my1DTolOnFront;
0249 occ::handle<NCollection_HArray2<double>> my2DTolOnFront;
0250 occ::handle<NCollection_HArray2<double>> my3DTolOnFront;
0251 double myFirstParInU;
0252 double myLastParInU;
0253 double myFirstParInV;
0254 double myLastParInV;
0255 GeomAbs_IsoType myFavoriteIso;
0256 GeomAbs_Shape myContInU;
0257 GeomAbs_Shape myContInV;
0258 int myPrecisionCode;
0259 int myMaxDegInU;
0260 int myMaxDegInV;
0261 int myMaxPatches;
0262 AdvApp2Var_Context myConditions;
0263 AdvApp2Var_Network myResult;
0264 AdvApp2Var_Framework myConstraints;
0265 bool myDone;
0266 bool myHasResult;
0267 occ::handle<NCollection_HArray1<occ::handle<Geom_Surface>>> mySurfaces;
0268 int myDegreeInU;
0269 int myDegreeInV;
0270 occ::handle<NCollection_HArray1<double>> my1DMaxError;
0271 occ::handle<NCollection_HArray1<double>> my1DAverageError;
0272 occ::handle<NCollection_HArray1<double>> my1DUFrontError;
0273 occ::handle<NCollection_HArray1<double>> my1DVFrontError;
0274 occ::handle<NCollection_HArray1<double>> my2DMaxError;
0275 occ::handle<NCollection_HArray1<double>> my2DAverageError;
0276 occ::handle<NCollection_HArray1<double>> my2DUFrontError;
0277 occ::handle<NCollection_HArray1<double>> my2DVFrontError;
0278 occ::handle<NCollection_HArray1<double>> my3DMaxError;
0279 occ::handle<NCollection_HArray1<double>> my3DAverageError;
0280 occ::handle<NCollection_HArray1<double>> my3DUFrontError;
0281 occ::handle<NCollection_HArray1<double>> my3DVFrontError;
0282 double myCriterionError;
0283 };
0284
0285 #include <AdvApp2Var_ApproxAFunc2Var.lxx>
0286
0287 #endif