[vtkusers] Creating simple Polygon data

Ashika Umanga Umagiliya aumanga at biggjapan.com
Tue Sep 14 04:18:43 EDT 2010


Thanks alot Mirko.
That fixed it!

mirko heuegger wrote:
> Hello!
>
> On Tue, Sep 14, 2010 at 4:44 AM, Ashika Umanga Umagiliya
> <aumanga at biggjapan.com> wrote:
>   
>>  [cut]
>>
>>             //VTK: to VTK points
>>             vtkCrvPoints->InsertNextPoint(tmp->getX(),tmp->getY(),0.0);
>>             //VTK: add vertex to vtkCurve
>>             vtkCurve->GetPointIds()->SetId(ccount,ncount); //Crash Here!!!!!
>>     
>
> According to the documentation
> <http://www.vtk.org/doc/nightly/html/classvtkIdList.html#a7e1b87799a2b013b218350644a904efd>
> SetId requires memory allocation before using this command, this could
> be done over the SetNumberOfIds() command.
> Or you may use InsertId
> <http://www.vtk.org/doc/nightly/html/classvtkIdList.html#a0b601275c162f3637773650eef2bf755>,
> range checking and memory allocation will done automatically.
>
> hth
>
> mirko
>
>   




More information about the vtkusers mailing list