From: asl Date: Mon, 4 Jul 2005 10:27:33 +0000 (+0000) Subject: New methods for SMESH_Mesh and SMESH_subMesh: X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=3ef3246244b3dbcb0f245a14947945b103662320;p=modules%2Fsmesh.git New methods for SMESH_Mesh and SMESH_subMesh: GetElementType - returns element type by id --- diff --git a/idl/SMESH_Mesh.idl b/idl/SMESH_Mesh.idl index 53579df6a..8b7073579 100644 --- a/idl/SMESH_Mesh.idl +++ b/idl/SMESH_Mesh.idl @@ -154,7 +154,7 @@ module SMESH */ long_array GetIDs(); }; - + interface SMESH_GroupBase; interface SMESH_Group; interface SMESH_GroupOnGeom; @@ -411,6 +411,12 @@ module SMESH long_array GetNodesId() raises (SALOME::SALOME_Exception); + /*! + * Return type of mesh element + */ + ElementType GetElementType( in long id, in boolean iselem ) + raises (SALOME::SALOME_Exception); + string Dump(); }; @@ -440,6 +446,12 @@ module SMESH long_array GetElementsByType( in ElementType theType ) raises (SALOME::SALOME_Exception); + /*! + * Return type of submesh element + */ + ElementType GetElementType( in long id, in boolean iselem ) + raises (SALOME::SALOME_Exception); + /*! * */ @@ -461,7 +473,8 @@ module SMESH /*! * Get the internal Id */ - long GetId(); + long GetId(); + /*! * Get MED subMesh diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index d41a1f4f2..162926dff 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -1593,3 +1593,15 @@ SMESH::long_array* SMESH_Mesh_i::GetNodesId() return aResult._retn(); } + +//============================================================================= +/*! + * + */ +//============================================================================= + +SMESH::ElementType SMESH_Mesh_i::GetElementType( const CORBA::Long id, const bool iselem ) + throw (SALOME::SALOME_Exception) +{ + return ( SMESH::ElementType )_impl->GetElementType( id, iselem ); +} diff --git a/src/SMESH_I/SMESH_Mesh_i.hxx b/src/SMESH_I/SMESH_Mesh_i.hxx index dc3d06c57..c6e3f373d 100644 --- a/src/SMESH_I/SMESH_Mesh_i.hxx +++ b/src/SMESH_I/SMESH_Mesh_i.hxx @@ -215,7 +215,10 @@ public: SMESH::long_array* GetNodesId() throw (SALOME::SALOME_Exception); - + + SMESH::ElementType GetElementType( const CORBA::Long id, const bool iselem ) + throw (SALOME::SALOME_Exception); + char* Dump(); // Internal methods not available through CORBA diff --git a/src/SMESH_I/SMESH_subMesh_i.cxx b/src/SMESH_I/SMESH_subMesh_i.cxx index 2e58af96a..f8ade30f5 100644 --- a/src/SMESH_I/SMESH_subMesh_i.cxx +++ b/src/SMESH_I/SMESH_subMesh_i.cxx @@ -474,3 +474,14 @@ SMESH::long_array* SMESH_subMesh_i::GetIDs() SMESH::long_array_var aResult = GetElementsId(); return aResult._retn(); } + +//============================================================================= +/*! + * + */ +//============================================================================= +SMESH::ElementType SMESH_subMesh_i::GetElementType( const CORBA::Long id, const bool iselem ) + throw (SALOME::SALOME_Exception) +{ + return GetFather()->GetElementType( id, iselem ); +} diff --git a/src/SMESH_I/SMESH_subMesh_i.hxx b/src/SMESH_I/SMESH_subMesh_i.hxx index acbcd6399..769a4cda4 100644 --- a/src/SMESH_I/SMESH_subMesh_i.hxx +++ b/src/SMESH_I/SMESH_subMesh_i.hxx @@ -63,6 +63,9 @@ public: SMESH::long_array* GetElementsByType( SMESH::ElementType theElemType ) throw (SALOME::SALOME_Exception); + + SMESH::ElementType GetElementType( const CORBA::Long id, const bool iselem ) + throw (SALOME::SALOME_Exception); SMESH::long_array* GetNodesId() throw (SALOME::SALOME_Exception);