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;
46 enum AlgoStateErrorName { MISSING_ALGO, MISSING_HYPO, NOT_CONFORM_MESH, BAD_PARAM_VALUE };
47 struct AlgoStateError {
48 AlgoStateErrorName name;
53 typedef sequence<AlgoStateError> algo_error_array;
55 interface SMESH_Gen : Engines::Component, SALOMEDS::Driver
58 FilterManager CreateFilterManager();
60 SMESH_Pattern GetPattern();
65 void SetEmbeddedMode( in boolean theMode );
70 boolean IsEmbeddedMode();
75 void SetCurrentStudy( in SALOMEDS::Study theStudy );
80 SALOMEDS::Study GetCurrentStudy();
83 * Create a hypothesis that can be shared by differents parts of the mesh.
84 * An hypothesis is either:
85 * - a method used to generate or modify a part of the mesh (algorithm).
86 * - a parameter or a law used by an algorithm.
87 * Algorithms are 1D, 2D or 3D.
89 SMESH_Hypothesis CreateHypothesis( in string theHypName,
90 in string theLibName )
91 raises ( SALOME::SALOME_Exception );
94 * Return a hypothesis holding parameter values corresponding to the mesh
95 * existing on the given geometry.
96 * The returned hypothesis may be the one existing in a study and used
97 * to compute the mesh, or a temporary one created just to pass parameter
100 SMESH_Hypothesis GetHypothesisParameterValues( in string theHypName,
101 in string theLibName,
102 in SMESH_Mesh theMesh,
103 in GEOM::GEOM_Object theGeom)
104 raises ( SALOME::SALOME_Exception );
107 * Create a Mesh object, given a geometry shape.
108 * Mesh is created empty (no points, no elements).
109 * Shape is explored via GEOM_Client to create local copies.
110 * of TopoDS_Shapes and bind CORBA references of shape & subshapes
113 SMESH_Mesh CreateMesh( in GEOM::GEOM_Object theObject )
114 raises ( SALOME::SALOME_Exception );
117 * Create a empty mesh object
119 SMESH_Mesh CreateEmptyMesh()
120 raises ( SALOME::SALOME_Exception );
123 * Create Mesh object importing data from given UNV file
124 * (UNV supported version is I-DEAS 10)
126 SMESH_Mesh CreateMeshesFromUNV( in string theFileName )
127 raises ( SALOME::SALOME_Exception );
130 * Create Mesh object(s) importing data from given MED file
132 mesh_array CreateMeshesFromMED( in string theFileName,
133 out SMESH::DriverMED_ReadStatus theStatus )
134 raises ( SALOME::SALOME_Exception );
137 * Create Mesh object importing data from given STL file
139 SMESH_Mesh CreateMeshesFromSTL( in string theFileName )
140 raises ( SALOME::SALOME_Exception );
143 * Create a Mesh object, without a geometry shape reference
145 // SMESH_Mesh NewEmpty()
146 // raises ( SALOME::SALOME_Exception );
150 * First, verify list of hypothesis associated with the subShape,
151 * return NOK if hypothesis are not sufficient
153 boolean Compute( in SMESH_Mesh theMesh,
154 in GEOM::GEOM_Object theSubObject )
155 raises ( SALOME::SALOME_Exception );
158 * Return true if hypotheses are defined well
160 boolean IsReadyToCompute( in SMESH_Mesh theMesh,
161 in GEOM::GEOM_Object theSubObject )
162 raises ( SALOME::SALOME_Exception );
165 * Return errors of hypotheses definintion
166 * algo_error_array is empty if everything is OK
168 algo_error_array GetAlgoState( in SMESH_Mesh theMesh,
169 in GEOM::GEOM_Object theSubObject )
170 raises ( SALOME::SALOME_Exception );
173 * Return indeces of faces, edges and vertices of given subshapes
174 * within theMainObject
176 long_array GetSubShapesId( in GEOM::GEOM_Object theMainObject,
177 in object_array theListOfSubObjects )
178 raises ( SALOME::SALOME_Exception );
181 * Return geometrical object the given element is built on.
182 * The returned geometrical object, if not nil, is either found in the
183 * study or is published by this method with the given name
185 GEOM::GEOM_Object GetGeometryByMeshElement( in SMESH_Mesh theMesh,
186 in long theElementID,
187 in string theGeomName)
188 raises ( SALOME::SALOME_Exception );
191 * Return geometrical object the given element is built on.
192 * The returned geometrical object not published in study by this method.
194 GEOM::GEOM_Object FindGeometryByMeshElement( in SMESH_Mesh theMesh,
195 in long theElementID)
196 raises ( SALOME::SALOME_Exception );
199 * Concatenate the given meshes into one mesh.
200 * Union groups with the same name and type if
201 * theUniteIdenticalGroups flag is true.
202 * Merge coincident nodes and elements if
203 * theMergeNodesAndElements flag is true.
205 SMESH_Mesh Concatenate(in mesh_array theMeshesArray,
206 in boolean theUniteIdenticalGroups,
207 in boolean theMergeNodesAndElements,
208 in double theMergeTolerance)
209 raises ( SALOME::SALOME_Exception );