[vtkusers] vtkSmoothPolyDataFilter + unstructuredGrid

Bill Chivas noo134 at googlemail.com
Fri Dec 11 11:04:45 EST 2009


Thank you both.
I'll try out your suggestions.
By far, i tried the following pipeline:
1) UnstructuredGrid
2) vtkShrinkFilter (so i can see the hexahedrons)
3) vtkDataSetSurfaceFilter (!)
4) vtkSmoothPolyDataFilter

I get what i want. I'm not really sure if ALL hexahedrons are smoothed (and
not only the outer ones).
What do you think?

Thanks,
Bill




2009/12/11 David Gobbi <david.gobbi at gmail.com>

> Hmm... if GeometryFilter keeps all the points, then it's possible that
> you could generate a new vtkDataSet that combines the points from the
> smoothed polydata with the cells of your grid.  Something like this:
>
> smoothFilter->Update();
> gridProducer->Update();
> vtkDataSet *newdata = vtkDataSet::New();
> newdata->DeepCopy(gridProducer->GetOutput());
> newdata->SetPoints(smoothFilter->GetOutput()->GetPoints());
>
> Note that code like this can crash if the assumptions aren't correct.
> Also, only the outer layer of points will be smoothed, so the
> resulting data object might contain invalid cells.  But still, this
> should give you ideas about how to find a proper solution.
>
>    David
>
>
> On Fri, Dec 11, 2009 at 8:40 AM, Bill Chivas <noo134 at googlemail.com>
> wrote:
> > vtkGeometryFilter works fine. I wonder if i could get back to
> > unstructuredGrid and hexahedrons by using the points.
> > I noticed that the number of points are the same in unstructuredGrid and
> > vtkGeometryFilter (vtkPolyData).
> > Could i "reproduce" the original hexahedron topology?
> >
> > Thanks,
> > Bill
> >
> > 2009/12/11 David Gobbi <david.gobbi at gmail.com>
> >>
> >> On Fri, Dec 11, 2009 at 7:11 AM, Bill Chivas <noo134 at googlemail.com>
> >> wrote:
> >> > Hello all,
> >> >
> >> > I would like to use vtkSmoothPolyDataFilter  on an unstructuredGrid,
> but
> >> > i
> >> > read the particular filter applies only to vtkPolyData.
> >> > My unstructuredGrid consists of hexahedrons.
> >> > How could i use the filter?
> >> > One idea i thought is to extract the surface iterately and apply to
> >> > these
> >> > surfaces, but i don't know if it's ok.
> >>
> >> I've seen some people create a "skin" polydata with vtkGeometryFilter,
> >> apply the smoothing to the "skin" and then use a custom filter to
> >> propagate the smoothing throughout the interior of their mesh.  The
> >> vtkGeometryFilter is a basic anything-to-polydata filter, so it is
> >> easy to use.  The final step of using the smoothed polydata to create
> >> a smoothed mesh is nontrivial, though.
> >>
> >>    David
> >
> >
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20091211/6d6fa975/attachment.htm>


More information about the vtkusers mailing list