[vtkusers] Extract cells that contain all of selected points

David E DeMarle dave.demarle at kitware.com
Tue Jun 19 08:23:44 EDT 2012


I'm not aware of a filter that will do that. Hopefully someone else on
the list can point one out.

It should be fairly easy to write one, or to adapt
vtkExtractSelectedIds to do that. You just have to walk the cell list,
call GetCellPoints(cellId, point_list) on each cell, and flag the
cells for each every point in point_list is in your point selection.

David E DeMarle
Kitware, Inc.
R&D Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909


On Mon, Jun 18, 2012 at 3:26 PM, soheilghafurian
<soheilghafurian at yahoo.com> wrote:
> Hi everyone!
>
> I am extracting a part of a mesh by selecting the points I want and using
> vtkSelectionNode. The problem is that I want only those cells in which all
> of the points are selected, but selectionNode returns also cells which have
> at least one of the selected points, because I use
>
> selectionNode->GetProperties()->Set(vtkSelectionNode::CONTAINING_CELLS(),
> 1);
>
> If I don't use this line, the cells are not extracted and I will have only
> points, however I want a surface.
>
> Does anyone know how I should extract the cells in which all of the points
> are selected?
>
> Thanks a lot
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.com/Extract-cells-that-contain-all-of-selected-points-tp5713983.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers



More information about the vtkusers mailing list