<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=ISO-8859-15">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    Hi,<br>
    <br>
    I have a Polydata object consisting of e.g. 8 points. I'd like to
    get more points on the object.<br>
    I tried it with a vtkPolyDataPointSampler.<br>
    This works fine with a sphere but it crashes with vtkPolyData.<br>
    <br>
    Has anyone an idea what the problem might be? Or any alternative
    idea?<br>
    Thanks in advance!<br>
    <br>
    Code:<br>
    <font color="#009900">//vtkSmartPointer&lt;vtkSphereSource&gt;
      sphereSource = vtkSmartPointer&lt;vtkSphereSource&gt;::New();<br>
      //    sphereSource-&gt;Update();</font><br>
    vtkSmartPointer&lt;vtkPolyData&gt; data =
    vtkSmartPointer&lt;vtkPolyData&gt;::New();<br>
       
    data-&gt;ShallowCopy(stlActor-&gt;GetMapper()-&gt;GetInputAsDataSet());<br>
        data-&gt;Update();<br>
    vtkSmartPointer&lt;vtkPolyDataPointSampler&gt; pointSampler = 
    vtkSmartPointer&lt;vtkPolyDataPointSampler&gt;::New();<br>
                pointSampler-&gt;SetDistance(.1);<br>
               
    pointSampler-&gt;SetInputConnection(data-&gt;GetProducerPort());<br>
               <font color="#009900">
/*pointSampler-&gt;SetInputConnection(sphereSource-&gt;GetOutputPort());*/</font><br>
                pointSampler-&gt;Update();  <font color="#ff0000">//It
      crashes here</font><br>
    int numpoints=pointSampler-&gt;GetOutput()-&gt;GetNumberOfPoints();<br>
  </body>
</html>