[vtkusers] vtk python, point picker, UseCellsOff attribute error
David Gobbi
david.gobbi at gmail.com
Sun Nov 30 13:33:15 EST 2014
Hi Michael,
You say that you're interactor tries to pick a point first, and then if it
fails,
it tries to pick a cell? So you are using a vtkPointPicker for the first
part,
and a vtkCellPicker for the second part?
Do you have just one DataSet in the scene, or more than one? Is each
"point" in a vtkVertex cell?
Overall, I don't have a clear enough picture to give you much assistance.
I can say, however, that vtkPointPicker is not giving you cell points. In
VTK 6.1 the vtkPointPicker has no cell code in it whatsoever (you can
look at the code yourself to see that this is true).
- David
On Sun, Nov 30, 2014 at 10:18 AM, redmod79 <michael.j.redmond at gmail.com>
wrote:
> David, thank you for your reply.
>
> My current experience with the vtkPointPicker seems to indicate that the
> cell points are on by default. Or maybe something else fishy is going on.
>
> I have a finite element mesh with many elements - nodes, bars, tri's, and
> quads. My custom interactor style is set up to pick a node (point) or
> element (cell) when the mouse moves. It first tries a point, and if no
> point is selected, it tries a cell.
>
> When I have my mouse over the center of a cell, it selects the cell as
> desired. When my mouse is near the corner of the cell it selects a point
> (not desired). If I go near each corner of the cell it will select a point
> with id's 0, 1, 2, or 3, depending on the cell type and corner I'm in, but
> each corner has a unique id (0, 1, 2, or 3), which suggests to be it is
> selecting the cell points. The point doesn't get highlighted because the
> code is highlighting the raw point instead of the cell point. This
> behavior
> is the same for all cells in the mesh.
>
> If I put my mouse directly over the point, it will highlight the point
> correctly as desired. I'm not sure what to make of this if it isn't
> selecting the cell points.
>
> Thanks for your help.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20141130/843a2cb6/attachment.html>
More information about the vtkusers
mailing list