[vtkusers] Save reflection result as STL file

Utkarsh Ayachit utkarsh.ayachit at kitware.com
Mon May 29 10:58:26 EDT 2017


Connect the `reflectionFilter` to a `vtkSTLWriter` [1].

e.g

vtkNew<vtkSTLWriter> writer;
writer->SetInputConnection(reflectionFilter->GetOutputPort());
writer->SetFileName("/tmp/sample.stl");
writer->Write();

You may want to also call   `reflectionFilter->CopyInputOn()` on the filter
if you want to have the original data along with its reflection in the STL
file.

Utkarsh

[1] http://www.vtk.org/doc/nightly/html/classvtkSTLWriter.html

On Mon, May 29, 2017 at 10:31 AM, guo7212 <guo7212 at 163.com> wrote:

> Hi all,
>     In this example
> http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/Reflection,  could
> anyone
> tell me how to save the result as a STL file ?
>
>     Thanks !
>
>
>
> --
> View this message in context: http://vtk.1045678.n5.nabble.
> com/Save-reflection-result-as-STL-file-tp5743446.html
> Sent from the VTK - Users mailing list archive at Nabble.com.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20170529/01517593/attachment.html>


More information about the vtkusers mailing list