Integration of OCCT 6.5.0 from SVN
[occt.git] / src / BRepBlend / BRepBlend_AppFuncRoot.cdl
CommitLineData
7fd59977 1-- File: BRepBlend_AppFuncRoot.cdl
2-- Created: Tue May 12 14:50:30 1998
3-- Author: Philippe NOUAILLE
4-- <pne@cleox.paris1.matra-dtv.fr>
5---Copyright: Matra Datavision 1998
6
7deferred class AppFuncRoot from BRepBlend inherits SweepFunction from Approx
8
9 ---Purpose: Function to approximate by AppSurface
10 ---Level: Advanced
11
12uses
13 Line from BRepBlend,
14 Point from Blend,
15 AppFunction from Blend,
16 Shape from GeomAbs,
17 Vector from math,
18 Pnt from gp,
19 Array1OfPnt from TColgp,
20 Array1OfPnt2d from TColgp,
21 Array1OfVec from TColgp,
22 Array1OfVec2d from TColgp,
23 Array1OfReal from TColStd,
24 Array1OfInteger from TColStd,
25 HArray1OfPnt from TColgp,
26 HArray1OfPnt2d from TColgp,
27 HArray1OfVec from TColgp,
28 HArray1OfVec2d from TColgp,
29 HArray1OfReal from TColStd
30
31
32raises OutOfRange
33
34is
35 Initialize(Line : in out Line from BRepBlend;
36 Func : in out AppFunction from Blend;
37 Tol3d : Real from Standard;
38 Tol2d : Real from Standard)
39 ---Warning: The Object Func cannot be killed before me.
40 returns AppFuncRoot;
41
42--
43-- To compute Sections and derivatives Sections
44--
45--
46
47 D0(me : mutable;
48 Param: Real;
49 First, Last : Real;
50 Poles : out Array1OfPnt from TColgp;
51 Poles2d : out Array1OfPnt2d from TColgp;
52 Weigths : out Array1OfReal from TColStd)
53 ---Purpose: compute the section for v = param
54 returns Boolean is redefined;
55
56 D1(me : mutable;
57 Param: Real;
58 First, Last : Real;
59 Poles : out Array1OfPnt from TColgp;
60 DPoles : out Array1OfVec from TColgp;
61 Poles2d : out Array1OfPnt2d from TColgp;
62 DPoles2d : out Array1OfVec2d from TColgp;
63 Weigths : out Array1OfReal from TColStd;
64 DWeigths : out Array1OfReal from TColStd)
65 ---Purpose: compute the first derivative in v direction of the
66 -- section for v = param
67 returns Boolean
68 is redefined;
69
70 D2(me : mutable;
71 Param: Real;
72 First, Last : Real;
73 Poles : out Array1OfPnt from TColgp;
74 DPoles : out Array1OfVec from TColgp;
75 D2Poles : out Array1OfVec from TColgp;
76 Poles2d : out Array1OfPnt2d from TColgp;
77 DPoles2d : out Array1OfVec2d from TColgp;
78 D2Poles2d : out Array1OfVec2d from TColgp;
79 Weigths : out Array1OfReal from TColStd;
80 DWeigths : out Array1OfReal from TColStd;
81 D2Weigths : out Array1OfReal from TColStd)
82 ---Purpose: compute the second derivative in v direction of the
83 -- section for v = param
84 returns Boolean
85 is redefined;
86
87--
88-- General Information On The Function
89--
90
91 Nb2dCurves(me)
92 ---Purpose: get the number of 2d curves to approximate.
93 returns Integer
94 is redefined;
95
96 SectionShape(me; NbPoles : out Integer from Standard;
97 NbKnots : out Integer from Standard;
98 Degree : out Integer from Standard)
99 ---Purpose: get the format of an section
100 is redefined;
101
102 Knots(me; TKnots: out Array1OfReal from TColStd)
103 ---Purpose: get the Knots of the section
104 is redefined;
105
106
107 Mults(me; TMults: out Array1OfInteger from TColStd)
108 ---Purpose: get the Multplicities of the section
109 is redefined;
110
111
112 IsRational(me)
113 ---Purpose: Returns if the section is rationnal or not
114 returns Boolean
115 is redefined;
116
117
118
119--
120-- Mangement of continuity
121--
122
123 NbIntervals(me; S : Shape from GeomAbs)
124 ---Purpose: Returns the number of intervals for continuity
125 -- <S>. May be one if Continuity(me) >= <S>
126 returns Integer
127 is redefined;
128
129 Intervals(me; T : in out Array1OfReal from TColStd;
130 S : Shape from GeomAbs)
131 ---Purpose: Stores in <T> the parameters bounding the intervals
132 -- of continuity <S>.
133 --
134 -- The array must provide enough room to accomodate
135 -- for the parameters. i.e. T.Length() > NbIntervals()
136 raises
137 OutOfRange from Standard
138 is redefined;
139
140
141 SetInterval(me: mutable; First, Last: Real from Standard)
142 ---Purpose: Sets the bounds of the parametric interval on
143 -- the fonction
144 -- This determines the derivatives in these values if the
145 -- function is not Cn.
146 is redefined;
147
148
149--
150-- To help computation of Tolerance
151--
152-- Evaluation of error, in 2d space, or on rational function, is
153-- dificult. The folowing methodes can help
154--
155--
156
157
158 Resolution(me;
159 Index : Integer from Standard;
160 Tol : Real from Standard;
161 TolU, TolV : out Real from Standard)
162 ---Purpose: Returns the resolutions in the sub-space 2d <Index> --
163 -- This information is usfull to find an good tolerance in
164 -- 2d approximation
165
166 ---Warning: Used only if Nb2dCurve > 0
167 is redefined;
168
169
170 GetTolerance(me;
171 BoundTol, SurfTol, AngleTol : Real;
172 Tol3d : out Array1OfReal)
173 ---Purpose: Returns the tolerance to reach in approximation
174 -- to respecte
175 -- BoundTol error at the Boundary
176 -- AngleTol tangent error at the Boundary (in radian)
177 -- SurfTol error inside the surface.
178 is redefined;
179
180 SetTolerance(me : mutable; Tol3d, Tol2d : Real)
181 ---Purpose: Is usfull, if (me) have to be run numerical
182 -- algorithme to perform D0, D1 or D2
183 is redefined;
184
185 BarycentreOfSurf(me)
186 ---Purpose: Get the barycentre of Surface. An very poor
187 -- estimation is sufficent. This information is usefull
188 -- to perform well conditionned rational approximation.
189
190 ---Warning: Used only if <me> IsRational
191 returns Pnt from gp
192 is redefined;
193
194
195 MaximalSection(me) returns Real
196 ---Purpose: Returns the length of the maximum section. This
197 -- information is usefull to perform well conditionned rational
198 -- approximation.
199
200 ---Warning: Used only if <me> IsRational
201 is redefined;
202
203 GetMinimalWeight(me; Weigths : out Array1OfReal from TColStd)
204 ---Purpose: Compute the minimal value of weight for each poles
205 -- of all sections. This information is usefull to
206 -- perform well conditionned rational approximation.
207
208 ---Warning: Used only if <me> IsRational
209 is redefined;
210
211-- Private methods
212
213 SearchPoint(me:mutable;
214 Func : in out AppFunction from Blend;
215 Param : Real;
216 Pnt : in out Point from Blend)
217 returns Boolean
218 is private;
219
220 SearchLocation(me;
221 Param : Real;
222 FirstIndex, LastIndex : Integer;
223 ParamIndex : in out Integer)
224 returns Boolean
225 raises OutOfRange
226 is private;
227
228 Point(me;
229 Func : AppFunction from Blend;
230 Param : Real;
231 Sol : Vector from math;
232 Pnt : in out Point from Blend)
233 is deferred;
234
235 Vec(me;
236 Sol : in out Vector from math;
237 Pnt : Point from Blend)
238 is deferred;
239
240fields
241
242 myLine : Line from BRepBlend;
243 myFunc : Address;
244 mydimension : Integer;
245 myTolerance : Vector;
246 myPnt : Point from Blend;
247 myBary : Pnt from gp;
248
249 X1, X2, XInit, Sol : Vector from math;
250
251end AppFuncRoot;