[vtkusers] vtkPoints Adding too many points?

Ambar C ambarc at gmail.com
Fri Nov 19 01:14:54 EST 2010


David's solution takes it. I tried it a little after I sent the email
out - seems to be a more intelligent assignment.

On Tue, Nov 16, 2010 at 4:50 AM, David Doria <daviddoria at gmail.com> wrote:
> 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