0026118: Implement FastSewing algorithm
[occt.git] / src / BRepLib / BRepLib_MakeEdge2d.cdl
1 -- Created on: 1995-01-04
2 -- Created by: Bruno DUMORTIER
3 -- Copyright (c) 1995-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 MakeEdge2d from BRepLib  inherits MakeShape from BRepLib
18
19         ---Purpose: Provides methods to build edges.
20         --          
21         --          The   methods have  the  following   syntax, where
22         --          TheCurve is one of Lin2d, Circ2d, ...
23         --          
24         --          Create(C : TheCurve)
25         --            
26         --            Makes an edge on  the whole curve.  Add vertices
27         --            on finite curves.
28         --            
29         --          Create(C : TheCurve; p1,p2 : Real)
30         --          
31         --            Make an edge  on the curve between parameters p1
32         --            and p2. if p2 < p1 the edge will be REVERSED. If
33         --            p1  or p2 is infinite the  curve will be open in
34         --            that  direction. Vertices are created for finite
35         --            values of p1 and p2.
36         --            
37         --          Create(C : TheCurve; P1, P2 : Pnt2d from gp)
38         --          
39         --            Make an edge on the curve  between the points P1
40         --            and P2. The  points are projected on   the curve
41         --            and the   previous method is  used. An  error is
42         --            raised if the points are not on the curve.
43         --            
44         --          Create(C : TheCurve; V1, V2 : Vertex from TopoDS)
45         --          
46         --            Make an edge  on the curve  between the vertices
47         --            V1 and V2. Same as the  previous but no vertices
48         --            are created. If a vertex is  Null the curve will
49         --            be open in this direction.
50
51 uses
52     EdgeError from BRepLib,
53     Edge      from TopoDS,
54     Vertex    from TopoDS,
55     Pnt2d     from gp,
56     Lin2d     from gp,
57     Circ2d    from gp,
58     Elips2d   from gp,
59     Hypr2d    from gp,
60     Parab2d   from gp,
61     Curve     from Geom2d
62     
63 raises
64     NotDone from StdFail
65     
66 is
67
68     ----------------------------------------
69     -- Points
70     ----------------------------------------
71
72     Create(V1, V2 : Vertex from TopoDS)                    
73         ---Level: Public
74     returns MakeEdge2d from BRepLib;
75
76     Create(P1, P2 : Pnt2d from gp)                           
77         ---Level: Public
78     returns MakeEdge2d from BRepLib;
79
80
81     ----------------------------------------
82     -- Lin
83     ----------------------------------------
84         
85     Create(L : Lin2d from gp)                                
86         ---Level: Public
87     returns MakeEdge2d from BRepLib;
88
89     Create(L : Lin2d from gp; p1,p2 : Real)                  
90         ---Level: Public
91     returns MakeEdge2d from BRepLib;
92
93     Create(L : Lin2d from gp; P1,P2 : Pnt2d from gp)           
94         ---Level: Public
95     returns MakeEdge2d from BRepLib;
96
97     Create(L : Lin2d from gp; V1, V2 : Vertex from TopoDS)   
98         ---Level: Public
99     returns MakeEdge2d from BRepLib;
100
101     ----------------------------------------
102     -- Circ
103     ----------------------------------------
104         
105     Create(L : Circ2d from gp)                               
106         ---Level: Public
107     returns MakeEdge2d from BRepLib;
108
109     Create(L : Circ2d from gp; p1,p2 : Real)                 
110         ---Level: Public
111     returns MakeEdge2d from BRepLib;
112
113     Create(L : Circ2d from gp; P1,P2 : Pnt2d from gp)          
114         ---Level: Public
115     returns MakeEdge2d from BRepLib;
116
117     Create(L : Circ2d from gp; V1, V2 : Vertex from TopoDS)  
118         ---Level: Public
119     returns MakeEdge2d from BRepLib;
120
121         
122     ----------------------------------------
123     -- Elips
124     ----------------------------------------
125
126     Create(L : Elips2d from gp)                               
127         ---Level: Public
128     returns MakeEdge2d from BRepLib;
129
130     Create(L : Elips2d from gp; p1,p2 : Real)                 
131         ---Level: Public
132     returns MakeEdge2d from BRepLib;
133
134     Create(L : Elips2d from gp; P1,P2 : Pnt2d from gp)          
135         ---Level: Public
136     returns MakeEdge2d from BRepLib;
137
138     Create(L : Elips2d from gp; V1, V2 : Vertex from TopoDS)  
139         ---Level: Public
140     returns MakeEdge2d from BRepLib;
141
142     ----------------------------------------
143     -- Hypr
144     ----------------------------------------
145
146     Create(L : Hypr2d from gp)                               
147         ---Level: Public
148     returns MakeEdge2d from BRepLib;
149
150     Create(L : Hypr2d from gp; p1,p2 : Real)                 
151         ---Level: Public
152     returns MakeEdge2d from BRepLib;
153
154     Create(L : Hypr2d from gp; P1,P2 : Pnt2d from gp)          
155         ---Level: Public
156     returns MakeEdge2d from BRepLib;
157
158     Create(L : Hypr2d from gp; V1, V2 : Vertex from TopoDS)  
159         ---Level: Public
160     returns MakeEdge2d from BRepLib;
161
162     ----------------------------------------
163     -- Parab
164     ----------------------------------------
165
166     Create(L : Parab2d from gp)                               
167         ---Level: Public
168     returns MakeEdge2d from BRepLib;
169
170     Create(L : Parab2d from gp; p1,p2 : Real)                 
171         ---Level: Public
172     returns MakeEdge2d from BRepLib;
173
174     Create(L : Parab2d from gp; P1,P2 : Pnt2d from gp)          
175         ---Level: Public
176     returns MakeEdge2d from BRepLib;
177
178     Create(L : Parab2d from gp; V1, V2 : Vertex from TopoDS)  
179         ---Level: Public
180     returns MakeEdge2d from BRepLib;
181
182     ----------------------------------------
183     -- Curve
184     ----------------------------------------
185
186     Create(L : Curve from Geom2d)                               
187         ---Level: Public
188     returns MakeEdge2d from BRepLib;
189
190     Create(L : Curve from Geom2d; p1,p2 : Real)                 
191         ---Level: Public
192     returns MakeEdge2d from BRepLib;
193
194     Create(L : Curve from Geom2d; 
195     P1,P2 : Pnt2d from gp)                        
196         ---Level: Public
197     returns MakeEdge2d from BRepLib;
198
199     Create(L : Curve from Geom2d; 
200     V1, V2 : Vertex from TopoDS)
201         ---Level: Public
202     returns MakeEdge2d from BRepLib;
203
204     Create(L : Curve from Geom2d; 
205     P1,P2 : Pnt2d from gp; p1,p2 : Real)                        
206         ---Level: Public
207     returns MakeEdge2d from BRepLib;
208
209     Create(L : Curve from Geom2d; 
210     V1, V2 : Vertex from TopoDS;
211     p1, p2 :Real) 
212         ---Level: Public                                            
213     returns MakeEdge2d from BRepLib;
214
215     ----------------------------------------
216     --  Auxiliary methods
217     ----------------------------------------
218
219     Init(me : in out; C      : Curve from Geom2d)
220         ---Level: Public
221     is static;
222     
223     Init(me : in out; C      : Curve from Geom2d;
224                       p1, p2 : Real)
225         ---Level: Public
226     is static;                
227         
228     Init(me : in out; C      : Curve from Geom2d;
229                       P1, P2 : Pnt2d from gp)
230         ---Level: Public
231     is static;                
232         
233     Init(me : in out; C      : Curve  from Geom2d;
234                       V1, V2 : Vertex from TopoDS)
235         ---Level: Public
236     is static;
237         
238     Init(me : in out; C      : Curve from Geom2d;
239                       P1, P2 : Pnt2d from gp;
240                       p1, p2 : Real)
241         ---Level: Public
242     is static;                
243         
244     Init(me : in out; C      : Curve  from Geom2d;
245                       V1, V2 : Vertex from TopoDS;
246                       p1, p2 : Real)
247         ---Level: Public
248     is static;
249         
250
251     ----------------------------------------
252     --  Results
253     ----------------------------------------
254
255     Error(me)
256          returns EdgeError from BRepLib
257         ---Purpose: Returns the error description when NotDone.
258         ---Level: Public        
259     is static;
260
261     Edge(me) returns Edge from TopoDS
262         ---C++: return const &
263         ---C++: alias "Standard_EXPORT operator TopoDS_Edge() const;"
264         ---Level: Public
265     raises
266         NotDone from StdFail
267     is static;
268     
269     Vertex1(me) returns Vertex from TopoDS
270         ---Purpose: Returns the first vertex of the edge. May be Null.
271         --          
272         ---C++: return const &
273         ---Level: Public
274     is static;
275     
276     Vertex2(me) returns Vertex from TopoDS
277         ---Purpose: Returns the second vertex of the edge. May be Null.
278         --          
279         ---C++: return const &
280         ---Level: Public
281     is static;
282      
283 fields
284
285     myError   : EdgeError from BRepLib;
286     myVertex1 : Vertex    from TopoDS;
287     myVertex2 : Vertex    from TopoDS;
288
289 end MakeEdge2d;