Pierre, First thing first. The code inside the Programmable Filter script runs in a context in which it is aware of VTK only and not ParaView, so you cannot use paraview.simple module functions such as Clip. Instead, you would need to use a VTK-equivalent. In this case, you would use vtkClipDataSet:
import vtk plane = vtk.vtkPlane() plane.SetOrigin(-4.0, 0.0, 0.0) plane.SetNormal(1.0, 1.0, 1.0) clip = vtk.vtkClipDataSet() clip.SetClipFunction(plane) clip.SetInputData(input) clip.Update() Next, to use the output of the clip filter as the output of the Programmable Filter, do the following. self.GetOutput().ShallowCopy(clip.GetOutput()) Make sure you change the Output Data Set Type to vtkUnstructuredGrid if you go this way. Hope that helps, Cory On Wed, Jan 11, 2017 at 8:49 AM, Crepier, Pierre <[email protected]> wrote: > Hi everyone, > > > > I am trying to use the programmable filter to combine multiple filters. > Sort of like the custom filter but I want to have control over some of the > properties using user input. > > > > If I understood correctly, I can get the input data with: > > input = self.GetInputDataObject(0, 0) > > > > then I can use this input in a filter: > > xMin = Clip(Input=input) > > xMin.ClipType = 'Plane' > > xMin.Crinkleclip = 1 > > xMin.ClipType.Origin = [-4.0, 0.0, 0.0] > > xMin.ClipType.Normal = [1.0, 0.0, 0.0] > > > > Now, how can I use the output of this filter as output of my programmable > filter ? > > > > Thanks in advance, > > Pierre > > ir. Pierre Crepier | Project Manager Ships | CFD > MARIN | T +31 317 49 34 75 <+31%20317%20493%20475> | [email protected] | > www.marin.nl > > [image: LinkedIn] <https://www.linkedin.com/company/marin> [image: > YouTube] <http://www.youtube.com/marinmultimedia> [image: Twitter] > <https://twitter.com/MARIN_nieuws> [image: Facebook] > <https://www.facebook.com/marin.wageningen> > MARIN news: Modelling natural transition on hydrofoils for application in > underwater gliders > <http://www.marin.nl/web/News/News-items/Modelling-natural-transition-on-hydrofoils-for-application-in-underwater-gliders-1.htm> > > > _______________________________________________ > 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.
_______________________________________________ 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
