Re: [Paraview] Custom External Libraries built with ParaView

2010-06-07 Thread Eric Nodwell
Thanks Michael.  That did it - well 90% of it.  The other 10% was also adding a 
PARAVIEW_FILTERS_INCLUDE_DIRECTORIES command to specify the directory with .h 
files for our plugins.

Eric

On 2010-06-07, at 11:21 AM, Michael Jackson wrote:

> SET (PARAVIEW_ADDITIONAL_LIBRARIES
>${PARAVIEW_ADDITIONAL_LIBRARIES}
>libvtkskiIO
> )

___
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


Re: [Paraview] Custom External Libraries built with ParaView

2010-06-07 Thread Michael Jackson

SET (PARAVIEW_ADDITIONAL_LIBRARIES
${PARAVIEW_ADDITIONAL_LIBRARIES}
libvtkskiIO
)

___
Mike Jackson  www.bluequartz.net
Principal Software Engineer   mike.jack...@bluequartz.net
BlueQuartz Software   Dayton, Ohio


On Jun 7, 2010, at 1:15 PM, Eric Nodwell wrote:

I'm having some linking issues building our custom external  
libraries into ParaView.


The background is, we have the following:
1. a custom library (vtkskiIO) , and
2. some ParaView plugins that use classes out of vtkskiIO .

These can be built, loaded and run successfully when they are built  
not with with ParaView, but against an already-built ParaView source  
tree.  In this case they are loaded after launching ParaView with  
the Plugin manager.


We would like now to build them along with ParaView itself,  
following roughly these instructions: http://paraview.org/Wiki/Extending_ParaView_at_Compile_Time#Build_Code_As_Part_Of_ParaView 
 .  This will make it easier for our users, as we can just  
distribute ParaView with our extensions built in.


We have a single external module CMake file,  
"vtkskiPluginsParaViewImport.cmake" which we specify with the CMake  
variable PARAVIEW_EXTRA_EXTERNAL_MODULE .  It builds our vtkskiIO  
library, and informs ParaView about it as follows (this seems the  
most likely command that I found in ParaViewCommon.cmake):


 PARAVIEW_LINK_LIBRARIES(vtkskiIO)

The plugins themselves are then built with  
PARAVIEW_INCLUDE_WRAPPED_SOURCES,  
PARAVIEW_INCLUDE_SERVERMANAGER_RESOURCES and  
PARAVIEW_INCLUDE_GUI_RESOURCES .


The library does build correctly within the ParaView binary  
directory, however, we then run into this error:


Linking CXX shared library ../../bin/libvtkPVFilters.dylib
Undefined symbols:
 "vtkAIMReader::New()", referenced from:
 vtkSmartPointer::New()in  
vtkAIMReaderPlugin.cxx.o

ld: symbol(s) not found

It appears that we need somehow to specify that vtkPVFilters should  
link against out libvtkskiIO (without actually going in and  
modifying any CMake files within ParaView itself).  Apparently,  
PARAVIEW_LINK_LIBRARIES is not sufficient for this purpose.  Any  
suggestions?


Eric

___
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


___
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


[Paraview] Custom External Libraries built with ParaView

2010-06-07 Thread Eric Nodwell
I'm having some linking issues building our custom external libraries into 
ParaView.

The background is, we have the following:
1. a custom library (vtkskiIO) , and
2. some ParaView plugins that use classes out of vtkskiIO .

These can be built, loaded and run successfully when they are built not with 
with ParaView, but against an already-built ParaView source tree.  In this case 
they are loaded after launching ParaView with the Plugin manager.

We would like now to build them along with ParaView itself, following roughly 
these instructions: 
http://paraview.org/Wiki/Extending_ParaView_at_Compile_Time#Build_Code_As_Part_Of_ParaView
 .  This will make it easier for our users, as we can just distribute ParaView 
with our extensions built in.

We have a single external module CMake file, 
"vtkskiPluginsParaViewImport.cmake" which we specify with the CMake variable 
PARAVIEW_EXTRA_EXTERNAL_MODULE .  It builds our vtkskiIO library, and informs 
ParaView about it as follows (this seems the most likely command that I found 
in ParaViewCommon.cmake):

  PARAVIEW_LINK_LIBRARIES(vtkskiIO)

The plugins themselves are then built with PARAVIEW_INCLUDE_WRAPPED_SOURCES, 
PARAVIEW_INCLUDE_SERVERMANAGER_RESOURCES and PARAVIEW_INCLUDE_GUI_RESOURCES .

