[vtkusers] vtkCellArray insertion

Fred Fred stan1313 at hotmail.fr
Sat Sep 12 17:53:20 EDT 2009


There is probably something I did not understand in the management of vtkCellArray, despite I looked at the examples.
My code is below:

  printf("Before:\n");
  int npts, *sp;
  for (int st=0 ; stoutputLines->GetNumberOfCells() ; st++) {
    this->outputLines->GetCell(st, npts, sp);
    printf("st=%d npts=%d\n", st, npts);
  }
  this->outputLines->InsertNextCell(3);
  this->outputLines->InsertCellPoint(4);
  this->outputLines->InsertCellPoint(5);
  this->outputLines->InsertCellPoint(7);
  printf("After:\n");
  for (int st=0 ; stoutputLines->GetNumberOfCells() ; st++) {
    this->outputLines->GetCell(st, npts, sp);
    printf("st=%d npts=%d\n", st, npts);
  }

And the output here:

Before:
st=0 npts=98
After:
st=0 npts=98
st=1 npts=0

which means that my insertion has failed.
So where do I make a mistake?

_________________________________________________________________
Un avatar à votre image ? Créez votre mini-moi !
http://www.ilovemessenger.fr/minimize-me/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090912/d2ff84f2/attachment.htm>


More information about the vtkusers mailing list