0024043: Performance improvements: Modeling Algorithms
[occt.git] / src / ShapeAnalysis / ShapeAnalysis_Wire.cdl
1 -- Created on: 1998-06-03
2 -- Created by: data exchange team
3 -- Copyright (c) 1998-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
5 --
6 -- The content of this file is subject to the Open CASCADE Technology Public
7 -- License Version 6.5 (the "License"). You may not use the content of this file
8 -- except in compliance with the License. Please obtain a copy of the License
9 -- at http://www.opencascade.org and read it completely before using this file.
10 --
11 -- The Initial Developer of the Original Code is Open CASCADE S.A.S., having its
12 -- main offices at: 1, place des Freres Montgolfier, 78280 Guyancourt, France.
13 --
14 -- The Original Code and all software distributed under the License is
15 -- distributed on an "AS IS" basis, without warranty of any kind, and the
16 -- Initial Developer hereby disclaims all such warranties, including without
17 -- limitation, any warranties of merchantability, fitness for a particular
18 -- purpose or non-infringement. Please see the License for the specific terms
19 -- and conditions governing the rights and limitations under the License.
20
21
22
23 class Wire from ShapeAnalysis inherits TShared from MMgt
24
25         ---Purpose: This class provides analysis of a wire to be compliant to 
26         --          CAS.CADE requirements.
27         --
28         --          The functionalities provided are the following:
29         --           1. consistency of 2d and 3d edge curve senses
30         --           2. connection of adjacent edges regarding to: 
31         --             a. their vertices 
32         --             b. their pcurves 
33         --             c. their 3d curves 
34         --           3. adjacency of the edge vertices to its pcurve and 3d curve 
35         --           4. if a wire is closed or not (considering its 3d and 2d 
36         --              contour) 
37         --           5. if a wire is outer on its face (considering pcurves)
38         --
39         --
40         --          This class can be used in conjunction with class 
41         --          ShapeFix_Wire, which will fix the problems detected by this class.
42         --
43         --          The methods of the given class match to ones of the class 
44         --          ShapeFix_Wire, e.g., CheckSmall and FixSmall. 
45         --          This class also includes some auxilary methods 
46         --          (e.g., CheckOuterBound, etc.),
47         --          which have no pair in ShapeFix_Wire.
48         --
49         --          Like methods of ShapeFix_Wire the ones of this class are 
50         --          grouped into two levels:
51         --          - Public which are recommended for use (the most global 
52         --            method is Perform),
53         --          - Advanced, for optional use only
54         --
55         --          For analyzing result of Public API checking methods use
56         --          corresponding Status... method. 
57         --          The 'advanced' functions share the single status field which 
58         --          contains the result of the last performed 'advanced' method. 
59         --          It is quried by the method LastCheckStatus().
60         --
61         --          In order to prepare an analyzer, it is necessary to load a wire, 
62         --          set face and precision.
63
64 uses
65
66     Pnt2d     from gp,
67     Curve     from Geom2d,
68     Surface   from Geom,
69     Location  from TopLoc,
70     Shape     from TopoDS,
71     Wire      from TopoDS,
72     Face      from TopoDS,
73     SequenceOfIntersectionPoint from IntRes2d,
74     SequenceOfPnt               from TColgp,
75     SequenceOfReal              from TColStd,
76     Status    from ShapeExtend,
77     WireData  from ShapeExtend,
78     WireOrder from ShapeAnalysis,
79     Surface   from ShapeAnalysis,
80     IndexedMapOfShape from TopTools,
81     DataMapOfShapeListOfShape from TopTools,
82     MapOfShape from TopTools
83 is
84
85     Create returns Wire from ShapeAnalysis;
86         ---Purpose: Empty constructor
87     
88     Create (wire     : Wire from TopoDS;
89             face     : Face from TopoDS;
90             precision: Real)
91     returns Wire from ShapeAnalysis;
92         ---Purpose: Creates object with standard TopoDS_Wire, face
93         --          and precision
94     
95     Create (sbwd     : WireData from ShapeExtend;
96             face     : Face from TopoDS;
97             precision: Real)
98     returns Wire from ShapeAnalysis;
99         ---Purpose: Creates the object with WireData object, face
100         --          and precision
101         
102     Init (me: mutable; wire     : Wire from TopoDS;
103                       face     : Face from TopoDS;
104                       precision: Real);
105         ---Purpose: Initializes the object with standard TopoDS_Wire, face
106         --          and precision
107     
108     Init (me: mutable; sbwd     : WireData from ShapeExtend;
109                       face     : Face from TopoDS;
110                       precision: Real);
111         ---Purpose: Initializes the object with WireData object, face
112         --          and precision
113         
114     Load (me: mutable; wire: Wire from TopoDS);
115         ---Purpose: Loads the object with standard TopoDS_Wire
116
117     Load (me: mutable; sbwd: WireData from ShapeExtend);
118         ---Purpose: Loads the object with WireData object
119         ---Remark : Single WireData object will be shared
120
121     SetFace (me: mutable; face : Face from TopoDS);
122         ---Purpose: Loads the face the wire lies on
123
124     SetSurface (me: mutable; surface : Surface from Geom);
125         ---Purpose: Loads the surface the wire lies on
126
127     SetSurface (me: mutable; surface : Surface from Geom;
128                             location: Location from TopLoc);
129         ---Purpose: Loads the surface the wire lies on
130
131     SetPrecision (me: mutable; precision: Real);
132         ---Precision: Set the precision value
133
134     ClearStatuses (me: mutable);
135         ---Purpose: Unsets all the status and distance fields
136         --          wire, face and precision are not cleared
137
138     IsLoaded (me) returns Boolean;
139         ---C++: inline
140         ---Purpose: Returns True if wire is loaded and has number of edges >0
141         
142     IsReady (me) returns Boolean;
143         ---C++: inline
144         ---Purpose: Returns True if IsLoaded and underlying face is not null
145         
146     Precision (me) returns Real;
147         ---C++: inline
148         ---Purpose: Returns the value of precision
149     
150     WireData (me) returns WireData from ShapeExtend;
151         ---C++: return const &
152         ---C++: inline
153         ---Purpose: Returns wire object being analyzed
154         
155     NbEdges (me) returns Integer;
156         ---C++: inline
157         ---Purpose: Returns the number of edges in the wire, or 0 if it is not loaded
158
159     Face (me) returns Face from TopoDS;
160         ---C++: return const &
161         ---C++: inline
162         ---Purpose: Returns the working face
163
164     Surface (me) returns Surface from ShapeAnalysis;
165         ---C++: return const &
166         ---C++: inline
167         ---Purpose: Returns the working surface
168         
169     
170     ---Checking methods:
171     
172     ---Level: Public
173     
174     ---Return: Check..() methods return True when and only when the situation was
175     --         analyzed and the specific case detected. 
176     --         This corresponds to the flag DONE (or one of DONE#i) set in Status.
177
178     Perform (me : mutable) returns Boolean; 
179         ---Purpose: Performs all the checks in the following order :
180         --          CheckOrder, CheckSmall, CheckConected, CheckEdgeCurves,
181         --          CheckDegenerated, CheckSelfIntersection, CheckLacking,
182         --          CheckClosed
183         --  Returns: True if at least one method returned True;
184         --          For deeper analysis use Status...(status) methods
185     
186     CheckOrder (me: mutable; isClosed: Boolean = Standard_True;
187                              mode3d: Boolean = Standard_True) returns Boolean;
188         ---Purpose: Calls CheckOrder and returns False if wire is already
189         --          ordered (tail-to-head), True otherwise
190         --          Flag <isClosed> defines if the wire is closed or not
191         --          Flag <mode3d> defines which mode is used (3d or 2d)
192         
193     CheckConnected (me : mutable; prec : Real = 0.0) returns Boolean;
194         ---Purpose: Calls to CheckConnected for each edge
195         --  Returns: True if at least one pair of disconnected edges (not sharing the 
196         --          same vertex) was detected
197     
198     CheckSmall (me : mutable; precsmall : Real = 0.0) returns Boolean;
199         ---Purpose: Calls to CheckSmall for each edge
200         --  Returns: True if at least one small edge was detected
201     
202     CheckEdgeCurves (me : mutable) returns Boolean;
203         ---Purpose: Checks edges geometry (consitency of 2d and 3d senses, adjasment 
204         --          of curves to the vertices, etc.).
205         --          The order of the checks :
206         --          Call ShapeAnalysis_Wire to check:
207         --          ShapeAnalysis_Edge::CheckCurve3dWithPCurve  (1),
208         --          ShapeAnalysis_Edge::CheckVertcesWithPCurve  (2), 
209         --          ShapeAnalysis_Edge::CheckVertcesWithCurve3d (3),
210         --          CheckSeam                                   (4)
211         --          Additional:
212         --          CheckGap3d                                  (5),
213         --          CheckGap2d                                  (6),
214         --          ShapeAnalysis_Edge::CheckSameParameter      (7)
215         -- Returns: True if at least one check returned True
216         --  Remark:  The numbers in brackets show with what DONEi or FAILi
217         --          the status can be queried
218     
219     CheckDegenerated (me : mutable) returns Boolean;
220         ---Purpose: Calls to CheckDegenerated for each edge
221         --  Returns: True if at least one incorrect degenerated edge was detected
222     
223     CheckClosed (me : mutable; prec : Real = 0.0) returns Boolean;
224         ---Purpose: Checks if wire is closed, performs CheckConnected, 
225         --          CheckDegenerated and CheckLacking for the first and the last edges
226         --  Returns: True if at least one check returned True
227         --  Status:
228         --          FAIL1 or DONE1: see CheckConnected
229         --          FAIL2 or DONE2: see CheckDegenerated
230
231     CheckSelfIntersection (me : mutable) returns Boolean;
232         ---Purpose: Checks self-intersection of the wire (considering pcurves)
233         --          Looks for self-intersecting edges and each pair of intersecting 
234         --          edges.
235         --  Warning: It does not check each edge with any other one (only each two 
236         --          adjacent edges)
237         --          The order of the checks :
238         --          CheckSelfIntersectingEdge, CheckIntersectingEdges
239         --  Returns: True if at least one check returned True
240         --  Status:  FAIL1 or DONE1 - see CheckSelfIntersectingEdge
241         --          FAIL2 or DONE2 - see CheckIntersectingEdges
242     
243     CheckLacking (me : mutable) returns Boolean;
244         ---Purpose: Calls to CheckLacking for each edge
245         --  Returns: True if at least one lacking edge was detected
246     
247     CheckGaps3d (me : mutable) returns Boolean;
248         ---Purpose: 
249         ---Returns: 
250
251     CheckGaps2d (me : mutable) returns Boolean;
252         ---Purpose: 
253         ---Returns: 
254
255     CheckCurveGaps (me : mutable) returns Boolean;
256         ---Purpose: 
257         ---Returns: 
258
259
260     ---Level: Advanced
261
262     ---Status: For analyzing the status of the last performed method use method
263     --          Status(status)
264     --
265     --          All the Check...() methods below return False if the problem was 
266     --          not detected. If so, Status(ShapeExtend_OK) returns True.
267     
268     CheckOrder (me: mutable; sawo: out WireOrder from ShapeAnalysis;
269                              isClosed: Boolean = Standard_True;
270                              mode3d: Boolean = Standard_True)
271     returns Boolean;
272         ---Purpose: Analyzes the order of the edges in the wire,
273         --          uses class WireOrder for that purpose.
274         --          Flag <isClosed> defines if the wire is closed or not
275         --          Flag <mode3d> defines which mode is used (3d or 2d)
276         --          Returns False if wire is already ordered (tail-to-head),
277         --          True otherwise.
278         --          Use returned WireOrder object for deeper analysis.
279         --  Status:
280         --          OK   : the same edges orientation, the same edges sequence
281         --          DONE1: the same edges orientation, not the same edges sequence
282         --          DONE2: as DONE1 and gaps more than myPrecision
283         --          DONE3: not the same edges orientation (some need to be reversed)
284         --          DONE4: as DONE3 and gaps more than myPrecision
285         --          FAIL : algorithm failed (could not detect order)
286
287     CheckConnected (me : mutable; num: Integer; prec: Real = 0.0) returns Boolean;
288         ---Purpose: Checks connected edges (num-th and preceeding).
289         --           Tests with starting preci from <SBWD> or  with <prec> if  
290         --               it is greater.
291         --           Considers Vertices.
292         --  Returns: False if edges are connected by the common vertex, else True
293         --  Status  :
294         --           OK    : Vertices (end of num-1 th edge and start on num-th one) 
295         --                   are already the same
296         --           DONE1 : Absolutely confused (gp::Resolution)
297         --           DONE2 : Confused at starting <preci> from <SBWD>
298         --           DONE3 : Confused at <prec> but not <preci>
299         --           FAIL1 : Not confused
300         --           FAIL2 : Not confused but confused with <preci> if reverse num-th edge
301     
302     CheckSmall (me : mutable; num      : Integer;
303                              precsmall: Real = 0.0)
304     returns Boolean;
305         ---Purpose: Checks if an edge has a length not greater than myPreci or 
306         --          precsmall (if it is smaller)
307         --  Returns: False if its length is greater than precision
308         --  Status:
309         --          OK   : edge is not small or degenerated
310         --          DONE1: edge is small, vertices are the same
311         --          DONE2: edge is small, vertices are not the same
312         --          FAIL : no 3d curve and pcurve
313
314     CheckSeam (me : mutable; num   : Integer;
315                             C1, C2: out Curve from Geom2d;
316                             cf, cl: out Real)
317     returns Boolean;
318         ---Purpose: Checks if a seam pcurves are correct oriented
319         --  Returns: False (status OK) if given edge is not a seam or if it is OK
320         --          C1 - current pcurve for FORWARD edge,
321         --          C2 - current pcurve for REVERSED edge (if returns True they
322         --          should be swapped for the seam),
323         --          cf, cl - first and last parameters on curves
324         --  Status: 
325         --          OK   : Pcurves are correct or edge is not seam
326         --          DONE : Seam pcurves should be swapped
327
328     CheckSeam (me : mutable; num: Integer) returns Boolean;
329         ---Purpose: Checks if a seam pcurves are correct oriented
330         --          See previous functions for details
331
332     CheckDegenerated (me: mutable; num: Integer; dgnr1, dgnr2: out Pnt2d from gp)
333     returns Boolean;
334         ---Purpose: Checks for degenerated edge between two adjacent ones.
335         --          Fills parameters dgnr1 and dgnr2 with points in paramterical
336         --          space that correspond to the singularity (either gap that
337         --          needs to be filled by degenerated edge or that already filled)
338         --  Returns: False if no singularity or edge is already degenerated,
339         --          otherwise True
340         --  Status:
341         --          OK   : No surface singularity, or edge is already degenerated
342         --          DONE1: Degenerated edge should be inserted (gap in 2D)
343         --          DONE2: Edge <num> should be made degenerated (recompute pcurve 
344         --                 and set the flag)
345         --          FAIL1: One of edges neighbouring to degenerated one has 
346         --                 no pcurve
347         --          FAIL2: Edge marked as degenerated and has no pcurve 
348         --                 but singularity is not detected
349
350     CheckDegenerated (me: mutable; num: Integer)
351     returns Boolean;
352         ---Purpose: Checks for degenerated edge between two adjacent ones.
353         --  Remark : Calls previous function
354         --  Status : See the function above for details
355
356     CheckGap3d (me : mutable; num : Integer = 0) returns Boolean;
357         ---Purpose: Checks gap between edges in 3D (3d curves).
358         --          Checks the distance between ends of 3d curves of the num-th 
359         --          and preceeding edge. 
360         --          The distance can be queried by MinDistance3d. 
361         --
362         --  Returns: True if status is DONE
363         --  Status:
364         --          OK   : Gap is less than myPrecision
365         --          DONE : Gap is greater than myPrecision
366         --          FAIL : No 3d curve(s) on the edge(s)
367
368     CheckGap2d (me : mutable; num : Integer = 0) returns Boolean;
369         ---Purpose: Checks gap between edges in 2D (pcurves). 
370         --          Checks the distance between ends of pcurves of the num-th 
371         --          and preceeding edge. 
372         --          The distance can be queried by MinDistance2d.
373         --         
374         --  Returns: True if status is DONE
375         --  Status:
376         --          OK   : Gap is less than parametric precision out of myPrecision
377         --          DONE : Gap is greater than parametric precision out of myPrecision
378         --          FAIL : No pcurve(s) on the edge(s)
379
380     CheckCurveGap (me : mutable; num : Integer = 0) returns Boolean;
381         ---Purpose: Checks gap between points on 3D curve and points on surface
382         --          generated by pcurve of the num-th edge.
383         --          The distance can be queried by MinDistance3d.
384         --
385         --  Returns: True if status is DONE
386         --  Status:
387         --          OK   : Gap is less than myPrecision
388         --          DONE : Gap is greater than myPrecision
389         --          FAIL : No 3d curve(s) on the edge(s)
390      
391     CheckSelfIntersectingEdge (me: mutable; num: Integer;
392                                points2d: out SequenceOfIntersectionPoint from IntRes2d;
393                                points3d: out SequenceOfPnt from TColgp)
394     returns Boolean;
395         ---Purpose: Checks if num-th edge is self-intersecting.
396         --          Self-intersection is reported only if intersection point lies outside
397         --          of both end vertices of the edge.
398         --  Returns: True if edge is self-intersecting.
399         --          If returns True it also fills the sequences of intersection points
400         --          and corresponding 3d points (only that are not enclosed by a vertices)
401         --  Status:
402         --          FAIL1 : No pcurve
403         --          FAIL2 : No vertices
404         --          DONE1 : Self-intersection found
405     
406     CheckSelfIntersectingEdge (me: mutable; num: Integer)
407     returns Boolean;
408         --  Purpose: Checks num-th edge to be self-intersecting.
409         --  Remark : Calls the previous method
410         --  Status : See the function above for details
411     
412     CheckIntersectingEdges (me : mutable; num: Integer;
413                             points2d: out SequenceOfIntersectionPoint from IntRes2d;
414                             points3d: out SequenceOfPnt from TColgp;
415                             errors: out SequenceOfReal from TColStd)
416     returns Boolean;
417         ---Purpose: Checks two adjacent edges for intersecting.
418         --          Intersection is reported only if intersection point is not enclosed
419         --          by the common end vertex of the edges.
420         --  Returns: True if intersection is found.
421         --          If returns True it also fills the sequences of intersection points,
422         --          corresponding 3d points, and errors for them (half-distances between
423         --          intersection points in 3d calculated from one and from another edge)
424         --  Status:
425         --          FAIL1 : No pcurve
426         --          FAIL2 : No vertices
427         --          DONE1 : Self-intersection found
428      
429     CheckIntersectingEdges (me: mutable; num: Integer)
430     returns Boolean;
431         ---Purpose: Checks two adjacent edges for intersecting.
432         --  Remark : Calls the previous method
433         --  Status : See the function above for details
434     
435     CheckIntersectingEdges(me: mutable; num1: Integer; num2: Integer;
436                            points2d: out SequenceOfIntersectionPoint from IntRes2d;
437                            points3d: out SequenceOfPnt from TColgp;
438                            errors: out SequenceOfReal from TColStd)
439     returns Boolean;
440         ---Purpose: Checks i-th and j-th edges for intersecting. 
441         --  Remark : See the previous method for details
442         
443     CheckIntersectingEdges(me: mutable; num1: Integer; num2: Integer)
444     returns Boolean;
445         ---Purpose: Checks i-th and j-th edges for intersecting.
446         --  Remark : Calls  previous method.
447         --  Status : See the function above for details
448
449     CheckLacking (me: mutable; num: Integer; Tolerance: Real;
450                               p2d1, p2d2: out Pnt2d from gp) returns Boolean;
451         ---Purpose: Checks if there is a gap in 2d between edges, not comprised by 
452         --          the tolerance of their common vertex.
453         --          If <Tolerance> is greater than 0. and less than tolerance of
454         --          the vertex, then this value is used for check.
455         --  Returns: True if not closed gap was detected
456         --          p2d1 and p2d2 are the endpoint of <num-1>th edge and start of
457         --          the <num>th edge in 2d.
458         --  Status:
459         --          OK: No edge is lacking (3d and 2d connection)
460         --          FAIL1: edges have no vertices (at least one of them)
461         --          FAIL2: edges are neither connected by common vertex, nor have 
462         --                 coincided vertices
463         --          FAIL1: edges have no pcurves
464         --          DONE1: the gap is detected which cannot be closed by the tolerance
465         --                 of the common vertex (or with value of <Tolerance>)
466         --          DONE2: is set (together with DONE1) if gap is detected and the 
467         --                 vector (p2d2 - p2d1) goes in direction opposite to the pcurves
468         --                 of the edges (if angle is more than 0.9*PI).
469
470     CheckLacking (me : mutable; num: Integer; Tolerance: Real = 0.0) returns Boolean;
471         ---Purpose: Checks if there is a gap in 2D between edges and not comprised by vertex tolerance
472          --         The value of SBWD.thepreci is used.
473         --  Returns: False if no edge should be inserted
474         --  Status:
475         --           OK    : No edge is lacking (3d and 2d connection)
476         --          DONE1 : The vertex tolerance should be increased only (2d gap is 
477         --                  small)
478         --          DONE2 : Edge can be inserted (3d and 2d gaps are large enough)
479
480     CheckOuterBound (me: mutable; APIMake: Boolean = Standard_True)
481     returns Boolean;
482         ---Purpose: Checks if wire defines an outer bound on the face
483         --          Uses ShapeAnalysis::IsOuterBound for analysis
484         --          If <APIMake> is True uses BRepAPI_MakeWire to build the
485         --          wire, if False (to be used only when edges share common
486         --          vertices) uses BRep_Builder to build the wire
487         --          
488         ---Returns: False if wire is an outer bound, else returns True
489         --  Status:
490         --          OK   : If it is an outer wire
491         --          DONE : If not
492
493     CheckNotchedEdges(me : mutable; num      : Integer; 
494                                     shortNum : out Integer;
495                                     param    : out Real;
496                                     Tolerance: Real = 0.0) returns Boolean;
497         ---Purpose: Detects a notch
498
499     CheckSmallArea (me: mutable; prec2d : Real = 0)
500     returns Boolean;
501         ---Purpose: Checks if wire has parametric area less than prec2d.
502                  
503     CheckShapeConnect (me : mutable; shape : Shape from TopoDS; prec: Real = 0.0)
504     returns Boolean;
505         ---Purpose: Checks with what orientation <shape> (wire or edge) can be 
506         --           connected to the wire.
507         --           Tests distances with starting <preci> from <SBWD> (close confusion), 
508         --           but if given <prec> is greater, tests with <prec> (coarse confusion).
509         --           The smallest found distance can be returned by MinDistance3d
510         --           
511         --  Returns: False if status is FAIL (see below)
512         --  Status:
513         --           DONE1 : If <shape> follows <SBWD>, direct sense (normal)
514         --           DONE2 : If <shape> follows <SBWD>, but if reversed
515         --           DONE3 : If <shape> preceeds <SBWD>, direct sense
516         --           DONE4 : If <shape> preceeds <SBWD>, but if reversed
517         --           FAIL1 : If <shape> is neither an edge nor a wire 
518         --           FAIL2 : If <shape> cannot be connected to <SBWD>
519         --
520         --           DONE5 : To the tail of <SBWD> the <shape> is closer with
521         --                   direct sense
522         --           DONE6 : To the head of <SBWD> the <shape> is closer with
523         --                   direct sense
524         --
525         --  Remark:   Statuses DONE1 - DONE4, FAIL1 - FAIL2 are basic and
526         --           describe the nearest connection of the <shape> to <SBWD>.
527         --           Statuses DONE5 and DONE6 are advanced and are to be used when
528         --           analyzing with what sense (direct or reversed) the <shape>
529         --           should be connected to <SBWD>:
530         --           For tail of <SBWD> if DONE4 is True <shape> should be direct,
531         --           otherwise reversed.
532         --           For head of <SBWD> if DONE5 is True <shape> should be direct,
533         --           otherwise reversed.
534         
535     CheckShapeConnect (me : mutable; tailhead: out Real;
536                                     tailtail: out Real;
537                                     headtail: out Real;
538                                     headhead: out Real;
539                                     shape   : Shape from TopoDS;
540                                     prec    : Real = 0.0)
541     returns Boolean;
542         ---Purpose: The same as previous CheckShapeConnect but is more advanced.
543         --          It returns the distances between each end of <sbwd> and each
544         --          end of <shape>. For example, <tailhead> stores distance
545         --          between tail of <sbwd> and head of <shape>
546         --  Remark:  First method CheckShapeConnect calls this one
547
548     CheckLoop (me : mutable; aMapLoopVertices : out IndexedMapOfShape from TopTools;
549                              aMapVertexEdges :out DataMapOfShapeListOfShape from TopTools;
550                              aMapSmallEdges : out MapOfShape from TopTools;
551                              aMapSeemEdges : out MapOfShape from TopTools) returns Boolean;
552         ---Purpose: Checks existance of loop on wire and return vertices wich are loop vertices 
553 -- (vertices belonging to a few pairs of edges)
554         
555         
556         ---Status after checking :
557     
558         ---Level  : Public
559
560         -- Querying the status of perfomed API checking procedures
561     StatusOrder            (me; Status: Status from ShapeExtend) returns Boolean;
562         ---C++: inline
563     StatusConnected        (me; Status: Status from ShapeExtend) returns Boolean;
564         ---C++: inline
565     StatusEdgeCurves       (me; Status: Status from ShapeExtend) returns Boolean;
566         ---C++: inline
567     StatusDegenerated      (me; Status: Status from ShapeExtend) returns Boolean;
568         ---C++: inline
569     StatusClosed           (me; Status: Status from ShapeExtend) returns Boolean;
570         ---C++: inline
571     StatusSmall            (me; Status: Status from ShapeExtend) returns Boolean;
572         ---C++: inline
573     StatusSelfIntersection (me; Status: Status from ShapeExtend) returns Boolean;
574         ---C++: inline
575     StatusLacking          (me; Status: Status from ShapeExtend) returns Boolean;
576         ---C++: inline
577     StatusGaps3d           (me; Status: Status from ShapeExtend) returns Boolean;
578         ---C++: inline
579     StatusGaps2d           (me; Status: Status from ShapeExtend) returns Boolean;
580         ---C++: inline
581     StatusCurveGaps        (me; Status: Status from ShapeExtend) returns Boolean;
582         ---C++: inline
583
584     StatusLoop             (me; Status: Status from ShapeExtend) returns Boolean;
585         ---C++: inline
586         ---Level  : Advanced
587
588     LastCheckStatus        (me; Status: Status from ShapeExtend) returns Boolean;
589         ---C++: inline
590         ---Purpose:  Querying the status of the LAST perfomed 'Advanced' checking procedure
591
592         ---Querying fields
593     
594     MinDistance3d (me) returns Real;
595         ---C++: inline
596         ---Purpose: Returns the last lowest distance in 3D computed by
597         --           CheckOrientation, CheckConnected, CheckContinuity3d, 
598         --               CheckVertex, CheckNewVertex
599
600     MinDistance2d (me) returns Real;
601         ---C++: inline
602         ---Purpose: Returns the last lowest distance in 2D-UV computed by
603         --           CheckContinuity2d
604
605     MaxDistance3d (me) returns Real;
606         ---C++: inline
607         ---Purpose: Returns the last maximal distance in 3D computed by
608         --           CheckOrientation, CheckConnected, CheckContinuity3d, 
609         --               CheckVertex, CheckNewVertex, CheckSameParameter
610
611     MaxDistance2d (me) returns Real;
612         ---C++: inline
613         ---Purpose: Returns the last maximal distance in 2D-UV computed by
614         --           CheckContinuity2d
615     
616 fields
617
618     myWire: WireData from ShapeExtend is protected;
619     myFace: Face from TopoDS is protected;
620     mySurf: Surface from ShapeAnalysis is protected;
621     myPrecision : Real is protected;
622
623     myMin3d: Real is protected; -- lower computed distance 3d
624     myMin2d: Real is protected; -- lower computed distance 2d
625     myMax3d: Real is protected; -- upper computed distance 3d
626     myMax2d: Real is protected; -- upper computed distance 2d
627     
628         -- statuses corresponding to API methods, queried by Status..(status) methods
629     myStatusOrder:            Integer is protected;
630     myStatusConnected:        Integer is protected;
631     myStatusEdgeCurves:       Integer is protected;
632     myStatusDegenerated:      Integer is protected;
633     myStatusClosed:           Integer is protected;
634     myStatusSmall:            Integer is protected;
635     myStatusSelfIntersection: Integer is protected;
636     myStatusLacking:          Integer is protected;
637     myStatusGaps3d:           Integer is protected; -- szvsh
638     myStatusGaps2d:           Integer is protected; -- szvsh
639     myStatusCurveGaps:        Integer is protected; -- szvsh
640     myStatusLoop  :           Integer is protected;
641     
642     myStatus: Integer is protected; -- for internal use, queried by LastCheckStatus(status) method
643
644 end Wire;