[Paraview] question-filter

Megdich Islem megdich_islem at yahoo.fr
Mon Mar 21 09:21:16 EDT 2016


Hi,
Thank you for your email, I tried this expression  sum(alphawater*volume(input)) and it worked fine and gave me some logical results for some shapes that I know their volumes, but for the problem that I am working on, it gave me negative value for the volume. I am supposed to calculate the volume of a quarter of a cylinder with height 0.6 m and radius 0.3 m, so the volume should be V=(0.3*0.3*3.14*0.6)/4=0.04239 cubic meter, but  the annotation filter gave me this value -2639.95829243. I attached here two pictures that illustrate the dimensions of the cylinder and the value I got, I couldn't what is wrong.
Regards,Islem Megdiche 

    Le Dimanche 20 mars 2016 10h57, Cory Quammen <cory.quammen at kitware.com> a écrit :
 

 Thanks, Utkarsh.

Indeed, replacing "alpha.water" with "alphawater" appears to work just fine.

- Cory

On Sat, Mar 19, 2016 at 7:23 PM, Utkarsh Ayachit
<utkarsh.ayachit at kitware.com> wrote:
>> The dot "." in the array name is causing problems. Because it is a Python expression, the interpreter thinks you are asking for an attribute "water" from a class or module.
>
> FYI, ParaView uses paraview.make_name_valid()[1] function to sanitize
> array names in Python. Any character not a "_" or ASCII letter or
> number is simply dropped and if the name beings with a number, then a
> 'a' is prefixed.
>
> [1] http://www.paraview.org/ParaView/Doc/Nightly/www/py-doc/_modules/paraview/__init__.html#make_name_valid



-- 
Cory Quammen
R&D Engineer
Kitware, Inc.


  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160321/94554b64/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: side-view.png
Type: image/png
Size: 28759 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160321/94554b64/attachment.png>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: top-view.png
Type: image/png
Size: 104846 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/paraview/attachments/20160321/94554b64/attachment-0001.png>


More information about the ParaView mailing list