From: apo Date: Thu, 25 Aug 2005 11:46:53 +0000 (+0000) Subject: To implement VTK to Object ID mapping X-Git-Tag: BR-D5-38-2003_D2005-12-09~105 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=7b9794157bc897149764065f44c75d7d8b9f8360;p=modules%2Fvisu.git To implement VTK to Object ID mapping --- diff --git a/src/CONVERTOR/VISU_Convertor_impl.hxx b/src/CONVERTOR/VISU_Convertor_impl.hxx index 5d513381..ae52155e 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.hxx +++ b/src/CONVERTOR/VISU_Convertor_impl.hxx @@ -208,11 +208,13 @@ namespace VISU //--------------------------------------------------------------- - typedef std::map TGeom2GaussSubMesh; + typedef std::vector TGaussSubMeshArr; + typedef std::map TGeom2GaussSubMesh; struct TGaussMeshImpl: virtual TGaussMesh, virtual TAppendFilter { TGaussMeshImpl(); + TGaussSubMeshArr myGaussSubMeshArr; TGeom2GaussSubMesh myGeom2GaussSubMesh; }; typedef SharedPtr PGaussMeshImpl; diff --git a/src/CONVERTOR/VISU_MedConvertor.cxx b/src/CONVERTOR/VISU_MedConvertor.cxx index 43b842de..358bad43 100644 --- a/src/CONVERTOR/VISU_MedConvertor.cxx +++ b/src/CONVERTOR/VISU_MedConvertor.cxx @@ -349,13 +349,23 @@ namespace }else{ PMEDGaussMesh aGaussMesh(new TMEDGaussMesh()); TGeom2GaussSubMesh& aGeom2GaussSubMesh = aGaussMesh->myGeom2GaussSubMesh; - - TGaussKey::const_iterator anIter = aGaussKey.begin(); - for(; anIter != aGaussKey.end(); anIter++){ - PMEDGaussSubMesh aGaussSubMesh(*anIter); - PMEDGauss aGauss = aGaussSubMesh->myGauss; - vtkIdType aVGeom = aGauss->myGeom; - aGeom2GaussSubMesh[aVGeom] = aGaussSubMesh; + { + TGaussKey::const_iterator anIter = aGaussKey.begin(); + for(; anIter != aGaussKey.end(); anIter++){ + PMEDGaussSubMesh aGaussSubMesh(*anIter); + PMEDGauss aGauss = aGaussSubMesh->myGauss; + vtkIdType aVGeom = aGauss->myGeom; + aGeom2GaussSubMesh[aVGeom] = aGaussSubMesh; + } + } + { + TGaussSubMeshArr& aGaussSubMeshArr = aGaussMesh->myGaussSubMeshArr; + aGaussSubMeshArr.resize(aGeom2GaussSubMesh.size()); + TGeom2GaussSubMesh::const_iterator anIter = aGeom2GaussSubMesh.begin(); + for(TInt anID = 0; anIter != aGeom2GaussSubMesh.end(); anIter++, anID++){ + const PGaussSubMeshImpl& aGaussSubMesh = anIter->second; + aGaussSubMeshArr[anID] = aGaussSubMesh; + } } aGaussMeshMap[aGaussKey] = aGaussMesh; theValForTime.myGaussMesh = aGaussMesh;