The library does build correctly within the ParaView binary directory, however, 
we then run into this error:

Linking CXX shared library ../../bin/libvtkPVFilters.dylib
Undefined symbols:
  "vtkAIMReader::New()", referenced from:
  vtkSmartPointer::New()in vtkAIMReaderPlugin.cxx.o
ld: symbol(s) not found

It appears that we need somehow to specify that vtkPVFilters should link 
against out libvtkskiIO (without actually going in and modifying any CMake 
files within ParaView itself).  Apparently, PARAVIEW_LINK_LIBRARIES is not 
sufficient for this purpose.  Any suggestions?

Eric

___
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


[Paraview] PV 3.8.0 mesh modification

2010-06-07 Thread Stephen Wornom
I have a mesh, I would like to refine it in a region (for example the 
wake behind a cylinder or a sphere).


I can refine the mesh using PV (sub divide).
Questions:
1- How can I choose a region where I want to subdivide?
2- Once subdivided, how do I save the new mesh?
3- What formats are available?
Stephen
p.s.
Can one create a mesh using PV?

--
stephen.wor...@sophia.inria.fr
2004 route des lucioles - BP93
Sophia Antipolis
06902 CEDEX

Tel: 04 92 38 50 54
Fax: 04 97 15 53 51

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


Re: [Paraview] Particle tracer: output particle coordinates for every time step to file?

2010-06-07 Thread Biddiscombe, John A.
I added the particle writing as a "stub" so that the user can define his own 
writing class. 
simply create a writer sub-classed from vtkAbstractParticleWriter
http://www.vtk.org/doc/nightly/html/classvtkAbstractParticleWriter.html 
override the WriteData function, and add it to your build, then set it manually 
in the constructor of the temporal stream tracer (or other suitable place using 
SetParticleWriter)

JB



> -Original Message-
> From: paraview-boun...@paraview.org [mailto:paraview-boun...@paraview.org]
> On Behalf Of Florian Rathgeber
> Sent: 07 June 2010 14:54
> To: Andy Bauer
> Cc: paraview@paraview.org
> Subject: Re: [Paraview] Particle tracer: output particle coordinates for
> every time step to file?
> 
> Hi,
> 
> Thank you, that works, but gives me lots of data I don't actually need.
> I would rather have something more concise.
> 
> Is anybody more familiar with the particle tracer and can tell what this
> particle writing is supposed to do and how to get it to work?
> 
> Florian
> 
> On 04.06.2010 23:03, Andy Bauer wrote:
> > Hi,
> >
> > I'm not sure how the enable particle writing works in that filter.  I
> > would just use either the VTK legacy writer or VTK Polydata file writer
> > and check "Write all timesteps as file-series.".  You'll get a series of
> > files from that.
> >
> > Andy
> >
> > On Fri, Jun 4, 2010 at 10:19 AM, Florian Rathgeber  > > wrote:
> >
> > Hi!
> >
> > I am looking for a way to output the 3D particle coordinates computed
> by
> > the particle tracer to a file for every time step.
> >
> > The particle tracer has this option "Enable Particle Writing", but
> > giving a filename and checking the box gave no result. I thought this
> > might be the feature I am looking for, but I couldn't find any
> > documentation (apart from the interface).
> >
> > Does it do what I want? And if so, how? And if not, is there another
> way
> > to get the coordinates (potentially using the python interface?)
> >
> > I am grateful for any hints and tips,
> > Florian
> > ___
> > 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
> >
> >
> ___
> 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
___
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


Re: [Paraview] Particle tracer: output particle coordinates for every time step to file?

2010-06-07 Thread Florian Rathgeber
Hi,

Thank you, that works, but gives me lots of data I don't actually need.
I would rather have something more concise.

Is anybody more familiar with the particle tracer and can tell what this
particle writing is supposed to do and how to get it to work?

Florian

On 04.06.2010 23:03, Andy Bauer wrote:
> Hi,
> 
> I'm not sure how the enable particle writing works in that filter.  I
> would just use either the VTK legacy writer or VTK Polydata file writer
> and check "Write all timesteps as file-series.".  You'll get a series of
> files from that.
> 
> Andy
> 
> On Fri, Jun 4, 2010 at 10:19 AM, Florian Rathgeber  > wrote:
> 
> Hi!
> 
> I am looking for a way to output the 3D particle coordinates computed by
> the particle tracer to a file for every time step.
> 
> The particle tracer has this option "Enable Particle Writing", but
> giving a filename and checking the box gave no result. I thought this
> might be the feature I am looking for, but I couldn't find any
> documentation (apart from the interface).
> 
> Does it do what I want? And if so, how? And if not, is there another way
> to get the coordinates (potentially using the python interface?)
> 
> I am grateful for any hints and tips,
> Florian
> ___
> 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
> 
> 
___
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


