b311480e |
1 | -- Created on: 1990-12-20 |
2 | -- Created by: Remi Lequette |
3 | -- Copyright (c) 1990-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 | -- |
d5f74e42 |
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 |
973c2be1 |
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 | package TopExp |
18 | |
19 | ---Purpose: This package provides basic tools to explore the |
20 | -- topological data structures. |
21 | -- |
22 | -- * Explorer : A tool to find all sub-shapes of a given |
23 | -- type. e.g. all faces of a solid. |
24 | -- |
25 | -- * Package methods to map sub-shapes of a shape. |
26 | -- |
27 | -- Level : Public |
28 | -- All methods of all classes will be public. |
29 | |
30 | |
31 | uses |
32 | |
33 | TCollection, |
34 | TopLoc, |
35 | TopAbs, |
36 | TopoDS, |
37 | TopTools |
38 | |
39 | is |
40 | |
7fd59977 |
41 | pointer Stack to Iterator from TopoDS; |
42 | |
43 | class Explorer; |
44 | ---Purpose: Tool to explore a topological data structure. |
45 | |
46 | -- |
47 | -- Package methods |
48 | -- |
49 | |
50 | |
51 | MapShapes(S : Shape from TopoDS; |
52 | T : ShapeEnum from TopAbs; |
53 | M : in out IndexedMapOfShape from TopTools); |
54 | ---Purpose: Stores in the map <M> all the sub-shapes of <S> |
55 | -- of type <T>. |
56 | -- |
57 | -- Warning: The map is not cleared at first. |
58 | |
59 | MapShapes(S : Shape from TopoDS; |
60 | M : in out IndexedMapOfShape from TopTools); |
61 | ---Purpose: Stores in the map <M> all the sub-shapes of <S>. |
62 | |
63 | MapShapesAndAncestors |
64 | (S : Shape from TopoDS; |
65 | TS : ShapeEnum from TopAbs; |
66 | TA : ShapeEnum from TopAbs; |
67 | M : in out IndexedDataMapOfShapeListOfShape from TopTools); |
68 | ---Purpose: Stores in the map <M> all the subshape of <S> of |
69 | -- type <TS> for each one append to the list all |
70 | -- the ancestors of type <TA>. For example map all |
71 | -- the edges and bind the list of faces. |
72 | -- Warning: The map is not cleared at first. |
73 | |
74 | FirstVertex(E : Edge from TopoDS; |
75 | CumOri : Boolean from Standard = Standard_False) |
76 | returns Vertex from TopoDS; |
77 | ---Purpose: Returns the Vertex of orientation FORWARD in E. If |
78 | -- there is none returns a Null Shape. |
79 | -- CumOri = True : taking account the edge orientation |
80 | |
81 | LastVertex(E : Edge from TopoDS; |
82 | CumOri : Boolean from Standard = Standard_False) |
83 | returns Vertex from TopoDS; |
84 | ---Purpose: Returns the Vertex of orientation REVERSED in E. If |
85 | -- there is none returns a Null Shape. |
86 | -- CumOri = True : taking account the edge orientation |
87 | |
88 | Vertices(E : Edge from TopoDS; Vfirst, Vlast : out Vertex from TopoDS; |
89 | CumOri : Boolean from Standard = Standard_False); |
90 | ---Purpose: Returns in Vfirst, Vlast the FORWARD and REVERSED |
91 | -- vertices of the edge <E>. May be null shapes. |
92 | -- CumOri = True : taking account the edge orientation |
93 | |
94 | Vertices(W : Wire from TopoDS; Vfirst, Vlast : out Vertex from TopoDS); |
95 | ---Purpose: Returns in Vfirst, Vlast the first and last |
96 | -- vertices of the open wire <W>. May be null shapes. |
97 | -- if <W> is closed Vfirst and Vlast are a same |
98 | -- vertex on <W>. |
99 | -- if <W> is no manifold. VFirst and VLast are null |
100 | -- shapes. |
101 | |
102 | CommonVertex( E1, E2 : Edge from TopoDS; |
103 | V : out Vertex from TopoDS) |
104 | returns Boolean; |
105 | ---Purpose: Finds the vertex <V> common to the two edges |
106 | -- <E1,E2>, returns True if this vertex exists. |
107 | -- |
108 | -- Warning: <V> has sense only if the value <True> is returned |
109 | |
110 | end TopExp; |
111 | |
112 | |
113 | |