]> SALOME platform Git repositories - modules/visu.git/commitdiff
Salome HOME
Fix on regression: wrong elements calcultaion in method V3_2_6 V3_2_6pre5
authorenk <enk@opencascade.com>
Mon, 23 Apr 2007 13:16:23 +0000 (13:16 +0000)
committerenk <enk@opencascade.com>
Mon, 23 Apr 2007 13:16:23 +0000 (13:16 +0000)
MergeGeometryCellsAndDataOnAllPoints

src/CONVERTOR/VISU_MergeFilter.cxx

index 2b841cf193784b2e7320fa2339f20d948dbc8213..7489367773b7a142a02471adf7a3e6a7c615bb36 100644 (file)
@@ -586,13 +586,12 @@ namespace
         int aNewId = theOldId2NewIdPointsMap[aOldId];
         aNewPointIds->SetId(j,aNewId);
       }
-      const int aOldCellId = theElementIdsForCopy[aCellIndex];
-      theOutputUG->InsertNextCell(theInputUG->GetCellType(aOldCellId),
+      theOutputUG->InsertNextCell(theInputUG->GetCellType(aCellId),
                                   aNewPointIds);
 
-      *aOuputIDSPtr = aInputCellsMapperPointer[2*aOldCellId];
+      *aOuputIDSPtr = aInputCellsMapperPointer[2*aCellId];
       aOuputIDSPtr++;
-      *aOuputIDSPtr = aInputCellsMapperPointer[2*aOldCellId+1];
+      *aOuputIDSPtr = aInputCellsMapperPointer[2*aCellId+1];
       aOuputIDSPtr++;
       
       aNewPointIds->Delete();
@@ -780,26 +779,20 @@ VISU_MergeFilter
       anOutput->GetPointData()->ShallowCopy(aInputScalars->GetPointData());
       
       // Calculate output cells
-      int nbCells=0;
-      TSortedArray aCellIdsForCopy_fromCellMapper;
-      GetSortedArray(aGeometryCellMapper, aCellIdsForCopy_fromCellMapper);
-      nbCells = aCellIdsForCopy_fromCellMapper.size();
-      
       TSortedArray aCellIdsForCopy;
-      for(int i=0;i<nbCells;i++)
-        aCellIdsForCopy.push_back(anObj2VTKGeometryCellsMap[aCellIdsForCopy_fromCellMapper[i]]);
+      for(int i=0;i<aNbCells;i++)
+        aCellIdsForCopy.push_back(i);
       
       // copy cells to output
-      anOutput->Allocate(nbCells);
-      
+      anOutput->Allocate(aNbCells);
       
-      if(nbCells>0)
+      if(aNbCells>0)
         CopyElementsToOutput(anInput,
-                             nbCells,
+                             aNbCells,
                              aCellIdsForCopy,
                              anObj2VTKGeometryPointsMap,
                              anOutput);
-      
+
       return true;
     }
   }