[vtk-developers] How to export vtkRenderWindow to a stl file

Shawn Waldon shawn.waldon at kitware.com
Thu Aug 17 09:36:58 EDT 2017


Hi Richard,

The difference is the information the file format supports.  The VRML
format supports including color/textures, lighting information and most of
the information about the scene.  So it is an exporter given the
vtkRenderWindow where that information exists and it exports the entire
scene to the file.  The STL file format only stores geometry, so it is a
writer and should be given a single dataset as its input.  If you want to
export the whole scene to STL, your best path is probably to use
vtkAppendPolyData to group all the data into a single dataset and connect
that to the writer's input (be warned this will not get matrix transforms
that are applied to the actors).

HTH,
Shawn

On Thu, Aug 17, 2017 at 3:00 AM, Richard Anderson via vtk-developers <
vtk-developers at vtk.org> wrote:

> Hello,
>
> I can export vtkRenderWindow to VMRL file. Is there any way to export it to
> STL file?
>
> I did not find vtkSTLExporter. There is only vtkSTLWriter. But it does not
> accept vtkRenderWindow.
>
> Thanks,
> Richard
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Search the list archives at: http://markmail.org/search/?q=vtk-developers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtk-developers
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20170817/083472d2/attachment-0001.html>


More information about the vtk-developers mailing list