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
//purpose : Returns three components of normal of given mesh face.
//=======================================================================
-SMESH::double_array* SMESH_Mesh_i::GetFaceNormal(CORBA::Long elemId)
+SMESH::double_array* SMESH_Mesh_i::GetFaceNormal(CORBA::Long elemId,
+ CORBA::Boolean normalized)
{
if ( _preMeshInfo )
_preMeshInfo->FullLoadFromFile();
if ( SMESHDS_Mesh* mesh = _impl->GetMeshDS() )
{
gp_XYZ normal;
- if ( SMESH_MeshAlgos::FaceNormal( mesh->FindElement(elemId), normal, /*normalized=*/true ))
+ if ( SMESH_MeshAlgos::FaceNormal( mesh->FindElement(elemId), normal, normalized ))
{
aResult->length( 3 );
aResult[ 0 ] = normal.X();