<div>Hello,</div>
<div> </div>
<div>I have an unstructured grid. And what I want to do is get the points seperated by a specific distance along x and y axis. </div>
<div> </div>
<div><a href="http://www.vtk.org/doc/nightly/html/classvtkPolyDataPointSampler.html">http://www.vtk.org/doc/nightly/html/classvtkPolyDataPointSampler.html</a></div>
<div> </div>
<div>says that <em>&quot;</em><em>vtkPolyDataPointSampler</em><em> generates points from input </em><em>vtkPolyData</em><em>. The points are placed approximately a specified distance apart.&quot;</em></div>
<div><em></em> </div>
<div>So what I did was, I converted the unstructured grid to a polydata, using vtkGeometryFilter as shown below:</div>
<div> </div>
<div>vtkSmartPointer&lt;vtkGeometryFilter&gt; gf = vtkSmartPointer&lt;vtkGeometryFilter&gt;::New();</div>
<div>gf-&gt;SetInput(ugrid);</div>
<div> </div>
<div>vtkSmartPointer&lt;vtkPolyDataPointSampler&gt; pds = vtkSmartPointer&lt;vtkPolyDataPointSampler&gt;::New();</div>
<div>pds-&gt;SetInputConnection( gf-&gt;GetOutputPort());</div>
<div>pds-&gt;SetDistance(0.8);</div>
<div>pds-&gt;Update();</div>
<div> </div>
<div>vtkSmartPointer&lt;vtkPolyDataMapper&gt; mapp = vtkSmartPointer&lt;vtkPolyDataMapper&gt;::New();</div>
<div>mapp-&gt;SetInputConnection( pds-&gt;GetOutputPort());</div>
<div> </div>
<div>... /* Create an actor and add it to the renderer */</div>
<div> </div>
<div>Now the thing is in my test case data, the total number of node points in unstructured grid is say, 61,240. Even after sampling it produces the same number of points. I was expecting it to reduce the number of points. And if I decrease the distance, the number of points increases and also the distance between two successive points are not same. </div>

<div> </div>
<div>Can any one tell where I&#39;ve gone wrong? Or whether my understanding of the use of vtkPolyDataPointSampler is not correct?</div>
<div> </div>
<div>Thanks in advance</div>
<div> </div>
<div>Regards</div>
<div> </div>
<div>Rakesh Patil</div>