tags:

views:

36

answers:

1

Hello,

I currently have a small (I'm a complete beginner) project in VTK where I've used different vtkParametricFunctionSource objects and arranged them spatially. Now what I want to do is find a way to output all that data I'm currently rendering into a .stl file.

I don't know how I'd manage to convert my implicit parametric functions from their formula form that gives me the ellipses to some kind of point-set form that would allow me to output to .stl. I'm probably just not aware of some VTK class that helps me do this, but any and all help would be appreciated.

Best.

EDIT:

Also, in my VTK Scene, I've manipulated the position of some of the objects by changing the positions of the actors that are used to display them on screen. I would like to maintain this position as well in the outputted .stl file. So basically, how would one go about taking exactly what you see in the scene, shape and position wise, and placing all that data in one .stl file?

+1  A: 

a vtkActor only modifies the rendered representation of the data. Because of this you cannot easily write it out using pre-existing vtk writers.

What you want to do is apply a vtkTransformFilter to each vtkParametricFunctionSource with the transformation matrix being equal to the vtkActor for that vtkParametricFunctionSource. You can than group everything together with vtkAppendPolyData and write out that filters output with vtkSTLWriter.

RobertJMaynard
Add that's exactly what I did a few days ago :) Thanks!
sparkFinder
The vtk mailing list also is a great place to ask these type of questions.
RobertJMaynard