[Paraview] convert a multi-block structured grid into a single unstructured block

Paul Edwards paul.m.edwards at gmail.com
Fri Apr 18 05:20:56 EDT 2008


Thanks for everyones comments.  I made a plugin to merge the blocks.  I've
attached the files if anyone is interested.

Regards,
Paul

On 17/04/2008, Kent Eschenberg <eschenbe at psc.edu> wrote:
>
> Paul Edwards wrote:
> > Is there a way to convert a multi-block structured grid into a
> > single unstructured block?
> >
>
> There will always be tasks like this that ParaView can't do easily.
> Kitware will never catch up because we will keep inventing new things to do!
>
> A good solution is to build a version of VTK with Python and use it for
> little tasks like this. In your case the basic sequence would be
>
>  - create vtkAppendFilter
>  - read the multi-block grid
>  - loop over blocks and add each to the append filter
>  - write the append filter's output
>
> I used a similar Python program to combine multi-block PVD files sets into
> a smaller number of files.
>
> When the blocks share vertices we run the append filter's output through
> vtkCleanUnstructuredGrid before writing it. This requires a little work
> because this filter is in ParaView but not VTK. I pulled that filter from
> the ParaView source tree and added it to VTK following the instructions on
> the VTK Wiki page "Extending VTK".
>
> Hey Kitware - why are some really great classes like
> vtkCleanUnstructuredGrid in ParaView instead of VTK?
>
> Kent
> Pittsburgh Supercomputing Center
> _______________________________________________
> ParaView mailing list
> ParaView at paraview.org
> http://www.paraview.org/mailman/listinfo/paraview
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.paraview.org/pipermail/paraview/attachments/20080418/2d6a4a03/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkMergeBlocksFilter.h
Type: text/x-chdr
Size: 827 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20080418/2d6a4a03/attachment-0001.h>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkMergeBlocksFilter.xml
Type: text/xml
Size: 742 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20080418/2d6a4a03/attachment-0001.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: vtkMergeBlocksFilter.cxx
Type: text/x-c++src
Size: 1932 bytes
Desc: not available
URL: <http://www.paraview.org/pipermail/paraview/attachments/20080418/2d6a4a03/attachment-0001.cxx>


More information about the ParaView mailing list