X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FDriverMED%2FDriverMED_R_SMESHDS_Mesh.cxx;h=8ef19313ce223aadd37de19612d9a82f39411cd2;hp=c679edd9bca473f2612d5a372ec83245abeeefe8;hb=2c607013a23bd4e7ba07e72e0c04dee2c1209cff;hpb=8fa039a796957b302d86d90b22afc0a998573f83 diff --git a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx index c679edd9b..8ef19313c 100644 --- a/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx +++ b/src/DriverMED/DriverMED_R_SMESHDS_Mesh.cxx @@ -1,23 +1,23 @@ -// Copyright (C) 2007-2010 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2011 CEA/DEN, EDF R&D, OPEN CASCADE // -// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, -// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS +// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN, +// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS // -// This library is free software; you can redistribute it and/or -// modify it under the terms of the GNU Lesser General Public -// License as published by the Free Software Foundation; either -// version 2.1 of the License. +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License. // -// This library is distributed in the hope that it will be useful, -// but WITHOUT ANY WARRANTY; without even the implied warranty of -// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -// Lesser General Public License for more details. +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// Lesser General Public License for more details. // -// You should have received a copy of the GNU Lesser General Public -// License along with this library; if not, write to the Free Software -// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// You should have received a copy of the GNU Lesser General Public +// License along with this library; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA // -// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com +// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com // // SMESH DriverMED : driver to read and write 'med' files @@ -145,7 +145,7 @@ DriverMED_R_SMESHDS_Mesh aResult = DRS_FAIL; continue; } - + aMeshInfo->myDim=aMeshInfo->mySpaceDim;//Bug correction to ignore meshdim in MEDFile because can be false. PCoordHelper aCoordHelper = GetCoordHelper(aNodeInfo); EBooleen anIsNodeNum = aNodeInfo->IsElemNum(); @@ -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;