[vtkusers] VTK Python Wrapper - Exporting Surface Plot

Cory Quammen cory.quammen at kitware.com
Tue Sep 12 10:18:49 EDT 2017


Hi Anthony,

To my knowledge, exporting plots is not supported, especially
exporting to an OBJ file, which is a geometry format.

What do you hope to achieve by importing into ParaView/VisIt? Could
you do your visualization in those tools to begin with?

- Cory

On Mon, Sep 11, 2017 at 1:59 PM, Alberti, Anthony Lewis
<albertia at oregonstate.edu> wrote:
> Hello all,
>
> I'm using VTK 8.0.1 and python 3.5 and am brand new to VTK. I am trying to
> export a surface plot using vtkPlotSurface.
>
> By referencing VTK-8.0.1/Charts/Core/Testing/Cxx/TestSurfacePlot.cxx I have
> successfully created a surface plot and have been able to render it in
> python (even though it doesn't really look like a surface plot) - see
> attached script.
>
> In order to better visualize what I've made, I wanted to try and export it
> and then visualize using Paraview/Visit. However, I'm struggling to find any
> concrete examples where this type of vtk object is exported...
>
> I have tried running the following:
> out = vtk.vtkOBJExporter()
> out.SetFilePrefix("test")
> out.SetInput(chart)
> out.Write()
>
> But end up with the following type error:
> TypeError: SetInput argument 1: method requires a vtkRenderWindow, a
> vtkContextView was provided.
>
> Can anyone provide assistance? Thanks in advance.
> -- Tony
>
>
>
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>



-- 
Cory Quammen
Staff R&D Engineer
Kitware, Inc.


More information about the vtkusers mailing list