0024750: Replace instantiations of TCollection generic classes by NCollection templat...
[occt.git] / src / Geom2dHatch / Geom2dHatch_Hatcher.cdl
1 -- Created on: 1993-10-25
2 -- Created by: Jean Marc LACHAUME
3 -- Copyright (c) 1993-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 Hatcher from Geom2dHatch
18
19 uses
20     MapIntegerHasher from TColStd,
21     PointOnHatching  from HatchGen,
22     Orientation      from TopAbs,
23     State            from TopAbs,
24     Domain           from HatchGen,
25     ErrorStatus      from HatchGen,
26     Curve            from Geom2dAdaptor,
27     Intersector      from Geom2dHatch,
28     Element          from Geom2dHatch,
29     Elements         from Geom2dHatch,
30     Hatching         from Geom2dHatch,
31     Hatchings        from Geom2dHatch,
32     Classifier       from Geom2dHatch
33
34 raises
35     NoSuchObject      from Standard ,
36     OutOfRange        from Standard ,
37     NotDone           from StdFail
38     
39 ----------------------------------------------------------------------
40 --  class Hatcher description.
41 ----------------------------------------------------------------------
42
43 is
44
45 ---Category: General use
46
47
48     Create (Intersector : Intersector from Geom2dHatch ;
49             Confusion2d : Real    from Standard ;
50             Confusion3d : Real    from Standard ;
51             KeepPnt     : Boolean from Standard = Standard_False ;
52             KeepSeg     : Boolean from Standard = Standard_False)
53             
54         ---Purpose: Returns an empty hatcher.
55
56         returns Hatcher from Geom2dHatch;
57
58
59     Intersector (me : in out ; Intersector : Intersector from Geom2dHatch)
60     
61         ---Purpose: Sets the associated intersector.
62         is static ;
63         
64
65     Intersector (me : in out)
66     
67         ---Purpose: Returns the associated intersector.
68
69         ---C++: inline
70         ---C++: return const &
71
72         returns Intersector from Geom2dHatch
73         is static ;
74         
75
76     ChangeIntersector (me : in out)
77     
78         ---Purpose: Returns the associated intersector.
79
80         ---C++: inline
81         ---C++: return &
82
83         returns Intersector from Geom2dHatch
84         is static ;
85         
86
87     Confusion2d (me : in out ; Confusion : Real from Standard)
88     
89         ---Purpose: Sets the confusion tolerance.
90
91         is static ;
92
93
94     Confusion2d (me)
95     
96         ---Purpose: Returns the 2d confusion tolerance, i.e. the value under
97         --          which two points are considered identical in the
98         --          parametric space of the hatching.
99         
100         ---C++: inline
101         returns Real from Standard
102         is static ;
103
104
105     Confusion3d (me : in out ; Confusion : Real from Standard)
106     
107         ---Purpose: Sets the confusion tolerance.
108
109         is static ;
110
111
112     Confusion3d (me)
113     
114         ---Purpose: Returns the 3d confusion tolerance, i.e. the value under
115         --          which two points are considered identical in the
116         --          3d space of the hatching.
117
118         ---C++: inline
119         returns Real from Standard
120         is static ;
121
122
123     KeepPoints (me : in out; Keep : Boolean from Standard)
124     
125         ---Purpose: Sets the above flag.
126
127         is static ;
128
129
130     KeepPoints (me)
131     
132         ---Purpose: Returns the flag about the points consideration.
133
134         ---C++: inline
135         returns Boolean from Standard
136         is static ;
137
138
139     KeepSegments (me : in out; Keep : Boolean from Standard)
140     
141         ---Purpose: Sets the above flag.
142
143         is static ;
144
145
146     KeepSegments (me)
147     
148         ---Purpose: Returns the flag about the segments consideration.
149
150         ---C++: inline
151         returns Boolean from Standard
152         is static ;
153
154
155     Clear (me : in out)
156     
157         ---Purpose: Removes all the hatchings and all the elements.
158
159         ---C++: inline
160         is static ;
161
162
163 ---Category: Element
164
165
166     Element (me : in out ; IndE : Integer from Standard)
167     
168         ---Purpose: Returns the IndE-th element.
169
170         ---Category: Element
171
172         ---C++: inline
173         ---C++: return &
174
175         returns Element from Geom2dHatch
176         raises NoSuchObject from Standard
177         is static protected ;
178
179
180     ElementCurve (me; IndE : Integer from Standard)
181     
182         ---Purpose: Returns the curve associated to the IndE-th element.
183
184         ---Category: Element
185
186         ---C++: inline
187         ---C++: return const &
188
189         returns Curve from Geom2dAdaptor
190         raises NoSuchObject from Standard
191         is static ;
192
193
194     AddElement (me : in out ; Curve       : Curve from Geom2dAdaptor ;
195                               Orientation : Orientation from TopAbs = TopAbs_FORWARD)
196     
197         ---Purpose: Adds an element to the hatcher and returns its index.
198
199         ---Category: Element
200
201         returns Integer from Standard
202         is static ;
203
204
205     RemElement (me : in out ; IndE : Integer from Standard)
206     
207         ---Purpose: Removes the IndE-th element from the hatcher.
208
209         ---Category: Element
210
211         raises NoSuchObject from Standard
212         is static ;
213
214
215     ClrElements (me : in out)
216     
217         ---Purpose: Removes all the elements from the hatcher.
218
219         ---Category: Element
220
221         is static ;
222
223
224 ---Category: Hatching
225
226
227     Hatching (me : in out ; IndH : Integer from Standard)
228     
229         ---Purpose: Returns the IndH-th hatching.
230
231         ---Category: Hatching
232
233         ---C++: inline
234         ---C++: return &
235
236         returns Hatching from Geom2dHatch
237         raises NoSuchObject from Standard
238         is static protected ;
239
240
241     HatchingCurve (me; IndH : Integer from Standard)
242     
243         ---Purpose: Returns the curve associated to the IndH-th hatching.
244
245         ---Category: Hatching
246
247         ---C++: inline
248         ---C++: return const &
249
250         returns Curve from Geom2dAdaptor
251         raises NoSuchObject from Standard
252         is static ;
253
254
255     AddHatching (me : in out ; Curve : Curve from Geom2dAdaptor)
256     
257         ---Purpose: Adds a hatching to the hatcher and returns its index.
258
259         ---Category: Hatching
260
261         returns Integer from Standard
262         is static ;
263
264
265     RemHatching (me : in out ; IndH : Integer from Standard)
266     
267         ---Purpose: Removes the IndH-th hatching from the hatcher.
268
269         ---Category: Hatching
270
271         raises NoSuchObject from Standard
272         is static ;
273
274
275     ClrHatchings (me : in out)
276     
277         ---Purpose: Removes all the hatchings from the hatcher.
278
279         ---Category: Hatching
280
281         is static ;
282
283
284     NbPoints (me; IndH : Integer from Standard)
285
286         ---Purpose: Returns the number of intersection points of
287         --          the IndH-th hatching.
288
289         ---Category: Hatching - Test
290
291         ---C++: inline
292         returns Integer from Standard
293         raises NoSuchObject from Standard
294         is static ;
295
296
297     Point (me; IndH, IndP : Integer from Standard)
298     
299         ---Purpose: Returns the IndP-th intersection point of the
300         --          IndH-th hatching.
301
302         ---Category: Hatching - Test
303
304         ---C++: inline
305         ---C++: return const &
306
307         returns PointOnHatching from HatchGen
308         raises NoSuchObject from Standard,
309                OutOfRange   from Standard
310         is static ;
311
312
313 ---Category: Computation - Trimming
314
315     Trim (me : in out)
316     
317         ---Purpose: Trims all the hatchings of the hatcher by all the
318         --          elements of the hatcher.
319
320         is static ;
321
322
323     Trim (me : in out ; Curve : Curve from Geom2dAdaptor)
324     
325         ---Purpose: Adds a hatching to the hatcher and trims it by
326         --          the elements already given and returns its index.
327
328         ---Category: Computation
329
330         returns Integer from Standard
331         is static ;
332
333
334     Trim (me : in out ; IndH : Integer from Standard)
335     
336         ---Purpose: Trims the IndH-th hatching by the elements
337         --          already given.
338
339         ---Category: Computation
340
341         raises NoSuchObject from Standard
342         is static ;
343
344
345     Trim (me : in out ; IndH, IndE : Integer from Standard)
346     
347         ---Purpose: Trims the IndH-th hatching of the hatcher by the
348         --          IndE-th element.
349
350         ---Category: Computation
351
352         returns Boolean from Standard
353         is static private ;
354
355
356 ---Category: Computation - Domains
357
358     GlobalTransition (me : in out; Point : in out PointOnHatching from HatchGen)
359     
360         ---Purpose: Sets the global transition (the before and after
361         --          states and segment extremities flags) of the point.
362
363         ---Category: Computation - Domains
364
365         returns Boolean from Standard
366         is static private ;
367
368
369     ComputeDomains (me : in out)
370
371         ---Purpose: Computes the domains of all the hatchings.
372
373         ---Category: Computation - Domains
374
375         is static ;
376
377
378     ComputeDomains (me : in out ; IndH : Integer from Standard)
379
380         ---Purpose: Computes the domains of the IndH-th hatching.
381
382         ---Category: Computation - Domains
383
384         raises NoSuchObject from Standard
385         is static ;
386
387
388 ---Category: Results
389
390     TrimDone (me; IndH : Integer from Standard)
391     
392         ---Purpose: Returns the fact that the intersections were computed
393         --          for the IndH-th hatching. 
394
395         ---C++: inline
396         returns Boolean from Standard
397         raises NoSuchObject from Standard
398         is static ;
399
400
401     TrimFailed (me; IndH : Integer from Standard)
402     
403         ---Purpose: Returns the fact that the intersections failed
404         --          for the IndH-th hatching. 
405
406         ---C++: inline
407         returns Boolean from Standard
408         raises NoSuchObject from Standard
409         is static ;
410
411
412     IsDone (me)
413     
414         ---Purpose: Returns the fact that the domains were computed
415         --          for all the hatchings. 
416
417         ---C++: inline
418         returns Boolean from Standard
419         raises NoSuchObject from Standard
420         is static ;
421
422
423     IsDone (me; IndH : Integer from Standard)
424     
425         ---Purpose: Returns the fact that the domains were computed
426         --          for the IndH-th hatching. 
427
428         returns Boolean from Standard
429         raises NoSuchObject from Standard
430         is static ;
431
432
433     Status (me; IndH : Integer from Standard)
434     
435         ---Purpose: Returns the status about the IndH-th hatching. 
436
437         ---C++: inline
438         returns ErrorStatus from HatchGen
439         raises NoSuchObject from Standard
440         is static ;
441
442
443     NbDomains (me; IndH : Integer from Standard)
444
445         ---Purpose: Returns the number of domains of the IndH-th hatching.
446         --          Only ONE "INFINITE" domain means that the hatching is
447         --          fully included in the contour defined by the elements.
448
449         ---C++: inline
450         returns Integer from Standard
451         raises NoSuchObject from Standard ,
452                NotDone      from StdFail
453         is static ;
454
455
456     Domain (me; IndH : Integer from Standard ;
457                 IDom : Integer from Standard )
458
459         ---Purpose: Returns the IDom-th domain of the IndH-th hatching.
460
461         ---C++: return const &
462
463         returns Domain from HatchGen
464         raises NoSuchObject from Standard ,
465                NotDone      from StdFail ,
466                OutOfRange   from Standard
467         is static ;
468
469
470 ---Category: Dump
471
472     Dump (me)
473     
474         ---Purpose: Dump the hatcher.
475
476         is static ;
477
478
479 fields
480
481     myIntersector  : Intersector from Geom2dHatch;
482     myConfusion2d  : Real      from Standard ;
483     myConfusion3d  : Real      from Standard ;
484     myKeepPoints   : Boolean   from Standard ;
485     myKeepSegments : Boolean   from Standard ;
486     myNbElements   : Integer   from Standard ;
487     myElements     : Elements  from Geom2dHatch ;
488     myNbHatchings  : Integer   from Standard ;
489     myHatchings    : Hatchings from Geom2dHatch;
490
491 end Hatcher from Geom2dHatch;