[Paraview] pvpython & numpy

2010-06-07 Thread Aurélien Marsan
Good Morning,

At this time, when I want to use the numpy library with pvpython, I build
using the same version of python than pvpython.

Is there an easier way ? Especially : is it possible to build new libraries
directly with pvpython ?

When I try, I have this error :

> Running from numpy source directory.
> Traceback (most recent call last):
>   File "setup.py", line 187, in 
> setup_package()
>   File "setup.py", line 155, in setup_package
> from numpy.distutils.core import setup
>   File
> "/home/aurelien/Telechargements/numpy-1.4.1/numpy/distutils/core.py", line
> 25, in 
> from numpy.distutils.command import config, config_compiler, \
>   File
> "/home/aurelien/Telechargements/numpy-1.4.1/numpy/distutils/command/build_ext.py",
> line 16, in 
> from numpy.distutils.system_info import combine_paths
>   File
> "/home/aurelien/Telechargements/numpy-1.4.1/numpy/distutils/system_info.py",
> line 206, in 
> so_ext = distutils.sysconfig.get_config_vars('SO')[0] or ''
>   File
> "/home/aurelien/Telechargements/ParaView-3.8.0-Linux-x86_64/lib/paraview-3.8/lib/python2.5/distutils/sysconfig.py",
> line 493, in get_config_vars
> func()
>   File
> "/home/aurelien/Telechargements/ParaView-3.8.0-Linux-x86_64/lib/paraview-3.8/lib/python2.5/distutils/sysconfig.py",
> line 363, in _init_posix
> raise DistutilsPlatformError(my_msg)
> distutils.errors.DistutilsPlatformError: invalid Python installation:
> unable to open
> /home/aurelien/Telechargements/ParaView-3.8.0-Linux-x86_64/lib/paraview-3.8/include/python2.5/pyconfig.h
> (No such file or directory)
>


Thanks for help,

-- 
Aurélien MARSAN
Doctorant Cifre Turbomeca/LMFA
___
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


Re: [Paraview] Write and read a vtk file (in python)

2010-06-07 Thread Eric E. Monson
Hey Jérôme,

Yes, you can use the Python Programmable Source as a reader. There are some 
examples on these two pages, in case you haven't seen them:

http://www.paraview.org/Wiki/Here_are_some_more_examples_of_simple_ParaView_3_python_filters
http://www.paraview.org/Wiki/Python_Programmable_Filter

-Eric

--
Eric E Monson
Duke Visualization Technology Group


On Jun 7, 2010, at 4:58 AM, Jérôme Plumecoq wrote:

> Hello,
> 
> thank you very much !
> 
> Do you know if is possible to write directly a reader in python ? 
> 
> Or is it only possible in C++ ?
> 
> Jérôme
> 
> Le 04/06/2010 15:37, Utkarsh Ayachit a écrit :
>> 
>> There was a bug in OpenDataFile() that was fixed a few days ago (May
>> 26) that is causing that "AttributeError: Attribute FileName does not
>> exist". Attached is a patch for the same.
>> 
>> Utkarsh
>> 
>> 2010/6/4 Berk Geveci :
>>   
 1) reading :
 
 
 from a vtkStructuredGrid object, I use a vtkStructuredGridWriter to create 
 a
 vtk file, and I have the following problem :
 when I launch the script in Paraview, the format of floating points is not
 good (I obtain for example 33,1632 instead of 33.1632). So, the file 
 created
 is not readable by Paraview. If I launch the script directly in a terminal,
 it works fine. Perhaps because the version of vtk module is not the same ?
 If I use the binary format I have not this problem.
   
>>> This seems to be related to the way the LOCALE is set on your system. It is
>>> probably set to French in one case and English in the other. Does anybody 
>>> know
>>> if we can force LOCALE to English in the ParaView application or the reader?
>>> 
>>> 
 2) writing :
 
 
  I would like to read my vtk files from the python shell, with
 OpenDataFile(), but It didn't succeed and I have the following message 
 (with
 a file which can be read in paraview using menu open of course :-) :
   
