[vtkusers] How to get normals??
David Doria
daviddoria+vtk at gmail.com
Wed Nov 11 15:50:11 EST 2009
On Wed, Nov 11, 2009 at 3:46 PM, renlishen <renlishen at gmail.com> wrote:
>
> Dear David
> thanks for your help.
> My question is how can I extract the point normal after I use
> vtkMarchingCubes.
> If I want to create a sphere using vtkMarchingCubes, I have no idea to get
> the point normal on it.
> I try to use vtkPolyDataNormals to compute normals, but I don't know how to
> get them...
> does anyone do me a favor?
>
> thanks!!
vtkMarchingCubes derives from vtkPolyDataAlgorithm, so the output is
definitely a PolyData. You should then directly be able to use either
of these examples (depending if the normals are stored with the points
or with the vertices (if there are vertices at all?)) to get the
normals:
http://www.vtk.org/Wiki/Add/Get_Normals_to/from_a_Cells_in_a_Polydata
http://www.vtk.org/Wiki/Add/Get_Normals_to/from_a_Points_in_a_Polydata
Let us know if you have any problems.
Thanks,
David
More information about the vtkusers
mailing list