From bd84f5e2cde9e2f10e1706704b94bbb35803c5bd Mon Sep 17 00:00:00 2001 From: dmv Date: Mon, 8 Jun 2009 07:03:03 +0000 Subject: [PATCH] TC5.1.2: fatal error on 2D Mesh preview --- src/SMESH_I/SMESH_Gen_i.cxx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 ); -- 2.39.2