[vtkusers] Mesh cutting using freehand curve

Miguel Sotaquira msotaquira at gmail.com
Mon May 21 23:45:41 EDT 2012


Hi everyone!

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: http://postimage.org/image/sbnmcoodj/. By
cutting I mean generating a 3D surface from the freehand contour and then
splitting the mesh in two parts.

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.

However I'm lost from this point:
- How to generate the 3D cutting surface?
- Which would be the most adequate class to perform the cutting:
vtkClipPolyData, vtkCutter, vtkExtractPolyDataGeometry?
- In any of the previous classes I need a vtkImplicitFunction. How to
define a vtkImplicitFunction using the 3D cutting surface?

Thanks for any suggestions,
Miguel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120522/077f21e2/attachment.htm>


More information about the vtkusers mailing list