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
6 -- This file is part of Open CASCADE Technology software library.
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.
14 -- Alternatively, this file may be used under the terms of Open CASCADE
15 -- commercial license or contractual agreement.
17 class PointsToBSplineSurface from GeomAPI
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.
29 Array2OfPnt from TColgp,
30 Array2OfReal from TColStd,
32 BSplineSurface from Geom,
33 ParametrizationType from Approx
40 ---Purpose: Constructs an empty algorithm for
41 -- approximation or interpolation of a surface.
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.
48 returns PointsToBSplineSurface from GeomAPI;
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
63 returns PointsToBSplineSurface from GeomAPI;
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
79 returns PointsToBSplineSurface from GeomAPI;
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
93 returns PointsToBSplineSurface from GeomAPI;
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
107 -- The points will be constructed as follow:
108 -- P(i,j) = gp_Pnt( X0 + (i-1)*dX ,
112 -- The resulting BSpline will have the following
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) );
121 returns PointsToBSplineSurface from GeomAPI;
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
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.
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.
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
175 -- The points will be constructed as follow:
176 -- P(i,j) = gp_Pnt( X0 + (i-1)*dX ,
180 -- The resulting BSpline will have the following
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) );
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
200 -- The points will be constructed as follow:
201 -- P(i,j) = gp_Pnt( X0 + (i-1)*dX ,
205 -- The resulting BSpline will have the following
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) );
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
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
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;"
258 returns Boolean from Standard
263 myIsDone : Boolean from Standard;
264 mySurface : BSplineSurface from Geom;
266 end PointsToBSplineSurface;