[vtkusers] How to get the facet normals from stl file

David Doria daviddoria at gmail.com
Fri Jun 17 09:17:39 EDT 2011


On Fri, Jun 17, 2011 at 9:06 AM, Samu <gaoxuanhui at foxmail.com> wrote:
> Hi all:
>     I have met a problem about reading the normals information from stl
> file. I search the mail list and find some people had met the same problem
> as I do, but the problem was left unsolved. Could anyone give any
> suggestions?
> Here is the copy of the mail list:
> Hi everyone:
>   Now I can get three points coodinates of the same one triangle facet
> by the help of Vladimir Lazunin. But I have another question that I cannot
> solve
> by myself. In stl file there is normal information of a triangle facet. I
> want to
>
> get normal information too. I searched the book of vtk user's guide and
> web,but I
>
> didnot find interface to get normal information of stl file in vtk. Could
> someone
> give any suggestions?

You should not think of it as getting normals from an STL file. You
should think about it as reading an STL file into a vtkPolyData, and
then getting normals from a vtkPolyData. If the normals aren't in the
vtkPolyData, then the STL reader is incomplete.

David



More information about the vtkusers mailing list