From ad61c4111d453e6ea39d7dab5dd6e31bb2da512d Mon Sep 17 00:00:00 2001 From: eap Date: Mon, 7 Feb 2011 13:11:11 +0000 Subject: [PATCH] Test case bugs/C2 Fix buildMeshGrille() by taking into account that element ID in smesh can't be less that 1 since the recent redesign. --- src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx index c679edd9b..7f23e4b45 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx @@ -970,7 +970,7 @@ bool DriverMED_R_SMESHDS_Mesh::buildMeshGrille(const MED::PWrapper& theWrapper, MED::TNodeCoord aMEDNodeCoord = aGrilleInfo->GetCoord(iNode); for(MED::TInt iDim=0;iDimAddNodeWithID(aCoords[0],aCoords[1],aCoords[2],(int)iNode); + aNode = myMesh->AddNodeWithID(aCoords[0],aCoords[1],aCoords[2],iNode+1); if (!aNode) { EXCEPTION(runtime_error,"buildMeshGrille Error. Node not created! "<<(int)iNode); } @@ -996,35 +996,35 @@ bool DriverMED_R_SMESHDS_Mesh::buildMeshGrille(const MED::PWrapper& theWrapper, res = false; EXCEPTION(runtime_error,"buildMeshGrille Error. Incorrect size of ids 2!="<AddEdgeWithID(aNodeIds[0], - aNodeIds[1], - iCell); + anElement = myMesh->AddEdgeWithID(aNodeIds[0]+1, + aNodeIds[1]+1, + iCell+1); break; case MED::eQUAD4: if(aNodeIds.size() != 4){ res = false; EXCEPTION(runtime_error,"buildMeshGrille Error. Incorrect size of ids 4!="<AddFaceWithID(aNodeIds[0], - aNodeIds[2], - aNodeIds[3], - aNodeIds[1], - iCell); + anElement = myMesh->AddFaceWithID(aNodeIds[0]+1, + aNodeIds[2]+1, + aNodeIds[3]+1, + aNodeIds[1]+1, + iCell+1); break; case MED::eHEXA8: if(aNodeIds.size() != 8){ res = false; EXCEPTION(runtime_error,"buildMeshGrille Error. Incorrect size of ids 8!="<AddVolumeWithID(aNodeIds[0], - aNodeIds[2], - aNodeIds[3], - aNodeIds[1], - aNodeIds[4], - aNodeIds[6], - aNodeIds[7], - aNodeIds[5], - iCell); + anElement = myMesh->AddVolumeWithID(aNodeIds[0]+1, + aNodeIds[2]+1, + aNodeIds[3]+1, + aNodeIds[1]+1, + aNodeIds[4]+1, + aNodeIds[6]+1, + aNodeIds[7]+1, + aNodeIds[5]+1, + iCell+1); break; default: break; -- 2.39.2