b311480e |
1 | -- Created on: 1993-07-07 |
2 | -- Created by: Remi LEQUETTE |
3 | -- Copyright (c) 1993-1999 Matra Datavision |
973c2be1 |
4 | -- Copyright (c) 1999-2014 OPEN CASCADE SAS |
b311480e |
5 | -- |
973c2be1 |
6 | -- This file is part of Open CASCADE Technology software library. |
b311480e |
7 | -- |
973c2be1 |
8 | -- This library is free software; you can redistribute it and / or modify it |
9 | -- under the terms of the GNU Lesser General Public 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. |
b311480e |
13 | -- |
973c2be1 |
14 | -- Alternatively, this file may be used under the terms of Open CASCADE |
15 | -- commercial license or contractual agreement. |
7fd59977 |
16 | |
17 | class Tool from BRep |
18 | |
19 | ---Purpose: Provides class methods to access to the geometry |
20 | -- of BRep shapes. |
21 | |
22 | uses |
23 | Vertex from TopoDS, |
24 | Edge from TopoDS, |
25 | Face from TopoDS, |
26 | Shape from TopoDS, |
27 | Location from TopLoc, |
28 | Pnt from gp, |
29 | Pnt2d from gp, |
30 | Box2d from Bnd, |
31 | Curve from Geom2d, |
32 | Curve from Geom, |
33 | Surface from Geom, |
34 | Shape from GeomAbs, |
35 | |
36 | Triangulation from Poly, |
37 | Polygon3D from Poly, |
38 | Polygon2D from Poly, |
39 | PolygonOnTriangulation from Poly, |
40 | HArray1OfInteger from TColStd, |
41 | HArray1OfReal from TColStd |
42 | |
43 | raises |
44 | NullObject from Standard, |
45 | NoSuchObject from Standard |
46 | |
47 | is |
48 | |
49 | |
50 | ----------------------------------------------------------- |
51 | ----------------------------------------------------------- |
52 | -- Solid -- |
53 | ----------------------------------------------------------- |
54 | ----------------------------------------------------------- |
55 | IsClosed (myclass; S : Shape from TopoDS) returns Boolean from Standard; |
56 | |
57 | ---Purpose: Returns <True> if S if flaged Closed, if S is a |
58 | -- Solid,Shell or Compound returns <True> is S has no free boundaries. |
59 | |
60 | |
61 | ----------------------------------------------------------- |
62 | ----------------------------------------------------------- |
63 | -- Face -- |
64 | ----------------------------------------------------------- |
65 | ----------------------------------------------------------- |
66 | |
67 | |
68 | |
69 | ----------------------------------------------------------- |
70 | -- Face surface |
71 | ----------------------------------------------------------- |
72 | |
73 | |
74 | Surface(myclass; F : Face from TopoDS; |
75 | L : out Location from TopLoc) returns Surface from Geom |
76 | |
77 | ---Purpose: Returns the geometric surface of the face. Returns |
78 | -- in <L> the location for the surface. |
79 | ---C++: return const & |
80 | raises |
81 | NullObject from Standard; |
82 | |
83 | Surface(myclass; F : Face from TopoDS) returns Surface from Geom |
84 | |
85 | ---Purpose: Returns the geometric surface of the face. It can |
86 | -- be a copy if there is a Location. |
87 | -- |
88 | raises |
89 | NullObject from Standard; |
90 | |
91 | Triangulation(myclass; F : Face from TopoDS; |
92 | L : out Location from TopLoc) returns Triangulation from Poly |
93 | |
94 | ---Purpose: Returns the Triangulation of the face. It is a |
95 | -- null handle if there is no triangulation. |
96 | -- |
97 | ---C++: return const & |
98 | raises |
99 | NullObject from Standard; |
100 | |
101 | |
102 | |
103 | ----------------------------------------------------------- |
104 | -- Face tolerance |
105 | ----------------------------------------------------------- |
106 | |
107 | Tolerance(myclass; F : Face from TopoDS) returns Real |
108 | |
109 | ---Purpose: Returns the tolerance of the face. |
110 | raises |
111 | NullObject from Standard; |
112 | |
113 | ----------------------------------------------------------- |
114 | -- Face natural restriction flag |
115 | ----------------------------------------------------------- |
116 | |
117 | NaturalRestriction(myclass; F : Face from TopoDS) returns Boolean |
118 | |
119 | ---Purpose: Returns the NaturalRestriction flag of the face. |
120 | raises |
121 | NullObject from Standard; |
122 | |
123 | |
124 | |
125 | |
126 | ----------------------------------------------------------- |
127 | ----------------------------------------------------------- |
128 | -- Edge -- |
129 | ----------------------------------------------------------- |
130 | ----------------------------------------------------------- |
131 | |
132 | IsGeometric(myclass; E: Edge from TopoDS) |
133 | ---Purpose: Returns True if <E> is a 3d curve or a curve on |
134 | -- surface. |
135 | returns Boolean; |
136 | |
137 | ----------------------------------------------------------- |
138 | -- Edge 3d curve |
139 | ----------------------------------------------------------- |
140 | |
141 | Curve(myclass; E : Edge from TopoDS; |
142 | L : out Location from TopLoc; |
143 | First, Last : out Real) |
144 | returns Curve from Geom |
145 | |
146 | ---Purpose: Returns the 3D curve of the edge. May be a Null |
147 | -- handle. Returns in <L> the location for the curve. |
148 | -- In <First> and <Last> the parameter range. |
149 | -- |
150 | ---C++: return const & |
151 | raises |
152 | NullObject from Standard; |
153 | |
154 | |
155 | Curve(myclass; E : Edge from TopoDS; |
156 | First, Last : out Real) |
157 | returns Curve from Geom |
158 | |
159 | ---Purpose: Returns the 3D curve of the edge. May be a Null handle. |
160 | -- In <First> and <Last> the parameter range. |
161 | -- It can be a copy if there is a Location. |
162 | raises |
163 | NullObject from Standard; |
164 | |
165 | ----------------------------------------------------------- |
166 | -- Edge 3d polygon |
167 | ----------------------------------------------------------- |
168 | |
169 | Polygon3D(myclass; E : Edge from TopoDS; |
170 | L : out Location from TopLoc) |
171 | returns Polygon3D from Poly |
172 | |
173 | ---Purpose: Returns the 3D polygon of the edge. May be a Null |
174 | -- handle. Returns in <L> the location for the polygon. |
175 | -- |
176 | ---C++: return const & |
177 | raises |
178 | NullObject from Standard; |
179 | |
180 | |
181 | ----------------------------------------------------------- |
182 | -- Edge curve on surface |
183 | ----------------------------------------------------------- |
184 | |
185 | CurveOnSurface(myclass; E : Edge from TopoDS; |
186 | F : Face from TopoDS; |
187 | First, Last : out Real) |
188 | returns Curve from Geom2d |
189 | |
190 | ---Purpose: Returns the curve associated to the edge in the |
191 | -- parametric space of the face. Returns a NULL |
192 | -- handle if this curve does not exist. Returns in |
193 | -- <First> and <Last> the parameter range. |
194 | raises |
195 | NullObject from Standard; |
196 | |
197 | |
198 | CurveOnSurface(myclass; E : Edge from TopoDS; |
199 | S : Surface from Geom; |
200 | L : Location from TopLoc; |
201 | First, Last : out Real) |
202 | returns Curve from Geom2d |
203 | |
204 | ---Purpose: Returns the curve associated to the edge in the |
205 | -- parametric space of the surface. Returns a NULL |
206 | -- handle if this curve does not exist. Returns in |
207 | -- <First> and <Last> the parameter range. |
208 | raises |
209 | NullObject from Standard; |
210 | |
211 | |
212 | CurveOnSurface(myclass; E : Edge from TopoDS; |
213 | C : out Curve from Geom2d; |
214 | S : out Surface from Geom; |
215 | L : out Location from TopLoc; |
216 | First, Last : out Real) |
217 | |
218 | ---Purpose: Returns in <C>, <S>, <L> a 2d curve, a surface and |
219 | -- a location for the edge <E>. <C> and <S> are null |
220 | -- if the edge has no curve on surface. Returns in |
221 | -- <First> and <Last> the parameter range. |
222 | raises |
223 | NullObject from Standard; |
224 | |
225 | CurveOnSurface(myclass; E : Edge from TopoDS; |
226 | C : out Curve from Geom2d; |
227 | S : out Surface from Geom; |
228 | L : out Location from TopLoc; |
229 | First, Last : out Real; |
230 | Index : Integer) |
231 | |
232 | ---Purpose: Returns in <C>, <S>, <L> the 2d curve, the surface |
233 | -- and the location for the edge <E> of rank <Index>. |
234 | -- <C> and <S> are null if the index is out of range. |
235 | -- Returns in <First> and <Last> the parameter range. |
236 | raises |
237 | NullObject from Standard; |
238 | |
239 | ----------------------------------------------------------- |
240 | -- Edge polygon on surface |
241 | ----------------------------------------------------------- |
242 | |
243 | PolygonOnSurface(myclass; E : Edge from TopoDS; |
244 | F : Face from TopoDS) |
245 | returns Polygon2D from Poly |
246 | |
247 | ---Purpose: Returns the polygon associated to the edge in the |
248 | -- parametric space of the face. Returns a NULL |
249 | -- handle if this polygon does not exist. |
250 | raises |
251 | NullObject from Standard; |
252 | |
253 | PolygonOnSurface(myclass; E : Edge from TopoDS; |
254 | S : Surface from Geom; |
255 | L : Location from TopLoc) |
256 | returns Polygon2D from Poly |
257 | |
258 | ---Purpose: Returns the polygon associated to the edge in the |
259 | -- parametric space of the surface. Returns a NULL |
260 | -- handle if this polygon does not exist. |
261 | raises |
262 | NullObject from Standard; |
263 | |
264 | |
265 | PolygonOnSurface(myclass; E : Edge from TopoDS; |
266 | C : out Polygon2D from Poly; |
267 | S : out Surface from Geom; |
268 | L : out Location from TopLoc) |
269 | |
270 | ---Purpose: Returns in <C>, <S>, <L> a 2d curve, a surface and |
271 | -- a location for the edge <E>. <C> and <S> are null |
272 | -- if the edge has no polygon on surface. |
273 | raises |
274 | NullObject from Standard; |
275 | |
276 | PolygonOnSurface(myclass; E : Edge from TopoDS; |
277 | C : out Polygon2D from Poly; |
278 | S : out Surface from Geom; |
279 | L : out Location from TopLoc; |
280 | Index : Integer) |
281 | |
282 | ---Purpose: Returns in <C>, <S>, <L> the 2d curve, the surface |
283 | -- and the location for the edge <E> of rank <Index>. |
284 | -- <C> and <S> are null if the index is out of range. |
285 | raises |
286 | NullObject from Standard; |
287 | |
288 | |
289 | |
290 | ----------------------------------------------------------- |
291 | -- Edge polygon on triangulation |
292 | ----------------------------------------------------------- |
293 | |
294 | PolygonOnTriangulation(myclass; E : Edge from TopoDS; |
295 | T : Triangulation from Poly; |
296 | L : Location from TopLoc) |
297 | ---C++: return const & |
298 | returns PolygonOnTriangulation from Poly; |
299 | -- |
300 | ---Purpose: Returns the polygon associated to the edge in the |
301 | -- parametric space of the face. Returns a NULL |
302 | -- handle if this polygon does not exist. |
303 | |
304 | |
305 | PolygonOnTriangulation(myclass; E : Edge from TopoDS; |
306 | P : out PolygonOnTriangulation from Poly; |
307 | T : out Triangulation from Poly; |
308 | L : out Location from TopLoc) |
309 | |
310 | ---Purpose: Returns in <P>, <T>, <L> a polygon on triangulation, a |
311 | -- triangulation and a location for the edge <E>. |
312 | -- <P> and <T> are null if the edge has no |
313 | -- polygon on triangulation. |
314 | raises |
315 | NullObject from Standard; |
316 | |
317 | PolygonOnTriangulation(myclass; E : Edge from TopoDS; |
318 | P : out PolygonOnTriangulation from Poly; |
319 | T : out Triangulation from Poly; |
320 | L : out Location from TopLoc; |
321 | Index : Integer) |
322 | ---Purpose: Returns in <P>, <T>, <L> a polygon on |
323 | -- triangulation, a triangulation and a location for |
324 | -- the edge <E> for the range index. <C> and <S> are |
325 | -- null if the edge has no polygon on triangulation. |
326 | |
327 | raises |
328 | NullObject from Standard; |
329 | |
330 | |
331 | ----------------------------------------------------------- |
332 | -- Edge closed on surface |
333 | ----------------------------------------------------------- |
334 | |
335 | IsClosed(myclass; E : Edge from TopoDS; |
336 | F : Face from TopoDS) |
337 | returns Boolean |
338 | |
339 | ---Purpose: Returns True if <E> has two PCurves in the |
340 | -- parametric space of <F>. i.e. <F> is on a closed |
341 | -- surface and <E> is on the closing curve. |
342 | -- |
343 | raises |
344 | NullObject from Standard; |
345 | |
346 | |
347 | ----------------------------------------------------------- |
348 | -- Edge closed on surface |
349 | ----------------------------------------------------------- |
350 | |
351 | IsClosed(myclass; E : Edge from TopoDS; |
352 | S : Surface from Geom; |
353 | L : Location from TopLoc) |
354 | returns Boolean |
355 | |
356 | ---Purpose: Returns True if <E> has two PCurves in the |
357 | -- parametric space of <S>. i.e. <S> is a closed |
358 | -- surface and <E> is on the closing curve. |
359 | -- |
360 | raises |
361 | NullObject from Standard; |
362 | |
363 | ----------------------------------------------------------- |
364 | -- Edge closed on triangulation |
365 | ----------------------------------------------------------- |
366 | |
367 | IsClosed(myclass; E : Edge from TopoDS; |
368 | T : Triangulation from Poly) |
369 | returns Boolean |
370 | |
371 | ---Purpose: Returns True if <E> has two arrays of indices in |
372 | -- the triangulation <T>. |
373 | raises |
374 | NullObject from Standard; |
375 | |
376 | ----------------------------------------------------------- |
377 | -- Edge tolerance |
378 | ----------------------------------------------------------- |
379 | |
380 | Tolerance(myclass; E : Edge from TopoDS) returns Real |
381 | |
382 | ---Purpose: Returns the tolerance for <E>. |
383 | raises |
384 | NullObject from Standard; |
385 | |
386 | ----------------------------------------------------------- |
387 | -- Edge flags |
388 | ----------------------------------------------------------- |
389 | |
390 | SameParameter(myclass; E : Edge from TopoDS) returns Boolean |
391 | |
392 | ---Purpose: Returns the SameParameter flag for the edge. |
393 | raises |
394 | NullObject from Standard; |
395 | |
396 | SameRange(myclass; E : Edge from TopoDS) returns Boolean |
397 | |
398 | ---Purpose: Returns the SameRange flag for the edge. |
399 | raises |
400 | NullObject from Standard; |
401 | |
402 | Degenerated(myclass; E : Edge from TopoDS) |
403 | returns Boolean |
404 | |
405 | ---Purpose: Returns True if the edge is degenerated. |
406 | raises |
407 | NullObject from Standard; |
408 | |
409 | ------------------------------------------------------- |
410 | -- Edge parameter range |
411 | ------------------------------------------------------- |
412 | |
413 | Range(myclass; E : Edge from TopoDS; |
414 | First, Last : out Real) |
415 | ---Purpose: Gets the range of the 3d curve. |
416 | raises |
417 | NullObject from Standard; -- If <E> is Null |
418 | |
419 | |
420 | Range(myclass; E : Edge from TopoDS; |
421 | S : Surface from Geom; |
422 | L : Location from TopLoc; |
423 | First, Last : out Real) |
424 | ---Purpose: Gets the range of the edge on the pcurve on the |
425 | -- surface. |
426 | raises |
427 | NullObject from Standard; -- If <E> is Null |
428 | |
429 | |
430 | Range(myclass; E : Edge from TopoDS; |
431 | F : Face from TopoDS; |
432 | First, Last : out Real) |
433 | ---Purpose: Gets the range of the edge on the pcurve on the face. |
434 | raises |
435 | NullObject from Standard; -- If <E> is Null |
436 | |
437 | |
438 | ------------------------------------------------------- |
439 | -- Edge UV points |
440 | -- |
441 | -- The data structures records a location in UV for the two |
442 | -- extremities of an edge. |
443 | -- |
444 | -- By default these location are computed from the PCurve. |
445 | -- |
446 | -- They can be updated to ensure their identity on connected edges. |
447 | -- (See the package BRepTools) |
448 | -- |
449 | ------------------------------------------------------- |
450 | |
451 | UVPoints(myclass; E : Edge from TopoDS; |
452 | S : Surface from Geom; |
453 | L : Location from TopLoc; |
454 | PFirst, PLast : out Pnt2d from gp) |
455 | ---Purpose: Gets the UV locations of the extremities of the edge. |
456 | raises |
457 | NullObject from Standard; -- If <E> is Null |
458 | |
459 | |
460 | UVPoints(myclass; E : Edge from TopoDS; |
461 | F : Face from TopoDS; |
462 | PFirst, PLast : out Pnt2d from gp) |
463 | ---Purpose: Gets the UV locations of the extremities of the edge. |
464 | raises |
465 | NullObject from Standard; -- If <E> is Null |
466 | |
467 | SetUVPoints(myclass; E : Edge from TopoDS; |
468 | S : Surface from Geom; |
469 | L : Location from TopLoc; |
470 | PFirst, PLast : Pnt2d from gp) |
471 | ---Purpose: Sets the UV locations of the extremities of the edge. |
472 | raises |
473 | NullObject from Standard; -- If <E> is Null |
474 | |
475 | |
476 | SetUVPoints(myclass; E : Edge from TopoDS; |
477 | F : Face from TopoDS; |
478 | PFirst, PLast : Pnt2d from gp) |
479 | ---Purpose: Sets the UV locations of the extremities of the edge. |
480 | raises |
481 | NullObject from Standard; -- If <E> is Null |
482 | |
483 | ----------------------------------------------------------- |
484 | -- Edge continuity |
485 | ----------------------------------------------------------- |
486 | |
487 | HasContinuity(myclass; E : Edge from TopoDS; |
488 | F1, F2 : Face from TopoDS) |
489 | returns Boolean |
490 | |
491 | ---Purpose: Returns True if the edge is on the surfaces of the |
492 | -- two faces. |
493 | raises |
494 | NullObject from Standard; -- If the edge or the faces are null. |
495 | |
496 | |
497 | Continuity(myclass; E : Edge from TopoDS; |
498 | F1, F2 : Face from TopoDS) |
499 | returns Shape from GeomAbs |
500 | |
501 | ---Purpose: Returns the continuity. |
502 | raises |
503 | NullObject from Standard; -- If the edge or the faces are null. |
504 | |
505 | HasContinuity(myclass; E : Edge from TopoDS; |
506 | S1, S2 : Surface from Geom; |
507 | L1, L2 : Location from TopLoc) |
508 | returns Boolean |
509 | |
510 | ---Purpose: Returns True if the edge is on the surfaces. |
511 | raises |
512 | NullObject from Standard; -- If the edge or the surfaces are null. |
513 | |
514 | |
515 | Continuity(myclass; E : Edge from TopoDS; |
516 | S1, S2 : Surface from Geom; |
517 | L1, L2 : Location from TopLoc) |
518 | returns Shape from GeomAbs |
519 | |
520 | ---Purpose: Returns the continuity. |
521 | raises |
522 | NullObject from Standard; -- If the edge or the faces are null. |
523 | |
bda83605 |
524 | HasContinuity(myclass; E : Edge from TopoDS) |
525 | returns Boolean |
526 | |
527 | ---Purpose: Returns True if the edge has regularity on some |
528 | -- two surfaces |
529 | raises |
530 | NullObject from Standard; -- If the edge is null. |
7fd59977 |
531 | |
532 | ----------------------------------------------------------- |
533 | ----------------------------------------------------------- |
534 | -- Vertex -- |
535 | ----------------------------------------------------------- |
536 | ----------------------------------------------------------- |
537 | |
538 | |
539 | |
540 | ----------------------------------------------------------- |
541 | -- Vertex point |
542 | ----------------------------------------------------------- |
543 | |
544 | Pnt(myclass; V : Vertex from TopoDS) returns Pnt from gp |
545 | |
546 | ---Purpose: Returns the 3d point. |
547 | raises |
548 | NullObject from Standard; -- if <V> is Null or has no geometry. |
549 | |
550 | ----------------------------------------------------------- |
551 | -- Vertex tolerance |
552 | ----------------------------------------------------------- |
553 | |
554 | Tolerance(myclass; V : Vertex from TopoDS) returns Real |
555 | |
556 | ---Purpose: Returns the tolerance. |
557 | raises |
558 | NullObject from Standard; -- if <V> is Null or has no geometry. |
559 | |
560 | ----------------------------------------------------------- |
561 | -- Vertex parameter on edge |
562 | ----------------------------------------------------------- |
563 | |
564 | Parameter(myclass; V : Vertex from TopoDS; |
565 | E : Edge from TopoDS) |
566 | returns Real |
567 | |
568 | ---Purpose: Returns the parameter of <V> on <E>. |
569 | raises |
570 | NullObject from Standard; |
571 | |
572 | |
573 | |
574 | Parameter(myclass; V : Vertex from TopoDS; |
575 | E : Edge from TopoDS; |
576 | F : Face from TopoDS) |
577 | returns Real |
578 | |
579 | ---Purpose: Returns the parameters of the vertex on the |
580 | -- pcurve of the edge on the face. |
581 | raises |
582 | NullObject from Standard; |
583 | |
584 | |
585 | |
586 | Parameter(myclass; V : Vertex from TopoDS; |
587 | E : Edge from TopoDS; |
588 | S : Surface from Geom; |
589 | L : Location from TopLoc) |
590 | returns Real |
591 | |
592 | ---Purpose: Returns the parameters of the vertex on the |
593 | -- pcurve of the edge on the surface. |
594 | raises |
595 | NullObject from Standard; |
596 | |
597 | |
598 | Parameters(myclass; V : Vertex from TopoDS; |
599 | F : Face from TopoDS) |
600 | returns Pnt2d from gp |
601 | |
602 | ---Purpose: Returns the parameters of the vertex on the face. |
603 | raises |
604 | NullObject from Standard; |
605 | |
606 | |
607 | |
608 | end Tool; |
609 | |