<div dir="ltr"><div>Hello everyone. I'm new with VTK and I'm working on a visualization interface. I need some help.</div><div><br></div><div><div>Input: I have a vtkUnstructuredGrid with one Point Array Data called "Displacements"</div><div><br></div><div>Point 1: I would like to clip this ugrid with a Plane. Then, display the resulting clipped data. <br></div><div><br></div><div>Point 2: On the other hand, as the array is a 3d vector array that represents displacement, I want to display the mesh warped into the direction of the vectors (the points moved and the mesh deformed).</div><div><br></div><div>I can do both Point 1 and Point 2 on separate cases, but when I try to combine them, after Point 1, the array disappear from the output grid of vtkClipDataSet. </div><div>My objective is to see the clipped data displaced. </div><div><br></div><div>I attach an image on Paraview of what I would like to have (more or less).</div><div><br></div><div>I'm using VTK 5.10 under Windows 8.1 (64 bits).<br></div><div> </div><div>Thank you!.</div><div><br></div><div>PS: </div><div>Here is the relevant part of code. </div><div><br></div>/* omitted code that reads the model */<br>vtkSmartPointer<vtkUnstructuredGrid> model = reader->GetOutput();<br>// this shows that model has one point data array called "Displacements"<br>model->Print(std::cout); <br><br>// Plane to cut it<br>vtkSmartPointer<vtkPlane> plane = vtkSmartPointer<vtkPlane>::New();<br>plane->SetOrigin(0.0,0.0,0.0); plane->SetNormal(1,0,0);<br><br>// Clip data<br>vtkSmartPointer<vtkClipDataSet> clipDataSet = vtkSmartPointer<vtkClipDataSet>::New();<br>clipDataSet->SetClipFunction(plane);<br>clipDataSet->SetInputConnection(model->GetProducerPort());<br>clipDataSet->InsideOutOn();<br>clipDataSet->GenerateClippedOutputOn();<br><br>//PROBLEM HERE. The print shows that there aren't any arrays on the output data<br>clipDataSet->GetOutput()->Print(std::cout);</div><div><br>// Warp the data. <br>vtkSmartPointer<vtkWarpVector> warpingVector = vtkSmartPointer<vtkWarpVector>::New();<br>warpingVector->SetInput(clipDataSet->GetOutput());<br>warpingVector->Update();</div><div><br>// Filter the data because vtkFeatureEdges needs polydata as input<br>vtkSmartPointer<vtkGeometryFilter> outGeometryFilter = vtkSmartPointer<vtkGeometryFilter>::New();<br>outGeometryFilter->SetInput(warpingVector->GetOutput());<br><br>//Create a filter to only draw the boundaries of the displaced mesh<br>vtkSmartPointer<vtkFeatureEdges> drawOnlyBoundaries = vtkSmartPointer<vtkFeatureEdges>::New();<br>drawOnlyBoundaries->SetInputConnection(outGeometryFilter->GetOutputPort());<br></div><div>// configuration of drawOnlyBoundaries, it is not important<br>drawOnlyBoundaries->BoundaryEdgesOn(); drawOnlyBoundaries->ManifoldEdgesOff();<br>drawOnlyBoundaries->NonManifoldEdgesOff(); drawOnlyBoundaries->Update();<br><br></div><div>/* Here I omitted the code to display the mesh using clipDataSet->GetOutputPort() as input*/ <br>/* Also, the code to configure the mapper and actor using drawOnlyBoundaries as input */<div><br></div><div><div><br></div></div></div></div>