Integration of OCCT 6.5.0 from SVN
[occt.git] / src / IntWalk / IntWalk_PWalking.cdl
CommitLineData
7fd59977 1-- File: PWalking.cdl
2-- Created: Fri Apr 3 10:27:42 1992
3-- Author: Isabelle GRIGNON
4-- <isg@topsn3>
5---Copyright: Matra Datavision 1992
6
7
8generic class PWalking from IntWalk (
9 ThePSurface as any;
10 ThePSurfaceTool as any) -- as PSurfaceTool from IntWalk(ThePSurface)
11
12
13 ---Purpose: This class implements an algorithm to determine the
14 -- intersection between 2 parametrized surface, marching from
15 -- a starting point. The intersection line
16 -- starts and ends on the natural surface 's boundaries .
17
18
19uses XY from gp,
20 StatusDeflection from IntWalk,
21 ConstIsoparametric from IntImp,
22 Array1OfReal from TColStd,
23 PntOn2S from IntSurf,
24 LineOn2S from IntSurf,
25 Dir from gp,
26 Dir2d from gp
27
28
29raises OutOfRange from Standard,
30 NotDone from StdFail
31
32
33 class TheInt2S instantiates Int2S from IntImp
34 (ThePSurface, ThePSurfaceTool);
35
36is
37
38
39 Create ( Caro1 ,
40 Caro2 : ThePSurface ;
41 TolTangency,
42 Epsilon,
43 Deflection,
44 Increment : Real from Standard)
45
46 ---Purpose: Constructor used to set the data to compute intersection
47 -- lines between Caro1 and Caro2.
48 -- Deflection is the maximum deflection admitted between two
49 -- consecutive points on the resulting polyline.
50 -- TolTangency is the tolerance to find a tangent point.
51 -- Func is the criterion which has to be evaluated at each
52 -- solution point (each point of the line).
53 -- It is necessary to call the Perform method to compute
54 -- the intersection lines.
55 -- la ligne trouvee part d'un point sur ou dans les 2 domaines
56 -- naturelles des surfaces .Elle peut etre fermee ;dans les
57 -- cas standard si elle est ouverte elle s arrete et commence
58 -- a une frontiere d 'un des domaines.Si une ligne ouverte
59 -- s arrete en plein milieu d'un domaine ,on s'arrete sur
60 -- point de tangence.
61 -- Epsilon tolerance au carre de confusion de points
62
63 returns PWalking;
64
65
66 Create ( Caro1 ,
67 Caro2 : ThePSurface ;
68 TolTangency,
69 Epsilon,
70 Deflection,
71 Increment : Real from Standard;
72 U1,V1,U2,V2 :Real from Standard)
73
74 ---Purpose: Returns the intersection line containing the exact
75 -- point Poin. This line is a polygonal line.
76 -- Deflection is the maximum deflection admitted between two
77 -- consecutive points on the resulting polyline.
78 -- TolTangency is the tolerance to find a tangent point.
79 -- Func is the criterion which has to be evaluated at each
80 -- solution point (each point of the line).
81 -- la ligne trouvee part d'un point sur ou dans les 2 domaines
82 -- naturelles des surfaces .Elle peut etre fermee ;dans les
83 -- cas standard si elle est ouverte elle s arrete et commence
84 -- a une frontiere d 'un des domaines.Si une ligne ouverte
85 -- s arrete en plein milieu d'un domaine ,on s'arrete sur
86 -- point de tangence.
87 -- Epsilon tolerance au carre de confusion de points
88
89 returns PWalking;
90
91
92 Perform(me :in out;ParDep : Array1OfReal from TColStd)
93
94 ---Purpose: calcule la ligne d 'intersection
95
96 is static;
97
98 Perform(me :in out;ParDep : Array1OfReal from TColStd;
99 u1min,v1min,u2min,v2min,u1max,v1max,u2max,v2max: Real from Standard)
100
101 ---Purpose: calcule la ligne d 'intersection le reglage des
102 -- pas est fait a partir des valeurs min max sur u et
103 -- v. (si ces donnees ne sont pas presentes comme
104 -- dans la methode precedente, les pas initiaux sont
105 -- calcules a partir des min max uv des faces).
106
107 is static;
108
109
110 PerformFirstPoint(me :in out;
111 ParDep : Array1OfReal from TColStd;
112 FirstPoint: in out PntOn2S from IntSurf)
113
114 ---Purpose: calcule le premier point d'une ligne d'intersection
115 --
116
117 returns Boolean from Standard
118
119 is static;
120
121
122 IsDone(me)
123
124 ---Purpose: Returns true if the calculus was successful.
125
126 returns Boolean from Standard
127 ---C++: inline
128
129 is static;
130
131
132 NbPoints(me)
133
134 ---Purpose: Returns the number of points of the resulting polyline.
135 -- An exception is raised if IsDone returns False.
136
137 returns Integer from Standard
138 ---C++: inline
139
140 raises NotDone from StdFail
141
142 is static;
143
144
145 Value(me ; Index : Integer from Standard)
146
147 ---Purpose: Returns the point of range Index on the polyline.
148 -- An exception is raised if IsDone returns False.
149 -- An exception is raised if Index<=0 or Index>NbPoints.
150
151 returns PntOn2S from IntSurf
152 ---C++: inline
153 ---C++: return const&
154
155 raises NotDone from StdFail,
156 OutOfRange from Standard
157
158 is static;
159
160
161 Line(me)
162
163 returns mutable LineOn2S from IntSurf
164 ---C++: inline
165 ---C++: return const&
166
167 raises NotDone from StdFail
168 is static;
169
170
171 TangentAtFirst(me)
172
173 ---Purpose: Returns True if the surface are tangent at the first point
174 -- of the line.
175 -- An exception is raised if IsDone returns False.
176
177 returns Boolean from Standard
178 ---C++: inline
179
180 raises NotDone from StdFail
181
182 is static;
183
184
185 TangentAtLast(me)
186
187 ---Purpose: Returns true if the surface are tangent at the last point
188 -- of the line.
189 -- An exception is raised if IsDone returns False.
190
191 returns Boolean from Standard
192 ---C++: inline
193
194 raises NotDone from StdFail
195 is static;
196
197
198 IsClosed(me)
199
200 ---Purpose: Returns True if the line is closed.
201 -- An exception is raised if IsDone returns False.
202
203 returns Boolean from Standard
204 ---C++: inline
205
206 raises NotDone from StdFail
207 is static;
208
209
210 TangentAtLine(me; Index: out Integer from Standard)
211
212 returns Dir from gp
213 ---C++: return const&
214 ---C++: inline
215
216 raises NotDone from StdFail
217 is static;
218
219
220--private
221
222 TestDeflection(me : in out)
223
224 returns StatusDeflection from IntWalk
225 is static;
226
227
228 TestArret(me : in out; DejaReparti : Boolean from Standard;
229 Param : in out Array1OfReal from TColStd;
230 ChoixIso : out ConstIsoparametric from IntImp)
231
232
233 returns Boolean from Standard
234 is static;
235
236
237 RepartirOuDiviser(me : in out; DejaReparti : in out Boolean from Standard;
238 ChoixIso : out ConstIsoparametric from IntImp;
239 Arrive : in out Boolean from Standard )
240
241 is static;
242
243 AddAPoint ( me : in out ;
244 line : in out LineOn2S from IntSurf ;
245 POn2S : PntOn2S from IntSurf ) ;
246 ---C++: inline
247
248 ExtendLineInCommonZone(me: in out; theChoixIso: ConstIsoparametric from IntImp;
249 theDirectionFlag: Boolean from Standard)
250 returns Boolean from Standard
251 is private;
252
253fields
254
255 done : Boolean from Standard;
256 line : LineOn2S from IntSurf;
257 close : Boolean from Standard;
258 tgfirst : Boolean from Standard;
259 tglast : Boolean from Standard;
260 indextg : Integer from Standard;
261 tgdir : Dir from gp;
262
263 fleche : Real from Standard; -- fleche maxi autorisee
264 pasMax : Real from Standard; -- ratio uv maximum autorise
265 tolconf : Real from Standard; -- tol de confusion de 2 points
266 pasuv : Real from Standard[4];-- pas uv sur les caros
267 pasSav : Real from Standard[4];-- premier pas sauvegarde
268 pasInit : Real from Standard[4];-- sauvegarde des pas
269
270 Um1 : Real from Standard;
271 UM1 : Real from Standard;
272 Vm1 : Real from Standard;
273 VM1 : Real from Standard;
274
275 Um2 : Real from Standard;
276 UM2 : Real from Standard;
277 Vm2 : Real from Standard;
278 VM2 : Real from Standard;
279
280 ResoU1 : Real from Standard;
281 ResoU2 : Real from Standard;
282 ResoV1 : Real from Standard;
283 ResoV2 : Real from Standard;
284
285 sensCheminement : Integer from Standard;
286 choixIsoSav : ConstIsoparametric from IntImp;
287 -- sauvegarde du choix 1 iere iso
288 previousPoint : PntOn2S from IntSurf;
289 -- point d 'intersection precedent
290 previoustg : Boolean from Standard;
291 previousd : Dir from gp;
292 previousd1 : Dir2d from gp;
293 previousd2 : Dir2d from gp;
294 firstd1 : Dir2d from gp;
295 firstd2 : Dir2d from gp;
296
297 myIntersectionOn2S : TheInt2S ;
298
299end PWalking;