Salome HOME
CoTech decision: move MEDWrapper from MED to SMESH
[modules/smesh.git] / src / SMESH_I / SMESH_Mesh_i.hxx
index 3c13916a4592e4b26ccf628b28be849c1b2f7961..68d60d0e1dd978afc0b4b98c02fff54f40316568 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2012  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2013  CEA/DEN, EDF R&D, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -29,6 +29,7 @@
 #include "SMESH.hxx"
 
 #include <SALOMEconfig.h>
+#include CORBA_SERVER_HEADER(SMESH_Gen)
 #include CORBA_SERVER_HEADER(SMESH_Mesh)
 #include CORBA_SERVER_HEADER(SMESH_Group)
 #include CORBA_SERVER_HEADER(SMESH_Hypothesis)
@@ -37,7 +38,6 @@
 
 #include "SMESH_Hypothesis.hxx"
 #include "SMESH_Mesh.hxx"
-//#include "SMESH_subMesh_i.hxx"
 #include "SMESH_subMesh.hxx"
 
 #include "SALOME_GenericObj_i.hh"
@@ -63,6 +63,7 @@ public:
   virtual ~SMESH_Mesh_i();
 
   // --- CORBA
+
   void SetShape( GEOM::GEOM_Object_ptr theShapeObject )
     throw (SALOME::SALOME_Exception);
 
@@ -155,38 +156,34 @@ public:
   SMESH::SMESH_Group_ptr CutListOfGroups( const SMESH::ListOfGroups& theMainGroups,
                                           const SMESH::ListOfGroups& theToolGroups,
                                           const char* theName )
-  throw (SALOME::SALOME_Exception);
+    throw (SALOME::SALOME_Exception);
 
   SMESH::SMESH_Group_ptr CreateDimGroup( const SMESH::ListOfGroups& theGroups,
                                          SMESH::ElementType theElemType,
                                          const char* theName )
-  throw (SALOME::SALOME_Exception);
-
+    throw (SALOME::SALOME_Exception);
 
-  SMESH::SMESH_Group_ptr ConvertToStandalone( SMESH::SMESH_GroupBase_ptr theGroupOn );
 
-//    SMESH::string_array* GetLog(CORBA::Boolean clearAfterGet)
-//      throw (SALOME::SALOME_Exception);
+  SMESH::SMESH_Group_ptr ConvertToStandalone( SMESH::SMESH_GroupBase_ptr theGroupOn )
+    throw (SALOME::SALOME_Exception);
 
   SMESH::log_array* GetLog(CORBA::Boolean clearAfterGet)
     throw (SALOME::SALOME_Exception);
 
-  SMESH::SMESH_MeshEditor_ptr GetMeshEditor();
+  SMESH::SMESH_MeshEditor_ptr GetMeshEditor() throw (SALOME::SALOME_Exception);
 
-  SMESH::SMESH_MeshEditor_ptr GetMeshEditPreviewer();
+  SMESH::SMESH_MeshEditor_ptr GetMeshEditPreviewer() throw (SALOME::SALOME_Exception);
 
   CORBA::Boolean HasModificationsToDiscard() throw (SALOME::SALOME_Exception);
 
-  void ClearLog()
-    throw (SALOME::SALOME_Exception);
+  void ClearLog() throw (SALOME::SALOME_Exception);
 
-  CORBA::Long GetId()
-    throw (SALOME::SALOME_Exception);
+  CORBA::Long GetId() throw (SALOME::SALOME_Exception);
 
-  CORBA::Long GetStudyId()
-    throw (SALOME::SALOME_Exception);
+  CORBA::Long GetStudyId() throw (SALOME::SALOME_Exception);
 
   // --- C++ interface
+
   void SetImpl(::SMESH_Mesh* impl);
   ::SMESH_Mesh& GetImpl();         // :: force no namespace here
 
