[vtkusers] Problems using vtkGenericClip
Bill Lorensen
bill.lorensen at gmail.com
Thu Apr 8 12:22:47 EDT 2010
You need to set a clip value with the
SetValue method.
On Thu, Apr 8, 2010 at 11:03 AM, Luca Penasa <luca.penasa at email.it> wrote:
> Hi everybody... I need some help...
>
> I have an unstructured grid called 'grid' and i want to extract some
> points using the vtkGenericClip function. As clip fuction i used a
> vtkSphere object... this is the code i wrote:
>
> sphere = vtkSphere()
> sphere.SetCenter(x_coord, y_coord, z_coord)
> sphere.SetRadius(radius)
>
> cutter = vtkGenericClip()
> cutter.SetClipFunction(sphere)
> cutter.SetInsideOut(0)
> cutter.SetInput(grid)
> cutter.Update()
>
> smallgrid = cutter.GetOutput()
> smallgrid.Update()
>
>
> after that 'cutter.GetNumberOfPoints()' always gives me 0 as result!!
> i cannot understend why...
> coordinates and radius of sphere are correctly set...
> 'smallgrid' object is an unstructured grid object as expected...
>
>
> thank you!!
>
>
>
> --
> ---------------------------
> Luca Penasa
> Student at Geosciences Dpt.
> University of Padua (IT)
> luca.penasa at email.it
> ---------------------------
>
>
>
> --
> Caselle da 1GB, trasmetti allegati fino a 3GB e in piu' IMAP, POP3 e SMTP autenticato? GRATIS solo con Email.it http://www.email.it/f
>
> Sponsor:
> Apri Conto Arancio entro il 28 febbraio 2010 e ricevi 50 Euro da spendere presso Media World. Aprilo adesso
> Clicca qui: http://adv.email.it/cgi-bin/foclick.cgi?mid=10034&d=8-4
> _______________________________________________
> 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