[vtkusers] How to get grid result from vtkWarpVector ??

David E DeMarle dave.demarle at kitware.com
Tue May 13 12:30:47 EDT 2014


On Tue, May 13, 2014 at 12:06 PM, Fabio Canesin <fabio.canesin at gmail.com>wrote:

> Dear vtkusers,
>
> Can someone help in the usage of vtkWarpVector, I need to load the
> deformed grid, this should be the result of applying vtkWarpVector in
> the 'Total_displacement' field.
>
> I have tried:
>
> warp = vtk.vtkWarpVector()
> warp.SetInputConnection(pregrid.GetProducerPort())
> warp.Vectors = ['POINTS', 'Total_displacement']
> warp.SetScaleFactor(1.0)
> Extract = vtk.vtkExtractUnstructuredGrid()
> Extract.SetInputConnection(warp.GetOutputPort())
>

Are you missing an update here?
> Extract.Update()


> deformed_grid = Extract.GetOutput()
>
> Where pregrid is a vtkUnstrcturedGrid with the 'Total_displacement' as
> PointData. When I execute it I get the original mesh, without the
> warping.
>
> Any help ??
>
> Best regards,
> Fábio Canesin
> _______________________________________________
> 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 VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20140513/17e4a170/attachment.html>


More information about the vtkusers mailing list