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