[vtkusers] vtkPoints + InsertPoint

Bill Chivas noo134 at googlemail.com
Fri Mar 12 10:06:44 EST 2010


Thanks David.
I run it without crashing, too.
So, i think the problem is somewhere else ...

Thanks,
Bill

2010/3/12 David Doria <daviddoria+vtk at gmail.com <daviddoria%2Bvtk at gmail.com>
>

>  On Fri, Mar 12, 2010 at 9:36 AM, Bill Chivas <noo134 at googlemail.com>wrote:
>
>> To David:
>>
>> If it works with only two points, try to put some more (e.g. 10).
>> In mine, it crashes in 3 or 4 points.
>>
>>
> This runs without crashing for me:
>
> #include <vtkSmartPointer.h>
> #include <vtkPoints.h>
> #include <vtkMath.h>
>
> int main(int argc, char *argv[])
> {
>   vtkSmartPointer<vtkPoints> points =
>       vtkSmartPointer<vtkPoints>::New();
>
>   points->SetNumberOfPoints(61000000);
>
>   int start = 60983588;
>   for(unsigned int i = 0; i < 100; i++)
>     {
>     points->InsertPoint(start + i, vtkMath::Random(0.0,1.0),
> vtkMath::Random(0.0,1.0), vtkMath::Random(0.0,1.0));
>     }
>
>   return EXIT_SUCCESS;
> }
>
> Thanks,
>
> David
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20100312/b3fa528c/attachment.htm>


More information about the vtkusers mailing list