[Paraview] vtkClipDataSet in a programmable filter
Xavier Garnaud
xgarnaud at gmail.com
Thu Aug 31 02:32:10 EDT 2017
Dear Cory,
Thank you for your help.
In my case, this does not work and I get the following error message:
Traceback (most recent call last):
File "<string>", line 22, in <module>
File "<string>", line 12, in RequestData
TypeError: SetInputData argument 1: method requires a VTK object
Maybe it is related to the fact that when I create the first programmable
filter, I get this error message:
[image: Inline image 1]
I use Paraview 5.4.1 on windows (I get the same behavior with Paraview
5.3.0)
Best regards,
Xavier
On Wed, Aug 30, 2017 at 7:38 PM, Cory Quammen <cory.quammen at kitware.com>
wrote:
> This works for me in 5.4.1:
>
> import vtk
>
> plane = vtk.vtkPlane()
> plane.SetOrigin(0, 0, 0)
> plane.SetNormal(0, 1, 0)
>
> clip = vtk.vtkClipDataSet()
> clip.SetClipFunction(plane)
> clip.SetInputData(self.GetInput())
> clip.Update()
>
> self.GetOutput().DeepCopy(clip.GetOutput())
>
> Make sure you set the "Output Data Set Type" to "vtkUnstructuredGrid"
> before you first hit Apply. I believe there is a bug that does not let
> you change the output data set type after you first click Apply.
>
> HTH,
> Cory
>
> On Wed, Aug 30, 2017 at 10:27 AM, Xavier Garnaud <xgarnaud at gmail.com>
> wrote:
> > Dear all,
> >
> > I'd like to use the vtkClipDataSet in a programmable filter, but I can't
> > find it it paraview.vtk, and the function from vtk does not seem to
> work. (I
> > am using Paraview 5.2 or 5.4 on windows).
> > Is the function available, or is there another way to perform the clip?
> >
> > Best regards,
> >
> > Xavier
> >
> > _______________________________________________
> > 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 ParaView Wiki at:
> > http://paraview.org/Wiki/ParaView
> >
> > Search the list archives at: http://markmail.org/search/?q=ParaView
> >
> > Follow this link to subscribe/unsubscribe:
> > http://public.kitware.com/mailman/listinfo/paraview
> >
>
>
>
> --
> Cory Quammen
> Staff R&D Engineer
> Kitware, Inc.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170831/498a80e2/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 26979 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20170831/498a80e2/attachment.png>
More information about the ParaView
mailing list