[Paraview] vtkClipDataSet in a programmable filter
Cory Quammen
cory.quammen at kitware.com
Wed Aug 30 13:38:26 EDT 2017
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.
More information about the ParaView
mailing list