Back to index

salome-smesh  6.5.0
SMESH_Gen.idl
Go to the documentation of this file.
00001 // Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
00002 //
00003 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
00004 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
00005 //
00006 // This library is free software; you can redistribute it and/or
00007 // modify it under the terms of the GNU Lesser General Public
00008 // License as published by the Free Software Foundation; either
00009 // version 2.1 of the License.
00010 //
00011 // This library is distributed in the hope that it will be useful,
00012 // but WITHOUT ANY WARRANTY; without even the implied warranty of
00013 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00014 // Lesser General Public License for more details.
00015 //
00016 // You should have received a copy of the GNU Lesser General Public
00017 // License along with this library; if not, write to the Free Software
00018 // Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
00019 //
00020 // See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
00021 //
00022 //  File   : SMESH_Gen.idl
00023 //  Author : Paul RASCLE, EDF
00024 
00025 #ifndef _SMESH_GEN_IDL_
00026 #define _SMESH_GEN_IDL_
00027 
00028 #include "SALOME_Exception.idl"
00029 #include "SALOME_Component.idl"
00030 #include "SALOMEDS.idl"
00031 
00032 #include "GEOM_Gen.idl"
00033 
00034 #include "SMESH_Mesh.idl"
00035 #include "SMESH_Hypothesis.idl"
00036 
00037 module SMESH
00038 {
00039   typedef sequence<GEOM::GEOM_Object> object_array;
00040   typedef sequence<SMESH_Mesh>        mesh_array;
00041 
00042   interface FilterManager;
00043   interface SMESH_Pattern;
00044   interface Measurements;
00045 
00049   // Top level
00050   const long Tag_HypothesisRoot = 1; // hypotheses root
00051   const long Tag_AlgorithmsRoot = 2; // algorithms root
00052   const long Tag_FirstMeshRoot  = 3; // first mesh root
00053   // Mesh/Submesh
00054   const long Tag_RefOnShape             = 1; // references to shape
00055   const long Tag_RefOnAppliedHypothesis = 2; // applied hypotheses root
00056   const long Tag_RefOnAppliedAlgorithms = 3; // applied algorithms root
00057   // Mesh only: sub-meshes roots by type
00058   const long Tag_FirstSubMesh           =  4;
00059   const long Tag_SubMeshOnVertex        =  4;
00060   const long Tag_SubMeshOnEdge          =  5;
00061   const long Tag_SubMeshOnWire          =  6;
00062   const long Tag_SubMeshOnFace          =  7;
00063   const long Tag_SubMeshOnShell         =  8;
00064   const long Tag_SubMeshOnSolid         =  9;
00065   const long Tag_SubMeshOnCompound      = 10;
00066   const long Tag_LastSubMesh            = 10;
00067   // Mesh only: group roots by type
00068   const long Tag_FirstGroup             = 11;
00069   const long Tag_NodeGroups             = 11;
00070   const long Tag_EdgeGroups             = 12;
00071   const long Tag_FaceGroups             = 13;
00072   const long Tag_VolumeGroups           = 14;
00073   const long Tag_0DElementsGroups       = 15;
00074   const long Tag_LastGroup              = 15;
00075 
00079   struct AlgoStateError
00080   {
00081     Hypothesis_Status  state;
00082     string             algoName;
00083     long               algoDim;
00084     boolean            isGlobalAlgo;
00085   };
00086   typedef sequence<AlgoStateError> algo_error_array;
00087 
00091   enum ComputeErrorName
00092   {
00093     COMPERR_OK            ,
00094     COMPERR_BAD_INPUT_MESH,  // wrong mesh on lower submesh
00095     COMPERR_STD_EXCEPTION ,  // some std exception raised
00096     COMPERR_OCC_EXCEPTION ,  // OCC exception raised
00097     COMPERR_SLM_EXCEPTION ,  // SALOME exception raised
00098     COMPERR_EXCEPTION     ,  // other exception raised
00099     COMPERR_MEMORY_PB     ,  // memory allocation problem
00100     COMPERR_ALGO_FAILED   ,  // computation failed
00101     COMPERR_BAD_SHAPE     ,  // bad geometry
00102     COMPERR_WARNING          // algo reports error but sub-mesh is computed anyway
00103   };
00104   struct ComputeError
00105   {
00106     short   code;       // ComputeErrorName or, if negative, algo specific code
00107     string  comment;    // textual problem description
00108     string  algoName;
00109     short   subShapeID; // id of sub-shape of a shape to mesh
00110     boolean hasBadMesh; // there are elements preventing computation available for visualization
00111   };
00112   typedef sequence<ComputeError> compute_error_array;
00113 
00114 
00115   interface SMESH_Gen : Engines::EngineComponent, SALOMEDS::Driver
00116   {
00117     //GEOM::GEOM_Gen SetGeomEngine( in string containerLoc );
00118     void SetGeomEngine( in GEOM::GEOM_Gen geomcompo );
00119 
00120     FilterManager CreateFilterManager();
00121 
00122     SMESH_Pattern GetPattern();
00123 
00124     Measurements  CreateMeasurements();
00125 
00129     void SetEmbeddedMode( in boolean theMode );
00130 
00134     boolean IsEmbeddedMode();
00135 
00139     void SetCurrentStudy( in SALOMEDS::Study theStudy );
00140 
00144     SALOMEDS::Study GetCurrentStudy();
00145 
00153     SMESH_Hypothesis CreateHypothesis( in string theHypName,
00154                                        in string theLibName )
00155       raises ( SALOME::SALOME_Exception );
00156 
00164     SMESH_Hypothesis GetHypothesisParameterValues( in string            theHypName,
00165                                                    in string            theLibName,
00166                                                    in SMESH_Mesh        theMesh,
00167                                                    in GEOM::GEOM_Object theGeom,
00168                                                    in boolean           byMesh)
00169       raises ( SALOME::SALOME_Exception );
00170 
00175     void SetBoundaryBoxSegmentation( in long theNbSegments ) raises ( SALOME::SALOME_Exception );
00179     void SetDefaultNbSegments( in long theNbSegments) raises ( SALOME::SALOME_Exception );
00180 
00184     void SetName( in string theObjectIOR,
00185                   in string theObjectName )
00186       raises ( SALOME::SALOME_Exception );
00187 
00195     SMESH_Mesh CreateMesh( in GEOM::GEOM_Object theObject )
00196       raises ( SALOME::SALOME_Exception );
00197 
00201     SMESH_Mesh CreateEmptyMesh()
00202       raises ( SALOME::SALOME_Exception );
00203 
00208     SMESH_Mesh CreateMeshesFromUNV( in string theFileName )
00209       raises ( SALOME::SALOME_Exception );
00210 
00214      mesh_array CreateMeshesFromMED( in string theFileName,
00215                                      out SMESH::DriverMED_ReadStatus theStatus )
00216        raises ( SALOME::SALOME_Exception );
00217 
00221      mesh_array CreateMeshesFromSAUV( in string theFileName,
00222                                   out SMESH::DriverMED_ReadStatus theStatus )
00223        raises ( SALOME::SALOME_Exception );
00224 
00228     SMESH_Mesh CreateMeshesFromSTL( in string theFileName )
00229       raises ( SALOME::SALOME_Exception );
00230 
00234     mesh_array CreateMeshesFromCGNS( in string theFileName,
00235                                      out SMESH::DriverMED_ReadStatus theStatus )
00236       raises ( SALOME::SALOME_Exception );
00237 
00246     SMESH_Mesh CopyMesh(in SMESH_IDSource meshPart,
00247                         in string         meshName,
00248                         in boolean        toCopyGroups,
00249                         in boolean        toKeepIDs)
00250       raises ( SALOME::SALOME_Exception );
00251 
00259     SMESH_Mesh Concatenate(in mesh_array theMeshesArray,
00260                            in boolean    theUniteIdenticalGroups,
00261                            in boolean    theMergeNodesAndElements,
00262                            in double     theMergeTolerance)
00263       raises ( SALOME::SALOME_Exception );
00264 
00273     SMESH_Mesh ConcatenateWithGroups(in mesh_array theMeshesArray,
00274                                      in boolean    theUniteIdenticalGroups,
00275                                      in boolean    theMergeNodesAndElements,
00276                                      in double     theMergeTolerance)
00277       raises ( SALOME::SALOME_Exception );
00278 
00284     boolean Compute( in SMESH_Mesh        theMesh,
00285                      in GEOM::GEOM_Object theSubObject )
00286       raises ( SALOME::SALOME_Exception );
00287 
00291     void CancelCompute( in SMESH_Mesh        theMesh,
00292                      in GEOM::GEOM_Object theSubObject );
00293 
00297     boolean IsReadyToCompute( in SMESH_Mesh        theMesh,
00298                               in GEOM::GEOM_Object theSubObject )
00299       raises ( SALOME::SALOME_Exception );
00300 
00304     long_array  Evaluate(in SMESH_Mesh        theMesh,
00305                          in GEOM::GEOM_Object theSubObject)
00306       raises ( SALOME::SALOME_Exception );
00307 
00313     MeshPreviewStruct Precompute( in SMESH_Mesh        theMesh,
00314                                   in GEOM::GEOM_Object theSubObject,
00315                                   in Dimension         theDimension,
00316                                   inout long_array    theShapesId )
00317       raises ( SALOME::SALOME_Exception );
00318 
00323     algo_error_array GetAlgoState( in SMESH_Mesh        theMesh,
00324                                    in GEOM::GEOM_Object theSubObject )
00325       raises ( SALOME::SALOME_Exception );
00326 
00331     compute_error_array GetComputeErrors( in SMESH_Mesh        theMesh,
00332                                           in GEOM::GEOM_Object theSubObject )
00333       raises ( SALOME::SALOME_Exception );
00334 
00338     MeshPreviewStruct GetBadInputElements( in SMESH_Mesh theMesh,
00339                                            in short      theSubShapeID )
00340       raises ( SALOME::SALOME_Exception );
00341 
00346     long_array GetSubShapesId( in GEOM::GEOM_Object theMainObject,
00347                                in object_array      theListOfSubObjects )
00348        raises ( SALOME::SALOME_Exception );
00349 
00355     GEOM::GEOM_Object GetGeometryByMeshElement( in SMESH_Mesh  theMesh,
00356                                                 in long        theElementID,
00357                                                 in string      theGeomName)
00358       raises ( SALOME::SALOME_Exception );
00359 
00364     GEOM::GEOM_Object FindGeometryByMeshElement( in SMESH_Mesh  theMesh,
00365                                                  in long        theElementID)
00366       raises ( SALOME::SALOME_Exception );
00367 
00373     long GetObjectId(in Object theObject);
00374 
00378     boolean GetMEDVersion(in string theFileName, out MED_VERSION theVersion);
00379 
00383     string_array GetMeshNames(in string theFileName);
00384   };
00385 
00386 };
00387 
00388 #endif