Miguel Sotaquira
2012-05-22 03:45:41 UTC
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
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