0023982: Wire explorer raises exception
[occt.git] / src / BRepTools / BRepTools_WireExplorer.cdl
1 -- Created on: 1993-01-21
2 -- Created by: Remi LEQUETTE
3 -- Copyright (c) 1993-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
24 class WireExplorer from BRepTools
25
26         ---Purpose: The WireExplorer is a tool to explore the edges of
27         --          a wire in a connection order.
28         --          
29         --          i.e. each edge is connected to the previous one by
30         --          its origin.
31         --      If a wire is not closed returns only a segment of edges which
32 -- length depends on started in exploration edge. If wire has
33 -- singularities (for example, loops) WireExplorer can return not all
34 -- edges in a wire. it depends on type of singularity.
35
36 uses
37
38     Orientation from TopAbs,
39     Wire        from TopoDS,
40     Edge        from TopoDS,
41     Vertex      from TopoDS,
42     Face        from TopoDS,
43     DataMapOfShapeListOfShape from TopTools,
44     MapOfShape                from TopTools
45 raises
46     DomainError  from Standard,
47     NoSuchObject from Standard,
48     NoMoreObject from Standard
49
50 is
51     Create returns WireExplorer from BRepTools;
52 ---Purpose: Constructs an empty explorer (which can be initialized using Init)
53     
54     Create(W : Wire from TopoDS ) returns WireExplorer from BRepTools
55         ---Purpose: IInitializes an exploration  of the wire <W>. 
56     raises DomainError from Standard;
57     
58     Create(W : Wire from TopoDS;
59            F : Face from TopoDS) returns WireExplorer from BRepTools
60         ---Purpose: Initializes an exploration  of the wire <W>.
61         --          F is used to select the edge connected to the 
62         --          previous in the parametric representation of <F>.
63     raises DomainError from Standard;
64
65     Init(me : in out; W  : Wire from TopoDS)
66         ---Purpose: Initializes an exploration of the wire <W>.
67     raises DomainError from Standard
68     is static;
69     
70     Init(me : in out; W  : Wire from TopoDS;
71                       F  : Face from TopoDS)
72         ---Purpose: Initializes an exploration of the wire <W>.
73         --          F is used to select the edge connected to the 
74         --          previous in the parametric representation of <F>.
75         --          
76     raises DomainError from Standard
77     is static;
78     
79     More(me) returns Boolean
80         ---Purpose: Returns True if there  is a current  edge.
81     is static;
82     
83     Next(me : in out)
84         ---Purpose: Proceeds to the next edge.
85     raises
86         NoMoreObject from Standard 
87     is static;
88     
89     Current(me) returns Edge from TopoDS
90         ---Purpose: Returns the current edge. 
91     raises
92         NoSuchObject from Standard
93         ---C++: return const &
94     is static;
95     
96     Orientation(me) returns Orientation from TopAbs
97         ---Purpose: Returns an Orientation for the current edge.
98     is static;
99     
100     CurrentVertex(me) returns Vertex from TopoDS
101         ---Purpose: Returns the vertex connecting the current  edge to
102         --          the previous one.
103     raises
104         NoSuchObject from Standard
105         --          
106         ---C++: return const &
107     is static;
108     
109    Clear(me : in out)
110         ---Purpose: Clears the content of the explorer.
111     is static;
112     
113 fields
114     myMap    : DataMapOfShapeListOfShape from TopTools;
115     myEdge   : Edge   from TopoDS;
116     myVertex : Vertex from TopoDS;
117     myFace   : Face   from TopoDS;
118     myDoubles: MapOfShape from TopTools;
119     myReverse: Boolean from Standard; 
120     myTolU   : Real  from  Standard; 
121     myTolV   : Real  from  Standard; 
122
123 end WireExplorer;