X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH_I%2FSMESH_Mesh_i.hxx;h=6d0f5e47fcc297257bddbcb0103fe32a0b4d68ef;hb=ddd20dd94358856385f639219bbdfbd1e14239d7;hp=92e431e4f1afc3a983d9a0db1ef598e358850714;hpb=9d11375af40826e967ab2c3bcb77d1f9d439c90c;p=modules%2Fsmesh.git diff --git a/src/SMESH_I/SMESH_Mesh_i.hxx b/src/SMESH_I/SMESH_Mesh_i.hxx index 92e431e4f..6d0f5e47f 100644 --- a/src/SMESH_I/SMESH_Mesh_i.hxx +++ b/src/SMESH_I/SMESH_Mesh_i.hxx @@ -40,13 +40,14 @@ #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 @@ -67,9 +68,15 @@ 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); + void Clear() + throw (SALOME::SALOME_Exception); + SMESH::Hypothesis_Status AddHypothesis(GEOM::GEOM_Object_ptr aSubShapeObject, SMESH::SMESH_Hypothesis_ptr anHyp) throw (SALOME::SALOME_Exception); @@ -104,6 +111,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 +137,8 @@ public: SMESH::SMESH_MeshEditor_ptr GetMeshEditor(); + SMESH::SMESH_MeshEditor_ptr GetMeshEditPreviewer(); + void ClearLog() throw (SALOME::SALOME_Exception); @@ -154,10 +166,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 +310,12 @@ 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); + + static void PrepareForWriting (const char* file); + + //int importMEDFile( const char* theFileName, const char* theMeshName ); SMESH::SMESH_subMesh_ptr createSubMesh( GEOM::GEOM_Object_ptr theSubShapeObject ); @@ -301,13 +331,29 @@ public: SMESH::SMESH_subMesh_ptr getSubMesh(int shapeID); // return an existing subMesh object for the shapeID. shapeID == submeshID. - const map& getGroups() { return _mapGroups; } + const std::map& 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& groupIDs) const; /*! * Get XYZ coordinates of node as list of double @@ -321,6 +367,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 +441,25 @@ public: */ SMESH::double_array* BaryCenter(CORBA::Long id); + /*! + * Returns information about imported MED file + */ + virtual SALOME_MED::MedFileInfo* GetMEDFileInfo(); - map _mapSubMesh_i; //NRI - map _mapSubMesh; //NRI + std::map _mapSubMesh_i; //NRI + std::map _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 _mapSubMeshIor; - map _mapGroups; - map _mapHypo; + std::map _mapSubMeshIor; + std::map _mapGroups; + std::map _mapHypo; + SALOME_MED::MedFileInfo_var myFileInfo; }; #endif