[vtkusers] InsertNextCell memory allocation problem
Markus Louw
mlouw at unizar.es
Thu Jun 19 05:15:27 EDT 2003
Hi All
I think there is some kind of a memory allocation problem with
int vtkCellTypes::InsertNextCell(unsigned char type, int loc)
Using 4 differerent PolyData objects, I load the cells into each one by building up a
vtkCellArray. After inserting about 250 cells into the vtkCellArray for the 3rd vtkPolyData object, I get an error which says that the memory could not be written to.
vtkPoints *points = vtkPoints::New();
points->SetNumberOfPoints(Pset->size());
vtkCellArray *polys = vtkCellArray::New();
points->InsertPoint(i,x);
polys->InsertNextCell(3,tri);
I used to get a similar error for inserting points, which was fixed by setting the number of points beforehand, but
using
polys->Allocate(2000, 1000 );
beforehand doesn't help.
Has anyone come across this or are there any ideas?
Thanks
Markus
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20030619/a7bd27ad/attachment.htm>
More information about the vtkusers
mailing list