开发者

Outputting stl from multiple ellipse sources VTK

开发者 https://www.devze.com 2023-01-05 11:58 出处:网络
I currently have a small (I\'m a complete beginner) project in VTK where I\'ve used开发者_如何学Python different vtkParametricFunctionSource objects and arranged them spatially. Now what I want to do

I currently have a small (I'm a complete beginner) project in VTK where I've used开发者_如何学Python 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?


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.

0

精彩评论

暂无评论...
验证码 换一张
取 消