From: dmv Date: Mon, 8 Jun 2009 07:03:03 +0000 (+0000) Subject: TC5.1.2: fatal error on 2D Mesh preview X-Git-Tag: V5_1_2rc2~7 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=bd84f5e2cde9e2f10e1706704b94bbb35803c5bd;p=modules%2Fsmesh.git TC5.1.2: fatal error on 2D Mesh preview --- diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index eb49db1b9..2e15edca3 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -1510,10 +1510,10 @@ SMESH::MeshPreviewStruct* SMESH_Gen_i::Precompute( SMESH::SMESH_Mesh_ptr theMesh if ( aNbNode > 4 ) aNbNode /= 2; // do not take into account additional middle nodes - SMDS_MeshNode* node1 = (SMDS_MeshNode*)face->GetNode( 1 ); - for ( int nIndx = 1; nIndx <= aNbNode; nIndx++ ) + SMDS_MeshNode* node1 = (SMDS_MeshNode*)face->GetNode( 0 ); + for ( int nIndx = 0; nIndx < aNbNode; nIndx++ ) { - SMDS_MeshNode* node2 = (SMDS_MeshNode*)face->GetNode( nIndx < aNbNode ? nIndx+1 : 1 ); + SMDS_MeshNode* node2 = (SMDS_MeshNode*)face->GetNode( nIndx+1 < aNbNode ? nIndx+1 : 0 ); if ( setOfEdge.insert( SMESH_TLink ( node1, node2 ) ).second ) { listOfElemType.push_back( SMDSAbs_Edge );