Version: 6.3.1

idl/SMESH_Gen.idl

Go to the documentation of this file.
00001 // Copyright (C) 2007-2011  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   };
00103   struct ComputeError
00104   {
00105     short   code;       // ComputeErrorName or, if negative, algo specific code
00106     string  comment;    // textual problem description
00107     string  algoName;
00108     short   subShapeID; // id of subshape of a shape to mesh
00109     boolean hasBadMesh; // there are elements preventing computation available for visualization
00110   };
00111   typedef sequence<ComputeError> compute_error_array;
00112 
00113 
00114   interface SMESH_Gen : Engines::EngineComponent, SALOMEDS::Driver
00115   {
00116     //GEOM::GEOM_Gen SetGeomEngine( in string containerLoc );
00117     void SetGeomEngine( in GEOM::GEOM_Gen geomcompo );
00118 
00119     FilterManager CreateFilterManager();
00120 
00121     SMESH_Pattern GetPattern();
00122 
00123     Measurements  CreateMeasurements();
00124 
00128     void SetEmbeddedMode( in boolean theMode );
00129 
00133     boolean IsEmbeddedMode();
00134 
00138     void SetCurrentStudy( in SALOMEDS::Study theStudy );
00139 
00143     SALOMEDS::Study GetCurrentStudy();
00144 
00152     SMESH_Hypothesis CreateHypothesis( in string theHypName,
00153                                        in string theLibName )
00154       raises ( SALOME::SALOME_Exception );
00155 
00163     SMESH_Hypothesis GetHypothesisParameterValues( in string            theHypName,
00164                                                    in string            theLibName,
00165                                                    in SMESH_Mesh        theMesh,
00166                                                    in GEOM::GEOM_Object theGeom,
00167                                                    in boolean           byMesh)
00168       raises ( SALOME::SALOME_Exception );
00169 
00174     void SetBoundaryBoxSegmentation( in long theNbSegments ) raises ( SALOME::SALOME_Exception );
00178     void SetDefaultNbSegments( in long theNbSegments) raises ( SALOME::SALOME_Exception );
00179 
00183     void SetName( in string theObjectIOR,
00184                   in string theObjectName )
00185       raises ( SALOME::SALOME_Exception );
00186 
00194     SMESH_Mesh CreateMesh( in GEOM::GEOM_Object theObject )
00195       raises ( SALOME::SALOME_Exception );
00196 
00200     SMESH_Mesh CreateEmptyMesh()
00201       raises ( SALOME::SALOME_Exception );
00202 
00207     SMESH_Mesh CreateMeshesFromUNV( in string theFileName )
00208       raises ( SALOME::SALOME_Exception );
00209 
00213      mesh_array CreateMeshesFromMED( in string theFileName,
00214                                      out SMESH::DriverMED_ReadStatus theStatus )
00215        raises ( SALOME::SALOME_Exception );
00216 
00220     SMESH_Mesh CreateMeshesFromSTL( in string theFileName )
00221       raises ( SALOME::SALOME_Exception );
00222 
00231     SMESH_Mesh CopyMesh(in SMESH_IDSource meshPart,
00232                         in string         meshName,
00233                         in boolean        toCopyGroups,
00234                         in boolean        toKeepIDs)
00235       raises ( SALOME::SALOME_Exception );
00236 
00244     SMESH_Mesh Concatenate(in mesh_array theMeshesArray,
00245                            in boolean    theUniteIdenticalGroups,
00246                            in boolean    theMergeNodesAndElements,
00247                            in double     theMergeTolerance)
00248       raises ( SALOME::SALOME_Exception );
00249 
00258     SMESH_Mesh ConcatenateWithGroups(in mesh_array theMeshesArray,
00259                                      in boolean    theUniteIdenticalGroups,
00260                                      in boolean    theMergeNodesAndElements,
00261                                      in double     theMergeTolerance)
00262       raises ( SALOME::SALOME_Exception );
00263 
00269     boolean Compute( in SMESH_Mesh        theMesh,
00270                      in GEOM::GEOM_Object theSubObject )
00271       raises ( SALOME::SALOME_Exception );
00272 
00276     void CancelCompute( in SMESH_Mesh        theMesh,
00277                in GEOM::GEOM_Object theSubObject );
00278 
00282     boolean IsReadyToCompute( in SMESH_Mesh        theMesh,
00283                               in GEOM::GEOM_Object theSubObject )
00284       raises ( SALOME::SALOME_Exception );
00285 
00289     long_array  Evaluate(in SMESH_Mesh        theMesh,
00290                          in GEOM::GEOM_Object theSubObject)
00291       raises ( SALOME::SALOME_Exception );
00292 
00298     MeshPreviewStruct Precompute( in SMESH_Mesh        theMesh,
00299                                   in GEOM::GEOM_Object theSubObject,
00300                                   in Dimension         theDimension,
00301                                   inout long_array    theShapesId )
00302       raises ( SALOME::SALOME_Exception );
00303 
00308     algo_error_array GetAlgoState( in SMESH_Mesh        theMesh,
00309                                    in GEOM::GEOM_Object theSubObject )
00310       raises ( SALOME::SALOME_Exception );
00311 
00316     compute_error_array GetComputeErrors( in SMESH_Mesh        theMesh,
00317                                           in GEOM::GEOM_Object theSubObject )
00318       raises ( SALOME::SALOME_Exception );
00319 
00323     MeshPreviewStruct GetBadInputElements( in SMESH_Mesh theMesh,
00324                                            in short      theSubShapeID )
00325       raises ( SALOME::SALOME_Exception );
00326 
00331     long_array GetSubShapesId( in GEOM::GEOM_Object theMainObject,
00332                                in object_array      theListOfSubObjects )
00333        raises ( SALOME::SALOME_Exception );
00334 
00340     GEOM::GEOM_Object GetGeometryByMeshElement( in SMESH_Mesh  theMesh,
00341                                                 in long        theElementID,
00342                                                 in string      theGeomName)
00343       raises ( SALOME::SALOME_Exception );
00344 
00349     GEOM::GEOM_Object FindGeometryByMeshElement( in SMESH_Mesh  theMesh,
00350                                                  in long        theElementID)
00351       raises ( SALOME::SALOME_Exception );
00352 
00358     long GetObjectId(in Object theObject);
00359 
00363     boolean GetMEDVersion(in string theFileName, out MED_VERSION theVersion);
00364 
00368     string_array GetMeshNames(in string theFileName);
00369   };
00370 
00371 };
00372 
00373 #endif
Copyright © 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE
Copyright © 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS