b311480e |
1 | -- Created on: 1993-07-06 |
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 | |
7fd59977 |
21 | |
22 | |
23 | |
24 | class MakeEdge from BRepLib inherits MakeShape from BRepLib |
25 | |
26 | ---Purpose: Provides methods to build edges. |
27 | -- |
28 | -- The methods have the following syntax, where |
29 | -- TheCurve is one of Lin, Circ, ... |
30 | -- |
31 | -- Create(C : TheCurve) |
32 | -- |
33 | -- Makes an edge on the whole curve. Add vertices |
34 | -- on finite curves. |
35 | -- |
36 | -- Create(C : TheCurve; p1,p2 : Real) |
37 | -- |
38 | -- Make an edge on the curve between parameters p1 |
39 | -- and p2. if p2 < p1 the edge will be REVERSED. If |
40 | -- p1 or p2 is infinite the curve will be open in |
41 | -- that direction. Vertices are created for finite |
42 | -- values of p1 and p2. |
43 | -- |
44 | -- Create(C : TheCurve; P1, P2 : Pnt from gp) |
45 | -- |
46 | -- Make an edge on the curve between the points P1 |
47 | -- and P2. The points are projected on the curve |
48 | -- and the previous method is used. An error is |
49 | -- raised if the points are not on the curve. |
50 | -- |
51 | -- Create(C : TheCurve; V1, V2 : Vertex from TopoDS) |
52 | -- |
53 | -- Make an edge on the curve between the vertices |
54 | -- V1 and V2. Same as the previous but no vertices |
55 | -- are created. If a vertex is Null the curve will |
56 | -- be open in this direction. |
57 | |
58 | uses |
59 | EdgeError from BRepLib, |
60 | Edge from TopoDS, |
61 | Vertex from TopoDS, |
62 | Pnt from gp, |
63 | Lin from gp, |
64 | Circ from gp, |
65 | Elips from gp, |
66 | Hypr from gp, |
67 | Parab from gp, |
68 | Curve from Geom2d, |
69 | Curve from Geom, |
70 | Surface from Geom |
71 | |
72 | raises |
73 | NotDone from StdFail |
74 | |
75 | is |
76 | |
77 | Create returns MakeEdge from BRepLib; |
78 | |
79 | ---------------------------------------- |
80 | -- Points |
81 | ---------------------------------------- |
82 | |
83 | Create(V1, V2 : Vertex from TopoDS) |
84 | ---Level: Public |
85 | returns MakeEdge from BRepLib; |
86 | |
87 | Create(P1, P2 : Pnt from gp) |
88 | ---Level: Public |
89 | returns MakeEdge from BRepLib; |
90 | |
91 | |
92 | ---------------------------------------- |
93 | -- Lin |
94 | ---------------------------------------- |
95 | |
96 | Create(L : Lin from gp) |
97 | ---Level: Public |
98 | returns MakeEdge from BRepLib; |
99 | |
100 | Create(L : Lin from gp; p1,p2 : Real) |
101 | ---Level: Public |
102 | returns MakeEdge from BRepLib; |
103 | |
104 | Create(L : Lin from gp; P1,P2 : Pnt from gp) |
105 | ---Level: Public |
106 | returns MakeEdge from BRepLib; |
107 | |
108 | Create(L : Lin from gp; V1, V2 : Vertex from TopoDS) |
109 | ---Level: Public |
110 | returns MakeEdge from BRepLib; |
111 | |
112 | ---------------------------------------- |
113 | -- Circ |
114 | ---------------------------------------- |
115 | |
116 | Create(L : Circ from gp) |
117 | ---Level: Public |
118 | returns MakeEdge from BRepLib; |
119 | |
120 | Create(L : Circ from gp; p1,p2 : Real) |
121 | ---Level: Public |
122 | returns MakeEdge from BRepLib; |
123 | |
124 | Create(L : Circ from gp; P1,P2 : Pnt from gp) |
125 | ---Level: Public |
126 | returns MakeEdge from BRepLib; |
127 | |
128 | Create(L : Circ from gp; V1, V2 : Vertex from TopoDS) |
129 | ---Level: Public |
130 | returns MakeEdge from BRepLib; |
131 | |
132 | |
133 | ---------------------------------------- |
134 | -- Elips |
135 | ---------------------------------------- |
136 | |
137 | Create(L : Elips from gp) |
138 | ---Level: Public |
139 | returns MakeEdge from BRepLib; |
140 | |
141 | Create(L : Elips from gp; p1,p2 : Real) |
142 | ---Level: Public |
143 | returns MakeEdge from BRepLib; |
144 | |
145 | Create(L : Elips from gp; P1,P2 : Pnt from gp) |
146 | ---Level: Public |
147 | returns MakeEdge from BRepLib; |
148 | |
149 | Create(L : Elips from gp; V1, V2 : Vertex from TopoDS) |
150 | ---Level: Public |
151 | returns MakeEdge from BRepLib; |
152 | |
153 | ---------------------------------------- |
154 | -- Hypr |
155 | ---------------------------------------- |
156 | |
157 | Create(L : Hypr from gp) |
158 | ---Level: Public |
159 | returns MakeEdge from BRepLib; |
160 | |
161 | Create(L : Hypr from gp; p1,p2 : Real) |
162 | ---Level: Public |
163 | returns MakeEdge from BRepLib; |
164 | |
165 | Create(L : Hypr from gp; P1,P2 : Pnt from gp) |
166 | ---Level: Public |
167 | returns MakeEdge from BRepLib; |
168 | |
169 | Create(L : Hypr from gp; V1, V2 : Vertex from TopoDS) |
170 | ---Level: Public |
171 | returns MakeEdge from BRepLib; |
172 | |
173 | ---------------------------------------- |
174 | -- Parab |
175 | ---------------------------------------- |
176 | |
177 | Create(L : Parab from gp) |
178 | ---Level: Public |
179 | returns MakeEdge from BRepLib; |
180 | |
181 | Create(L : Parab from gp; p1,p2 : Real) |
182 | ---Level: Public |
183 | returns MakeEdge from BRepLib; |
184 | |
185 | Create(L : Parab from gp; P1,P2 : Pnt from gp) |
186 | ---Level: Public |
187 | returns MakeEdge from BRepLib; |
188 | |
189 | Create(L : Parab from gp; V1, V2 : Vertex from TopoDS) |
190 | ---Level: Public |
191 | returns MakeEdge from BRepLib; |
192 | |
193 | ---------------------------------------- |
194 | -- Curve |
195 | ---------------------------------------- |
196 | |
197 | Create(L : Curve from Geom) |
198 | ---Level: Public |
199 | returns MakeEdge from BRepLib; |
200 | |
201 | Create(L : Curve from Geom; p1,p2 : Real) |
202 | ---Level: Public |
203 | returns MakeEdge from BRepLib; |
204 | |
205 | Create(L : Curve from Geom; |
206 | P1,P2 : Pnt from gp) |
207 | ---Level: Public |
208 | returns MakeEdge from BRepLib; |
209 | |
210 | Create(L : Curve from Geom; |
211 | V1, V2 : Vertex from TopoDS) |
212 | ---Level: Public |
213 | returns MakeEdge from BRepLib; |
214 | |
215 | Create(L : Curve from Geom; |
216 | P1,P2 : Pnt from gp; p1,p2 : Real) |
217 | ---Level: Public |
218 | returns MakeEdge from BRepLib; |
219 | |
220 | Create(L : Curve from Geom; |
221 | V1, V2 : Vertex from TopoDS; |
222 | p1, p2 :Real) |
223 | ---Level: Public |
224 | returns MakeEdge from BRepLib; |
225 | |
226 | ---------------------------------------- |
227 | -- Curve and surface |
228 | ---------------------------------------- |
229 | |
230 | Create(L : Curve from Geom2d; S : Surface from Geom) |
231 | ---Level: Public |
232 | returns MakeEdge from BRepLib; |
233 | |
234 | Create(L : Curve from Geom2d; S : Surface from Geom; p1,p2 : Real) |
235 | ---Level: Public |
236 | returns MakeEdge from BRepLib; |
237 | |
238 | Create(L : Curve from Geom2d; S : Surface from Geom; |
239 | P1,P2 : Pnt from gp) |
240 | ---Level: Public |
241 | returns MakeEdge from BRepLib; |
242 | |
243 | Create(L : Curve from Geom2d; S : Surface from Geom; |
244 | V1, V2 : Vertex from TopoDS) |
245 | ---Level: Public |
246 | returns MakeEdge from BRepLib; |
247 | |
248 | Create(L : Curve from Geom2d; S : Surface from Geom; |
249 | P1,P2 : Pnt from gp; p1,p2 : Real) |
250 | ---Level: Public |
251 | returns MakeEdge from BRepLib; |
252 | |
253 | Create(L : Curve from Geom2d; S : Surface from Geom; |
254 | V1, V2 : Vertex from TopoDS; |
255 | p1, p2 :Real) |
256 | ---Level: Public |
257 | returns MakeEdge from BRepLib; |
258 | |
259 | ---------------------------------------- |
260 | -- Auxiliary methods |
261 | ---------------------------------------- |
262 | |
263 | Init(me : in out; C : Curve from Geom) |
264 | ---Level: Public |
265 | is static; |
266 | |
267 | Init(me : in out; C : Curve from Geom; |
268 | p1, p2 : Real) |
269 | ---Level: Public |
270 | is static; |
271 | |
272 | Init(me : in out; C : Curve from Geom; |
273 | P1, P2 : Pnt from gp) |
274 | ---Level: Public |
275 | is static; |
276 | |
277 | Init(me : in out; C : Curve from Geom; |
278 | V1, V2 : Vertex from TopoDS) |
279 | ---Level: Public |
280 | is static; |
281 | |
282 | Init(me : in out; C : Curve from Geom; |
283 | P1, P2 : Pnt from gp; |
284 | p1, p2 : Real) |
285 | ---Level: Public |
286 | is static; |
287 | |
288 | Init(me : in out; C : Curve from Geom; |
289 | V1, V2 : Vertex from TopoDS; |
290 | p1, p2 : Real) |
291 | ---Level: Public |
292 | is static; |
293 | |
294 | Init(me : in out; C : Curve from Geom2d; S : Surface from Geom) |
295 | ---Level: Public |
296 | is static; |
297 | |
298 | Init(me : in out; C : Curve from Geom2d; S : Surface from Geom; |
299 | p1, p2 : Real) |
300 | ---Level: Public |
301 | is static; |
302 | |
303 | Init(me : in out; C : Curve from Geom2d; S : Surface from Geom; |
304 | P1, P2 : Pnt from gp) |
305 | ---Level: Public |
306 | is static; |
307 | |
308 | Init(me : in out; C : Curve from Geom2d; S : Surface from Geom; |
309 | V1, V2 : Vertex from TopoDS) |
310 | ---Level: Public |
311 | is static; |
312 | |
313 | Init(me : in out; C : Curve from Geom2d; S : Surface from Geom; |
314 | P1, P2 : Pnt from gp; |
315 | p1, p2 : Real) |
316 | ---Level: Public |
317 | is static; |
318 | |
319 | Init(me : in out; C : Curve from Geom2d; S : Surface from Geom; |
320 | V1, V2 : Vertex from TopoDS; |
321 | p1, p2 : Real) |
322 | ---Level: Public |
323 | is static; |
324 | |
325 | |
326 | ---------------------------------------- |
327 | -- Results |
328 | ---------------------------------------- |
329 | |
330 | Error(me) returns EdgeError from BRepLib |
331 | ---Purpose: Returns the error description when NotDone. |
332 | ---Level: Public |
333 | is static; |
334 | |
335 | Edge(me) returns Edge from TopoDS |
336 | ---C++: return const & |
337 | ---C++: alias "Standard_EXPORT operator TopoDS_Edge() const;" |
338 | ---Level: Public |
339 | raises |
340 | NotDone from StdFail |
341 | is static; |
342 | |
343 | Vertex1(me) returns Vertex from TopoDS |
344 | ---Purpose: Returns the first vertex of the edge. May be Null. |
345 | -- |
346 | ---C++: return const & |
347 | ---Level: Public |
348 | is static; |
349 | |
350 | Vertex2(me) returns Vertex from TopoDS |
351 | ---Purpose: Returns the second vertex of the edge. May be Null. |
352 | -- |
353 | ---C++: return const & |
354 | ---Level: Public |
355 | is static; |
356 | |
357 | fields |
358 | |
359 | myError : EdgeError from BRepLib; |
360 | myVertex1 : Vertex from TopoDS; |
361 | myVertex2 : Vertex from TopoDS; |
362 | |
363 | end MakeEdge; |