[Paraview] question-filter
Cory Quammen
cory.quammen at kitware.com
Thu Mar 24 11:48:31 EDT 2016
Islem,
One possibility is that the order of vertices in your grid is somehow
different than what VTK expects and gives you inverted cells that have
negative volume. I don't know if this is the case because your
negative volume is much different from the expected positive volume.
Could you try using the Python Calculator to compute the volumes of
each cell and see if they are all negative? The expression should be
something like
volumes(input)
(haven't tested this). This would at least be a first step in
debugging the problem.
HTH,
Cory
On Mon, Mar 21, 2016 at 8:21 AM, Megdich Islem <megdich_islem at yahoo.fr> wrote:
> 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.
>
>
>
--
Cory Quammen
R&D Engineer
Kitware, Inc.
More information about the ParaView
mailing list