Hi Goodwin,<div><br></div><div>The filter vtkSelectPolyData doesn't require a closed loop to select the region inside/outside the polygonal mesh? In my case I actually don't have a closed contour, just a freehand line obtained using vtkContourWidget.</div>
<div><br></div><div>I was checking the documentation and there's this vtkImplicitSelectionLoop that would be useful, although - again - it seems that only works with closed contours. Isn't there something similar to vtkImplicitSelectionLoop but that works with open selections?</div>
<div><br></div><div>Thanks again!</div><div>Miguel<br><br><div class="gmail_quote">On Tue, May 22, 2012 at 8:16 AM, Goodwin Lawlor <span dir="ltr"><<a href="mailto:goodwin.lawlor.lists@gmail.com" target="_blank">goodwin.lawlor.lists@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hi Miguel,<br><br>Try out this pipeline:<div>(in Tcl but it's the same idea in any language)</div><div>
<br> vtkPoints selectionPoints<br> selectionPoints InsertNextPoint 1.0 1.0 1.0<br># etc...<br><br>
vtkSelectPolyData select<br> select SetLoop selectionPoints<br># connect your data here<br> select SetInputConnection [mydataFilter GetOutputPort]<br> select GenerateSelectionScalarsOn<br> select SetSelectionModeToLargestRegion;<br>
<br> vtkClipPolyData selectclip<br> selectclip SetInputConnection [select GetOutputPort]<br> selectclip SetValue 0.0</div><div><br></div><div>It's not 100% robust but works for most meshes that have well behaved topology...</div>
<div><br></div><div>hth</div><div><br></div><div>Goodwin</div><div><div><br><div class="gmail_quote"><div><div class="h5">On Tue, May 22, 2012 at 4:45 AM, Miguel Sotaquira <span dir="ltr"><<a href="mailto:msotaquira@gmail.com" target="_blank">msotaquira@gmail.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">Hi everyone!<div><br></div><div>I have a 3D manifold mesh and I want to be able to cut it using a freehand (drawn by user) contour. An example of such a mesh and the contour drawn by the user is shown in this image: <a href="http://postimage.org/image/sbnmcoodj/" target="_blank">http://postimage.org/image/sbnmcoodj/</a>. By cutting I mean generating a 3D surface from the freehand contour and then splitting the mesh in two parts.</div>
<div><br></div><div>Up to this point I've came up with this workflow for generating the freehand contour: vtkContourWidget -> vtkPolygonalSurfacePointPlacer. With this approach I'm able to draw the contour on the polydata mesh (see previous figure) and extract the set of contour point coordinates.</div>
<div><br></div><div>However I'm lost from this point:</div><div>- How to generate the 3D cutting surface?</div><div>- Which would be the most adequate class to perform the cutting: vtkClipPolyData, vtkCutter, vtkExtractPolyDataGeometry?</div>
<div>- In any of the previous classes I need a vtkImplicitFunction. How to define a vtkImplicitFunction using the 3D cutting surface?</div><div><br></div><div>Thanks for any suggestions,</div><div>Miguel</div>
<br></div></div>_______________________________________________<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></div></div></div>
</blockquote></div><br></div>