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
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 Hatcher from Geom2dHatch
20 MapIntegerHasher from TColStd,
21 PointOnHatching from HatchGen,
22 Orientation from TopAbs,
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
35 NoSuchObject from Standard ,
36 OutOfRange from Standard ,
39 ----------------------------------------------------------------------
40 -- class Hatcher description.
41 ----------------------------------------------------------------------
45 ---Category: General use
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)
54 ---Purpose: Returns an empty hatcher.
56 returns Hatcher from Geom2dHatch;
59 Intersector (me : in out ; Intersector : Intersector from Geom2dHatch)
61 ---Purpose: Sets the associated intersector.
65 Intersector (me : in out)
67 ---Purpose: Returns the associated intersector.
70 ---C++: return const &
72 returns Intersector from Geom2dHatch
76 ChangeIntersector (me : in out)
78 ---Purpose: Returns the associated intersector.
83 returns Intersector from Geom2dHatch
87 Confusion2d (me : in out ; Confusion : Real from Standard)
89 ---Purpose: Sets the confusion tolerance.
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.
101 returns Real from Standard
105 Confusion3d (me : in out ; Confusion : Real from Standard)
107 ---Purpose: Sets the confusion tolerance.
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.
119 returns Real from Standard
123 KeepPoints (me : in out; Keep : Boolean from Standard)
125 ---Purpose: Sets the above flag.
132 ---Purpose: Returns the flag about the points consideration.
135 returns Boolean from Standard
139 KeepSegments (me : in out; Keep : Boolean from Standard)
141 ---Purpose: Sets the above flag.
148 ---Purpose: Returns the flag about the segments consideration.
151 returns Boolean from Standard
157 ---Purpose: Removes all the hatchings and all the elements.
166 Element (me : in out ; IndE : Integer from Standard)
168 ---Purpose: Returns the IndE-th element.
175 returns Element from Geom2dHatch
176 raises NoSuchObject from Standard
177 is static protected ;
180 ElementCurve (me; IndE : Integer from Standard)
182 ---Purpose: Returns the curve associated to the IndE-th element.
187 ---C++: return const &
189 returns Curve from Geom2dAdaptor
190 raises NoSuchObject from Standard
194 AddElement (me : in out ; Curve : Curve from Geom2dAdaptor ;
195 Orientation : Orientation from TopAbs = TopAbs_FORWARD)
197 ---Purpose: Adds an element to the hatcher and returns its index.
201 returns Integer from Standard
205 RemElement (me : in out ; IndE : Integer from Standard)
207 ---Purpose: Removes the IndE-th element from the hatcher.
211 raises NoSuchObject from Standard
215 ClrElements (me : in out)
217 ---Purpose: Removes all the elements from the hatcher.
224 ---Category: Hatching
227 Hatching (me : in out ; IndH : Integer from Standard)
229 ---Purpose: Returns the IndH-th hatching.
231 ---Category: Hatching
236 returns Hatching from Geom2dHatch
237 raises NoSuchObject from Standard
238 is static protected ;
241 HatchingCurve (me; IndH : Integer from Standard)
243 ---Purpose: Returns the curve associated to the IndH-th hatching.
245 ---Category: Hatching
248 ---C++: return const &
250 returns Curve from Geom2dAdaptor
251 raises NoSuchObject from Standard
255 AddHatching (me : in out ; Curve : Curve from Geom2dAdaptor)
257 ---Purpose: Adds a hatching to the hatcher and returns its index.
259 ---Category: Hatching
261 returns Integer from Standard
265 RemHatching (me : in out ; IndH : Integer from Standard)
267 ---Purpose: Removes the IndH-th hatching from the hatcher.
269 ---Category: Hatching
271 raises NoSuchObject from Standard
275 ClrHatchings (me : in out)
277 ---Purpose: Removes all the hatchings from the hatcher.
279 ---Category: Hatching
284 NbPoints (me; IndH : Integer from Standard)
286 ---Purpose: Returns the number of intersection points of
287 -- the IndH-th hatching.
289 ---Category: Hatching - Test
292 returns Integer from Standard
293 raises NoSuchObject from Standard
297 Point (me; IndH, IndP : Integer from Standard)
299 ---Purpose: Returns the IndP-th intersection point of the
302 ---Category: Hatching - Test
305 ---C++: return const &
307 returns PointOnHatching from HatchGen
308 raises NoSuchObject from Standard,
309 OutOfRange from Standard
313 ---Category: Computation - Trimming
317 ---Purpose: Trims all the hatchings of the hatcher by all the
318 -- elements of the hatcher.
323 Trim (me : in out ; Curve : Curve from Geom2dAdaptor)
325 ---Purpose: Adds a hatching to the hatcher and trims it by
326 -- the elements already given and returns its index.
328 ---Category: Computation
330 returns Integer from Standard
334 Trim (me : in out ; IndH : Integer from Standard)
336 ---Purpose: Trims the IndH-th hatching by the elements
339 ---Category: Computation
341 raises NoSuchObject from Standard
345 Trim (me : in out ; IndH, IndE : Integer from Standard)
347 ---Purpose: Trims the IndH-th hatching of the hatcher by the
350 ---Category: Computation
352 returns Boolean from Standard
356 ---Category: Computation - Domains
358 GlobalTransition (me : in out; Point : in out PointOnHatching from HatchGen)
360 ---Purpose: Sets the global transition (the before and after
361 -- states and segment extremities flags) of the point.
363 ---Category: Computation - Domains
365 returns Boolean from Standard
369 ComputeDomains (me : in out)
371 ---Purpose: Computes the domains of all the hatchings.
373 ---Category: Computation - Domains
378 ComputeDomains (me : in out ; IndH : Integer from Standard)
380 ---Purpose: Computes the domains of the IndH-th hatching.
382 ---Category: Computation - Domains
384 raises NoSuchObject from Standard
390 TrimDone (me; IndH : Integer from Standard)
392 ---Purpose: Returns the fact that the intersections were computed
393 -- for the IndH-th hatching.
396 returns Boolean from Standard
397 raises NoSuchObject from Standard
401 TrimFailed (me; IndH : Integer from Standard)
403 ---Purpose: Returns the fact that the intersections failed
404 -- for the IndH-th hatching.
407 returns Boolean from Standard
408 raises NoSuchObject from Standard
414 ---Purpose: Returns the fact that the domains were computed
415 -- for all the hatchings.
418 returns Boolean from Standard
419 raises NoSuchObject from Standard
423 IsDone (me; IndH : Integer from Standard)
425 ---Purpose: Returns the fact that the domains were computed
426 -- for the IndH-th hatching.
428 returns Boolean from Standard
429 raises NoSuchObject from Standard
433 Status (me; IndH : Integer from Standard)
435 ---Purpose: Returns the status about the IndH-th hatching.
438 returns ErrorStatus from HatchGen
439 raises NoSuchObject from Standard
443 NbDomains (me; IndH : Integer from Standard)
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.
450 returns Integer from Standard
451 raises NoSuchObject from Standard ,
456 Domain (me; IndH : Integer from Standard ;
457 IDom : Integer from Standard )
459 ---Purpose: Returns the IDom-th domain of the IndH-th hatching.
461 ---C++: return const &
463 returns Domain from HatchGen
464 raises NoSuchObject from Standard ,
465 NotDone from StdFail ,
466 OutOfRange from Standard
474 ---Purpose: Dump the hatcher.
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;
491 end Hatcher from Geom2dHatch;