- alreadyCopied = 0;
- int i = 0;
- while ( i < oldCellSize )
- {
- // skip a hole if any
- while ( i < oldCellSize && this->Types->GetValue(i) == VTK_EMPTY_CELL )
- ++i;
- int startBloc = i;
- // look for a block end
- while ( i < oldCellSize && this->Types->GetValue(i) != VTK_EMPTY_CELL )
- ++i;
- int endBloc = i;
- if ( endBloc > startBloc )
- copyBloc(newTypes,
- idCellsOldToNew, idNodesOldToNew,
- newConnectivity, newLocations,
- pointsCell, alreadyCopied,
- startBloc, endBloc);
- }
- newConnectivity->Squeeze();
+ copyBloc(newTypes, idCellsNewToOld, idNodesOldToNew,
+ newConnectivity, newLocations, pointsCell );