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.salome-platform.org/ or email : webmaster.salome@opencascade.com
22 // File : SMESH_Gen.idl
23 // Author : Paul RASCLE, EDF
26 #ifndef _SMESH_GEN_IDL_
27 #define _SMESH_GEN_IDL_
29 #include "SALOME_Exception.idl"
30 #include "SALOME_Component.idl"
31 #include "SALOMEDS.idl"
33 #include "GEOM_Gen.idl"
35 #include "SMESH_Mesh.idl"
36 #include "SMESH_Hypothesis.idl"
40 typedef sequence<GEOM::GEOM_Object> object_array;
41 typedef sequence<SMESH_Mesh> mesh_array;
43 interface FilterManager;
44 interface SMESH_Pattern;
47 * Hypothesis definintion error
51 Hypothesis_Status state;
56 typedef sequence<AlgoStateError> algo_error_array;
59 * Mesh computation error
64 COMPERR_BAD_INPUT_MESH, // wrong mesh on lower submesh
65 COMPERR_STD_EXCEPTION , // some std exception raised
66 COMPERR_OCC_EXCEPTION , // OCC exception raised
67 COMPERR_SLM_EXCEPTION , // SALOME exception raised
68 COMPERR_EXCEPTION , // other exception raised
69 COMPERR_MEMORY_PB , // memory allocation problem
70 COMPERR_ALGO_FAILED , // computation failed
71 COMPERR_BAD_SHAPE // bad geometry
75 short code; // ComputeErrorName or, if negative, algo specific code
76 string comment; // textual problem description
78 short subShapeID; // id of subshape of a shape to mesh
80 typedef sequence<ComputeError> compute_error_array;
83 interface SMESH_Gen : Engines::Component, SALOMEDS::Driver
86 FilterManager CreateFilterManager();
88 SMESH_Pattern GetPattern();
93 void SetEmbeddedMode( in boolean theMode );
98 boolean IsEmbeddedMode();
101 Set the current study
103 void SetCurrentStudy( in SALOMEDS::Study theStudy );
106 Get the current study
108 SALOMEDS::Study GetCurrentStudy();
111 * Create a hypothesis that can be shared by differents parts of the mesh.
112 * An hypothesis is either:
113 * - a method used to generate or modify a part of the mesh (algorithm).
114 * - a parameter or a law used by an algorithm.
115 * Algorithms are 1D, 2D or 3D.
117 SMESH_Hypothesis CreateHypothesis( in string theHypName,
118 in string theLibName )
119 raises ( SALOME::SALOME_Exception );
122 * Return a hypothesis holding parameter values corresponding to the mesh
123 * existing on the given geometry.
124 * The returned hypothesis may be the one existing in a study and used
125 * to compute the mesh, or a temporary one created just to pass parameter
128 SMESH_Hypothesis GetHypothesisParameterValues( in string theHypName,
129 in string theLibName,
130 in SMESH_Mesh theMesh,
131 in GEOM::GEOM_Object theGeom)
132 raises ( SALOME::SALOME_Exception );
135 * Create a Mesh object, given a geometry shape.
136 * Mesh is created empty (no points, no elements).
137 * Shape is explored via GEOM_Client to create local copies.
138 * of TopoDS_Shapes and bind CORBA references of shape & subshapes
141 SMESH_Mesh CreateMesh( in GEOM::GEOM_Object theObject )
142 raises ( SALOME::SALOME_Exception );
145 * Create a empty mesh object
147 SMESH_Mesh CreateEmptyMesh()
148 raises ( SALOME::SALOME_Exception );
151 * Create Mesh object importing data from given UNV file
152 * (UNV supported version is I-DEAS 10)
154 SMESH_Mesh CreateMeshesFromUNV( in string theFileName )
155 raises ( SALOME::SALOME_Exception );
158 * Create Mesh object(s) importing data from given MED file
160 mesh_array CreateMeshesFromMED( in string theFileName,
161 out SMESH::DriverMED_ReadStatus theStatus )
162 raises ( SALOME::SALOME_Exception );
165 * Create Mesh object importing data from given STL file
167 SMESH_Mesh CreateMeshesFromSTL( in string theFileName )
168 raises ( SALOME::SALOME_Exception );
171 * Create a Mesh object, without a geometry shape reference
173 // SMESH_Mesh NewEmpty()
174 // raises ( SALOME::SALOME_Exception );
178 * First, verify list of hypothesis associated with the subShape,
179 * return NOK if hypothesis are not sufficient
181 boolean Compute( in SMESH_Mesh theMesh,
182 in GEOM::GEOM_Object theSubObject )
183 raises ( SALOME::SALOME_Exception );
186 * Return true if hypotheses are defined well
188 boolean IsReadyToCompute( in SMESH_Mesh theMesh,
189 in GEOM::GEOM_Object theSubObject )
190 raises ( SALOME::SALOME_Exception );
193 * Return errors of hypotheses definintion
194 * algo_error_array is empty if everything is OK
196 algo_error_array GetAlgoState( in SMESH_Mesh theMesh,
197 in GEOM::GEOM_Object theSubObject )
198 raises ( SALOME::SALOME_Exception );
201 * Return errors of mesh computation
202 * compute_error_array is empty if everything is OK
204 compute_error_array GetComputeErrors( in SMESH_Mesh theMesh,
205 in GEOM::GEOM_Object theSubObject )
206 raises ( SALOME::SALOME_Exception );
209 * Return indeces of faces, edges and vertices of given subshapes
210 * within theMainObject
212 long_array GetSubShapesId( in GEOM::GEOM_Object theMainObject,
213 in object_array theListOfSubObjects )
214 raises ( SALOME::SALOME_Exception );
217 * Return geometrical object the given element is built on.
218 * The returned geometrical object, if not nil, is either found in the
219 * study or is published by this method with the given name
221 GEOM::GEOM_Object GetGeometryByMeshElement( in SMESH_Mesh theMesh,
222 in long theElementID,
223 in string theGeomName)
224 raises ( SALOME::SALOME_Exception );
227 * Return geometrical object the given element is built on.
228 * The returned geometrical object not published in study by this method.
230 GEOM::GEOM_Object FindGeometryByMeshElement( in SMESH_Mesh theMesh,
231 in long theElementID)
232 raises ( SALOME::SALOME_Exception );
235 * Concatenate the given meshes into one mesh.
236 * Union groups with the same name and type if
237 * theUniteIdenticalGroups flag is true.
238 * Merge coincident nodes and elements if
239 * theMergeNodesAndElements flag is true.
241 SMESH_Mesh Concatenate(in mesh_array theMeshesArray,
242 in boolean theUniteIdenticalGroups,
243 in boolean theMergeNodesAndElements,
244 in double theMergeTolerance)
245 raises ( SALOME::SALOME_Exception );