From: apo Date: Thu, 1 Sep 2005 05:50:51 +0000 (+0000) Subject: To introduce ID's mapping (improve MeshOnEntity ID's mapping) X-Git-Tag: BR-D5-38-2003_D2005-12-09~52 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c8e130d6fa7ea0f985b7d6733dc0ed1e0ed55c5f;p=modules%2Fvisu.git To introduce ID's mapping (improve MeshOnEntity ID's mapping) --- diff --git a/src/CONVERTOR/VISU_Convertor_impl.cxx b/src/CONVERTOR/VISU_Convertor_impl.cxx index 04f0d3bf..bfe9c21e 100644 --- a/src/CONVERTOR/VISU_Convertor_impl.cxx +++ b/src/CONVERTOR/VISU_Convertor_impl.cxx @@ -852,11 +852,9 @@ namespace aCellTypesArray->SetNumberOfComponents(1); aCellTypesArray->SetNumberOfTuples(aNbCells); - VISU::TID2ID& anElemObj2VTKID = theMeshOnEntity->myElemObj2VTKID; for(vtkIdType anID = 0; anID < aNbCells; anID++){ PrintCells(anID,aConnectivity,anArray[anID]); aCellTypesArray->SetValue(anID,(unsigned char)theGeom); - anElemObj2VTKID[theSubMesh->GetElemObjID(anID)] = anID; } vtkIdType *pts = 0, npts = 0; @@ -1489,9 +1487,12 @@ VISU_Convertor_impl const TGeom2SubMesh& aGeom2SubMesh = aMeshOnEntity->myGeom2SubMesh; TGeom2SubMesh::const_iterator anIter = aGeom2SubMesh.begin(); + + TID2ID& anElemObj2VTKID = aMeshOnEntity->myElemObj2VTKID; TSubMeshArr& aSubMeshArr = aMeshOnEntity->mySubMeshArr; aSubMeshArr.resize(aGeom2SubMesh.size()); - for(vtkIdType anID = 0; anIter != aGeom2SubMesh.end(); anIter++, anID++){ + + for(vtkIdType anID = 0, aCellID = 0; anIter != aGeom2SubMesh.end(); anIter++, anID++){ const vtkIdType& aGeom = anIter->first; PSubMeshImpl aSubMesh = anIter->second; const TVTKSource& aSource = aSubMesh->GetSource(); @@ -1499,6 +1500,10 @@ VISU_Convertor_impl GetCellsOnSubMesh(aSource,aMeshOnEntity,aSubMesh,aGeom); anAppendFilter->AddInput(aSource.GetPointer()); + vtkIdType aNbCells = aSource->GetNumberOfCells(); + for(vtkIdType aCell = 0; aCell < aNbCells; aCell++, aCellID++){ + anElemObj2VTKID[aSubMesh->GetElemObjID(aCell)] = aCellID; + } aSubMeshArr[anID] = aSubMesh; } aMeshOnEntity->myNamedPointCoords = aMesh->myNamedPointCoords;