[Paraview] (no subject)

Timothy Cale drtsc.para at gmail.com
Sat Dec 1 11:39:52 EST 2012


Sebastien:

Thank you!

That indeed what I was looking for.

Is there a place where one can find out about (look up) such things?

I spent an hour or so yesterday trying to guess  writer.FileType='Ascii'.

My apologies for not including a subject line on my first submission, and
for any confusion
due to trying to send a file that is too large. New to the mailing list.

Thanks again!

Regards,
Tim

On Sat, Dec 1, 2012 at 8:42 AM, Sebastien Jourdain <
sebastien.jourdain at kitware.com> wrote:

> Here is the script that you should run
>
> from paraview.simple import *
>
> data = XMLPolyDataReader( FileName=['/.../file.vtp'] )
>
> smooth = Smooth(data)
> smooth.NumberofIterations = 200
>
> writer = CreateWriter("foo.ply", smooth)
> writer.FileType = 'Ascii'
> writer.UpdatePipeline()
>
>
>
> On Fri, Nov 30, 2012 at 3:10 PM, Timothy Cale <drtsc.para at gmail.com>wrote:
>
>> Sebastien:
>>
>> The data file I attached to the previous version of this update note was
>> too large.
>>
>> I am resending the note with that file removed.
>>
>> Tim
>>
>> ---------- Forwarded message ----------
>> From: Timothy Cale <drtsc.para at gmail.com>
>> Date: Fri, Nov 30, 2012 at 1:03 PM
>> Subject: Re: [Paraview] (no subject)
>> To: Sebastien Jourdain <sebastien.jourdain at kitware.com>
>> Cc: "paraview at paraview.org" <paraview at paraview.org>
>>
>>
>> Update:
>>
>> I am able to write a ply file using CreateWriter (see attached
>> first_stab.py and nano....vtp files).
>> But the ply file is in binary.
>>
>> I looked around for more than an hour to find out how to write the file
>> in ascii - to no avail.
>>
>> Any hints?
>>
>> Aside: When I put in 0 (for ascii) as a third arg. to CreateWriter,
>> pvpython complained about
>> having more than 2 arguments. I note that in the paraview users guide,
>> CreateWriter has
>> several arguments in some cases. help(CreateWriter) indicates that more
>> than 2 arguments
>> can be used:
>>
>> >>> help(CreateWriter)
>>
>> Help on function CreateWriter in module paraview.simple:
>>
>>
>> CreateWriter(filename, proxy=None, **extraArgs)
>>
>> Creates a writer that can write the data produced by the source proxy in
>>
>> the given file format (identified by the extension). If no source is
>>
>> provided, then the active source is used. This doesn't actually write the
>>
>> data, it simply creates the writer and returns it.
>>
>> Regards,
>> Tim
>>
>> On Fri, Nov 30, 2012 at 10:15 AM, Timothy Cale <drtsc.para at gmail.com>wrote:
>>
>>> Sebastien:
>>>
>>> Good question:
>>>
>>> My goal is to have a script which smooths results between simulation
>>> steps (fortran codes).
>>>
>>> I use paraview to view results, and the smoothing filter in paraview
>>> seems to do what I want.
>>>
>>> I want to start with a Trace-generated python script, and edit it to
>>> write the vertices and element
>>> info to a file (.ply would be nice) that the next code can read.
>>>
>>> So, fortunately for me (in some sense), I decided to upgrade my ubuntu
>>> OS to 12.10. This has
>>> paraview 3.14.1-6build1 on its software list (aptitude).
>>>
>>> This version corrected a bug (with pvpython) in the version of paraview
>>> 3.14 that I was using.
>>> (I also spent a day trying to get/install other versions. That was not
>>> very successful.)
>>>
>>> Now if I import the trace generated py file, it pops up (and stays). Not
>>> a very good image, but it is
>>> a start!
>>>
>>> Being new to python and paraview, this is quite a step.
>>>
>>> Any suggestions as to how to write vertex/node info would be appreciated.
>>>
>>>
>>> Thanks,
>>> Tim
>>>
>>> On Thu, Nov 29, 2012 at 7:41 PM, Sebastien Jourdain <
>>> sebastien.jourdain at kitware.com> wrote:
>>>
>>>> I don't know ? what your script is supposed to do ? Render an image and
>>>> quit ?
>>>>
>>>>
>>>> On Thu, Nov 29, 2012 at 1:19 PM, Timothy Cale <drtsc.para at gmail.com>wrote:
>>>>
>>>>> I am using paraview 3.14 (64 bit, ubuntu 12.04 vm on a MBP).
>>>>>
>>>>> I am trying to run pvpython to view .py files generated using Trace:
>>>>>
>>>>> 'which' pvpython' yields: /usr/bin/pvpython
>>>>>
>>>>> 'pvpython' yields: Error converting executable file
>>>>> "/usr/bin/../lib/paraview/pvpython" to real path: No such file or directory
>>>>>
>>>>> So, /usr/bin/python seems to be looking for /usr/lib/paraview/pvpython
>>>>>
>>>>> Which is indeed not there.
>>>>>
>>>>> I uninstalled (purged) and installed 3.14 again. Same thing.
>>>>>
>>>>> BTW: I did see the notes regarding 3.14.1-2 from ~6 months ago, but
>>>>> cannot tell which 3.14 binary installer is on the
>>>>> Paraview download page.
>>>>>
>>>>> Nevertheless, I downloaded the 3.14 tar-ball.
>>>>>
>>>>> When I run a .py script generated using trace, an image pops up for a
>>>>> second, then disappears.
>>>>>
>>>>> BTW: The same thing happens with 3.98, at least on a companion machine.
>>>>>
>>>>> What am I missing?
>>>>>
>>>>> Thanks,
>>>>> Tim
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> 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
>>>>>
>>>>>
>>>>
>>>
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20121201/92d6d82b/attachment.htm>


More information about the ParaView mailing list