Prabhu Ramachandran a écrit :
> On Tuesday 12 July 2011 10:14 PM, pellegrini wrote:
>> def pickupatoms(self):
>>      e = tvtk.ExtractSelectedFrustum()
>>      e.set_input(0, pts.mlab_source.dataset)
>>      e.frustum = scene.interactor.picker.frustum
>>      o = e.get_output(0)
>>      print o.points
>>
>> as far as I understood 'o.points' should return the points inside my
>> selected area. However, it is always equal to None.
>> By the way is pts.mlab_source.dataset an object of type 'vtkDataObject'
>> ?  I ask this question because in the only example
>> of ExtractSelectedFrustum I could find on the web, the guys were using
>
> Yes, it is, try this::
>
>  pts.mlab_source.dataset.is_a('vtkDataObject')
>
>> 'scene.engine.scenes[0].children[0].data' as an input for the 
>> set_input method. What would be the equivalent
>> in my case ?
>
> You might what to do ::
>
>  e.update()
>
> before you get the output, to see if that helps.
>
> cheers,
> prabhu
Great !!! That seems to work !

I broke my unefficiency record: 4 hours on a problem that was solved in 
one line ... !

thanks a lot Prabhu

Eric



-- 
Eric Pellegrini
Calcul Scientifique
Institut Laue-Langevin
Grenoble, France


------------------------------------------------------------------------------
AppSumo Presents a FREE Video for the SourceForge Community by Eric 
Ries, the creator of the Lean Startup Methodology on "Lean Startup 
Secrets Revealed." This video shows you how to validate your ideas, 
optimize your ideas and identify your business strategy.
http://p.sf.net/sfu/appsumosfdev2dev
_______________________________________________
MayaVi-users mailing list
MayaVi-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mayavi-users

Reply via email to