title: Clip Unstructured grid and keep arrays data
body: <p>I'm trying to clip a vtkUnstructuredGrid using vtkClipDataSet. The problem is that after I clip, the resulting vtkUnstructuredGrid doesn't have the point/cells data (the arrays).</p>
  <p>This is my code:</p>
  <pre><code>vtkSmartPointer&lt;vtkUnstructuredGrid&gt; model = reader-&gt;GetOutput();
  // this shows that model has one point data array called &quot;Displacements&quot; (vectorial of 3 components)
  model-&gt;Print(std::cout); 
  
  // Plane to cut it
  vtkSmartPointer&lt;vtkPlane&gt; plane = vtkSmartPointer&lt;vtkPlane&gt;::New();
  plane-&gt;SetOrigin(0.0,0.0,0.0); plane-&gt;SetNormal(1,0,0);
  
  // Clip data
  vtkSmartPointer&lt;vtkClipDataSet&gt; clipDataSet = vtkSmartPointer&lt;vtkClipDataSet&gt;::New();
  clipDataSet-&gt;SetClipFunction(plane);
  clipDataSet-&gt;SetInputConnection(model-&gt;GetProducerPort());
  clipDataSet-&gt;InsideOutOn();
  clipDataSet-&gt;GenerateClippedOutputOn();
  
  //PROBLEM HERE. The print shows that there aren't any arrays on the output data
  clipDataSet-&gt;GetOutput()-&gt;Print(std::cout);
  </code></pre>
  <p>I need the output grid to have the arrays, because I would like to display the values on the resulting grid.
  For example, if the data are are scalars, I would like to display isovalues on the cutted mesh. If the data is vectorial, I would like to deform the mesh (warp) in the direction of the data vectors.</p>
  <p>Here I have an example on ParaView of what I would like to do. The solid is the original mesh and the wireframe mesh is the deformed one.
  <a href="https://i.stack.imgur.com/CZUVU.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/CZUVU.png" alt="Example of clipped data and the deformed mesh" /></a></p>
  <p>I'm using VTK 5.10 under C++ (Windows 8.1 64 bits, if that helps).</p>
  <p>Thank you!
  PS: I tried asking this on the VTKusers list, but I got no answer.</p>