Afraid not. One potential work around would be you build the
transformation matrix and set that on the camera. You can build the
matrix yourself by changing the order of rotations.
Utkarsh
On Fri, Nov 24, 2017 at 1:43 PM, Léo Pessanha
wrote:
> Thank you again for
Thank you again for your help, Utkarsh!
Your solution worked but it flicks a lot because of the gimbal lock, but I
believe I could not get rid of that. Right?
Thanks in advance!
Leonardo Pessanha
Laboratory of Computational Methods in Engineering
Federal University of Rio de Janeiro - COPPE
Rio
Leo,
To handle 90-degree pitch or elevation, do the following:
camera.Pitch(90)
camera.OrthogonalizeViewUp()
Render()
Utkarsh
On Tue, Oct 24, 2017 at 2:50 PM, Léo Pessanha
wrote:
> Thanks Utkarsh!
>
> This change would take a build right? Can't do it right now
Thanks Utkarsh!
This change would take a build right? Can't do it right now =/
My goal is to know what should I do after a
cameraInstance.Pitch(90)
>
and before a
Render()
>
In order not to get the warning
Resetting view-up since view plane normal is parallel
>
I've tried
Leo,
You can't access it in Python since the Python script is not run on the
server side. If your goal is to debug what thet camera is set to, you can
put cout's to print the camera in
`vtkCaveSynchronizedRenderers::HandleStartRender`. That's where the local
camera on each rank is "prepped" for
Hi!
I would like to know if there's a way to acess the information/attributes
of the cameras there are created trough a .pvx file
To acess the attributes in the camera of the active Layout/RenderView I do:
1 - Open Python Shell
2 - camera = GetActiveCamera()
3 - print(camera)
And the output
Hi Richard,
Since you didn't specify the version you are using I'm using 5.4-RC3 for
this answer. I loaded a dataset and ran the Python Trace (Tools -> Start
Trace) to find out what it is doing. Here is the python script that was
generated from changing what the dataset was colored by.
# get
Hey,
I have a python script that opens a Legacy VTK file that contains two
scalar arrays of the same length (real and imaginary part of a wave
function) and then adjusts the camera settings, representation and
color. My transfer functions seem to be ignored and I just get full
opacity and
Hi Cory,
Thank you so much! It works after specifying the fill path.
Best regards,
Enrique
On Nov 12, 2015, at 8:31 PM, Cory Quammen wrote:
> Hi Enrique,
>
> It looks like the writer is attempting to write to / and doesn't have
> permission to do so. Try specifying
Hi Enrique,
It looks like the writer is attempting to write to / and doesn't have
permission to do so. Try specifying the full path in the 'name' variable.
HTH,
Cory
On Thu, Nov 12, 2015 at 6:02 PM, Enrique Lizarraga-Garcia <
enriliz...@gmail.com> wrote:
> Hi all,
>
> I would like to automate
Hi all,
I would like to automate exporting csv files from countour of vtk files. I am
tracing the steps in paraview, but it somehow misses the last part,
saving/exporting as csv. When I do it manually, it saves n csv files, where n
is the number of blocks I have in my simulation. I have
I just submitted an account request for the paraview.org/Wiki.
Hopefully, once I have an account, I can add this myself... I want to
add some short documentation to the Python Scripting page, explaining if
you're trying to do multiple Render() calls in the same python session,
you must not
Hi,
I'd like to create a Python script for paraview that performs the following
actions
1. Inserts point probes at specified coordinates within the geometry
2. Extracts selected data from all the timesteps of the case and exports it
to an external file.
I have started traces and written scripts
Dear all,
I'm trying to handle the output of Histogram filter in my python
script. First I use extract selection to select a specified geometry of a
VTK file. Then, I apply the Histogram Filter. Now, I want to write the
outputs of Histogram in the external text file. The outputs of
Do you intend to write the data out as CSV? You can simply use the
CSVWriter as follows:
histogram1 =
SaveData('/tmp/sample.csv', proxy=histogram1)
Utkarsh
On Fri, Oct 16, 2015 at 11:23 AM, mohammadreza yaghoobi
wrote:
> Dear all,
>
> I'm trying
I'd recommend you use the Trace tools to see how to write the python code.
Get your data, apply the slice filter, and see how its arguments are set.
you'll end up with something like:
data = PhastaReader(FileName=view.pht)
Show(data)
slice = Slice(Input=data)
slice.SliceType = 'Plane'
Dear all,
I'm trying to use a Python script to slice a 3D model in multiple locations
and interrogate the values at these slices.
Is it possible to apply the slice with a plane? I.e. intersect the model
with a pre-defined plane?
I can load and view my data and a plane I've defined (see below),
Hello there,
I am trying to cook up a batch file for the visualization pipeline that I am
doing on ParaView GUI so that I can run that same sequence in batch mode and in
parallel using pvbatch. I can get most of the python script using the
Tool-Start Trace option on ParaView GUI. However,
I believe, the trace does not capture the inputs and the outputs. What you
can do instead, is take the output of trace, add code to it for input and
output and
run using pvpython.
On Thu, Apr 3, 2014 at 11:56 AM, Su, Simon M CTR USAF (US)
simon.m.su@mail.mil wrote:
Hello there,
I am
-- start python script --
try: paraview.simple
except: from paraview.simple import *
paraview.simple._DisableFirstRenderCameraReset()
Cone1 = Cone()
RenderView1 = GetRenderView()
DataRepresentation1 = Show()
DataRepresentation1.ScaleFactor = 0.1
, 2014 12:42 PM
To: Su, Simon M CTR USAF (US)
Cc: paraview@paraview.org
Subject: Re: [Paraview] ParaView python scripting - capture from ParaView GUI
-- start python script --
try: paraview.simple
except: from paraview.simple import *
paraview.simple
--
*From:* David E DeMarle [dave.dema...@kitware.com]
*Sent:* Thursday, April 03, 2014 12:42 PM
*To:* Su, Simon M CTR USAF (US)
*Cc:* paraview@paraview.org
*Subject:* Re: [Paraview] ParaView python scripting - capture from
ParaView GUI
-- start python script
in passing in your $0.02?
Thanks,
Alan
From: Andy Bauer [mailto:andy.ba...@kitware.com]
Sent: Tuesday, December 03, 2013 7:23 PM
To: Scott, W Alan
Cc: paraview@paraview.org
Subject: [EXTERNAL] Re: [Paraview] Python scripting question
Hmm, I'm not sure this is the proper way to do it since
Hi,
I have a user that is trying to delete all of the entries in the pipeline
browser, in a python script. I tried using the trace recorder, and that didn't
work. Does anyone have any idea what command would do this?
Thanks,
Alan
___
Powered by
Hmm, I'm not sure this is the proper way to do it since I get a warning but
it appears to work:
a = GetActiveSource() # requires a leaf of the pipeline tree to be selected
Delete(a)
The warning I get is:
ERROR: In
apply a CleanToGrid filter before the python programmable filter and
this is a corrected version of your script:
pdi = self.GetInput()
pdo = self.GetOutput()
newPoints = vtk.vtkPoints()
numPoints = pdi.GetNumberOfPoints()
for i in range(0, numPoints):
coord = pdi.GetPoint(i)
x, y, z =
Hi,
I am reading the following xmf file (attached as var3d.xmf) into Paraview:
?xml version=1.0 ?
!DOCTYPE Xdmf SYSTEM Xdmf.dtd []
Xdmf Version=2.2
Domain
Grid GridType=Uniform
Topology TopologyType=3DRectMesh Dimensions= 2 4 3/
Geometry GeometryType=VXVYVZ
DataItem Dimensions=3
I just realized that paraview is using a different python (2.5) on my
system than the default one (2.7) which has numpy. Also, the paraview I got
is a compiled binary of 3.14. How do I go about pointing paraview to
python2.7.
Also, form running the saved trace using python, it looks like it
Hi,
So I got python2.7 working and I set all the variables correctly like you
advised but I still get errors. When I try to run a saved trace using
python, I get the following errors.
b8-8d-12-38-84-40:Python chukwudichukwudozie$ python trace.py
Traceback (most recent call last):
File
For the script you downloaded, you should remove line 3 where it says
Connect(). It's possible the script is old enough that some of the
statements need to be updated in order to run against the latest version of
ParaView.
Pat
On Mon, Mar 18, 2013 at 5:38 PM, Chukwudi Chukwudozie
Please copy the paraview@paraview.org mailing list when you reply.
Are you using python2.5 to run you script? Does your version of OSX have
python2.6 or python2.7 (in /usr/bin) ? On my machine, the system version
of numpy for pthon2.5 is only available in i386, while later versions
contains
For PYTHONPATH, try removing the last /paraview components from the path,
so you're setting: /Applications/ParaView.app/Contents/Python
Also add /Applications/ParaView.app/Contents/Libraries to PYTHONPATH and
DYLD_LIBRARY_PATH. Note, that is DYLD not LD. You don't need to add the
Contents/bin
Hi,
I want help to be able to do the following two things using my mac OS X
10.7.5 but I have not been successful.
1. Run a paraview python script on terminal using pvpython.
2. Run the same script on terminal using python.
For (1) above, I saved the trace for a particular operation and ran it
Hello,
thank you for your messages. I tried changing del writer to Delete(writer).
However, I get the following error now:
Traceback (most recent call last):
File /scratch/mesh3mm/Z085_velocity_data.py, line 41, in module
Delete(writer)
File
Hello again,
the memory leak has definitely something to do with the writer
as everything works well when I run my script without it.
Is there any other way to delete the writer after a file has been processed?
Best,
Sebastian
___
Powered by
Hello,
I am running Paraview in batch mode using a Python script to analyze my data.
However, after looping through few files ny script gets terminated because of a
memory overload. Is it possible to deallocate the used memory after a file has
been processed?
Currently I am using the Delete()
Hi Sebastian,
What version of ParaView are you using? Pre-3.14 suffered from
http://www.paraview.org/Bug/view.php?id=12424. An issue similar to what
you described and a workaround for it got discussed last year, see
http://markmail.org/message/72qrmqwjaxmgsa7h.
Karl
Sebastian wrote, On
Hello Karl,
thank you for your message. I am using Paraview 3.14.1 (64bit).
This is what my script looks like:
# SETTINGS
directory_pvtu= '/scratch/mesh3mm_SEM/'
directory_csv = '/scratch/mesh3mm_SEM/Z085_velocity_data/'
file_number_start = 373527
file_number_end = 640332
Not sure why it isn't garbage collecting for you, but you might try
moving the entire pipeline setup out of the loop and then inside the
loop just call the two set filenames to modify the existing pipeline
before calling Write().
David E DeMarle
Kitware, Inc.
RD Engineer
21 Corporate Drive
I believe the filter won't get deleted until after the proxy goes out of
scope. If I'm right, you need to call Delete() on it and then have the
variable that's holding the proxy either go out of scope or set to
something else.
Andy
On Wed, Dec 19, 2012 at 4:36 PM, David E DeMarle
I think you need to replace del writer with Delete(writer).
ParaView has a proxy manager that keeps all proxies. Proxies will not be
deleted when the python reference is deleted, you must explicitly call
paraview.simple.Delete(). The return value of CreateWriter is a proxy, so
it must be
: Friday, February 17, 2012 1:35 PM
To: paraview@paraview.org
Subject: [Paraview] Python scripting of selection / labels on contours
Dear all,
What I'm trying to achieve is to get labels on contourlines from a python
script (that is, non-interactively). To get started, I followed the following
Hi,
We had a programmable filter that started out like:
from paraview import vtk
input = self.GetInputDataObject(0, 0)
output = self.GetOutputDataObject(0)
ngls = 2
if input.IsA(vtkMultiBlockDataSet):
nblk = input.GetNumberOfBlocks()
print nblk = , nblk
for n in range(nblk):
) Grid.
Why is the data type returned different now from the
vtkMultiBlockDataSet.GetBlock() call?
Tim
- Original Message -
From: Tim Gallagher tim.gallag...@gatech.edu
To: ParaView list paraview@paraview.org
Sent: Monday, February 27, 2012 2:09:37 PM
Subject: [Paraview] Python
, February 27, 2012 2:09:37 PM
Subject: [Paraview] Python scripting question in 3.14
Hi,
We had a programmable filter that started out like:
from paraview import vtk
input = self.GetInputDataObject(0, 0)
output = self.GetOutputDataObject(0)
ngls = 2
if input.IsA(vtkMultiBlockDataSet
Dear all,
What I'm trying to achieve is to get labels on contourlines from a python
script (that is, non-interactively). To get started, I followed the following
advice given on the list on Sep 13, 2010:
Try doing a slice through all the contour lines, and then selecting the points
on the
:* Adriano Gagliardi [mailto:agaglia...@ara.co.uk]
*Envoyé :* 1 novembre 2011 10:07
*À :* 'David Dupuis'; 'Utkarsh Ayachit'
*Cc :* paraview@paraview.org
*Objet :* RE: [Paraview] Paraview Python scripting
What does sta.py do that it needs to open the GUI? Do you mean an X11
window
” in Paraview.
Is there a way to load a python state file?
Here is what I tried to do so, but didn’t succeeded.
1- I followed the procedure for Paraview/Python scripting, and added
PYTHONPATH in .bashrc:
export
PYTHONPATH=/home/david/ParaView-3.12.0-RC2-Linux-x86_64/lib/paraview-3.12/site
- Load state” in Paraview.
Is there a way to load a python state file?
Here is what I tried to do so, but didn’t succeeded.
1- I followed the procedure for Paraview/Python scripting, and added
PYTHONPATH in .bashrc:
export
PYTHONPATH=/home/david/ParaView-3.12.0-RC2-Linux-x86_64/lib
Url: www.ara.co.uk
_
From: paraview-boun...@paraview.org [mailto:paraview-boun...@paraview.org]
On Behalf Of David Dupuis
Sent: 01 November 2011 14:00
To: Utkarsh Ayachit
Cc: paraview@paraview.org
Subject: Re: [Paraview] Paraview Python scripting
Hello Utkarsh,
The Python Shell
:* paraview@paraview.org
*Objet :* RE: [Paraview] Paraview Python scripting
What does sta.py do that it needs to open the GUI? Do you mean an X11
window?
===
Adriano Gagliardi MEng PhD
Business Sector Leader
Computational Aerodynamics
Aircraft Research
'
*Cc :* paraview@paraview.org
*Objet :* RE: [Paraview] Paraview Python scripting
What does sta.py do that it needs to open the GUI? Do you mean an X11
window?
===
Adriano Gagliardi MEng PhD
Business Sector Leader
Computational Aerodynamics
Aircraft
:* RE: [Paraview] Paraview Python scripting
What does sta.py do that it needs to open the GUI? Do you mean an X11
window?
===
Adriano Gagliardi MEng PhD
Business Sector Leader
Computational Aerodynamics
Aircraft Research Association Ltd.
Manton Lane
in the
Python State file.
*De :* Adriano Gagliardi [mailto:agaglia...@ara.co.uk]
*Envoyé :* 1 novembre 2011 10:07
*À :* 'David Dupuis'; 'Utkarsh Ayachit'
*Cc :* paraview@paraview.org
*Objet :* RE: [Paraview] Paraview Python scripting
What does sta.py do that it needs to open the GUI? Do you mean
Hi-
I've been using the Extract Selection Filter to extract nodes from a
mesh for pre-processing of boundary conditions. Is there a way to do the
opposite and give Paraview a bunch of nodes in the mesh and then have
Paraview display it?
I have tried using vtkSelection and have created an
Dear all,
Recently I was encouraged by a colleague to use the Native OpenFOAM reader
for ParaView, which was created by Takuya Oshima. I really appreciate the
reader since it loads my data faster and uses less memory than the standard
OpenFOAM reader and it works faster than using the OpenFOAM
Translating that to Python as I understand it would correspond to:
reader.FileName =
reader.FileName = original
That does the trick, thank you! I had tried that before and had hoped
there is a nicer way, since I get VTK errors about not being able to
open the file and read the file information
The vtkPVDReader (you may want to look at it's superclasses as well)
does not re-read the XML file, unless the reader is modified. What you
really need, is somehow call Modified() on the reader. One way would
be setting the filename to empty (then call
vtkSMPRoxy::UpdateVTKObjects()) and then
Hi,
I'm trying to get ParaView to work in an interactive context for
numerical simulations. The first goal is to have ParaView visualize time
steps as they are output by the solver (vtu for individual steps, pvd as
collection). I searched the wiki, mailing lists etc. and it seems this
cannot be
I tried with the cvs version and I still have the same problem
Nicolas
On 10/02/2010 15:45, Utkarsh Ayachit wrote:
Can you try updating to latest CVS and see? I just tried with the CVS
head and couldn't reproduce the issue.
Utkarsh
On Wed, Feb 10, 2010 at 7:55 AM, Nicolas Richart
Is this through python shell or pvpython? Can you attach a debugger
and post the stack trace?
Utkarsh
On Fri, Feb 12, 2010 at 4:37 AM, Nicolas Richart
nicolas.rich...@epfl.ch wrote:
I tried with the cvs version and I still have the same problem
Nicolas
On 10/02/2010 15:45, Utkarsh Ayachit
Hi,
I try to modify representation properties in order to color my data with
the values of an array
and I get a segmentation fault.
So I try the example which is on the wiki on the Python Scripting page
And i also get a segmentation fault during the rendering
from paraview.simple import
Can you try updating to latest CVS and see? I just tried with the CVS
head and couldn't reproduce the issue.
Utkarsh
On Wed, Feb 10, 2010 at 7:55 AM, Nicolas Richart
nicolas.rich...@epfl.ch wrote:
Hi,
I try to modify representation properties in order to color my data with the
values of an
Where are you typing the python script: the python shell or the
Script parameter for the Programmable Filter/Programmable Source?
On Wed, Jan 14, 2009 at 7:17 PM, Pierre-Olivier Dallaire
pierre-olivier.dalla...@videotron.ca wrote:
Good evening,
I'm trying to import a text file in order to
python shell, I'm using pvpython script.py
On 15-Jan-09, at 9:20 AM, Utkarsh Ayachit wrote:
Where are you typing the python script: the python shell or the
Script parameter for the Programmable Filter/Programmable Source?
On Wed, Jan 14, 2009 at 7:17 PM, Pierre-Olivier Dallaire
These scripts are meant to be used at values for the Script paramater
for Programmable Filter or Programmable Source as identified by the
title. These will not directly work from the python shell or pvpython.
Create a Programmable Source from the Sources menu in the ParaView
GUI and try pasting
Good afternoon,
I'm looking for an example on how to use the calculator filter in a
python script.
With the calculator, I want to :
1) Extract each component of a vector array (x, y, z);
2) Apply a scalar factor on each array (for unit conversion).
Best regards,
PO
Here's something I did recently
calc = servermanager.filters.Calculator(Input=pderiv)
calc.ResultArrayName = 'w'
calc.AddVectorVariable = ['Vorticity', 'Vorticity', '0', '1', '2']
calc.Function = '(Vorticity).(kHat)'
calc.UpdatePipeline() # w is now element 16
This gave the vorticity in the khat
Hello,
I've noticed that if I make an active camera object
view = servermanager.CreateRenderView()
camera = view.GetActiveCamera(),
there is a method camera.GetOrientation(), and even
camera.GetOrientationWXYZ, but no SetOrientation(), or
SetOrientationWXYZ(), or even camera.Orientation
Hello,
I'm trying to visualise ConeSource() for practice on local host, when i
run this code:
from paraview import servermanager as sm
sm.Connect()
file = my path to filename
data = sm.sources.LegacyVTKReader(FileNames=file)
view = sm.CreateRenderView()
rep = sm.CreateRepresentation()
70 matches
Mail list logo