1 -- Created on: 1990-12-20
2 -- Created by: Remi Lequette
3 -- Copyright (c) 1990-1999 Matra Datavision
4 -- Copyright (c) 1999-2012 OPEN CASCADE SAS
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.
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.
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.
25 ---Purpose: This package provides basic tools to explore the
26 -- topological data structures.
28 -- * Explorer : A tool to find all sub-shapes of a given
29 -- type. e.g. all faces of a solid.
31 -- * Package methods to map sub-shapes of a shape.
34 -- All methods of all classes will be public.
47 private class StackOfIterator instantiates
48 Stack from TCollection (Iterator from TopoDS);
50 pointer Stack to Iterator from TopoDS;
53 ---Purpose: Tool to explore a topological data structure.
60 MapShapes(S : Shape from TopoDS;
61 T : ShapeEnum from TopAbs;
62 M : in out IndexedMapOfShape from TopTools);
63 ---Purpose: Stores in the map <M> all the sub-shapes of <S>
66 -- Warning: The map is not cleared at first.
68 MapShapes(S : Shape from TopoDS;
69 M : in out IndexedMapOfShape from TopTools);
70 ---Purpose: Stores in the map <M> all the sub-shapes of <S>.
73 (S : Shape from TopoDS;
74 TS : ShapeEnum from TopAbs;
75 TA : ShapeEnum from TopAbs;
76 M : in out IndexedDataMapOfShapeListOfShape from TopTools);
77 ---Purpose: Stores in the map <M> all the subshape of <S> of
78 -- type <TS> for each one append to the list all
79 -- the ancestors of type <TA>. For example map all
80 -- the edges and bind the list of faces.
81 -- Warning: The map is not cleared at first.
83 FirstVertex(E : Edge from TopoDS;
84 CumOri : Boolean from Standard = Standard_False)
85 returns Vertex from TopoDS;
86 ---Purpose: Returns the Vertex of orientation FORWARD in E. If
87 -- there is none returns a Null Shape.
88 -- CumOri = True : taking account the edge orientation
90 LastVertex(E : Edge from TopoDS;
91 CumOri : Boolean from Standard = Standard_False)
92 returns Vertex from TopoDS;
93 ---Purpose: Returns the Vertex of orientation REVERSED in E. If
94 -- there is none returns a Null Shape.
95 -- CumOri = True : taking account the edge orientation
97 Vertices(E : Edge from TopoDS; Vfirst, Vlast : out Vertex from TopoDS;
98 CumOri : Boolean from Standard = Standard_False);
99 ---Purpose: Returns in Vfirst, Vlast the FORWARD and REVERSED
100 -- vertices of the edge <E>. May be null shapes.
101 -- CumOri = True : taking account the edge orientation
103 Vertices(W : Wire from TopoDS; Vfirst, Vlast : out Vertex from TopoDS);
104 ---Purpose: Returns in Vfirst, Vlast the first and last
105 -- vertices of the open wire <W>. May be null shapes.
106 -- if <W> is closed Vfirst and Vlast are a same
108 -- if <W> is no manifold. VFirst and VLast are null
111 CommonVertex( E1, E2 : Edge from TopoDS;
112 V : out Vertex from TopoDS)
114 ---Purpose: Finds the vertex <V> common to the two edges
115 -- <E1,E2>, returns True if this vertex exists.
117 -- Warning: <V> has sense only if the value <True> is returned