[vtkusers] delete vertex from mesh

David Doria daviddoria at gmail.com
Thu Oct 27 08:52:16 EDT 2011


On Thu, Oct 27, 2011 at 6:48 AM, rima4 <rima.sb4 at gmail.com> wrote:
> hi all
>  what i'm trying to do is defining points inside et outside an object and i
> just want simply  to eliminate those points who are outside, i tried this
> code but when t run it it makes a bug:
>
>
>  double pcoords[3], weights[3];
>
>  vtkIdType cellId;
>  int subId;
>  cellId = df->GetOutput()->FindCell(E, NULL, 0, .1,subId, pcoords,
> weights);
>  if (cellId>=0)
>    {
>    std::cout << "inside" << std::endl;
>    }
>  else
>    {
>    std::cout << "outside" << std::endl;
>        epol->DeleteCell(cellId);
>          }
> }
>
>
>
> can someone help me please?

Maybe these examples will help?

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

David



More information about the vtkusers mailing list