From: enk Date: Mon, 23 Apr 2007 13:16:23 +0000 (+0000) Subject: Fix on regression: wrong elements calcultaion in method X-Git-Tag: V3_2_6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=4b559f750c48d55ebd8b361ab73e321ace51a4c8;p=modules%2Fvisu.git Fix on regression: wrong elements calcultaion in method MergeGeometryCellsAndDataOnAllPoints --- 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; } }