0023024: Update headers of OCCT files
[occt.git] / src / BRepMesh / BRepMesh_DataStructureOfDelaun.cdl
CommitLineData
b311480e 1-- Created on: 1993-03-17
2-- Created by: Didier PIFFAULT
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
0d88155b
O
21
22
23class DataStructureOfDelaun from BRepMesh inherits TShared from MMgt
24
25 ---Purpose: Describes the data structure necessary for the
26 -- mesh algorithms in two dimensions plane or on
27 -- surface by meshing in UV space.
28
29
30 uses Integer from Standard,
31 ListOfInteger from BRepMesh,
32 MapOfInteger from BRepMesh,
33 PairOfIndex from BRepMesh,
34 Box from Bnd,
35 BoundSortBox from Bnd,
36 BaseAllocator from BRepMesh,
37 NodeHasherOfDataStructureOfDelaun from BRepMesh,
38 LinkHasherOfDataStructureOfDelaun from BRepMesh,
39 ElemHasherOfDataStructureOfDelaun from BRepMesh,
51c3cc5f 40 VertexTool from BRepMesh,
0d88155b
O
41 IDMapOfLinkOfDataStructureOfDelaun from BRepMesh,
42 IMapOfElementOfDataStructureOfDelaun from BRepMesh,
43 SelectorOfDataStructureOfDelaun from BRepMesh,
44 Vertex from BRepMesh,
45 Edge from BRepMesh,
46 Triangle from BRepMesh
47
48 is Create (theAllocator: BaseAllocator from BRepMesh;
49 NodeNumber : Integer from Standard = 100)
51c3cc5f
O
50 ---Purpose: <NodeNumber> is just an evaluation of the
51 -- presumed number of nodes in this mesh. The
52 -- Mesh data structure will be automatically
53 -- redimensioned if necessary.
54 returns mutable DataStructureOfDelaun from BRepMesh ;
0d88155b 55
51c3cc5f 56 AddNode (me : mutable ;
0d88155b 57 theNode : Vertex from BRepMesh)
51c3cc5f
O
58 returns Integer from Standard
59 ---Purpose: Adds a node to the mesh if the node is not
60 -- already in the Mesh. Returns the index of the
61 -- node in the structure.
62 is static;
63
64 GetNode (me : mutable;
0d88155b 65 Index : Integer from Standard)
51c3cc5f
O
66 returns Vertex from BRepMesh
67 ---Purpose: Get the value of node <Index>.
68 ---C++: return const &
69 ---C++: alias operator ()
70 is static;
71
72 GetNodeList (me : mutable;
73 Index : Integer from Standard)
74 returns ListOfInteger from BRepMesh
75 ---Purpose: Get the list of node <Index>.
76 ---C++: return const &
77 is static;
78
79 ForceRemoveNode (me : mutable;
80 Index : Integer from Standard)
81 ---Purpose: Removes the node of index <index> from the mesh.
82 is static;
83
84 ForceRemoveLink (me : mutable;
85 Index : Integer from Standard)
86 ---Purpose: Removes the link of index <index> from the mesh.
87 is static;
88
89 ReplaceNodes (me : mutable;
90 NewNodes : VertexTool from BRepMesh)
91 ---Purpose: Removes the all nodes and sets new map of
92 -- nodes from the mesh.
93 -- For internal use only.
94 is static;
95
96 RemoveNode (me : mutable;
97 Index : Integer from Standard)
98 ---Purpose: Removes the node of index <index> from the mesh.
99 is static;
100
101 MoveNode (me : mutable ;
0d88155b 102 Index : Integer from Standard;
51c3cc5f
O
103 newNode : Vertex from BRepMesh)
104 ---Purpose: Changes the UV value of node of index <Index> by
105 -- <newNode>. Returns false if <newnode> is already in
106 -- the structure.
107 returns Boolean from Standard is static;
108
109 NbNodes (me)
110 returns Integer from Standard
111 ---Purpose: Gives the number of nodes in this mesh.
112 is static;
113
114
115 AddLink (me : mutable;
116 theLink : Edge from BRepMesh)
117 returns Integer from Standard
118 ---Purpose: Adds a Link to the mesh if the Link is not
119 -- already in the structure. Returns the index of
120 -- the link in the structure.
121 is static;
122
123 GetLink (me : mutable;
124 Index : Integer from Standard)
125 returns Edge from BRepMesh
126 ---Purpose: Get the value of Link <Index>.
127 ---C++: return const &
128 is static;
0d88155b 129
51c3cc5f
O
130 RemoveLink (me : mutable;
131 Index : Integer from Standard)
132 ---Purpose: Removes the Link of index <Index> from the
133 -- mesh.
134 is static;
135
136 SubstituteLink (me : mutable ;
137 Index : Integer from Standard;
138 newLink : Edge from BRepMesh)
139 ---Purpose: Substitutes the Link of index <Index> by
140 -- <newLink> clear the connectivity.
141 returns Boolean from Standard is static;
142
143 NbLinks (me)
144 returns Integer from Standard
145 ---Purpose: Gives the number of elements in this mesh.
146 is static;
147
148
149 AddElement (me : mutable;
150 theElement : Triangle from BRepMesh)
151 returns Integer from Standard
152 ---Purpose: Adds an element to the mesh if it is not
153 -- already in the Mesh. Returns the index of the
154 -- element in the structure.
155 is static;
156
157 GetElement (me : mutable;
158 Index : Integer from Standard)
159 returns Triangle from BRepMesh
160 ---Purpose: Get the value of Element <Index>.
161 ---C++: return const &
162 is static;
0d88155b 163
51c3cc5f
O
164 RemoveElement (me : mutable;
165 Index : Integer from Standard)
166 ---Purpose: Removes the element of index <Index> in the mesh.
167 is static;
0d88155b 168
51c3cc5f
O
169 SubstituteElement (me : mutable ;
170 Index : Integer from Standard;
171 newElement : Triangle from BRepMesh)
172 ---Purpose: Substitutes the element of index <Index> by
173 -- <newElement>. The links connectivity is updated.
174 returns Boolean from Standard is static;
0d88155b 175
51c3cc5f
O
176 NbElements (me)
177 returns Integer from Standard
178 ---Purpose: Gives the number of elements in this mesh.
179 is static;
0d88155b 180
51c3cc5f
O
181 ClearDomain (me : mutable)
182 ---Purpose: Removes all elements
183 is static;
0d88155b
O
184
185
51c3cc5f 186 IndexOf (me: mutable;
0d88155b 187 aNode : Vertex from BRepMesh)
51c3cc5f
O
188 ---Purpose: Finds the index of the node. Returns 0 if the
189 -- node is not in the mesh.
190 returns Integer from Standard;
0d88155b
O
191
192 IndexOf (me;
193 aLink : Edge from BRepMesh)
51c3cc5f
O
194 ---Purpose: Finds the index of the Link. Returns 0 if the
195 -- Link is not in the mesh.
0d88155b
O
196 returns Integer from Standard;
197
198 IndexOf (me;
199 anElement : Triangle from BRepMesh)
51c3cc5f
O
200 ---Purpose: Finds the index of the Element. Returns 0 if
201 -- the Element is not in the mesh.
0d88155b
O
202 returns Integer from Standard;
203
51c3cc5f
O
204 LinkNeighboursOf (me;
205 theNode : in Integer from Standard)
206 returns ListOfInteger from BRepMesh
207 ---C++: return const &
208 ---Purpose: Gives the list of Link's indices handling the
209 -- node <theNode>.
210 is static;
0d88155b
O
211
212
51c3cc5f
O
213 ElemConnectedTo (me;
214 theLink : in Integer from Standard)
0d88155b
O
215 returns PairOfIndex from BRepMesh
216 ---C++: return const &
217 ---Purpose: Gives the element's indices conected
218 -- to <theLink>.
219 is static;
220
221 ElemOfDomain (me)
222 returns MapOfInteger from BRepMesh
223 ---C++: return const &
224 ---Purpose: Gives the list of element's indices
225 is static;
226
227
228 LinkOfDomain (me)
229 returns MapOfInteger from BRepMesh
230 ---C++: return const &
231 ---Purpose: Gives the list of link's indices
232 is static;
233
234
235 ClearDeleted (me : mutable)
236 ---Purpose: This method substitute the deleted items by
237 -- the last in Indexed Data Maps to have only
238 -- non-deleted elements, links or nodes in the
239 -- structure.
240 is static;
241
242
243 -- Internal methods :
244
245 ClearElement (me : mutable;
246 Index : Integer from Standard;
247 theElem : Triangle from BRepMesh)
51c3cc5f
O
248 ---Purpose: Deletes the element of index <Index> in
249 -- the mesh. Used by RemoveElement.
0d88155b
O
250 is static private;
251
51c3cc5f
O
252 Statistics (me;
253 flot : in out OStream from Standard)
254 ---Purpose: Give informations on map.
255 is static;
0d88155b 256
51c3cc5f
O
257 Allocator (me) returns BaseAllocator from BRepMesh;
258 ---C++: return const&
259
260 Data (me: mutable) returns VertexTool from BRepMesh;
261 ---Purpose: Give the data structure for cell size and
262 -- tolerance initialization.
263 ---C++: return &
264
265
266 fields myNodes : VertexTool from BRepMesh;
267 myLinks : IDMapOfLinkOfDataStructureOfDelaun from BRepMesh;
268 myDelLinks : ListOfInteger from BRepMesh;
269 myElements : IMapOfElementOfDataStructureOfDelaun from BRepMesh;
270 --myDelElements : ListOfInteger from BRepMesh;
271 myElemOfDomain : MapOfInteger from BRepMesh;
272 myLinkOfDomain : MapOfInteger from BRepMesh;
273 myAllocator : BaseAllocator from BRepMesh;
0d88155b 274end DataStructureOfDelaun;