Correction of mistakes: 0022537: EDF 2877 SMESH : wrong information about the numbre of nodes with polyhedra

This commit is contained in:
mpa 2014-04-02 12:45:03 +04:00
parent dcc24a9c43
commit 22ea5ccafb
2 changed files with 44 additions and 45 deletions

View File

@ -74,7 +74,6 @@ SET(_link_LIBRARIES
${GEOM_GEOMObject}
SMESHFiltersSelection
SMDS
SMESHEngine
SMESHControls
SMESHObject
)

View File

@ -29,7 +29,7 @@
#include "SMDS_EdgePosition.hxx"
#include "SMDS_FacePosition.hxx"
#include "SMDS_Mesh.hxx"
#include "SMESH_Gen_i.hxx"
#include "SMDS_VolumeTool.hxx"
#include "SMESHDS_Mesh.hxx"
#include "SMESHGUI.h"
#include "SMESHGUI_FilterUtils.h"
@ -1855,17 +1855,17 @@ void SMESHGUI_TreeElemInfo::information( const QList<long>& ids )
while ( nodeIt->more() )
uniqueNodes.append( nodeIt->next() );
SMESH::SMESH_Mesh_ptr aMesh = actor()->GetObject()->GetMeshServer();
SMESH_Mesh_i* mesh_i = SMESH::DownCast< SMESH_Mesh_i* >( aMesh );
const int nbFaces = mesh_i->ElemNbFaces( e->GetID() );
for( int i = 0; i < nbFaces; i++ ) {
SMDS_VolumeTool vtool( e );
const int nbFaces = vtool.NbFaces();
for( int face_id = 0; face_id < nbFaces; face_id++ ) {
QTreeWidgetItem* faceItem = createItem( conItem, Bold );
faceItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "FACE" ) ).arg( i + 1 ).arg( nbFaces ) );
faceItem->setText( 0, QString( "%1 %2 / %3" ).arg( SMESHGUI_ElemInfo::tr( "FACE" ) ).arg( face_id + 1 ).arg( nbFaces ) );
faceItem->setExpanded( true );
SMESH::long_array_var anNodeIds = mesh_i->GetElemFaceNodes( e->GetID(), i );
for( CORBA::Long node_id = 0, n = anNodeIds->length(); node_id < n; node_id++ ) {
const SMDS_MeshNode* node = actor()->GetObject()->GetMesh()->FindNode( anNodeIds[node_id] );
const SMDS_MeshNode** aNodeIds = vtool.GetFaceNodes( face_id );
const int nbNodes = vtool.NbFaceNodes( face_id );
for( int node_id = 0; node_id < nbNodes; node_id++ ) {
const SMDS_MeshNode* node = actor()->GetObject()->GetMesh()->FindNode( aNodeIds[node_id]->GetID() );
nodeInfo( node, uniqueNodes.indexOf(node) + 1, aVtkVolume->NbUniqueNodes(), faceItem );
}
}