Salome HOME
New methods for SMESH_Mesh and SMESH_subMesh:
authorasl <asl@opencascade.com>
Mon, 4 Jul 2005 10:27:33 +0000 (10:27 +0000)
committerasl <asl@opencascade.com>
Mon, 4 Jul 2005 10:27:33 +0000 (10:27 +0000)
GetElementType - returns element type by id

idl/SMESH_Mesh.idl
src/SMESH_I/SMESH_Mesh_i.cxx
src/SMESH_I/SMESH_Mesh_i.hxx
src/SMESH_I/SMESH_subMesh_i.cxx
src/SMESH_I/SMESH_subMesh_i.hxx

index 53579df6a210624d812957228f2e035927f6df08..8b7073579b278e7e3f414efa8a9ca2439bff0d4b 100644 (file)
@@ -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
index d41a1f4f29c140e17df9be51790db37a26d55f68..162926dff4c3c295880a0eaab7c6c47a3237930e 100644 (file)
@@ -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 );
+}
index dc3d06c57725b8447884880b1889cd9b45ecfe4b..c6e3f373d1d660f376281901b3ae4bae95d312cd 100644 (file)
@@ -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
index 2e58af96a8531f35da589f13f8200b8c286f8cdd..f8ade30f58677fdf052cdec74ea70f8e3eb8b6a0 100644 (file)
@@ -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 );
+}
index acbcd63994fe365e865c7c62cafc27dff8657c1c..769a4cda49ad1b68fe5ff5e46e9ceb76516a7771 100644 (file)
@@ -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);