[vtkusers] Re: Extrude a 3D object along 3D path ?

Goodwin Lawlor goodwin.lawlor at ucd.ie
Fri Nov 4 12:13:32 EST 2005


Hi Jim,

You can either use vtkSampleFunction on your vtkImplicitFunction input 
or vtkImplicitModeller on your vtkPolyData input (but 
vtkImplicitModeller is really just reversing the work of the contour 
filter you used).

vtkDataSetToImageFilter is an abstract superclass... you can't create an 
instances of it. Use one of its subclasses (you've used vtkShepardMethod 
already) instead.

In short... use vtkSampleFunction on your implicit function and set its 
vtkImageData output as the input to vtkSweptSurface.

hth

Goodwin

Jean-Marie Normand wrote:
> Thanks for your answer Goodwin,
> my problem is this SweptSurface only take a vtkImageData* as an input
> and my inputs are either vtkImplicitFunctions or vtkPolyData (when i
> pass my implicit function through a contour filter). I haven't succeeded
> in transforming those data into vtkImageData*, I tried to use a
> vtkDataSetToImageFilter but I got a compilation error  when doing
> 
> vtkDataSetToImageFilter *dataToImFil = vtkDataSetToImageFilter::New();
> the error being "error: invalid conversion from 'vtkObject*' to
> 'vtkDataSetToImageFilter*'"
> 
> I also tried the vtkShepardMethod to convert my vtkPolyDatas into
> vtkImageData but the resulting object hasn't got the same shape at all.
> 
> So I'm wondering how can I use the vtkSweptSurface with my data, any
> help would be appreciated.
> 
> Jim
> 
> Le mercredi 02 novembre 2005 à 20:23 +0000, Goodwin Lawlor a écrit :
> 
>>Jean-Marie Normand wrote:
>>
>>>Hi,
>>>I'd like to know whether it's possible in VTK to extrude a 3D-object
>>>(let's say a vtkPolyData) along a given 3D path for example to create a
>>>volume simulating the displacement of an object in the space.
>>>
>>>I haven't found any vtk classes that seems to do the trick but I may be
>>>wrong.
>>>Any help would be greatly appreciated, thanks in advance.
>>>
>>>
>>>Jim.
>>>
>>>
>>>_______________________________________________
>>>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
>>>
>>
>>Hi Jim,
>>
>>There was a patented class in vtk 4.x called vtkSweptSurface to do this. 
>>  You may be able to use vtkLinearExtrusionFilter (recursively or 
>>several filter in series) to achieve the same effect - it isn't patented.
>>
>>hth
>>
>>Goodwin
>>
>>_______________________________________________





More information about the vtkusers mailing list