[vtk-developers] Generated normals not present in the polydata from unknown reason.

Bill Lorensen bill.lorensen at gmail.com
Fri Apr 20 10:33:45 EDT 2012


Try
normalGenerator-Update();
before
polydata = normalGenerator->GetOutput();


On Fri, Apr 20, 2012 at 10:30 AM, Jana Sefcikova <neollie at gmail.com> wrote:
> Dear Users,
> I tested vtk example PolyDataExtractNormals
> (http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataExtractNormals)
> code that tries to detect whether normals are present in input polydata
> structure and if not it will generate them. I made small change to code  at
> the end of the main function in order to run TestPointNormal twice so I have
> :
>
>   std::cout << "PolyData address: " << polydata << std::endl;
>   TestPointNormals(polydata);
>
>   TestPointNormals(polydata);
>
> I expected that after first round the polydata will be changed and will
> contain new array for "Normals"  because output of normal generator is
> assigned to input polydata in the first round / polydata =
> normalGenerator->GetOutput(); /
> so second  test round should pass directly without normal generation.
> But after the firt test, polydata normals are not present any more so second
> Test generate them  again .
> So my question is : Why normals dissapeared ?
> The same confusion for me occured when I enabled splitting on normal
> generator (normalGenerator->SetSplitting(1);).  Inside first
> TestPointNormals polydata had more points as before at the end (due to
> splitting), but second test again work on likely unchanged polydata.
>
> Why two functions working on the same pointer that is changed inside each
> call looks unchanged ?
>
> Thanks for any advice.
>
>
>
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>



-- 
Unpaid intern in BillsBasement at noware dot com



More information about the vtk-developers mailing list