[vtkusers] How to display the mesh not the just 3D

David Doria daviddoria at gmail.com
Mon Jan 2 18:15:06 EST 2012


On Mon, Jan 2, 2012 at 6:03 PM, Ali Habib <ali.mahmoud.habib at gmail.com>wrote:

> I read STL I want to display it as mesh, not as 3D
>
> I use the following code
>
>             string filename = @"c:\Soft_Tissue.stl";
>             vtkSTLReader reader = new vtkSTLReader();
>             reader.SetFileName(filename);
>             vtk.vtkPolyDataMapper coneMapper = new vtk.vtkPolyDataMapper();
>             coneMapper.SetInput(reader.GetOutput());
>             vtk.vtkActor coneActor = new vtk.vtkActor();
>             coneActor.SetMapper(coneMapper);
>             vtk.vtkRenderer ren1 = new vtk.vtkRenderer();
>             ren1.AddActor(coneActor);
>             ren1.SetBackground(0.0f, 0.0f, 0.0f); renWin.AddRenderer(ren1);
>
> any idea how to solve that
>
> Best regards
>

I think you're looking for this?
http://www.vtk.org/Wiki/VTK/Examples/Cxx/Visualization/Wireframe

David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20120102/d2303c60/attachment.htm>


More information about the vtkusers mailing list