[vtkusers] vtkPoints Adding too many points?

David Doria daviddoria at gmail.com
Tue Nov 16 07:50:14 EST 2010


On Tue, Nov 16, 2010 at 4:58 AM, Bill Chivas <billno123 at hotmail.com> wrote:
> The "GetNumberOfPoints()" method returns the "last_id + 1". It doesn't
> return the actual number of points.
> It does that because it supposes the points ids indexing is started from 0
> (zero).
> The only one that returns the actual number of points is the "points1" whose
> ids indexing is started from zero.
>
> Major problem for deleting a point (or cell)....you have to re-build
> grid...look at my problem...

To get the behavior I think you're looking for, try changing all of
the lines like:

points1->InsertPoint(0, 1, 4, 5);

to

points1->InsertNextPoint(1, 4, 5);

David



More information about the vtkusers mailing list