Xavier, The runtime error is troubling. I suspect there may be a problem or incompatibility with a shared library on your system.
If you wanted to debug further, you could try downloading Dependency Walker [1] and load paraview.exe with it. It should show you the DLLs ParaView is trying to load. I wonder if ParaView is trying to load a Python other than the one it ships with? HTH, Cory [1] http://www.dependencywalker.com/ On Thu, Aug 31, 2017 at 2:32 AM, Xavier Garnaud <[email protected]> wrote: > 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 <[email protected]> > 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 <[email protected]> >> 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. >> > > -- Cory Quammen Staff R&D Engineer Kitware, Inc.
_______________________________________________ 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