@@ -198,6 +195,10 @@ public:
   int ImportSTLFile( const char* theFileName )
     throw (SALOME::SALOME_Exception);
 
+  SMESH::ComputeError* ImportGMFFile( const char* theFileName,
+                                      bool        theMakeRequiredGroups)
+    throw (SALOME::SALOME_Exception);
+
   /*!
    * consult DriverMED_R_SMESHDS_Mesh::ReadStatus for returned value
    */
@@ -230,7 +231,8 @@ public:
   void ExportToMEDX( const char*        file,
                      CORBA::Boolean     auto_groups,
                      SMESH::MED_VERSION version,
-                     CORBA::Boolean     overwrite ) throw (SALOME::SALOME_Exception);
+                     CORBA::Boolean     overwrite,
+                     CORBA::Boolean     autoDimension=true) throw (SALOME::SALOME_Exception);
   void ExportToMED ( const char*        file,
                      CORBA::Boolean     auto_groups,
                      SMESH::MED_VERSION version ) throw (SALOME::SALOME_Exception);
@@ -245,12 +247,16 @@ public:
   void ExportCGNS(SMESH::SMESH_IDSource_ptr meshPart,
                   const char*               file,
                   CORBA::Boolean            overwrite) throw (SALOME::SALOME_Exception);
+  void ExportGMF(SMESH::SMESH_IDSource_ptr meshPart,
+                 const char*               file,
+                 CORBA::Boolean            withRequiredGroups) throw (SALOME::SALOME_Exception);
 
   void ExportPartToMED(SMESH::SMESH_IDSource_ptr meshPart,
                        const char*               file,
                        CORBA::Boolean            auto_groups,
                        SMESH::MED_VERSION        version,
-                       CORBA::Boolean            overwrite) throw (SALOME::SALOME_Exception);
+                       CORBA::Boolean            overwrite,
+                       CORBA::Boolean            autoDim=true) throw (SALOME::SALOME_Exception);
   void ExportPartToDAT(SMESH::SMESH_IDSource_ptr meshPart,
                        const char*               file) throw (SALOME::SALOME_Exception);
   void ExportPartToUNV(SMESH::SMESH_IDSource_ptr meshPart,
@@ -292,6 +298,9 @@ public:
   CORBA::Long NbTrianglesOfOrder(SMESH::ElementOrder order)
     throw (SALOME::SALOME_Exception);
 
+  CORBA::Long NbBiQuadTriangles()
+    throw (SALOME::SALOME_Exception);
+
   CORBA::Long NbQuadrangles()
     throw (SALOME::SALOME_Exception);
 
@@ -383,6 +392,11 @@ public:
 
   char* Dump();
 
+  // Create groups of elements preventing computation of a sub-shape
+  SMESH::ListOfGroups* MakeGroupsOfBadInputElements( int         theSubShapeID,
+                                                     const char* theGroupName)
+    throw (SALOME::SALOME_Exception);
+
   // Internal methods not available through CORBA
   // They are called by corresponding interface methods
   SMESH_Hypothesis::Hypothesis_Status addHypothesis(GEOM::GEOM_Object_ptr aSubShapeObject,
@@ -414,7 +428,7 @@ public:
   // return an existing subMesh object for the shapeID. shapeID == submeshID.
 
   const std::map<int, SMESH::SMESH_GroupBase_ptr>& getGroups() { return _mapGroups; }
-  // return an existing group object.
+  // return existing group objects
 
   void onHypothesisModified();
   // callback from _impl to forget not loaded mesh data (issue 0021208)
@@ -457,6 +471,11 @@ public:
    */
   SMESH::NodePosition* GetNodePosition(CORBA::Long NodeID);
 
+  /*!
+   * \brief Return position of an element on shape
+   */
+  SMESH::ElementPosition GetElementPosition(CORBA::Long ElemID);
+
   /*!
    * If given element is node returns IDs of shape from position
    * If there is not node for given ID - returns -1