idl/SMESH_Gen.idl

Go to the documentation of this file.
00001 //  Copyright (C) 2003  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00002 //  CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS 
00003 // 
00004 //  This library is free software; you can redistribute it and/or 
00005 //  modify it under the terms of the GNU Lesser General Public 
00006 //  License as published by the Free Software Foundation; either 
00007 //  version 2.1 of the License. 
00008 // 
00009 //  This library is distributed in the hope that it will be useful, 
00010 //  but WITHOUT ANY WARRANTY; without even the implied warranty of 
00011 //  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU 
00012 //  Lesser General Public License for more details. 
00013 // 
00014 //  You should have received a copy of the GNU Lesser General Public 
00015 //  License along with this library; if not, write to the Free Software 
00016 //  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA 
00017 // 
00018 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00019 //
00020 //
00021 //
00022 //  File   : SMESH_Gen.idl
00023 //  Author : Paul RASCLE, EDF
00024 //  $Header: /home/server/cvs/SMESH/SMESH_SRC/idl/SMESH_Gen.idl,v 1.12.2.6 2007/04/10 13:55:23 eap Exp $
00025 
00026 #ifndef _SMESH_GEN_IDL_
00027 #define _SMESH_GEN_IDL_
00028 
00029 #include "SALOME_Exception.idl"
00030 #include "SALOME_Component.idl"
00031 #include "SALOMEDS.idl"
00032 
00033 #include "GEOM_Gen.idl"
00034 
00035 #include "SMESH_Mesh.idl"
00036 #include "SMESH_Hypothesis.idl"
00037 
00038 module SMESH
00039 {
00040   typedef sequence<GEOM::GEOM_Object> object_array;
00041   typedef sequence<SMESH_Mesh>        mesh_array;
00042 
00043   interface FilterManager;
00044   interface SMESH_Pattern;
00045 
00049   struct AlgoStateError 
00050   {
00051     Hypothesis_Status  state;
00052     string             algoName;
00053     long               algoDim;
00054     boolean            isGlobalAlgo;
00055   };
00056   typedef sequence<AlgoStateError> algo_error_array;
00057 
00061   enum ComputeErrorName
00062   {
00063     COMPERR_OK            ,
00064     COMPERR_BAD_INPUT_MESH,  // wrong mesh on lower submesh
00065     COMPERR_STD_EXCEPTION ,  // some std exception raised
00066     COMPERR_OCC_EXCEPTION ,  // OCC exception raised
00067     COMPERR_SLM_EXCEPTION ,  // SALOME exception raised
00068     COMPERR_EXCEPTION     ,  // other exception raised
00069     COMPERR_MEMORY_PB     ,  // memory allocation problem
00070     COMPERR_ALGO_FAILED   ,  // computation failed
00071     COMPERR_BAD_SHAPE        // bad geometry
00072   };
00073   struct ComputeError
00074   {
00075     short  code;       // ComputeErrorName or, if negative, algo specific code
00076     string comment;    // textual problem description
00077     string algoName;
00078     short  subShapeID; // id of subshape of a shape to mesh
00079   };
00080   typedef sequence<ComputeError> compute_error_array;
00081 
00082 
00083   interface SMESH_Gen : Engines::Component, SALOMEDS::Driver
00084   {
00085 
00086     FilterManager CreateFilterManager();
00087 
00088     SMESH_Pattern GetPattern();
00089 
00093     void SetEmbeddedMode( in boolean theMode );
00094 
00098     boolean IsEmbeddedMode();
00099 
00103     void SetCurrentStudy( in SALOMEDS::Study theStudy );
00104 
00108     SALOMEDS::Study GetCurrentStudy();
00109 
00117     SMESH_Hypothesis CreateHypothesis( in string theHypName,
00118                            in string theLibName )
00119       raises ( SALOME::SALOME_Exception );
00120 
00128     SMESH_Hypothesis GetHypothesisParameterValues( in string            theHypName,
00129                                                    in string            theLibName,
00130                                                    in SMESH_Mesh        theMesh,
00131                                                    in GEOM::GEOM_Object theGeom)
00132       raises ( SALOME::SALOME_Exception );
00133 
00141     SMESH_Mesh CreateMesh( in GEOM::GEOM_Object theObject )
00142       raises ( SALOME::SALOME_Exception );
00143     
00147     SMESH_Mesh CreateEmptyMesh()
00148       raises ( SALOME::SALOME_Exception );
00149     
00154     SMESH_Mesh CreateMeshesFromUNV( in string theFileName )
00155       raises ( SALOME::SALOME_Exception );
00156 
00160      mesh_array CreateMeshesFromMED( in string theFileName,
00161                          out SMESH::DriverMED_ReadStatus theStatus )
00162        raises ( SALOME::SALOME_Exception );
00163 
00167     SMESH_Mesh CreateMeshesFromSTL( in string theFileName )
00168       raises ( SALOME::SALOME_Exception );
00169 
00173 //      SMESH_Mesh NewEmpty()
00174 //        raises ( SALOME::SALOME_Exception );
00175 
00181     boolean Compute( in SMESH_Mesh        theMesh, 
00182                in GEOM::GEOM_Object theSubObject )
00183       raises ( SALOME::SALOME_Exception );
00184 
00188     boolean IsReadyToCompute( in SMESH_Mesh        theMesh, 
00189                      in GEOM::GEOM_Object theSubObject )
00190       raises ( SALOME::SALOME_Exception );
00191 
00196     algo_error_array GetAlgoState( in SMESH_Mesh        theMesh, 
00197                                    in GEOM::GEOM_Object theSubObject )
00198       raises ( SALOME::SALOME_Exception );
00199 
00204     compute_error_array GetComputeErrors( in SMESH_Mesh        theMesh, 
00205                                           in GEOM::GEOM_Object theSubObject )
00206       raises ( SALOME::SALOME_Exception );
00207 
00212     long_array GetSubShapesId( in GEOM::GEOM_Object theMainObject,
00213                                in object_array      theListOfSubObjects )
00214        raises ( SALOME::SALOME_Exception );
00215 
00221     GEOM::GEOM_Object GetGeometryByMeshElement( in SMESH_Mesh  theMesh,
00222                                                 in long        theElementID,
00223                                                 in string      theGeomName)
00224       raises ( SALOME::SALOME_Exception );
00225 
00230     GEOM::GEOM_Object FindGeometryByMeshElement( in SMESH_Mesh  theMesh,
00231                                in long        theElementID)
00232       raises ( SALOME::SALOME_Exception );
00233 
00241     SMESH_Mesh Concatenate(in mesh_array theMeshesArray, 
00242                   in boolean    theUniteIdenticalGroups, 
00243                   in boolean    theMergeNodesAndElements, 
00244                   in double     theMergeTolerance)
00245       raises ( SALOME::SALOME_Exception );
00246 
00247   };
00248 
00249 };
00250 
00251 #endif