Questions tagged [pvpython]

pvpython is the version of python bundled with the paraview plotting package

pvpython is a version of the python programming language that is bundled with the paraview data visualization software. It is a full implementation of python with additional modules builtin (e.g. numpy, scipy, paraview)

20 questions
6
votes
2 answers

Add a datafile type reader to paraview using pvpython

I'm aware that you can add readers for different datafile types to paraview, however, that all talks about doing a bunch of VTK stuff in c++ and (maybe worse) re-compiling paraview to make it aware of your datafile format. On the other hand,…
mgilson
  • 300,191
  • 65
  • 633
  • 696
5
votes
1 answer

How to show vtkUnstructuredGrid in python script based on paraview?

I install paraview 5.6 on my Ubuntu 18.04 system and I want to write a python script to show a vtkUnstructuredGrid. import numpy as np from paraview.simple import * import paraview.vtk as vtk from paraview.vtk.numpy_interface import dataset_adapter…
Huayi Wei
  • 829
  • 1
  • 7
  • 16
3
votes
1 answer

How to save a slice of a 3D vtk file

Good morning, I would like to use pvpython to make a slice of a 3D volume inside a VTK file and then I'd want to save this image (possibly with a symmetric color palette centered in white). To be specific, I'd want to make with python the following…
1
vote
1 answer

Paraview rescaling colour scheme to visible data in range in Python

I have an automated clip script which i run and as a part of it I would like to have and option to rescale the colour scheme to visible data in range - boolean. I have found this command clipDisplay.SetScalarBarVisibility(renderView1, True) in the…
1
vote
0 answers

Is there a way to create a conda virtual environment with a custom python (by specifying a path to python interpreter, not only python version)?

I am trying to create a virtual environment with /usr/local/bin/pvpython interpreter (used with ParaView). As from conda documentation it seems that only python version can be changed (and not the path to python), at first I tried to use virtualenv…
Gosia
  • 11
  • 2
1
vote
1 answer

How do I open the paraview GUI with pvpython?

I generate a Paraview python script by using Tools -> Start trace. This records a set of steps I carry out using the Paraview GUI. I can run this script fine from the GUI with Tools -> Python Shell But if I try to run the script from command line…
DJames
  • 571
  • 3
  • 17
0
votes
1 answer

How do I change python encoding to execute pvpython?

I am trying to execute pvpython (from ParaView) in Linux. The problem is that when I try to execute pvpython by typing python2 -i $HOME/Downloads/ParaView-5.10/bin/pvpython I get an error: SyntaxError: Non-ASCII character '\x84' in file pvpython…
gioggior
  • 13
  • 5
0
votes
1 answer

Plot Over Line with pvpython

Good afternoon, I am trying to use the filter "Plot Over Line" of Paraview in a Python script. Basically, I want to: Open the file ".vtu"; Use the filter PlotOverLine for the velocity; Save the data in a ".csv" file. On internet, I found a…
0
votes
1 answer

How can I use SaveData to write an ASCII file in ParaView 3.98.1?

I am writing an automation script for an old project and I need some help with pvpython from Paraview 3.98.1. The function SaveData() in this version does not exist. I found its implementation here and moved it to my code. How can I save a file as…
ACR
  • 81
  • 1
  • 7
0
votes
1 answer

Paraview PVpython running subscript from master script - relative path

I've got master script for PVPython which runs about 3-5 subscripts. Apart from aguments I always have to specify the subscript path in order to run it like this: '/home/username/Documents/MainFolder/Subscripts/subscript1.py' Is there a way to get…
0
votes
1 answer

Paraview python 'Zoom to Box'

I am trying to make a script which does basically what tool 'Zoom to Box' does. Track option is out of question as it doesn't track camera movement. I've found this online, fixed it to work, but keep getting '3d cam position is yet TODO' This is…
0
votes
1 answer

Paraview clip/slice filter "show plane" in python

I am trying to untick "show plane" using python but I didn't find any working solution. Is there some command for it? Found this: https://public.kitware.com/pipermail/paraview/2011-July/022283.html, but trace option doesn't track ticking the "show…
0
votes
1 answer

Unable to render something with pvpython (paraview)

I'm new on paraview, and I want to make a script that render a vtk file, using only pvpython. Therefore, I wrote this script from paraview.simple import * from paraview.vtk.vtkFiltersSources import…
lufydad
  • 225
  • 2
  • 8
0
votes
1 answer

Passing very long list as sys.argv (pvpython to python)

Error: OSError: [Errno 7] Argument list too long History: Running a script on pvpython (vtk); however on older distributions pvpython < 5.0, the matplotlib modules are obsolete, thus making the use of that module not possible. To overcome this,…
Aly Abdelaziz
  • 292
  • 4
  • 24
0
votes
1 answer

Paraview not releasing control back to Shell

I have a GUI containing several buttons to launch paraview and display specific results in it. Each button push calls a bat file in the shell containing a call to a python script file, itself containing the data to plot. This is what the .bat file…
1
2