summaryrefslogtreecommitdiff
path: root/inc/GeomAPI_PointsToBSplineSurface.hxx
blob: 758f3caba6d2f55e4565df556c2a9bbc3d649739 (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
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
// 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 _GeomAPI_PointsToBSplineSurface_HeaderFile
#define _GeomAPI_PointsToBSplineSurface_HeaderFile

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

#ifndef _Standard_Boolean_HeaderFile
#include <Standard_Boolean.hxx>
#endif
#ifndef _Handle_Geom_BSplineSurface_HeaderFile
#include <Handle_Geom_BSplineSurface.hxx>
#endif
#ifndef _Standard_Integer_HeaderFile
#include <Standard_Integer.hxx>
#endif
#ifndef _GeomAbs_Shape_HeaderFile
#include <GeomAbs_Shape.hxx>
#endif
#ifndef _Standard_Real_HeaderFile
#include <Standard_Real.hxx>
#endif
#ifndef _Approx_ParametrizationType_HeaderFile
#include <Approx_ParametrizationType.hxx>
#endif
class Geom_BSplineSurface;
class StdFail_NotDone;
class TColgp_Array2OfPnt;
class TColStd_Array2OfReal;


//! This class is used to approximate or interpolate <br>
//!          a BSplineSurface passing through an  Array2 of <br>
//!          points, with a given continuity. <br>
//! Describes functions for building a BSpline <br>
//! surface which approximates or interpolates a set of points. <br>
//! A PointsToBSplineSurface object provides a framework for: <br>
//! -   defining the data of the BSpline surface to be built, <br>
//! -   implementing the approximation algorithm <br>
//!   or the interpolation algorithm, and consulting the results. <br>
class GeomAPI_PointsToBSplineSurface  {
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 an empty algorithm for <br>
//! approximation or interpolation of a surface. <br>
//! Use: <br>
//! -   an Init function to define and build the <br>
//!   BSpline surface by approximation, or <br>
//! -   an Interpolate function to define and build <br>
//!   the BSpline surface by interpolation. <br>
  Standard_EXPORT   GeomAPI_PointsToBSplineSurface();
  //! Approximates  a BSpline  Surface passing  through  an <br>
//!          array of  Points.  The resulting BSpline will  have <br>
//!          the following properties: <br>
//!          1- his degree will be in the range [Degmin,Degmax] <br>
//!          2- his  continuity will be  at  least <Continuity> <br>
//!          3- the distance from the point <Points> to the <br>
//!             BSpline will be lower to Tol3D <br>
  Standard_EXPORT   GeomAPI_PointsToBSplineSurface(const TColgp_Array2OfPnt& Points,const Standard_Integer DegMin = 3,const Standard_Integer DegMax = 8,const GeomAbs_Shape Continuity = GeomAbs_C2,const Standard_Real Tol3D = 1.0e-3);
  //! Approximates  a BSpline  Surface passing  through  an <br>
//!          array of  Points.  The resulting BSpline will  have <br>
//!          the following properties: <br>
//!          1- his degree will be in the range [Degmin,Degmax] <br>
//!          2- his  continuity will be  at  least <Continuity> <br>
//!          3- the distance from the point <Points> to the <br>
//!             BSpline will be lower to Tol3D <br>
  Standard_EXPORT   GeomAPI_PointsToBSplineSurface(const TColgp_Array2OfPnt& Points,const Approx_ParametrizationType ParType,const Standard_Integer DegMin = 3,const Standard_Integer DegMax = 8,const GeomAbs_Shape Continuity = GeomAbs_C2,const Standard_Real Tol3D = 1.0e-3);
  //! Approximates  a BSpline  Surface passing  through  an <br>
//!          array of  points using variational smoothing algorithm, <br>
//!          which tries to minimize additional criterium: <br>
//!          Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion <br>
  Standard_EXPORT   GeomAPI_PointsToBSplineSurface(const TColgp_Array2OfPnt& Points,const Standard_Real Weight1,const Standard_Real Weight2,const Standard_Real Weight3,const Standard_Integer DegMax = 8,const GeomAbs_Shape Continuity = GeomAbs_C2,const Standard_Real Tol3D = 1.0e-3);
  //! Approximates  a BSpline  Surface passing  through  an <br>
//!          array of  Points. <br>
//! <br>
//!          The points will be constructed as follow: <br>
//!            P(i,j) = gp_Pnt( X0 + (i-1)*dX , <br>
//!                             Y0 + (j-1)*dY , <br>
//!                             ZPoints(i,j)   ) <br>
//! <br>
//!          The resulting BSpline will  have the following <br>
//!          properties: <br>
//!          1- his degree will be in the range [Degmin,Degmax] <br>
//!          2- his  continuity will be  at  least <Continuity> <br>
//!          3- the distance from the point <Points> to the <br>
//!             BSpline will be lower to Tol3D <br>
//!          4- the parametrization of the surface will verify: <br>
//!               S->Value( U, V) = gp_Pnt( U, V, Z(U,V) ); <br>
  Standard_EXPORT   GeomAPI_PointsToBSplineSurface(const TColStd_Array2OfReal& ZPoints,const Standard_Real X0,const Standard_Real dX,const Standard_Real Y0,const Standard_Real dY,const Standard_Integer DegMin = 3,const Standard_Integer DegMax = 8,const GeomAbs_Shape Continuity = GeomAbs_C2,const Standard_Real Tol3D = 1.0e-3);
  //! Approximates  a BSpline Surface passing  through  an <br>
//!          array of  Point.  The resulting BSpline will  have <br>
//!          the following properties: <br>
//!          1- his degree will be in the range [Degmin,Degmax] <br>
//!          2- his  continuity will be  at  least <Continuity> <br>
//!          3- the distance from the point <Points> to the <br>
//!             BSpline will be lower to Tol3D <br>
  Standard_EXPORT     void Init(const TColgp_Array2OfPnt& Points,const Standard_Integer DegMin = 3,const Standard_Integer DegMax = 8,const GeomAbs_Shape Continuity = GeomAbs_C2,const Standard_Real Tol3D = 1.0e-3) ;
  //! Interpolates  a BSpline Surface passing  through  an <br>
//!          array of  Point.  The resulting BSpline will  have <br>
//!          the following properties: <br>
//!          1- his degree will be 3. <br>
//!          2- his  continuity will be  C2. <br>
  Standard_EXPORT     void Interpolate(const TColgp_Array2OfPnt& Points) ;
  //! Interpolates  a BSpline Surface passing  through  an <br>
//!          array of  Point.  The resulting BSpline will  have <br>
//!          the following properties: <br>
//!          1- his degree will be 3. <br>
//!          2- his  continuity will be  C2. <br>
  Standard_EXPORT     void Interpolate(const TColgp_Array2OfPnt& Points,const Approx_ParametrizationType ParType) ;
  //! Approximates  a BSpline  Surface passing  through  an <br>
//!          array of  Points. <br>
//! <br>
//!          The points will be constructed as follow: <br>
//!            P(i,j) = gp_Pnt( X0 + (i-1)*dX , <br>
//!                             Y0 + (j-1)*dY , <br>
//!                             ZPoints(i,j)   ) <br>
//! <br>
//!          The resulting BSpline will  have the following <br>
//!          properties: <br>
//!          1- his degree will be in the range [Degmin,Degmax] <br>
//!          2- his  continuity will be  at  least <Continuity> <br>
//!          3- the distance from the point <Points> to the <br>
//!             BSpline will be lower to Tol3D <br>
//!          4- the parametrization of the surface will verify: <br>
//!               S->Value( U, V) = gp_Pnt( U, V, Z(U,V) ); <br>
  Standard_EXPORT     void Init(const TColStd_Array2OfReal& ZPoints,const Standard_Real X0,const Standard_Real dX,const Standard_Real Y0,const Standard_Real dY,const Standard_Integer DegMin = 3,const Standard_Integer DegMax = 8,const GeomAbs_Shape Continuity = GeomAbs_C2,const Standard_Real Tol3D = 1.0e-3) ;
  //! Interpolates  a BSpline  Surface passing  through  an <br>
//!          array of  Points. <br>
//! <br>
//!          The points will be constructed as follow: <br>
//!            P(i,j) = gp_Pnt( X0 + (i-1)*dX , <br>
//!                             Y0 + (j-1)*dY , <br>
//!                             ZPoints(i,j)   ) <br>
//! <br>
//!          The resulting BSpline will  have the following <br>
//!          properties: <br>
//!          1- his degree will be 3 <br>
//!          2- his  continuity will be  C2. <br>
//!          4- the parametrization of the surface will verify: <br>
//!               S->Value( U, V) = gp_Pnt( U, V, Z(U,V) ); <br>
  Standard_EXPORT     void Interpolate(const TColStd_Array2OfReal& ZPoints,const Standard_Real X0,const Standard_Real dX,const Standard_Real Y0,const Standard_Real dY) ;
  //! Approximates  a BSpline Surface passing  through  an <br>
//!          array of  Point.  The resulting BSpline will  have <br>
//!          the following properties: <br>
//!          1- his degree will be in the range [Degmin,Degmax] <br>
//!          2- his  continuity will be  at  least <Continuity> <br>
//!          3- the distance from the point <Points> to the <br>
//!             BSpline will be lower to Tol3D <br>
  Standard_EXPORT     void Init(const TColgp_Array2OfPnt& Points,const Approx_ParametrizationType ParType,const Standard_Integer DegMin = 3,const Standard_Integer DegMax = 8,const GeomAbs_Shape Continuity = GeomAbs_C2,const Standard_Real Tol3D = 1.0e-3) ;
  //! Approximates  a BSpline Surface passing  through  an <br>
//!          array of  point using variational smoothing algorithm, <br>
//!          which tries to minimize additional criterium: <br>
//!          Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion <br>
  Standard_EXPORT     void Init(const TColgp_Array2OfPnt& Points,const Standard_Real Weight1,const Standard_Real Weight2,const Standard_Real Weight3,const Standard_Integer DegMax = 8,const GeomAbs_Shape Continuity = GeomAbs_C2,const Standard_Real Tol3D = 1.0e-3) ;
  //! Returns the approximate BSpline Surface <br>
  Standard_EXPORT    const Handle_Geom_BSplineSurface& Surface() const;
Standard_EXPORT operator Handle(Geom_BSplineSurface)() const;
  
  Standard_EXPORT     Standard_Boolean IsDone() const;





protected:





private:



Standard_Boolean myIsDone;
Handle_Geom_BSplineSurface mySurface;


};





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


#endif