1 //=============================================================================
2 // File : SMESH_Mesh.idl
3 // Created : jeu avr 11 15:31:39 CEST 2002
4 // Author : Paul RASCLE, EDF
6 // Copyright : EDF 2002
8 //=============================================================================
11 #ifndef _SMESH_MESH_IDL_
12 #define _SMESH_MESH_IDL_
14 #include "SALOME_Exception.idl"
15 #include "SMESH_Hypothesis.idl"
17 #include "GEOM_Shape.idl"
22 typedef sequence<double> double_array ;
23 typedef sequence<long> long_array ;
24 typedef sequence<string> string_array ;
48 typedef sequence<log_block> log_array;
50 interface SMESH_subMesh;
51 interface SMESH_MeshEditor;
55 * Associate a Shape to a Mesh created with NewEmpty
58 // boolean SetMesh(in GEOM::GEOM_Shape aShape)
59 // raises (SALOME::SALOME_Exception);
62 * Get the subMesh object associated to a subShape. The subMesh object
63 * gives access to nodes and elements IDs.
64 * SubMesh will be used instead of SubShape in a next idl version to
65 * adress a specific subMesh...
67 SMESH_subMesh GetElementsOnShape(in GEOM::GEOM_Shape aSubShape)
68 raises (SALOME::SALOME_Exception);
71 * Create a subMesh without reference to a subShape
73 // SMESH_subMesh NewEmpty()
74 // raises (SALOME::SALOME_Exception);
77 * Add hypothesis to the mesh, under a particular subShape
78 * (or the main shape itself)
79 * The Add method is only used to prepare the build of the mesh and store
80 * the algorithms and associated parameters.
81 * Actual job of mesh the shape is done by MESH_Gen.
83 * - aSubShape : subShape obtained by a shape explode in GEOM
85 * - anHyp : hypothesis object
87 * - OK if the hypothesis is compatible with the subShape
88 * (and all previous hypothesis on the subShape)
89 * - NOK if the hypothesis is not compatible with the subShape
90 * (or one previous hypothesis on the subShape)
91 * raises exception if hypothesis has not been created
93 boolean AddHypothesis(in GEOM::GEOM_Shape aSubShape, in SMESH_Hypothesis anHyp)
94 raises (SALOME::SALOME_Exception);
95 // boolean AddHypothesis(in SMESH_subMesh aSubMesh, in SMESH_Hypothesis anHyp)
96 // raises (SALOME::SALOME_Exception);
100 * Remove an hypothesis previouly added with AddHypothesis.
102 boolean RemoveHypothesis(in GEOM::GEOM_Shape aSubShape,
103 in SMESH_Hypothesis anHyp)
104 raises (SALOME::SALOME_Exception);
105 // boolean RemoveHypothesis(in SMESH_subMesh aSubMesh,
106 // in SMESH_Hypothesis anHyp)
107 // raises (SALOME::SALOME_Exception);
110 * Get the list of hypothesis added on a subShape
112 ListOfHypothesis GetHypothesisList(in GEOM::GEOM_Shape aSubShape)
113 raises (SALOME::SALOME_Exception);
114 // ListOfHypothesis GetHypothesisList(in SMESH_subMesh aSubMesh)
115 // raises (SALOME::SALOME_Exception);
118 * Get the log of nodes and elements added or removed since previous
121 * - clearAfterGet : log is emptied after Get (safe if concurrents access)
123 // string_array GetLog(in boolean clearAfterGet)
124 // raises (SALOME::SALOME_Exception);
125 log_array GetLog(in boolean clearAfterGet)
126 raises (SALOME::SALOME_Exception);
129 * Clear the log of nodes and elements added or removed since previous
130 * clear. Must be used immediately after GetLog if clearAfterGet is false.
133 raises (SALOME::SALOME_Exception);
136 * Get the internal Id
145 SMESH_MeshEditor GetMeshEditor()
146 raises (SALOME::SALOME_Exception);
149 * Export Mesh with DAT and MED Formats
151 void ExportDAT( in string file )
152 raises (SALOME::SALOME_Exception);
153 void ExportMED( in string file )
154 raises (SALOME::SALOME_Exception);
155 void ExportUNV( in string file )
156 raises (SALOME::SALOME_Exception);
161 SALOME_MED::MESH GetMEDMesh()
162 raises (SALOME::SALOME_Exception);
165 raises (SALOME::SALOME_Exception);
168 raises (SALOME::SALOME_Exception);
171 raises (SALOME::SALOME_Exception);
174 raises (SALOME::SALOME_Exception);
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 interface SMESH_subMesh
197 long GetNumberOfElements()
198 raises (SALOME::SALOME_Exception);
203 long GetNumberOfNodes()
204 raises (SALOME::SALOME_Exception);
209 long_array GetElementsId()
210 raises (SALOME::SALOME_Exception);
215 long_array GetNodesId()
216 raises (SALOME::SALOME_Exception);
219 * Get SMESH_Mesh which stores nodes coordinates & elements definition
221 SMESH_Mesh GetFather()
222 raises (SALOME::SALOME_Exception);
225 * Get the internal Id
232 SALOME_MED::FAMILY GetFamily()
233 raises (SALOME::SALOME_Exception);
237 * This interface makes modifications on the Mesh - removing elements and nodes
239 interface SMESH_MeshEditor {
242 boolean RemoveElements(in long_array IDsOfElements)
243 raises (SALOME::SALOME_Exception);
245 boolean RemoveNodes(in long_array IDsOfNodes)
246 raises (SALOME::SALOME_Exception);
248 boolean AddNode(in double x, in double y, in double z)
249 raises (SALOME::SALOME_Exception);
251 boolean AddEdge(in long_array IDsOfNodes)
252 raises (SALOME::SALOME_Exception);
254 boolean AddFace(in long_array IDsOfNodes)
255 raises (SALOME::SALOME_Exception);
257 boolean AddVolume(in long_array IDsOfNodes)
258 raises (SALOME::SALOME_Exception);