[vtkusers] vtkPolyDataNormals: normals pointing in the wrong direction

David Doria daviddoria at gmail.com
Sun Jul 24 00:25:16 EDT 2011


2011/7/24 Miguel Sotaquirá <msotaquira at gmail.com>:
> Hi!
> I'm using vtkPolyDataNormals to obtain point normals on my mesh. The idea is
> to use these normals to compute curvatures using polynomial fitting.
> The problem is that vtkPolyDataNormals is not giving me the correct normal
> orientations for all vertices. Here's an example image:
> http://tinypic.com/r/2dv7l36/7
> as you can see, for now I'm using a synthetic, perfectly regular noiseless
> mesh!
> Here's my code for computing normals:
> vtkSmartPointer<vtkPolyDataNormals> normals =
> vtkSmartPointer<vtkPolyDataNormals>::New();
> normals->SetInput( meshdata->polydata );
> normals->SplittingOff();
> normals->ComputePointNormalsOn();
> normals->ComputeCellNormalsOff();
> normals->Update();
> Thanks,
> Miguel

I don't think there is any guarantee that normals computed by
vtkPolyDataNormals are consistently oriented. A note to this effect
should be added to the documentation.

We wrote a EMST based normal orientation as a VTK filter here, it
might be what you're looking for:

http://www.midasjournal.org/browse/publication/708

David



More information about the vtkusers mailing list