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();
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;
}
}