OCC22138 Remove *.gxx files from Mesh algorithm
[occt.git] / src / BRepMesh / BRepMesh_Delaun.cdl
CommitLineData
0d88155b
O
1-- File: BRepMesh_Delaun.cdl
2-- Created: Tue May 11 17:19:19 1993
3-- Author: Didier PIFFAULT
4-- <dpf@nonox>
5---Copyright: Matra Datavision 1993, 1994
6
7
8class Delaun from BRepMesh
9
10 ---Purpose: Compute the Delaunay's triangulation with the
11 -- algorithm of Watson.
12
13
14 uses Integer from Standard,
15 SequenceOfInteger from TColStd,
16 Array1OfInteger from TColStd,
17 Box2d from Bnd,
18 CircleTool from BRepMesh,
19 MapOfInteger from BRepMesh,
20 DataStructureOfDelaun from BRepMesh,
21 MapOfIntegerInteger from BRepMesh,
22 Vertex from BRepMesh,
23 Edge from BRepMesh,
24 Triangle from BRepMesh,
25 ComparatorOfVertexOfDelaun from BRepMesh,
26 ComparatorOfIndexedVertexOfDelaun from BRepMesh,
27 Array1OfVertexOfDelaun from BRepMesh,
28 HArray1OfVertexOfDelaun from BRepMesh,
29 HeapSortVertexOfDelaun from BRepMesh,
30 HeapSortIndexedVertexOfDelaun from BRepMesh
31
32
33 is
34 -- Interface :
35
36 Create (Vertices : in out Array1OfVertexOfDelaun from BRepMesh;
37 ZPositive : in Boolean from Standard=Standard_True)
38 ---Purpose: Creates the triangulation with an empty Mesh
39 -- data structure.
40 returns Delaun from BRepMesh;
41
42
43 Create (OldMesh : mutable DataStructureOfDelaun from BRepMesh;
44 Vertices : in out Array1OfVertexOfDelaun from BRepMesh;
45 ZPositive : in Boolean from Standard=Standard_True)
46 ---Purpose: Creates the triangulation with and existant
47 -- Mesh data structure.
48 returns Delaun from BRepMesh;
49
50
51 Create (OldMesh : mutable DataStructureOfDelaun from BRepMesh;
52 VertexIndices : in out Array1OfInteger from TColStd;
53 ZPositive : in Boolean from Standard=Standard_True)
54 ---Purpose: Creates the triangulation with and existant
55 -- Mesh data structure.
56 returns Delaun from BRepMesh;
57
58
59 AddVertex (me : in out;
60 theVertex : in Vertex from BRepMesh);
61 ---Purpose: Adds a new vertex in the triangulation.
62
63
64 RemoveVertex (me : in out;
65 theVertex : in Vertex from BRepMesh);
66 ---Purpose: Removes a vertex in the triangulation.
67
68
69 AddVertices (me : in out;
70 Vertices : in out Array1OfVertexOfDelaun from BRepMesh);
71 ---Purpose: Adds some vertices in the triangulation.
72
73
74 RevertDiagonal (me : in out;
75 theEdge : in Integer from Standard)
76 ---Purpose: Substitutes the Edge beetween to triangles by the
77 -- other diagonal of the quadrilatere if it is
78 -- possible (convex polygon). Return True if done.
79 returns Boolean from Standard;
80
81
82 UseEdge (me : in out;
83 theEdge : in Integer from Standard)
84 ---Purpose: Modify mesh to use the edge. Return True if done.
85 returns Boolean from Standard;
86
87
88 SmoothMesh (me : in out;
89 Epsilon : in Real from Standard);
90 ---Purpose: Smooths the mesh in 2d space. The method is to
91 -- move the free and OnSurface vertices at the
92 -- barycentre of their polygon.
93
94
95 Result (me)
96 ---C++: return const &
97 ---Purpose: Gives the Mesh data structure.
98 returns DataStructureOfDelaun from BRepMesh;
99
100
101 Frontier (me : in out)
102 ---Purpose: Gives the list of frontier edges
103 ---C++: return const &
104 returns MapOfInteger from BRepMesh;
105
106
107 InternalEdges (me : in out)
108 ---Purpose: Gives the list of internal edges
109 ---C++: return const &
110 returns MapOfInteger from BRepMesh;
111
112
113 FreeEdges (me : in out)
114 ---Purpose: Gives the list of free edges used only one time
115 ---C++: return const &
116 returns MapOfInteger from BRepMesh;
117
118
119 GetVertex (me;
120 vIndex : in Integer from Standard)
121 ---C++: return const &
122 ---C++: inline
123 returns Vertex from BRepMesh;
124
125
126 GetEdge (me;
127 eIndex : in Integer from Standard)
128 ---C++: return const &
129 ---C++: inline
130 returns Edge from BRepMesh;
131
132
133 GetTriangle (me;
134 tIndex : in Integer from Standard)
135 ---C++: return const &
136 ---C++: inline
137 returns Triangle from BRepMesh;
138
139
140 -- Implementation :
141
142 Init (me : in out;
143 Vertices : in out Array1OfVertexOfDelaun from BRepMesh);
144 ---Purpose: Initializes the triangulation with an Array of
145 -- Vertex.
146
147 Compute (me : in out;
148 VertexIndices : in out Array1OfInteger from TColStd);
149 ---Purpose: Computes the triangulation and add the vertices
150 -- edges and triangles to the Mesh data structure.
151
152 ReCompute (me : in out;
153 VertexIndices : in out Array1OfInteger from TColStd);
154 ---Purpose: Clear the existing triangles and recomputes
155 -- the triangulation .
156
157 SuperMesh (me : in out;
158 theBox : Box2d from Bnd);
159 ---Purpose: Build the super mesh .
160
161
162 FrontierAdjust (me : in out)
163 ---Purpose: Adjust the mesh on the frontier.
164 is private;
165
166
167 MeshLeftPolygonOf (me : in out;
168 EdgeIndex : Integer from Standard;
169 EdgeSens : Boolean from Standard)
170 ---Purpose: Find left polygon of the edge and call MeshPolygon.
171 is private;
172
173
174 MeshPolygon (me : in out;
175 Polygon : in out SequenceOfInteger from TColStd)
176 ---Purpose: Mesh closed polygon.
177 is private;
178
179
180 CreateTriangles(me : in out;
181 vertexIndex : Integer from Standard;
182 --vertex : in Vertex from BRepMesh;
183 freeEdges: out MapOfIntegerInteger from BRepMesh)
184 ---Purpose: Creates the triangles beetween the node
185 -- <Vertex> and the polyline <freeEdges>.
186 is private;
187
188
189 DeleteTriangle (me : in out;
190 TrianIndex : Integer from Standard;
191 freeEdges : out MapOfIntegerInteger from BRepMesh)
192 ---Purpose: Deletes the triangle of index <TrianIndex> and
193 -- add the free edges to the map.
194 -- When an edge is suppressed more than one time
195 -- it is destroyed.
196 is private;
197
198
199 Contains (me;
200 TrianIndex : Integer from Standard;
201 theVertex : in Vertex from BRepMesh;
202 edgeOn : out Integer from Standard)
203 ---Purpose: Test if triangle of index <TrianIndex>
204 -- contains geometricaly <theVertex>. If <EdgeOn>
205 -- is != 0 then theVertex is on Edge of index
206 -- <edgeOn>.
207 returns Boolean from Standard;
208
209 TriangleContaining
210 (me : in out;
211 theVertex : in Vertex from BRepMesh)
212 ---Purpose: Gives the index of triangle containing
213 -- geometricaly <theVertex>.
214 returns Integer from Standard;
215
216
217 fields MeshData : DataStructureOfDelaun from BRepMesh;
218 PositiveOrientation : Boolean from Standard;
219 tCircles : CircleTool from BRepMesh;
220 supVert1 : Integer from Standard;
221 supVert2 : Integer from Standard;
222 supVert3 : Integer from Standard;
223 supTrian : Triangle from BRepMesh;
224 mapEdges : MapOfInteger from BRepMesh;
225
226
227end Delaun;