[vtkusers] Converting vtkPolyData to vtkUnstructuredGrid for Exodus Export

Thompson, David C dcthomp at sandia.gov
Sun Jun 8 01:46:42 EDT 2008


Well, copying is going to be required no matter what because
vtkUnstructuredGrid stores cells in a single vtkCellArray while
vtkPolyData has a different cell array for each type of primitive.
That said, vtkCleanUnstructuredGrid probably does some extra
work you're not interested in (i.e., point merging).

    David
________________________________________
From: Karl Merkley [karl at elemtech.com]
Sent: Saturday, June 07, 2008 22:38
To: Thompson, David C
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] Converting vtkPolyData to vtkUnstructuredGrid for Exodus Export

I'm doing this from straight VTK code.  I did look at the
vtkCleanUnstructuredGrid code in Paraview and it looks like it does it
does lots of copying.

    Thanks,
         Karl

On Jun 7, 2008, at 11:26 PM, Thompson, David C wrote:

> If you're using ParaView, the CleanToGrid filter does what you want.
> I don't believe that filter is part of VTK, though, so I don't know
> about standalone VTK.
>
>    David
> ________________________________________
> From: vtkusers-bounces at vtk.org [vtkusers-bounces at vtk.org] On Behalf
> Of Karl Merkley [karl at elemtech.com]
> Sent: Saturday, June 07, 2008 21:21
> To: vtkusers at vtk.org
> Subject: [vtkusers] Converting vtkPolyData to vtkUnstructuredGrid
> for Exodus Export
>
> I have a vtkPolyData that I want to write out using the
> vtkExodusIIWriter which requires an unstructtured grid as input.
> What is the best way to convert from the vtkPolyData to a
> vtkUnstructuredGrid?
>
>    Thanks,
>         Karl
>
>
>
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at: http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>

---------------------------
Karl Merkley
karl at elemtech.com









More information about the vtkusers mailing list