From: eap Date: Mon, 20 Jan 2014 10:32:14 +0000 (+0000) Subject: 22316: EDF 2719 SMESH: Split hexas into prisms X-Git-Tag: V7_4_0a1~108 X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=commitdiff_plain;h=ffa52542822b49458a812f75afed40e95fcb4b51;hp=f500e5a8b62895e81275f73d8fecd7a977711d78 22316: EDF 2719 SMESH: Split hexas into prisms + GeometryType GetElementShape( in long id ) + raises (SALOME::SALOME_Exception); --- diff --git a/idl/SMESH_Mesh.idl b/idl/SMESH_Mesh.idl index ff60e68ad..92a3cd3b8 100644 --- a/idl/SMESH_Mesh.idl +++ b/idl/SMESH_Mesh.idl @@ -810,6 +810,9 @@ module SMESH EntityType GetElementGeomType( in long id ) raises (SALOME::SALOME_Exception); + GeometryType GetElementShape( in long id ) + raises (SALOME::SALOME_Exception); + long_array GetSubMeshElementsId(in long ShapeID) raises (SALOME::SALOME_Exception); diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index f6beb92d5..b47ae9b19 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -3467,6 +3467,25 @@ SMESH::EntityType SMESH_Mesh_i::GetElementGeomType( const CORBA::Long id ) return ( SMESH::EntityType ) e->GetEntityType(); } +//============================================================================= +/*! + * + */ +//============================================================================= + +SMESH::GeometryType SMESH_Mesh_i::GetElementShape( const CORBA::Long id ) + throw (SALOME::SALOME_Exception) +{ + if ( _preMeshInfo ) + _preMeshInfo->FullLoadFromFile(); + + const SMDS_MeshElement* e = _impl->GetMeshDS()->FindElement(id); + if ( !e ) + THROW_SALOME_CORBA_EXCEPTION( "invalid element id", SALOME::BAD_PARAM ); + + return ( SMESH::GeometryType ) e->GetGeomType(); +} + //============================================================================= /*! * Returns ID of elements for given submesh diff --git a/src/SMESH_I/SMESH_Mesh_i.hxx b/src/SMESH_I/SMESH_Mesh_i.hxx index 2615bef48..7b1fdc473 100644 --- a/src/SMESH_I/SMESH_Mesh_i.hxx +++ b/src/SMESH_I/SMESH_Mesh_i.hxx @@ -368,6 +368,9 @@ public: SMESH::EntityType GetElementGeomType( CORBA::Long id ) throw (SALOME::SALOME_Exception); + SMESH::GeometryType GetElementShape( CORBA::Long id ) + throw (SALOME::SALOME_Exception); + /*! * Returns ID of elements for given submesh */