summaryrefslogtreecommitdiff
path: root/inc/AdvApprox_ApproxAFunction.hxx
blob: 2f07982ce343b1e99f5e4f43bbfce03e2071cea6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
// This file is generated by WOK (CPPExt).
// Please do not edit this file; modify original file instead.
// The copyright and license terms as defined for the original file apply to 
// this header file considered to be the "object code" form of the original source.

#ifndef _AdvApprox_ApproxAFunction_HeaderFile
#define _AdvApprox_ApproxAFunction_HeaderFile

#ifndef _Standard_HeaderFile
#include <Standard.hxx>
#endif
#ifndef _Standard_Macro_HeaderFile
#include <Standard_Macro.hxx>
#endif

#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _Handle_TColStd_HArray1OfReal_HeaderFile
#include <Handle_TColStd_HArray1OfReal.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _GeomAbs_Shape_HeaderFile
#include <GeomAbs_Shape.hxx>
#endif
#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Handle_TColStd_HArray2OfReal_HeaderFile
#include <Handle_TColStd_HArray2OfReal.hxx>
#endif
#ifndef _Handle_TColgp_HArray2OfPnt2d_HeaderFile
#include <Handle_TColgp_HArray2OfPnt2d.hxx>
#endif
#ifndef _Handle_TColgp_HArray2OfPnt_HeaderFile
#include <Handle_TColgp_HArray2OfPnt.hxx>
#endif
#ifndef _Handle_TColStd_HArray1OfInteger_HeaderFile
#include <Handle_TColStd_HArray1OfInteger.hxx>
#endif
#ifndef _Standard_Address_HeaderFile
#include <Standard_Address.hxx>
#endif
#ifndef _AdvApprox_EvaluatorFunction_HeaderFile
#include <AdvApprox_EvaluatorFunction.hxx>
#endif
#ifndef _Standard_OStream_HeaderFile
#include <Standard_OStream.hxx>
#endif
class TColStd_HArray1OfReal;
class TColStd_HArray2OfReal;
class TColgp_HArray2OfPnt2d;
class TColgp_HArray2OfPnt;
class TColStd_HArray1OfInteger;
class Standard_OutOfRange;
class Standard_ConstructionError;
class AdvApprox_Cutting;
class TColStd_Array1OfInteger;
class TColStd_Array1OfReal;
class TColgp_Array1OfPnt2d;
class TColgp_Array1OfPnt;



class AdvApprox_ApproxAFunction  {
public:

  void* operator new(size_t,void* anAddress) 
  {
    return anAddress;
  }
  void* operator new(size_t size) 
  {
    return Standard::Allocate(size); 
  }
  void  operator delete(void *anAddress) 
  {
    if (anAddress) Standard::Free((Standard_Address&)anAddress); 
  }

  //! Constructs approximator tool. <br>
  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);
  //! Approximation with user methode of cutting <br>
  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);
  
  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) ;
  
        Standard_Boolean IsDone() const;
  
        Standard_Boolean HasResult() const;
  //! returns the poles from the algorithms as is <br>
        Handle_TColStd_HArray2OfReal Poles1d() const;
  //! returns the poles from the algorithms as is <br>
        Handle_TColgp_HArray2OfPnt2d Poles2d() const;
  //! -- returns the poles from the algorithms as is <br>
        Handle_TColgp_HArray2OfPnt Poles() const;
  //!  as the name says <br>
  Standard_EXPORT     Standard_Integer NbPoles() const;
  //! returns the poles at Index from the 1d subspace <br>
  Standard_EXPORT     void Poles1d(const Standard_Integer Index,TColStd_Array1OfReal& P) const;
  //!  returns the poles at Index from the 2d subspace <br>
  Standard_EXPORT     void Poles2d(const Standard_Integer Index,TColgp_Array1OfPnt2d& P) const;
  //!  returns the poles at Index from the 3d subspace <br>
  Standard_EXPORT     void Poles(const Standard_Integer Index,TColgp_Array1OfPnt& P) const;
  
        Standard_Integer Degree() const;
  
        Standard_Integer NbKnots() const;
  
        Standard_Integer NumSubSpaces(const Standard_Integer Dimension) const;
  
        Handle_TColStd_HArray1OfReal Knots() const;
  
        Handle_TColStd_HArray1OfInteger Multiplicities() const;
  //!  returns the error as is in the algorithms <br>
  Standard_EXPORT     Handle_TColStd_HArray1OfReal MaxError(const Standard_Integer Dimension) const;
  //! returns the error as is in the algorithms <br>
  Standard_EXPORT     Handle_TColStd_HArray1OfReal AverageError(const Standard_Integer Dimension) const;
  
  Standard_EXPORT     Standard_Real MaxError(const Standard_Integer Dimension,const Standard_Integer Index) const;
  
  Standard_EXPORT     Standard_Real AverageError(const Standard_Integer Dimension,const Standard_Integer Index) const;
  //! diplay information on approximation. <br>
  Standard_EXPORT     void Dump(Standard_OStream& o) const;





protected:





private:

  
  Standard_EXPORT     void Perform(const Standard_Integer Num1DSS,const Standard_Integer Num2DSS,const Standard_Integer Num3DSS,const AdvApprox_Cutting& CutTool) ;


Standard_Integer myNumSubSpaces[3];
Handle_TColStd_HArray1OfReal my1DTolerances;
Handle_TColStd_HArray1OfReal my2DTolerances;
Handle_TColStd_HArray1OfReal my3DTolerances;
Standard_Real myFirst;
Standard_Real myLast;
GeomAbs_Shape myContinuity;
Standard_Integer myMaxDegree;
Standard_Integer myMaxSegments;
Standard_Boolean myDone;
Standard_Boolean myHasResult;
Handle_TColStd_HArray2OfReal my1DPoles;
Handle_TColgp_HArray2OfPnt2d my2DPoles;
Handle_TColgp_HArray2OfPnt my3DPoles;
Handle_TColStd_HArray1OfReal myKnots;
Handle_TColStd_HArray1OfInteger myMults;
Standard_Integer myDegree;
Standard_Address myEvaluator;
Handle_TColStd_HArray1OfReal my1DMaxError;
Handle_TColStd_HArray1OfReal my1DAverageError;
Handle_TColStd_HArray1OfReal my2DMaxError;
Handle_TColStd_HArray1OfReal my2DAverageError;
Handle_TColStd_HArray1OfReal my3DMaxError;
Handle_TColStd_HArray1OfReal my3DAverageError;


};


#include <AdvApprox_ApproxAFunction.lxx>



// other Inline functions and methods (like "C++: function call" methods)


#endif