>>> Unless I am mistaken, you give the filename directly to OpenDataFile(),
>>> without FileName=.
>>> 
>>> -berk
>>> 
>>> 
 
 /home/plumecoq/tmp/ParaView/flow_1_0075.vtk
 Traceback (most recent call last):
  File "", line 1, in 
  File "/home/plumecoq/EHPOC/plugins/ElsaMenu/elsa.py", line 91, in 
main()
  File "/home/plumecoq/EHPOC/plugins/ElsaMenu/elsa.py", line 73, in main
reader_vtk = OpenDataFile(file_name_vtk)
  File
 "/home/plumecoq/Paraview/ParaView-3.8.0-bin/Utilities/VTKPythonWrapping/paraview/simple.py",
 line 115, in OpenDataFile
reader = globals()[xml_name](FileName=filename, **extraArgs)
  File
 "/home/plumecoq/Paraview/ParaView-3.8.0-bin/Utilities/VTKPythonWrapping/paraview/simple.py",
 line 542, in CreateObject
setattr(px, param, params[param])
  File
 "/home/plumecoq/Paraview/ParaView-3.8.0-bin/Utilities/VTKPythonWrapping/paraview/servermanager.py",
 line 201, in __setattr__
"to add this attribute.")
 AttributeError: Attribute FileName does not exist.  This class does not
 allow addition of new attributes to avoid mistakes due to typos. Use
 add_attribute() if you really want to add this attribute.
 
 
 any ideas ? I try to use LegacyVTKFileReader instead, but I have also some
 problems.
 
 I use a re-compile version of Paraview 3.8, under Linux (Fedora 10 - 64
 bits)
 
 thanks for your help.
 
 Jérôme
 
 ___
 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
 
 
   
>>> ___
>>> 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
>>> 
>>> 
> 
> ___
> 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

___
Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-

Re: [Paraview] Write and read a vtk file (in python)

2010-06-07 Thread Jérôme Plumecoq




Hello,

it doesn't fix the problem for me, but perhaps it is because I don't
use version 4.6 of Qt...

But if I set the locale in the python script before writing the vtk
file in ASCII, it works fine.

Thank you !

Jérôme

Le 04/06/2010 16:15, Utkarsh Ayachit a écrit :

  I've committed a fix. Attached is the patch for the same.

commit 3f4904f94224ef3a6c03989a012c4484a759a607
Author: Utkarsh Ayachit 
Date:   Fri Jun 4 10:14:30 2010 -0400

setlocale to avoid locale related numeric issues.

Refer to http://www.paraview.org/pipermail/paraview/2009-August/013278.html
thread for details.


Utkarsh

On Fri, Jun 4, 2010 at 9:50 AM, Berk Geveci  wrote:
  
  
Thanks Takuya. We'll take care of it.

2010/6/4 Takuya OSHIMA :


  Hi,

  
  
This seems to be related to the way the LOCALE is set on your system. It is
probably set to French in one case and English in the other. Does anybody know
if we can force LOCALE to English in the ParaView application or the reader?

  
  
Indeed, forcing the locale where the PV application runs under to C
was what I proposed a while ago, which failed to draw attention:
http://www.paraview.org/pipermail/paraview/2009-August/013278.html

I'd really appreciate if the PV developers reconsider this.

Takuya

Takuya OSHIMA, Ph.D.
Faculty of Engineering, Niigata University
8050 Ikarashi-Ninocho, Nishi-ku, Niigata, 950-2181, JAPAN


From: Berk Geveci 
Subject: Re: [Paraview] Write and read a vtk file (in python)
Date: Fri, 4 Jun 2010 09:25:02 -0400

  
  

  1) reading :


from a vtkStructuredGrid object, I use a vtkStructuredGridWriter to create a
vtk file, and I have the following problem :
when I launch the script in Paraview, the format of floating points is not
good (I obtain for example 33,1632 instead of 33.1632). So, the file created
is not readable by Paraview. If I launch the script directly in a terminal,
it works fine. Perhaps because the version of vtk module is not the same ?
If I use the binary format I have not this problem.
  


This seems to be related to the way the LOCALE is set on your system. It is
probably set to French in one case and English in the other. Does anybody know
if we can force LOCALE to English in the ParaView application or the reader?



  2) writing :


 I would like to read my vtk files from the python shell, with
OpenDataFile(), but It didn't succeed and I have the following message (with
a file which can be read in paraview using menu open of course :-) :
  


Unless I am mistaken, you give the filename directly to OpenDataFile(),
without FileName=.

-berk



  

