Re: [Paraview] Pythonscript for listing elements from pipeline in an XML

2017-04-24 Thread Scott Wittenburg
ParaViewWeb has the capability to do most of those things in python.  See
here:

https://gitlab.kitware.com/paraview/paraview/blob/master/Web/Python/paraview/web/protocols.py#L1930

for an example of some code which gathers the list of pipeline elements.
Then see here:

https://gitlab.kitware.com/paraview/paraview/blob/master/Web/Python/paraview/web/protocols.py#L1801

for some example code which reads a state file.  That protocols.py file has
examples of doing all kinds of things in Python, hopefully it will help you
get where you need to be.

Cheers,
Scott

On Mon, Apr 24, 2017 at 2:41 AM, lisa kauffmann 
wrote:

> Dear ParaViewers,
>
> I've been working with paraview for a while now but I never tried
> scripting with Python.
> Now my question:
> Is there a posibility to list all the names of the elements in my
> paraview-pipeline with a python script and then write the names into an
> XML-file? The thing ist I don't want to open paraview for that: I need a
> function in python that calls my paraview .pvsm-file with all the
> information about my paraview state.
>
> The XML-file should look like that (when i have for example filters used
> in my pipeline):
>
> - 
> - 
> Streamlines
> - 
> - 
> Slice
> 
>
> Thank You,
>
> namali92
>
> ___
> 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
>
>
___
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


Re: [Paraview] problem freezing python

2017-04-24 Thread Burlen Loring

Hi Ben,

Right you are, should be : and not ' '. Seems as though the issues are 
all related to recent OS upgrades on our side. I reinstalled Python and 
the build completes without error and I see all the output of the 
freezing process.


One issue I'm still having is that import math fails. Other modules like 
numpy import it, and as a result fail to import as well. See below. I'm 
hesitant to install with freezing because of this. math seems to be an 
essential module, without which it would be difficult to do any on the 
fly calculations such as camera positioning etc. Do you have any plans 
to fix this?


swowner@cori01:/usr/common/software/ParaView/builds/ParaView-5.3.0> 
./bin/pvpython

Python 2.7.12 (default, Apr 24 2017, 13:19:37)
[GCC 6.3.0 20161221 (Cray Inc.)] on linux2
>>> import math
Traceback (most recent call last):
  File "", line 1, in 
ImportError: No module named math

On 04/24/2017 06:52 AM, Ben Boeckel wrote:

On Fri, Apr 21, 2017 at 12:10:36 -0700, Burlen Loring wrote:

That file lives in: lib/python2.7/config/config.c.in

OK, it looks like the freeze_paraview.py file can't find it. Could you
debug around line 250 to see what it is actually doing?


-set(ENV{PYTHONPATH} "${PACKAGE_ROOT}")
+set(ENV{PYTHONPATH} "${PACKAGE_ROOT} $ENV{PYTHONPATH}")

I don't see how this is valid (unless breaking the first entry in
`PYTHONPATH` is the goal); it should be separated by a colon.


"/usr/common/software/ParaView/python/2.7.12/lib/python2.7/struct.py",

What Python is this? Where did it come from?


line 1, in 
  from _struct import *
ImportError: No module named _struct

Can you import it in the interpreter living in the above directory?

--Ben


___
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


[Paraview] Your thred on Kitware forum about particle tracing

2017-04-24 Thread Dan Lipsa
Hi Jagan,
Sorry for my delayed reply - I have been in vacation last week.

This shows why it is a good idea to send questions to the ParaView list
rather than individual developers. This way, you'll probably get answers
quicker.

1. You probably seeded your streamlines in areas where vector values are
very small. Try increasing Streamline Parameters / Maximum Steps and / or
Maximum Streamline Length.

You can also try changing the Line Parameters and moving the seeding line
to a different area of your dataset.

2.
There are standard vector measures computed:
AngularVelocity
Rotation
Vorticity
and additional arrays that provide more information about the process:
IntegrationTime
ReasonForTermination
SeedIds

The documentation for the class used is at:
http://www.vtk.org/doc/nightly/html/classvtkStreamTracer.html

Dan


>Hi Dan,
>
>I am Jagan Gorle, a CFD engineer and new user of paraview.
>I went through your tag on Paraview/Kitware forum regarding the particle
tracer. I have now the >same problem. I see the particles staying at the
patch where they are injected.

>1. Can you please give me steps how to trace the particle motion?
>2. Also, how to measure other kinematics such as drag/force, momentum,
velocity plot etc for the >particles?
>
>Your help would be appreciated.
>
>Regards
___
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


Re: [Paraview] xdmf2 vs xdmf3 file type

2017-04-24 Thread David E DeMarle
They both claim ".xmf" and ".xdmf" via the ReaderFactor extensions line you
will find in readers.xml and proxies_xdmf3.xml. If one had something like
xmf2 and the other xmf3 it would do what you are asking for. You could do
that if you build from source for example.

