0022627: Change OCCT memory management defaults
[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
2b59653e 6
0d88155b
O
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
2b59653e
E
36 Create (Vertices : in out Array1OfVertexOfDelaun from BRepMesh;
37 ZPositive : in Boolean from Standard=Standard_True)
0d88155b
O
38 ---Purpose: Creates the triangulation with an empty Mesh
39 -- data structure.
40 returns Delaun from BRepMesh;
41
42
2b59653e
E
43 Create (OldMesh : mutable DataStructureOfDelaun from BRepMesh;
44 Vertices : in out Array1OfVertexOfDelaun from BRepMesh;
45 ZPositive : in Boolean from Standard=Standard_True)
0d88155b
O
46 ---Purpose: Creates the triangulation with and existant
47 -- Mesh data structure.
48 returns Delaun from BRepMesh;
49
50
2b59653e
E
51 Create (OldMesh : mutable DataStructureOfDelaun from BRepMesh;
52 VertexIndices : in out Array1OfInteger from TColStd;
53 ZPositive : in Boolean from Standard=Standard_True)
0d88155b
O
54 ---Purpose: Creates the triangulation with and existant
55 -- Mesh data structure.
56 returns Delaun from BRepMesh;
57
58
2b59653e
E
59 RemoveVertex (me : in out;
60 theVertex : in Vertex from BRepMesh);
0d88155b
O
61 ---Purpose: Removes a vertex in the triangulation.
62
63
2b59653e
E
64 AddVertices (me : in out;
65 Vertices : in out Array1OfVertexOfDelaun from BRepMesh);
0d88155b
O
66 ---Purpose: Adds some vertices in the triangulation.
67
68
2b59653e
E
69 UseEdge (me : in out;
70 theEdge : in Integer from Standard)
0d88155b
O
71 ---Purpose: Modify mesh to use the edge. Return True if done.
72 returns Boolean from Standard;
73
74
2b59653e 75 Result (me)
0d88155b
O
76 ---C++: return const &
77 ---Purpose: Gives the Mesh data structure.
78 returns DataStructureOfDelaun from BRepMesh;
79
80
2b59653e 81 Frontier (me : in out)
0d88155b
O
82 ---Purpose: Gives the list of frontier edges
83 ---C++: return const &
84 returns MapOfInteger from BRepMesh;
85
86
2b59653e 87 InternalEdges (me : in out)
0d88155b
O
88 ---Purpose: Gives the list of internal edges
89 ---C++: return const &
90 returns MapOfInteger from BRepMesh;
91
92
2b59653e 93 FreeEdges (me : in out)
0d88155b
O
94 ---Purpose: Gives the list of free edges used only one time
95 ---C++: return const &
96 returns MapOfInteger from BRepMesh;
97
98
2b59653e
E
99 GetVertex (me;
100 vIndex : in Integer from Standard)
0d88155b
O
101 ---C++: return const &
102 ---C++: inline
103 returns Vertex from BRepMesh;
104
105
2b59653e
E
106 GetEdge (me;
107 eIndex : in Integer from Standard)
0d88155b
O
108 ---C++: return const &
109 ---C++: inline
110 returns Edge from BRepMesh;
111
112
2b59653e
E
113 GetTriangle (me;
114 tIndex : in Integer from Standard)
0d88155b
O
115 ---C++: return const &
116 ---C++: inline
117 returns Triangle from BRepMesh;
118
119
2b59653e 120 -- Implementation :
0d88155b 121
2b59653e
E
122 Init (me : in out;
123 Vertices : in out Array1OfVertexOfDelaun from BRepMesh);
124 ---Purpose: Initializes the triangulation with an Array of
0d88155b
O
125 -- Vertex.
126
127 Compute (me : in out;
128 VertexIndices : in out Array1OfInteger from TColStd);
129 ---Purpose: Computes the triangulation and add the vertices
130 -- edges and triangles to the Mesh data structure.
131
0d88155b
O
132
133 SuperMesh (me : in out;
2b59653e
E
134 theBox : Box2d from Bnd);
135 ---Purpose: Build the super mesh .
0d88155b
O
136
137
138 FrontierAdjust (me : in out)
139 ---Purpose: Adjust the mesh on the frontier.
140 is private;
141
142
2b59653e
E
143 MeshLeftPolygonOf (me : in out;
144 EdgeIndex : Integer from Standard;
145 EdgeSens : Boolean from Standard)
0d88155b
O
146 ---Purpose: Find left polygon of the edge and call MeshPolygon.
147 is private;
148
149
150 MeshPolygon (me : in out;
151 Polygon : in out SequenceOfInteger from TColStd)
152 ---Purpose: Mesh closed polygon.
153 is private;
154
155
156 CreateTriangles(me : in out;
2b59653e 157 vertexIndex : Integer from Standard;
0d88155b
O
158 --vertex : in Vertex from BRepMesh;
159 freeEdges: out MapOfIntegerInteger from BRepMesh)
160 ---Purpose: Creates the triangles beetween the node
161 -- <Vertex> and the polyline <freeEdges>.
162 is private;
163
164
165 DeleteTriangle (me : in out;
166 TrianIndex : Integer from Standard;
167 freeEdges : out MapOfIntegerInteger from BRepMesh)
168 ---Purpose: Deletes the triangle of index <TrianIndex> and
169 -- add the free edges to the map.
170 -- When an edge is suppressed more than one time
171 -- it is destroyed.
172 is private;
2b59653e
E
173
174
175 Perform (me: in out;
176 theBndBox : out Box2d from Bnd;
177 theVertexIndices: out Array1OfInteger from TColStd)
178 is private;
0d88155b
O
179
180
2b59653e
E
181 Contains (me;
182 TrianIndex : Integer from Standard;
183 theVertex : in Vertex from BRepMesh;
184 edgeOn : out Integer from Standard)
185 ---Purpose: Test if triangle of index <TrianIndex>
186 -- contains geometricaly <theVertex>. If <EdgeOn>
187 -- is != 0 then theVertex is on Edge of index
188 -- <edgeOn>.
189 returns Boolean from Standard;
190
191
192 CreateTrianglesOnNewVertices(me : in out;
193 theVertexIndices: out Array1OfInteger from TColStd)
194 --vertex : in Vertex from BRepMesh;
195 ---Purpose: Creates the triangles on new nodes
196 is private;
197
0d88155b 198
2b59653e
E
199 fields MeshData : DataStructureOfDelaun from BRepMesh;
200 PositiveOrientation : Boolean from Standard;
201 tCircles : CircleTool from BRepMesh;
202 supVert1 : Integer from Standard;
203 supVert2 : Integer from Standard;
204 supVert3 : Integer from Standard;
205 supTrian : Triangle from BRepMesh;
206 mapEdges : MapOfInteger from BRepMesh;
0d88155b
O
207
208
209end Delaun;