From 4b559f750c48d55ebd8b361ab73e321ace51a4c8 Mon Sep 17 00:00:00 2001 From: enk Date: Mon, 23 Apr 2007 13:16:23 +0000 Subject: [PATCH] Fix on regression: wrong elements calcultaion in method MergeGeometryCellsAndDataOnAllPoints --- src/CONVERTOR/VISU_MergeFilter.cxx | 25 +++++++++---------------- 1 file changed, 9 insertions(+), 16 deletions(-) diff --git a/src/CONVERTOR/VISU_MergeFilter.cxx b/src/CONVERTOR/VISU_MergeFilter.cxx index 2b841cf1..74893677 100644 --- a/src/CONVERTOR/VISU_MergeFilter.cxx +++ b/src/CONVERTOR/VISU_MergeFilter.cxx @@ -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;iAllocate(nbCells); - + anOutput->Allocate(aNbCells); - if(nbCells>0) + if(aNbCells>0) CopyElementsToOutput(anInput, - nbCells, + aNbCells, aCellIdsForCopy, anObj2VTKGeometryPointsMap, anOutput); - + return true; } } -- 2.39.2