Salome HOME
Merge from BR_Dev_For_4_0 branch (from tag mergeto_BR_QT4_Dev_07Jul08)
[modules/smesh.git] / src / SMESH_I / SMESH_Mesh_i.hxx
index 92e431e4f1afc3a983d9a0db1ef598e358850714..c4d4a7277542a1879cdc168b5b867e86b3d65c36 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>
 
@@ -67,6 +68,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);
 
@@ -104,6 +108,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 )
@@ -127,6 +134,8 @@ public:
 
   SMESH::SMESH_MeshEditor_ptr GetMeshEditor();
 
+  SMESH::SMESH_MeshEditor_ptr GetMeshEditPreviewer();
+
   void ClearLog()
     throw (SALOME::SALOME_Exception);
 
@@ -154,10 +163,23 @@ public:
   SMESH::DriverMED_ReadStatus ImportMEDFile( const char* theFileName, const char* theMeshName )
     throw (SALOME::SALOME_Exception);
 
+  /*!
+   *  Auto color
+   */
+  void SetAutoColor(CORBA::Boolean theAutoColor)
+    throw (SALOME::SALOME_Exception);
+
+  CORBA::Boolean GetAutoColor()
+    throw (SALOME::SALOME_Exception);
+
   /*! Check group names for duplications.
    *  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);
@@ -285,7 +307,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 );
 
@@ -301,13 +326,29 @@ public:
   SMESH::SMESH_subMesh_ptr getSubMesh(int shapeID);
   // return an existing subMesh object for the shapeID. shapeID == submeshID.
 
-  const map<int, SMESH::SMESH_GroupBase_ptr>& getGroups() { return _mapGroups; }
+  const std::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
@@ -321,6 +362,11 @@ public:
    */
   SMESH::long_array* GetNodeInverseElements(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
@@ -390,21 +436,25 @@ public:
    */
   SMESH::double_array* BaryCenter(CORBA::Long id);
 
+  /*!
+   * Returns information about imported MED file
+   */
+  virtual SALOME_MED::MedFileInfo* GetMEDFileInfo();
 
-  map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
-  map<int, ::SMESH_subMesh*> _mapSubMesh;   //NRI
+  std::map<int, SMESH_subMesh_i*> _mapSubMesh_i; //NRI
+  std::map<int, ::SMESH_subMesh*> _mapSubMesh;   //NRI
 
 private:
-  void CreateGroupServants();
 
   static int myIdGenerator;
   ::SMESH_Mesh* _impl;  // :: force no namespace here
   SMESH_Gen_i* _gen_i;
   int _id;          // id given by creator (unique within the creator instance)
   int _studyId;
-  map<int, SMESH::SMESH_subMesh_ptr>    _mapSubMeshIor;
-  map<int, SMESH::SMESH_GroupBase_ptr>  _mapGroups;
-  map<int, SMESH::SMESH_Hypothesis_ptr> _mapHypo;
+  std::map<int, SMESH::SMESH_subMesh_ptr>    _mapSubMeshIor;
+  std::map<int, SMESH::SMESH_GroupBase_ptr>  _mapGroups;
+  std::map<int, SMESH::SMESH_Hypothesis_ptr> _mapHypo;
+  string myFile;
 };
 
 #endif