[Paraview] Building a programmable source based on existing sources

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Tue Feb 4 14:09:52 EST 2014


You can create a vtkArrowSource in the ProgrammableSource as follows:

from vtk.vtkFiltersSources import vtkArrowSource

Basically, you need to determine the VTK-Module in which that class is
provided and then import that module.

(if you're using versions less than 4.1, you may have to change the
import line to import from paraview.vtk.vtkFiltersSources)

Utkarsh

On Wed, Jan 29, 2014 at 9:18 PM, Richard Townsend
<townsend at astro.wisc.edu> wrote:
> Hi --
>
> Suppose I want to create a programmable source which draws a 3D (polygon) arrow between two user-specified points. Is there a way to leverage the already-existing arrow source to do this? Ideally, I'd like to take the polygons defined by the arrow source, adjust the vertex coordinates to position the arrow correctly, and return the result as the output of the programmable source. But I've not been able to figure out a sensible way to do this.
>
> cheers,
>
> Rich
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.paraview.org/mailman/listinfo/paraview


More information about the ParaView mailing list