[vtk-developers] easy way to delete points

David Doria daviddoria at gmail.com
Wed Jul 27 09:45:41 EDT 2011


On Wed, Jul 27, 2011 at 9:28 AM, Huang, Ming-Ern (MU-Student) <
mhuang at mail.mizzou.edu> wrote:

>  Is there an easy way to delete points from a mesh.  I read data from PLY
> file format.
>
> I just want to get rid of the faces that use the point.  The current way
> I'm using is reading the file that's
>
> in PLY format into a vertices array and a faces array
>
>
>
> and then using pointpicker to pick the point.  And then getting the point.
>
> Then I try to find which point on the mesh was picked.
>
> Then I try to eliminate all the faces that use that point.
>
> Then rewrite the PLY file.
>
> Then read the PLY file back into vtkPLYReader.
>
>
>
> This seems way too much effort.
>
>
>
> Is there a library I can use that will do this for me?
>

This doesn't have anything to do with the PLY format. Once you use the
vtkPLYReader, you now have a vtkPolyData and the question becomes how to do
these operations on a vtkPolyData.

You can use a functionality of vtkExtractSelection for this purpose:

http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/ExtractCellsUsingPoints

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20110727/38b9f4b3/attachment.html>


More information about the vtk-developers mailing list