1 // Copyright (C) 2003 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
2 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
4 // This library is free software; you can redistribute it and/or
5 // modify it under the terms of the GNU Lesser General Public
6 // License as published by the Free Software Foundation; either
7 // version 2.1 of the License.
9 // This library is distributed in the hope that it will be useful,
10 // but WITHOUT ANY WARRANTY; without even the implied warranty of
11 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 // Lesser General Public License for more details.
14 // You should have received a copy of the GNU Lesser General Public
15 // License along with this library; if not, write to the Free Software
16 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 // See http://www.opencascade.org/SALOME/ or email : webmaster.salome@opencascade.org
22 // File : SMESH_Mesh.idl
23 // Author : Paul RASCLE, EDF
26 #ifndef _SMESH_MESH_IDL_
27 #define _SMESH_MESH_IDL_
29 #include "SALOME_Exception.idl"
30 #include "SMESH_Hypothesis.idl"
32 #include "GEOM_Shape.idl"
37 typedef sequence<double> double_array ;
38 typedef sequence<long> long_array ;
39 typedef sequence<string> string_array ;
63 typedef sequence<log_block> log_array;
65 interface SMESH_subMesh;
66 interface SMESH_MeshEditor;
70 * Associate a Shape to a Mesh created with NewEmpty
73 // boolean SetMesh(in GEOM::GEOM_Shape aShape)
74 // raises (SALOME::SALOME_Exception);
77 * Get the subMesh object associated to a subShape. The subMesh object
78 * gives access to nodes and elements IDs.
79 * SubMesh will be used instead of SubShape in a next idl version to
80 * adress a specific subMesh...
82 SMESH_subMesh GetElementsOnShape(in GEOM::GEOM_Shape aSubShape)
83 raises (SALOME::SALOME_Exception);
86 * Create a subMesh without reference to a subShape
88 // SMESH_subMesh NewEmpty()
89 // raises (SALOME::SALOME_Exception);
92 * Add hypothesis to the mesh, under a particular subShape
93 * (or the main shape itself)
94 * The Add method is only used to prepare the build of the mesh and store
95 * the algorithms and associated parameters.
96 * Actual job of mesh the shape is done by MESH_Gen.
98 * - aSubShape : subShape obtained by a shape explode in GEOM
100 * - anHyp : hypothesis object
102 * - OK if the hypothesis is compatible with the subShape
103 * (and all previous hypothesis on the subShape)
104 * - NOK if the hypothesis is not compatible with the subShape
105 * (or one previous hypothesis on the subShape)
106 * raises exception if hypothesis has not been created
108 boolean AddHypothesis(in GEOM::GEOM_Shape aSubShape, in SMESH_Hypothesis anHyp)
109 raises (SALOME::SALOME_Exception);
110 // boolean AddHypothesis(in SMESH_subMesh aSubMesh, in SMESH_Hypothesis anHyp)
111 // raises (SALOME::SALOME_Exception);
115 * Remove an hypothesis previouly added with AddHypothesis.
117 boolean RemoveHypothesis(in GEOM::GEOM_Shape aSubShape,
118 in SMESH_Hypothesis anHyp)
119 raises (SALOME::SALOME_Exception);
120 // boolean RemoveHypothesis(in SMESH_subMesh aSubMesh,
121 // in SMESH_Hypothesis anHyp)
122 // raises (SALOME::SALOME_Exception);
125 * Get the list of hypothesis added on a subShape
127 ListOfHypothesis GetHypothesisList(in GEOM::GEOM_Shape aSubShape)
128 raises (SALOME::SALOME_Exception);
129 // ListOfHypothesis GetHypothesisList(in SMESH_subMesh aSubMesh)
130 // raises (SALOME::SALOME_Exception);
133 * Get the log of nodes and elements added or removed since previous
136 * - clearAfterGet : log is emptied after Get (safe if concurrents access)
138 // string_array GetLog(in boolean clearAfterGet)
139 // raises (SALOME::SALOME_Exception);
140 log_array GetLog(in boolean clearAfterGet)
141 raises (SALOME::SALOME_Exception);
144 * Clear the log of nodes and elements added or removed since previous
145 * clear. Must be used immediately after GetLog if clearAfterGet is false.
148 raises (SALOME::SALOME_Exception);
151 * Get the internal Id
160 SMESH_MeshEditor GetMeshEditor()
161 raises (SALOME::SALOME_Exception);
164 * Export Mesh with DAT and MED Formats
166 void ExportDAT( in string file )
167 raises (SALOME::SALOME_Exception);
168 void ExportMED( in string file )
169 raises (SALOME::SALOME_Exception);
170 void ExportUNV( in string file )
171 raises (SALOME::SALOME_Exception);
176 SALOME_MED::MESH GetMEDMesh()
177 raises (SALOME::SALOME_Exception);
180 raises (SALOME::SALOME_Exception);
183 raises (SALOME::SALOME_Exception);
186 raises (SALOME::SALOME_Exception);
189 raises (SALOME::SALOME_Exception);
192 raises (SALOME::SALOME_Exception);
195 raises (SALOME::SALOME_Exception);
198 raises (SALOME::SALOME_Exception);
201 raises (SALOME::SALOME_Exception);
204 raises (SALOME::SALOME_Exception);
207 interface SMESH_subMesh
212 long GetNumberOfElements()
213 raises (SALOME::SALOME_Exception);
218 long GetNumberOfNodes()
219 raises (SALOME::SALOME_Exception);
224 long_array GetElementsId()
225 raises (SALOME::SALOME_Exception);
230 long_array GetNodesId()
231 raises (SALOME::SALOME_Exception);
234 * Get SMESH_Mesh which stores nodes coordinates & elements definition
236 SMESH_Mesh GetFather()
237 raises (SALOME::SALOME_Exception);
240 * Get the internal Id
247 SALOME_MED::FAMILY GetFamily()
248 raises (SALOME::SALOME_Exception);
252 * This interface makes modifications on the Mesh - removing elements and nodes
254 interface SMESH_MeshEditor {
257 boolean RemoveElements(in long_array IDsOfElements)
258 raises (SALOME::SALOME_Exception);
260 boolean RemoveNodes(in long_array IDsOfNodes)
261 raises (SALOME::SALOME_Exception);
263 boolean AddNode(in double x, in double y, in double z)
264 raises (SALOME::SALOME_Exception);
266 boolean AddEdge(in long_array IDsOfNodes)
267 raises (SALOME::SALOME_Exception);
269 boolean AddFace(in long_array IDsOfNodes)
270 raises (SALOME::SALOME_Exception);
272 boolean AddVolume(in long_array IDsOfNodes)
273 raises (SALOME::SALOME_Exception);