[vtkusers] surface expansion
Richard Brown
richard.j.brown at live.co.uk
Tue Apr 19 11:39:00 EDT 2016
Wonderful, thanks a lot guys.
Regards,
Richard
> On 19 Apr 2016, at 17:29, Bill Lorensen <bill.lorensen at gmail.com> wrote:
>
> Here is a c++ example. When I get a chance, I'll add it to the wiki examples...
> Try it with this file and a scale factor of 5 (second argument).
> https://raw.githubusercontent.com/lorensen/VTKWikiExamples/master/Testing/Data/Torso.vtp
>
> On Tue, Apr 19, 2016 at 9:12 AM, David Gobbi <david.gobbi at gmail.com> wrote:
>> I don't know of any example that does specifically what you want.
>> But the pipeline would go something like this:
>>
>> 1) use vtkPolyDataNormals to compute normals at each point.
>>
>> 2) feed the output of vtkPolyDataNormals into vtkWarpVector.
>>
>> 3) tell vtkWarpVector to use the normals, and give it a scale factor:
>>
>> warp.SetInputConnection(norms.GetOutputPort())
>>
>> warp.SetInputArrayToProcess(0, 0, 0,
>> vtkDataObject.FIELD_ASSOCIATION_POINTS,
>> vtkDataSetAttributes.NORMALS)
>>
>> warp.SetScaleFactor(5.0)
>>
>> I've never actually tried this, but in theory, it should work.
>>
>> - David
>>
>>
>>
>
>
>
> --
> Unpaid intern in BillsBasement at noware dot com
> <WarpSurface.cxx>
More information about the vtkusers
mailing list