Thanks Amy - I saw that initially but I thought it would only apply to the getCellNormals because it was dealing with edges and polygons and such, but it seems that it applies even to the getPointNormals.<br><br clear="all">
Thanks,<br><br>David<br>
<br><br><div class="gmail_quote">On Wed, Apr 29, 2009 at 2:07 PM, Amy Squillacote <span dir="ltr"><<a href="mailto:amylists@gmail.com">amylists@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Yes. From the vtkPolyDataNormals.h:<br>
<br>
// vtkPolyDataNormals is a filter that computes point normals for a polygonal<br>
// mesh. The filter can reorder polygons to insure consistent orientation<br>
// across polygon neighbors. Sharp edges can be split and points duplicated<br>
// with separate normals to give crisp (rendered) surface definition. It is<br>
// also possible to globally flip the normal orientation.<br>
//<br>
// The algorithm works by determining normals for each polygon and then<br>
// averaging them at shared points. When sharp edges are present, the edges<br>
// are split and new points generated to prevent blurry edges (due to<br>
// Gouraud shading).<br>
<br>
If there is a sharp angle between two adjacent faces, then the points<br>
they share will be duplicated so that the point normals are in the<br>
correct direction for the corresponding face.<br>
<br>
If you don't want duplicated points, you can call<br>
normalGenerator->SplittingOff();<br>
<br>
- Amy<br>
<div><div></div><div class="h5"><br>
<br>
On Thu, Apr 23, 2009 at 11:20 AM, David Doria <<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>> wrote:<br>
><br>
> Is there any reason points would be added in the following code?<br>
> cout << "Points before filter: " << polydata->GetNumberOfPoints() << endl;<br>
> vtkSmartPointer<vtkPolyDataNormals> normalGenerator = vtkSmartPointer<vtkPolyDataNormals>::New();<br>
> normalGenerator->SetInput(polydata);<br>
> normalGenerator->SetComputePointNormals(1);<br>
> normalGenerator->SetComputeCellNormals(0);<br>
> normalGenerator->Update();<br>
> polydata = normalGenerator->GetOutput();<br>
> cout << "Points after filter: " << polydata->GetNumberOfPoints() << endl;<br>
><br>
> The output is:<br>
> Points before filter: 502<br>
> Points after filter: 872<br>
><br>
> Thanks,<br>
><br>
> David<br>
><br>
</div></div>> _______________________________________________<br>
> Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
><br>
> Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
><br>
> Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
><br>
> Follow this link to subscribe/unsubscribe:<br>
> <a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
><br>
</blockquote></div><br>