[Paraview] Cell volume

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Fri Oct 16 10:27:21 EDT 2015


You can also use the "Python Calculator" with expression
"volume(inputs[0])" and the "Array Association" set to "Cell Data".

Utkarsh

On Fri, Oct 16, 2015 at 10:00 AM, Cory Quammen <cory.quammen at kitware.com> wrote:
> Hi Alan,
>
> This script for the Programmable Filter should compute cell volumes and add
> them as a new 'volume' cell array (I tested it on a vtkUnstructuredGrid data
> set).
>
> from vtk.numpy_interface import algorithms as algs
>
> volume = algs.volume(inputs[0])
> output.CellData.append(volume, 'volume')
>
> Let us know if that doesn't work.
>
> Thanks,
> Cory
>
> On Thu, Oct 15, 2015 at 5:18 PM, Scott, W Alan <wascott at sandia.gov> wrote:
>>
>> I have a user that wants volume of cells moved into a new variable.  There
>> is a feature request pending for this (
>> http://www.paraview.org/Bug/view.php?id=10433 ), but in the meantime, is it
>> possible with the programmable filter?
>>
>>
>>
>> Thanks,
>>
>>
>>
>> Alan
>>
>>
>>
>>
>>
>>
>> _______________________________________________
>> 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
>>
>
>
>
> --
> Cory Quammen
> R&D Engineer
> Kitware, Inc.
>
> _______________________________________________
> 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
>


More information about the ParaView mailing list