Salome HOME
PAL18696 SMESH : version of MED export
[modules/smesh.git] / src / SMESH_I / SMESH_Mesh_i.hxx
index 507fb6615c727f90f043f70bdd92696d82650765..aab2ed9022d07bbcf7fde4da4421189c892ebd77 100644 (file)
 
 #include "SMESH_Hypothesis.hxx"
 #include "SMESH_Mesh.hxx"
-#include "SMESH_subMesh_i.hxx"
+//#include "SMESH_subMesh_i.hxx"
 #include "SMESH_subMesh.hxx"
 
 #include "SALOME_GenericObj_i.hh"
 
 class SMESH_Gen_i;
 class SMESH_GroupBase_i;
+class SMESH_subMesh_i;
 
 #include <map>
 
@@ -65,6 +66,9 @@ public:
   void SetShape( GEOM::GEOM_Object_ptr theShapeObject )
     throw (SALOME::SALOME_Exception);
 
+  CORBA::Boolean HasShapeToMesh()
+    throw (SALOME::SALOME_Exception);
+
   GEOM::GEOM_Object_ptr GetShapeToMesh()
     throw (SALOME::SALOME_Exception);
 
@@ -102,6 +106,9 @@ public:
   SMESH::ListOfGroups* GetGroups()
     throw (SALOME::SALOME_Exception);
 
+  CORBA::Long NbGroups()
+    throw (SALOME::SALOME_Exception);
+
   SMESH::SMESH_Group_ptr UnionGroups( SMESH::SMESH_GroupBase_ptr theGroup1, 
                                       SMESH::SMESH_GroupBase_ptr theGroup2, 
                                       const char* theName )
@@ -125,6 +132,8 @@ public:
 
   SMESH::SMESH_MeshEditor_ptr GetMeshEditor();
 
+  SMESH::SMESH_MeshEditor_ptr GetMeshEditPreviewer();
+
   void ClearLog()
     throw (SALOME::SALOME_Exception);
 
@@ -156,6 +165,10 @@ public:
    *  Consider maximum group name length stored in MED file.
    */
   CORBA::Boolean HasDuplicatedGroupNamesMED();
+  /*!
+   * Return string representation of a MED file version comprising nbDigits
+   */
+  char* GetVersionString(SMESH::MED_VERSION version, CORBA::Short nbDigits);
 
   void ExportToMED( const char* file, CORBA::Boolean auto_groups, SMESH::MED_VERSION theVersion )
     throw (SALOME::SALOME_Exception);
@@ -283,7 +296,10 @@ public:
   SMESH_Hypothesis::Hypothesis_Status removeHypothesis(GEOM::GEOM_Object_ptr aSubShapeObject,
                                                        SMESH::SMESH_Hypothesis_ptr anHyp);
   
-  int importMEDFile( const char* theFileName, const char* theMeshName );
+  static SMESH::Hypothesis_Status
+  ConvertHypothesisStatus (SMESH_Hypothesis::Hypothesis_Status theStatus);
+
+  //int importMEDFile( const char* theFileName, const char* theMeshName );
 
   SMESH::SMESH_subMesh_ptr createSubMesh( GEOM::GEOM_Object_ptr theSubShapeObject );
 
@@ -302,10 +318,26 @@ public:
   const map<int, SMESH::SMESH_GroupBase_ptr>& getGroups() { return _mapGroups; }
   // return an existing group object.
 
+  /*!
+   * \brief Update hypotheses assigned to geom groups if the latter change
+   * 
+   * NPAL16168: "geometrical group edition from a submesh don't modifiy mesh computation"
+   */
+  void CheckGeomGroupModif();
+
   virtual SMESH::long_array* GetIDs();
 
-  CORBA::Long GetMeshPtr();
+  CORBA::LongLong GetMeshPtr();
 
+  /*!
+   * \brief Assure that all groups are published
+   */
+  void CreateGroupServants();
+
+  /*!
+   * \brief Return groups cantained in _mapGroups by their IDs
+   */
+  SMESH::ListOfGroups* GetGroups(const std::list<int>& groupIDs) const;
 
   /*!
    * Get XYZ coordinates of node as list of double
@@ -319,6 +351,11 @@ public:
    */
   SMESH::long_array* GetNodeInverseElements(const CORBA::Long id);
 
+  /*!
+   * \brief Return position of a node on shape
+   */
+  SMESH::NodePosition* GetNodePosition(CORBA::Long NodeID);
+
   /*!
    * If given element is node returns IDs of shape from position
    * If there is not node for given ID - returns -1
@@ -393,7 +430,6 @@ public:
   map<int, ::SMESH_subMesh*> _mapSubMesh;   //NRI
 
 private:
-  void CreateGroupServants();
 
   static int myIdGenerator;
   ::SMESH_Mesh* _impl;  // :: force no namespace here