<div>Hi Tristan,</div>
<div> </div>
<div>You can use a vtkCleanPolyData with default settings on your output. It will remap the points to the topology you get from the clipping process.</div>
<div> </div>
<div>Best,</div>
<div>Julien<br><br></div>
<div class="gmail_quote">On Wed, Feb 8, 2012 at 2:11 PM, Trystan Louboutin <span dir="ltr"><<a href="mailto:tanstry@gmail.com">tanstry@gmail.com</a>></span> wrote:<br>
<blockquote style="BORDER-LEFT:#ccc 1px solid;MARGIN:0px 0px 0px 0.8ex;PADDING-LEFT:1ex" class="gmail_quote">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><span class="HOEnZb"><font color="#888888">
<div>Trystan</div></font></span><br>_______________________________________________<br>Powered by <a href="http://www.kitware.com/" target="_blank">www.kitware.com</a><br><br>Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>