<div dir="ltr">Hi David,<br><br>I&#39;ll try to explain again:<br><br>How I can calculate the normal at a specific point (id) on polydata.<br>I&#39;d like to visualize that normal too, so how to write that normal (as an arrow)?<br>
<br>this is what I use, but it doesn&#39;t write the normals:<br>void generateNormals(vtkPolyData* polydata)<br>{    <br><br>    // Generate normals<br>    vtkSmartPointer&lt;vtkPolyDataNormals&gt; normalGenerator = vtkSmartPointer&lt;vtkPolyDataNormals&gt;::New();<br>
    normalGenerator-&gt;SetInput(polydata);<br><br>    normalGenerator-&gt;ComputePointNormalsOn();<br>    normalGenerator-&gt;ComputeCellNormalsOff();<br>    normalGenerator-&gt;Update();<br> <br>    polydata = normalGenerator-&gt;GetOutput();<br>
    <br>    vtkPolyDataWriter* writer = vtkPolyDataWriter::New();<br>    writer-&gt;SetInput(polydata);<br>    writer-&gt;SetFileName(&quot;normals.vtk&quot;);<br>    writer-&gt;Write();<br>}<br><br><div class="gmail_quote">
On Sun, Mar 11, 2012 at 7:48 PM, David Doria <span dir="ltr">&lt;<a href="mailto:daviddoria@gmail.com">daviddoria@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5">On Sun, Mar 11, 2012 at 11:25 AM, Hila Hiler &lt;<a href="mailto:hilahiler@gmail.com">hilahiler@gmail.com</a>&gt; wrote:<br>
&gt; Hi All,<br>
&gt;<br>
&gt; How should I get and WRITE a normal of a specific point from polyData.<br>
&gt; The writing on .vtk file in order to examine what I got ...<br>
&gt;<br>
&gt; I use this example, but only three first normals set. and again, how I can<br>
&gt; write them?<br>
&gt; <a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataPointNormals" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/PolyDataPointNormals</a><br>
&gt;<br>
&gt;<br>
&gt; Thanks<br>
<br>
</div></div>I&#39;m not sure I understand your question, but if it is &quot;how do I write<br>
a PolyData to a file?&quot;, then the answer is:<br>
<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/WriteVTP" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/IO/WriteVTP</a><br>
<span class="HOEnZb"><font color="#888888"><br>
David<br>
</font></span></blockquote></div><br></div>