If not you should be able to force something like that by making a dummy
reader xml only plugin just to get the file extension association. See
http://www.paraview.org/Wiki/ParaView/Plugin_HowTo#Adding_a_Reader for
hints.




David E DeMarle
Kitware, Inc.
R Engineer
21 Corporate Drive
Clifton Park, NY 12065-8662
Phone: 518-881-4909

On Mon, Apr 24, 2017 at 4:58 PM, Nico Schlömer 
wrote:

> Hi everyone,
>
> I have a simulation code that spits out XDMF2 data (something.xdmf), and I
> can visualize that with ParaView by opening the file, then selecting XDMF
> over XDMF3 in a menu.
> Since I have to repeat this process often, I'm asking myself if there's a
> specific XDMF2 (or XDMF3) file extension that would allow me to skip the
> dialog.
>
> Any hints?
>
> Cheers,
> Nico
>
> ___
> 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
>
>
___
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


[Paraview] xdmf2 vs xdmf3 file type

2017-04-24 Thread Nico Schlömer
Hi everyone,

I have a simulation code that spits out XDMF2 data (something.xdmf), and I
can visualize that with ParaView by opening the file, then selecting XDMF
over XDMF3 in a menu.
Since I have to repeat this process often, I'm asking myself if there's a
specific XDMF2 (or XDMF3) file extension that would allow me to skip the
dialog.

Any hints?

Cheers,
Nico
___
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


Re: [Paraview] Python tracing doesn't work for opacity time frames?

2017-04-24 Thread Utkarsh Ayachit
Robert,

I've reported the issue here:
https://gitlab.kitware.com/paraview/paraview/issues/17395

You can get access to the opacity track using the API similar to
getting track for any other attribute as "Radius" for SPhere Source.

a = GetAnimationTrack('Opacity', index=0, proxy=sphere1)

Now you can add keyframes etc to the track.


Utkarsh

On Wed, Apr 19, 2017 at 10:09 AM, Robert Sawko  wrote:
> Hi,
>
> I am trying to script paraview to ramp up opacity of some objects, but it 
> seems
> that the tracing functionality isn't working. I've selected maximum verbosity
> options in Tools->Start trace, but nothing is produced.
>
> Could anyone perhaps share a script with Opacity? I've been able to work
> out camera actions with PV, but it seems to me that opacity ramping is more
> difficult as it needs some reference to an object it's meant to affect.
>
> Please let me know,
> Robert
> --
> Constellation iridium and its flares
> https://www.youtube.com/watch?v=MTGVuPr9Epg
> https://en.wikipedia.org/wiki/Iridium_satellite_constellation
> ___
> 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
___
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


Re: [Paraview] using selected cells in the python programmable filter

2017-04-24 Thread Utkarsh Ayachit
Very tricky :). This use-case isn't easily supported currently. Please
feel free to report a feature request on issue tracer. For now, you
can potentially apply the **Extract Selection** filter and then run
the Python programmable filter one it.

Utkarsh

On Wed, Apr 19, 2017 at 10:54 AM, Richardson CFD  wrote:
> How do you operate on screen selected cells (Select Cells On) from
> within the Python Programmable Filter?
>
> --
> Richardson CFD
> http://richardsoncfd.weebly.com
>
> ___
> 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
>
___
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


Re: [Paraview] problem freezing python

2017-04-24 Thread Ben Boeckel
On Fri, Apr 21, 2017 at 12:10:36 -0700, Burlen Loring wrote:
> That file lives in: lib/python2.7/config/config.c.in

OK, it looks like the freeze_paraview.py file can't find it. Could you
debug around line 250 to see what it is actually doing?

> -set(ENV{PYTHONPATH} "${PACKAGE_ROOT}")
> +set(ENV{PYTHONPATH} "${PACKAGE_ROOT} $ENV{PYTHONPATH}")

I don't see how this is valid (unless breaking the first entry in
`PYTHONPATH` is the goal); it should be separated by a colon.

> "/usr/common/software/ParaView/python/2.7.12/lib/python2.7/struct.py", 

What Python is this? Where did it come from?

> line 1, in 
>  from _struct import *
> ImportError: No module named _struct

Can you import it in the interpreter living in the above directory?

--Ben
___
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


[Paraview] Pythonscript for listing elements from pipeline in an XML

2017-04-24 Thread lisa kauffmann
Dear ParaViewers,

 

I've been working with paraview for a while now but I never tried scripting with Python.

Now my question:

Is there a posibility to list all the names of the elements in my paraview-pipeline with a python script and then write the names into an XML-file? The thing ist I don't want to open paraview for that: I need a function in python that calls my paraview .pvsm-file with all the information about my paraview state.

 

The XML-file should look like that (when i have for example filters used in my pipeline):

 

- 

- 

Streamlines

- 

- 

Slice



 

Thank You,

 

namali92
___
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