/home/plumecoq/tmp/ParaView/flow_1_0075.vtk
Traceback (most recent call last):
 File "", line 1, in 
 File "/home/plumecoq/EHPOC/plugins/ElsaMenu/elsa.py", line 91, in 
   main()
 File "/home/plumecoq/EHPOC/plugins/ElsaMenu/elsa.py", line 73, in main
   reader_vtk = OpenDataFile(file_name_vtk)
 File
"/home/plumecoq/Paraview/ParaView-3.8.0-bin/Utilities/VTKPythonWrapping/paraview/simple.py",
line 115, in OpenDataFile
   reader = globals()[xml_name](FileName=filename, **extraArgs)
 File
"/home/plumecoq/Paraview/ParaView-3.8.0-bin/Utilities/VTKPythonWrapping/paraview/simple.py",
line 542, in CreateObject
   setattr(px, param, params[param])
 File
"/home/plumecoq/Paraview/ParaView-3.8.0-bin/Utilities/VTKPythonWrapping/paraview/servermanager.py",
line 201, in __setattr__
   "to add this attribute.")
AttributeError: Attribute FileName does not exist.  This class does not
allow addition of new attributes to avoid mistakes due to typos. Use
add_attribute() if you really want to add this attribute.


any ideas ? I try to use LegacyVTKFileReader instead, but I have also some
problems.

I use a re-compile version of Paraview 3.8, under Linux (Fedora 10 - 64
bits)

thanks for your help.

Jérôme

___
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
  

  
  
  

___
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




___
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: htt

Re: [Paraview] Write and read a vtk file (in python)

2010-06-07 Thread Jérôme Plumecoq




Hello,

thank you very much !

Do you know if is possible to write directly a reader in python ? 

Or is it only possible in C++ ?

Jérôme

Le 04/06/2010 15:37, Utkarsh Ayachit a écrit :

  There was a bug in OpenDataFile() that was fixed a few days ago (May
26) that is causing that "AttributeError: Attribute FileName does not
exist". Attached is a patch for the same.

Utkarsh

2010/6/4 Berk Geveci :
  
  

  1) reading :


from a vtkStructuredGrid object, I use a vtkStructuredGridWriter to create a
vtk file, and I have the following problem :
when I launch the script in Paraview, the format of floating points is not
good (I obtain for example 33,1632 instead of 33.1632). So, the file created
is not readable by Paraview. If I launch the script directly in a terminal,
it works fine. Perhaps because the version of vtk module is not the same ?
If I use the binary format I have not this problem.
  


This seems to be related to the way the LOCALE is set on your system. It is
probably set to French in one case and English in the other. Does anybody know
if we can force LOCALE to English in the ParaView application or the reader?



  2) writing :


 I would like to read my vtk files from the python shell, with
OpenDataFile(), but It didn't succeed and I have the following message (with
a file which can be read in paraview using menu open of course :-) :
  


Unless I am mistaken, you give the filename directly to OpenDataFile(),
without FileName=.

-berk



  

/home/plumecoq/tmp/ParaView/flow_1_0075.vtk
Traceback (most recent call last):
 File "", line 1, in 
 File "/home/plumecoq/EHPOC/plugins/ElsaMenu/elsa.py", line 91, in 
   main()
 File "/home/plumecoq/EHPOC/plugins/ElsaMenu/elsa.py", line 73, in main
   reader_vtk = OpenDataFile(file_name_vtk)
 File
"/home/plumecoq/Paraview/ParaView-3.8.0-bin/Utilities/VTKPythonWrapping/paraview/simple.py",
line 115, in OpenDataFile
   reader = globals()[xml_name](FileName=filename, **extraArgs)
 File
"/home/plumecoq/Paraview/ParaView-3.8.0-bin/Utilities/VTKPythonWrapping/paraview/simple.py",
line 542, in CreateObject
   setattr(px, param, params[param])
 File
"/home/plumecoq/Paraview/ParaView-3.8.0-bin/Utilities/VTKPythonWrapping/paraview/servermanager.py",
line 201, in __setattr__
   "to add this attribute.")
AttributeError: Attribute FileName does not exist.  This class does not
allow addition of new attributes to avoid mistakes due to typos. Use
add_attribute() if you really want to add this attribute.


any ideas ? I try to use LegacyVTKFileReader instead, but I have also some
problems.

I use a re-compile version of Paraview 3.8, under Linux (Fedora 10 - 64
bits)

thanks for your help.

Jérôme

___
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


  

___
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


  




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