0023948: Wrong intersection between a surface of revolution and a plane.
[occt.git] / src / GeomAPI / GeomAPI_PointsToBSplineSurface.cdl
1 -- Created on: 1995-01-16
2 -- Created by: Remi LEQUETTE
3 -- Copyright (c) 1995-1999 Matra Datavision
4 -- Copyright (c) 1999-2014 OPEN CASCADE SAS
5 --
6 -- This file is part of Open CASCADE Technology software library.
7 --
8 -- This library is free software; you can redistribute it and/or modify it under
9 -- the terms of the GNU Lesser General Public License version 2.1 as published
10 -- by the Free Software Foundation, with special exception defined in the file
11 -- OCCT_LGPL_EXCEPTION.txt. Consult the file LICENSE_LGPL_21.txt included in OCCT
12 -- distribution for complete text of the license and disclaimer of any warranty.
13 --
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
16
17 class PointsToBSplineSurface from GeomAPI 
18
19         ---Purpose: This class is used to approximate or interpolate 
20         --          a BSplineSurface passing through an  Array2 of 
21         --          points, with a given continuity. 
22         -- Describes functions for building a BSpline
23         -- surface which approximates or interpolates a set of points.
24         -- A PointsToBSplineSurface object provides a framework for:
25         -- -   defining the data of the BSpline surface to be built,
26         -- -   implementing the approximation algorithm
27         --   or the interpolation algorithm, and consulting the results.
28 uses
29     Array2OfPnt    from TColgp,
30     Array2OfReal   from TColStd,
31     Shape          from GeomAbs,
32     BSplineSurface from Geom,
33     ParametrizationType from Approx 
34     
35 raises
36     NotDone from StdFail
37
38 is
39     Create
40         ---Purpose: Constructs an empty algorithm for
41         -- approximation or interpolation of a surface.
42         -- Use:
43         -- -   an Init function to define and build the
44         --   BSpline surface by approximation, or
45         -- -   an Interpolate function to define and build
46         --   the BSpline surface by interpolation.
47  
48     returns PointsToBSplineSurface from GeomAPI;
49     
50     Create(Points     : Array2OfPnt from TColgp;
51            DegMin     : Integer     from Standard = 3;
52            DegMax     : Integer     from Standard = 8;
53            Continuity : Shape       from GeomAbs  = GeomAbs_C2;
54            Tol3D      : Real        from Standard = 1.0e-3)
55         ---Purpose: Approximates  a BSpline  Surface passing  through  an
56         --          array of  Points.  The resulting BSpline will  have
57         --          the following properties: 
58         --          1- his degree will be in the range [Degmin,Degmax]  
59         --          2- his  continuity will be  at  least <Continuity>
60         --          3- the distance from the point <Points> to the 
61         --             BSpline will be lower to Tol3D
62         ---Level: Public
63     returns PointsToBSplineSurface from GeomAPI;
64     
65     Create(Points     : Array2OfPnt from TColgp;
66            ParType    : ParametrizationType from Approx;
67            DegMin     : Integer     from Standard = 3;
68            DegMax     : Integer     from Standard = 8;
69            Continuity : Shape       from GeomAbs  = GeomAbs_C2;
70            Tol3D      : Real        from Standard = 1.0e-3)
71         ---Purpose: Approximates  a BSpline  Surface passing  through  an
72         --          array of  Points.  The resulting BSpline will  have
73         --          the following properties: 
74         --          1- his degree will be in the range [Degmin,Degmax]  
75         --          2- his  continuity will be  at  least <Continuity>
76         --          3- the distance from the point <Points> to the 
77         --             BSpline will be lower to Tol3D
78         ---Level: Public
79     returns PointsToBSplineSurface from GeomAPI;
80     
81     Create(Points     : Array2OfPnt from TColgp;
82            Weight1      : Real         from Standard;
83            Weight2      : Real         from Standard;
84            Weight3      : Real         from Standard;
85            DegMax     : Integer     from Standard = 8;
86            Continuity : Shape       from GeomAbs  = GeomAbs_C2;
87            Tol3D      : Real        from Standard = 1.0e-3)
88         ---Purpose: Approximates  a BSpline  Surface passing  through  an
89         --          array of  points using variational smoothing algorithm, 
90         --          which tries to minimize additional criterium: 
91         --          Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion 
92         ---Level: Public
93     returns PointsToBSplineSurface from GeomAPI;
94     
95     Create(ZPoints    : Array2OfReal from TColStd;
96            X0         : Real         from Standard;
97            dX         : Real         from Standard;
98            Y0         : Real         from Standard;
99            dY         : Real         from Standard;
100            DegMin     : Integer      from Standard = 3;
101            DegMax     : Integer      from Standard = 8;
102            Continuity : Shape        from GeomAbs  = GeomAbs_C2;
103            Tol3D      : Real         from Standard = 1.0e-3)
104         ---Purpose: Approximates  a BSpline  Surface passing  through  an
105         --          array of  Points.  
106         --          
107         --          The points will be constructed as follow:
108         --            P(i,j) = gp_Pnt( X0 + (i-1)*dX ,
109         --                             Y0 + (j-1)*dY ,
110         --                             ZPoints(i,j)   )
111         --          
112         --          The resulting BSpline will  have the following 
113         --          properties: 
114         --          1- his degree will be in the range [Degmin,Degmax]  
115         --          2- his  continuity will be  at  least <Continuity>
116         --          3- the distance from the point <Points> to the 
117         --             BSpline will be lower to Tol3D
118         --          4- the parametrization of the surface will verify:
119         --               S->Value( U, V) = gp_Pnt( U, V, Z(U,V) );
120         ---Level: Public
121     returns PointsToBSplineSurface from GeomAPI;
122
123
124     Init(me : in out;
125          Points     : Array2OfPnt from TColgp;
126          DegMin     : Integer     from Standard = 3;
127          DegMax     : Integer     from Standard = 8;
128          Continuity : Shape       from GeomAbs  = GeomAbs_C2;
129          Tol3D      : Real        from Standard = 1.0e-3)
130         ---Purpose: Approximates  a BSpline Surface passing  through  an
131         --          array of  Point.  The resulting BSpline will  have
132         --          the following properties: 
133         --          1- his degree will be in the range [Degmin,Degmax]  
134         --          2- his  continuity will be  at  least <Continuity> 
135         --          3- the distance from the point <Points> to the 
136         --             BSpline will be lower to Tol3D
137         ---Level: Public
138     is static;
139
140              
141     Interpolate(me : in out; Points     : Array2OfPnt from TColgp)
142         ---Purpose: Interpolates  a BSpline Surface passing  through  an
143         --          array of  Point.  The resulting BSpline will  have
144         --          the following properties: 
145         --          1- his degree will be 3.
146         --          2- his  continuity will be  C2.
147         ---Level: Public
148     is static;
149              
150              
151     Interpolate(me : in out; Points     : Array2OfPnt from TColgp; 
152                              ParType    : ParametrizationType from Approx)
153         ---Purpose: Interpolates  a BSpline Surface passing  through  an
154         --          array of  Point.  The resulting BSpline will  have
155         --          the following properties: 
156         --          1- his degree will be 3.
157         --          2- his  continuity will be  C2.
158         ---Level: Public
159     is static;
160              
161
162     Init(me : in out;
163          ZPoints    : Array2OfReal from TColStd;
164          X0         : Real         from Standard;
165          dX         : Real         from Standard;
166          Y0         : Real         from Standard;
167          dY         : Real         from Standard;
168          DegMin     : Integer      from Standard = 3;
169          DegMax     : Integer      from Standard = 8;
170          Continuity : Shape        from GeomAbs  = GeomAbs_C2;
171          Tol3D      : Real         from Standard = 1.0e-3)
172         ---Purpose: Approximates  a BSpline  Surface passing  through  an
173         --          array of  Points.  
174         --          
175         --          The points will be constructed as follow:
176         --            P(i,j) = gp_Pnt( X0 + (i-1)*dX ,
177         --                             Y0 + (j-1)*dY ,
178         --                             ZPoints(i,j)   )
179         --          
180         --          The resulting BSpline will  have the following 
181         --          properties: 
182         --          1- his degree will be in the range [Degmin,Degmax]  
183         --          2- his  continuity will be  at  least <Continuity>
184         --          3- the distance from the point <Points> to the 
185         --             BSpline will be lower to Tol3D
186         --          4- the parametrization of the surface will verify:
187         --               S->Value( U, V) = gp_Pnt( U, V, Z(U,V) );
188         ---Level: Public
189     is static;
190            
191     Interpolate(me : in out;
192                 ZPoints    : Array2OfReal from TColStd;
193                 X0         : Real         from Standard;
194                 dX         : Real         from Standard;
195                 Y0         : Real         from Standard;
196                 dY         : Real         from Standard)
197         ---Purpose: Interpolates  a BSpline  Surface passing  through  an
198         --          array of  Points.  
199         --          
200         --          The points will be constructed as follow:
201         --            P(i,j) = gp_Pnt( X0 + (i-1)*dX ,
202         --                             Y0 + (j-1)*dY ,
203         --                             ZPoints(i,j)   )
204         --          
205         --          The resulting BSpline will  have the following 
206         --          properties: 
207         --          1- his degree will be 3
208         --          2- his  continuity will be  C2.
209         --          4- the parametrization of the surface will verify:
210         --               S->Value( U, V) = gp_Pnt( U, V, Z(U,V) );
211         ---Level: Public
212     is static;
213
214     Init(me : in out;
215          Points     : Array2OfPnt from TColgp;
216          ParType      : ParametrizationType from Approx;
217          DegMin     : Integer     from Standard = 3;
218          DegMax     : Integer     from Standard = 8;
219          Continuity : Shape       from GeomAbs  = GeomAbs_C2;
220          Tol3D      : Real        from Standard = 1.0e-3)
221         ---Purpose: Approximates  a BSpline Surface passing  through  an
222         --          array of  Point.  The resulting BSpline will  have
223         --          the following properties: 
224         --          1- his degree will be in the range [Degmin,Degmax]  
225         --          2- his  continuity will be  at  least <Continuity> 
226         --          3- the distance from the point <Points> to the 
227         --             BSpline will be lower to Tol3D
228         ---Level: Public
229     is static;
230
231
232     Init(me : in out;
233          Points     : Array2OfPnt from TColgp;
234          Weight1      : Real         from Standard;
235          Weight2      : Real         from Standard;
236          Weight3      : Real         from Standard;
237          DegMax     : Integer     from Standard = 8;
238          Continuity : Shape       from GeomAbs  = GeomAbs_C2;
239          Tol3D      : Real        from Standard = 1.0e-3)
240         ---Purpose: Approximates  a BSpline Surface passing  through  an
241         --          array of  point using variational smoothing algorithm, 
242         --          which tries to minimize additional criterium: 
243         --          Weight1*CurveLength + Weight2*Curvature + Weight3*Torsion
244         ---Level: Public
245     is static;
246
247            
248     Surface(me) 
249         ---Purpose: Returns the approximate BSpline Surface
250     returns BSplineSurface from Geom
251         ---C++: return const &
252         ---C++: alias "Standard_EXPORT operator Handle(Geom_BSplineSurface)() const;"
253     raises
254         NotDone from StdFail
255     is static;
256      
257     IsDone(me) 
258     returns  Boolean  from  Standard 
259     is  static;
260             
261
262 fields
263     myIsDone  : Boolean        from Standard;
264     mySurface : BSplineSurface from Geom;
265
266 end PointsToBSplineSurface;