[vtkusers] AppendPolyData Problem

Secolas UA secolasua at gmail.com
Tue Jan 23 10:57:26 EST 2007


Hello!

I am importing a Vrml Model and i want to append to the same polydata the
polydata information of all the actors, but I have a problem when I do the
appendSet->Update(); the following message appears Unhandled exception at
0x004771b7 in Visualization_Tool.exe: 0xC00000FD: Stack overflow.

I think i'm doing everything right, so i'll put the relevant part of the
code hoping that someone will have a solution.

Thanks
Ricardo Seco
University of Aveiro

...
if (NumberOfActors >0)
    {
          // Obtenção dos actores da cena

        ActColection = ren1->GetActors();

        tmpData = (vtkPolyData *)
((vtkActor*)ActColection->GetLastActor())->GetMapper()->GetInput();

        appendSet->AddInput(tmpData);

        ActColection->InitTraversal();

        // Para cada iteração ...
        for (int i=0;i<NumberOfActors;i++)
        {
            auxiliar++;

            // Obter esse actor

            Act = ActColection->GetNextActor();

            if (Act!=NULL)
            {
                if (Act->GetMapper()!=NULL)
                {

printf("------------------------------------------------------------------
\n");

                    // Este código consoante o indice do actor
                    // que "engloba" o modelo torna-o ou não
                    // pickable. No caso de só existir um actor
                    // este é sempre pickable

                    if ((auxiliar==1) && (NumberOfActors>1))
                    {
                        Act->PickableOff();
                        Act->GetProperty()->SetOpacity(0.5);
                    }

                    // Vai buscar ao Mapper os dados poligonais
                    tmpData = (vtkPolyData* ) Act->GetMapper()->GetInput();

                    appendSet->AddInput(appendSet->GetOutput());

                    appendSet->AddInput(tmpData);

                    appendSet->Update(); //-> Stack OverFlow

                    polyData = (vtkPolyData* )appendSet->GetOutput();
...
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20070123/3e8c9e30/attachment.htm>


More information about the vtkusers mailing list