Hi all,<div><br></div><div>I am using a vtkClipPolyData to clip a vtkPolyData with a sphere.</div><div><br></div><div>I need the two complementary parts of the clipping,</div><div><ul><li>first one generating the outside part of the sphere:</li>
</ul></div><div><div>vtkClipPolyData * l_clipper = vtkClipPolyData::New() ;</div><div>l_clipper->SetInput( myPolyDataToClip );</div><div>l_clipper->SetClipFunction( mySphereFunction );</div><div>l_clipper->Update();</div>
<div><br></div><div>vtkPolyData * l_outside = l_clipper->GetOutput();</div></div><div><ul><li>second one generating the inside part of the sphere:</li></ul></div><div><div>vtkClipPolyData *l_clipper = vtkClipPolyData::New() ;</div>
<div>l_clipper->SetInput( myPolyDataToClip );</div><div>l_clipper->SetClipFunction( mySphereFunction );</div><div>l_clipper->GenerateClippedOutputOn();</div><div>l_clipper->Update();</div><div><br></div><div>
vtkPolyData * l_inside = l_clipper->GetClippedOutput();</div></div><div><br></div><div>Then, I am processing those generated vtkPolyData and especially their points using polydata->GetPoints(id, point[]).</div><div>
<br></div><div>The problem is that the second generated vtkPolyData does not only contain points that are inside the sphere but all points from the input vtkPolyData.</div><div><br></div><div>In display scene, no problem: clipped in + clipped away = original polydata.</div>
<div>But in terms of points the "clipped in" part contains points of the original polydata.</div><div><br></div><div>Is there any way to make the vtkPolyData containing only the points inside the sphere used for clipping ?</div>
<div><br></div><div>Thanks in advance.</div><div>Trystan</div>