[vtkusers] Picking actors from an assembly

Koteswara Rao Ruvva ruvva at yahoo.com
Sat Feb 24 00:16:21 EST 2018


 Todd, GetActor() returns None, but GetAssembly() returns the picked assembly. Looks like I am missing something. Thank you.

    On Friday, February 23, 2018, 12:55:44 AM PST, Todd via vtkusers <vtkusers at vtk.org> wrote:  
 
 Hi Rao
vtkPropPicker inherits from vtkAbstractPropPicker, so, following your own code example, you can just use picker.GetActor()
It's documented herehttps://www.vtk.org/doc/nightly/html/classvtkPropPicker.html


On 23 Feb 2018 8:49 p.m., Koteswara Rao Ruvva via vtkusers <vtkusers at vtk.org> wrote:

 Thank you for responding, Todd.
First of all, I cannot instantiate vtkAbstractPropPicker, as it is abstract type. I appreciate if you can send me some sudo code. BTW, I moved from vtk7.1.1 to 8.1.0.
Thank youRao
    On Wednesday, February 21, 2018, 11:25:07 PM PST, Todd via vtkusers <vtkusers at vtk.org> wrote:  
 
 vtkAbstractPropPicker.GetActor() in vtk 8

On 22 Feb 2018 7:02 p.m., Koteswara Rao Ruvva via vtkusers <vtkusers at vtk.org> wrote:

Hello all,
I have two vtkPropAssemblies in the Renderer, each with couple of vtkActors. How do I pick an actor using mouse? I need to find the actor and the location on the actor. I tried the following code, but I am getting an assembly instead of the actor.
picker = vtk.vtkPropPicker()if picker.Pick(mouseX, mouseY, 0,  renderer):        prop = picker.GetPath().GetFirstNode().GetViewProp()
        print(prop)     
Please advise.
Thank youRao


_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
  

_______________________________________________
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

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://vtk.org/mailman/listinfo/vtkusers
  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://vtk.org/pipermail/vtkusers/attachments/20180224/514273ed/attachment.html>


More information about the vtkusers mailing list