7fd59977 |
1 | -- File: Blend_Function.cdl |
2 | -- Created: Mon Sep 13 16:54:05 1993 |
3 | -- Author: Jacques GOUSSARD |
4 | -- <jag@topsn2> |
5 | ---Copyright: Matra Datavision 1993 |
6 | |
7 | |
8 | deferred class Function from Blend |
9 | |
10 | inherits AppFunction from Blend |
11 | |
12 | |
13 | |
14 | ---Purpose: Deferred class for a function used to compute a blending |
15 | -- surface between two surfaces, using a guide line. |
16 | -- The vector <X> used in Value, Values and Derivatives methods |
17 | -- has to be the vector of the parametric coordinates U1,V1, |
18 | -- U2,V2, of the extremities of a section on the first and |
19 | -- second surface. |
20 | |
21 | |
22 | uses Vector from math, |
23 | Matrix from math, |
24 | Vec from gp, |
25 | Vec2d from gp, |
26 | Pnt from gp, |
27 | Point from Blend, |
28 | Array1OfPnt from TColgp, |
29 | Array1OfVec from TColgp, |
30 | Array1OfPnt2d from TColgp, |
31 | Array1OfVec2d from TColgp, |
32 | Array1OfReal from TColStd, |
33 | Array1OfInteger from TColStd |
34 | |
35 | raises DomainError from Standard |
36 | |
37 | is |
38 | |
39 | NbVariables(me) |
40 | ---Purpose: Returns 4. |
41 | returns Integer from Standard ; |
42 | |
43 | |
44 | NbEquations(me) |
45 | ---Purpose: returns the number of equations of the function. |
46 | returns Integer from Standard |
47 | is deferred; |
48 | |
49 | Value(me: in out; X: Vector; F: out Vector) |
50 | ---Purpose: computes the values <F> of the Functions for the |
51 | -- variable <X>. |
52 | -- Returns True if the computation was done successfully, |
53 | -- False otherwise. |
54 | |
55 | returns Boolean from Standard |
56 | is deferred; |
57 | |
58 | |
59 | Derivatives(me: in out; X: Vector; D: out Matrix) |
60 | ---Purpose: returns the values <D> of the derivatives for the |
61 | -- variable <X>. |
62 | -- Returns True if the computation was done successfully, |
63 | -- False otherwise. |
64 | |
65 | returns Boolean from Standard |
66 | is deferred; |
67 | |
68 | |
69 | Values(me: in out; X: Vector; F: out Vector; D: out Matrix) |
70 | ---Purpose: returns the values <F> of the functions and the derivatives |
71 | -- <D> for the variable <X>. |
72 | -- Returns True if the computation was done successfully, |
73 | -- False otherwise. |
74 | |
75 | returns Boolean from Standard |
76 | is deferred; |
77 | |
78 | |
79 | Set(me: in out; Param: Real from Standard) |
80 | |
81 | ---Purpose: Sets the value of the parameter along the guide line. |
82 | -- This determines the plane in which the solution has |
83 | -- to be found. |
84 | |
85 | is deferred; |
86 | |
87 | |
88 | Set(me: in out; First, Last: Real from Standard) |
89 | |
90 | ---Purpose: Sets the bounds of the parametric interval on |
91 | -- the guide line. |
92 | -- This determines the derivatives in these values if the |
93 | -- function is not Cn. |
94 | is deferred; |
95 | |
96 | |
97 | GetTolerance(me; Tolerance: out Vector from math; Tol: Real from Standard) |
98 | |
99 | ---Purpose: Returns in the vector Tolerance the parametric tolerance |
100 | -- for each of the 4 variables; |
101 | -- Tol is the tolerance used in 3d space. |
102 | |
103 | is deferred; |
104 | |
105 | |
106 | GetBounds(me; InfBound,SupBound: out Vector from math) |
107 | |
108 | ---Purpose: Returns in the vector InfBound the lowest values allowed |
109 | -- for each of the 4 variables. |
110 | -- Returns in the vector SupBound the greatest values allowed |
111 | -- for each of the 4 variables. |
112 | |
113 | is deferred; |
114 | |
115 | |
116 | IsSolution(me: in out; Sol: Vector from math; Tol: Real from Standard) |
117 | |
118 | ---Purpose: Returns Standard_True if Sol is a zero of the function. |
119 | -- Tol is the tolerance used in 3d space. |
120 | -- The computation is made at the current value of |
121 | -- the parameter on the guide line. |
122 | |
123 | returns Boolean from Standard |
124 | is deferred; |
125 | |
126 | |
127 | --- TheFollowing methods are called only when |
128 | -- IsSolution returns Standard_True. |
129 | |
130 | Pnt1(me) |
131 | ---Purpose: Returns the point on the first support. |
132 | ---See Also: PointOnS1 |
133 | ---C++: return const & |
134 | returns Pnt from gp |
135 | is redefined static; |
136 | |
137 | Pnt2(me) |
138 | ---Purpose: Returns the point on the seconde support. |
139 | ---See Also: PointOnS2 |
140 | ---C++: return const & |
141 | returns Pnt from gp |
142 | is redefined static; |
143 | |
144 | PointOnS1(me) |
145 | |
146 | ---Purpose: Returns the point on the first surface, at parameter |
147 | -- Sol(1),Sol(2) (Sol is the vector used in the call of |
148 | -- IsSolution. |
149 | |
150 | returns Pnt from gp |
151 | ---C++: return const& |
152 | is deferred; |
153 | |
154 | |
155 | PointOnS2(me) |
156 | |
157 | ---Purpose: Returns the point on the second surface, at parameter |
158 | -- Sol(3),Sol(4) (Sol is the vector used in the call of |
159 | -- IsSolution. |
160 | |
161 | returns Pnt from gp |
162 | ---C++: return const& |
163 | is deferred; |
164 | |
165 | |
166 | IsTangencyPoint(me) |
167 | |
168 | ---Purpose: Returns True when it is not possible to compute |
169 | -- the tangent vectors at PointOnS1 and/or PointOnS2. |
170 | |
171 | returns Boolean from Standard |
172 | is deferred; |
173 | |
174 | |
175 | TangentOnS1(me) |
176 | |
177 | ---Purpose: Returns the tangent vector at PointOnS1, in 3d space. |
178 | |
179 | returns Vec from gp |
180 | ---C++: return const& |
181 | raises DomainError from Standard |
182 | --- The exception is raised when IsTangencyPoint |
183 | -- returns Standard_True. |
184 | |
185 | is deferred; |
186 | |
187 | Tangent2dOnS1(me) |
188 | |
189 | ---Purpose: Returns the tangent vector at PointOnS1, in the |
190 | -- parametric space of the first surface. |
191 | |
192 | returns Vec2d from gp |
193 | ---C++: return const& |
194 | raises DomainError from Standard |
195 | --- The exception is raised when IsTangencyPoint |
196 | -- returns Standard_True. |
197 | |
198 | is deferred; |
199 | |
200 | |
201 | TangentOnS2(me) |
202 | |
203 | ---Purpose: Returns the tangent vector at PointOnS2, in 3d space. |
204 | |
205 | returns Vec from gp |
206 | ---C++: return const& |
207 | raises DomainError from Standard |
208 | --- The exception is raised when IsTangencyPoint |
209 | -- returns Standard_True. |
210 | |
211 | is deferred; |
212 | |
213 | |
214 | Tangent2dOnS2(me) |
215 | |
216 | ---Purpose: Returns the tangent vector at PointOnS2, in the |
217 | -- parametric space of the second surface. |
218 | |
219 | returns Vec2d from gp |
220 | ---C++: return const& |
221 | raises DomainError from Standard |
222 | --- The exception is raised when IsTangencyPoint |
223 | -- returns Standard_True. |
224 | |
225 | is deferred; |
226 | |
227 | |
228 | Tangent(me; U1,V1,U2,V2: Real from Standard; |
229 | TgFirst,TgLast,NormFirst,NormLast: out Vec from gp) |
230 | |
231 | ---Purpose: Returns the tangent vector at the section, |
232 | -- at the beginning and the end of the section, and |
233 | -- returns the normal (of the surfaces) at |
234 | -- these points. |
235 | |
236 | raises DomainError from Standard |
237 | --- The exception is raised when IsTangencyPoint |
238 | -- returns Standard_True. |
239 | |
240 | is deferred; |
241 | |
242 | TwistOnS1(me) |
243 | returns Boolean from Standard |
244 | is virtual; |
245 | |
246 | TwistOnS2(me) |
247 | returns Boolean from Standard |
248 | is virtual; |
249 | |
250 | -- Methods for the approximation |
251 | -- |
252 | |
253 | GetShape(me: in out; |
254 | NbPoles : out Integer from Standard; |
255 | NbKnots : out Integer from Standard; |
256 | Degree : out Integer from Standard; |
257 | NbPoles2d : out Integer from Standard) |
258 | is deferred; |
259 | |
260 | |
261 | GetTolerance(me; |
262 | BoundTol, SurfTol, AngleTol : Real; |
263 | Tol3d : out Vector; |
264 | Tol1D : out Vector ) |
265 | ---Purpose: Returns the tolerance to reach in approximation |
266 | -- to respecte |
267 | -- BoundTol error at the Boundary |
268 | -- AngleTol tangent error at the Boundary |
269 | -- SurfTol error inside the surface. |
270 | is deferred; |
271 | |
272 | Knots(me: in out; TKnots: out Array1OfReal from TColStd) |
273 | |
274 | is deferred; |
275 | |
276 | |
277 | Mults(me: in out; TMults: out Array1OfInteger from TColStd) |
278 | |
279 | is deferred; |
280 | |
281 | |
282 | Section(me: in out; P: Point from Blend; |
283 | Poles : out Array1OfPnt from TColgp; |
284 | DPoles : out Array1OfVec from TColgp; |
285 | Poles2d : out Array1OfPnt2d from TColgp; |
286 | DPoles2d : out Array1OfVec2d from TColgp; |
287 | Weigths : out Array1OfReal from TColStd; |
288 | DWeigths : out Array1OfReal from TColStd) |
289 | |
290 | ---Purpose: Used for the first and last section |
291 | -- The method returns Standard_True if the derivatives |
292 | -- are computed, otherwise it returns Standard_False. |
293 | |
294 | returns Boolean from Standard |
295 | |
296 | is deferred; |
297 | |
298 | |
299 | Section(me: in out; P: Point from Blend; |
300 | Poles : out Array1OfPnt from TColgp; |
301 | Poles2d : out Array1OfPnt2d from TColgp; |
302 | Weigths : out Array1OfReal from TColStd) |
303 | is deferred; |
304 | |
305 | |
306 | Section(me: in out; P: Point from Blend; |
307 | Poles : out Array1OfPnt from TColgp; |
308 | DPoles : out Array1OfVec from TColgp; |
309 | D2Poles : out Array1OfVec from TColgp; |
310 | Poles2d : out Array1OfPnt2d from TColgp; |
311 | DPoles2d : out Array1OfVec2d from TColgp; |
312 | D2Poles2d : out Array1OfVec2d from TColgp; |
313 | Weigths : out Array1OfReal from TColStd; |
314 | DWeigths : out Array1OfReal from TColStd; |
315 | D2Weigths : out Array1OfReal from TColStd) |
316 | |
317 | ---Purpose: Used for the first and last section |
318 | -- The method returns Standard_True if the derivatives |
319 | -- are computed, otherwise it returns Standard_False |
320 | |
321 | returns Boolean from Standard |
322 | |
323 | is redefined; |
324 | end Function; |