<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p><font size="+1">Hello!</font> </p>
    <p><font size="+1">I'm very new in vtk and I'm trying to visualize a
        triangular mesh describing a geometry (something like stl) with
        vtk and Qt. The result seems to be half transparent or something
        like that (see the picture). When I visualize it using Paraview
        it looks like as a solid. I've tried to auto orient normals and
        use ReverseSense but without success.</font></p>
    <p><font size="+1">Could you please tell me, what am I doing wrong?</font></p>
    <p><font size="+1">Thank you.<br>
      </font></p>
    <p><font size="+1"><br>
      </font></p>
    <p><font size="+1"> The code is:<br>
      </font></p>
    <p><font size="+1"> </font>vtkSmartPointer<vtkPoints> points
      = vtkSmartPointer<vtkPoints>::New();<br>
      <br>
          points->SetNumberOfPoints(surf_mesh.pt.size());<br>
          for (uint i=0; i<surf_mesh.pt.size(); ++i)<br>
          {<br>
              points->SetPoint(i, surf_mesh.pt[i].x,
      surf_mesh.pt[i].y, surf_mesh.pt[i].z);<br>
          };<br>
      <br>
          vtkSmartPointer<vtkCellArray> polys =
      vtkSmartPointer<vtkCellArray>::New();<br>
      <br>
          for (uint i=0; i<surf_mesh.tr.size(); ++i)<br>
          {<br>
              polys->InsertNextCell(3);<br>
              polys->InsertCellPoint(surf_mesh.tr[i].p1);<br>
              polys->InsertCellPoint(surf_mesh.tr[i].p2);<br>
              polys->InsertCellPoint(surf_mesh.tr[i].p3);<br>
          };<br>
      <br>
          vtkPolyData * polydata = vtkPolyData::New();<br>
          polydata->SetPoints(points);<br>
          polydata->SetPolys(polys);<br>
      <br>
      <br>
          vtkSmartPointer<vtkPolyDataMapper> mapper =
      vtkSmartPointer<vtkPolyDataMapper>::New();<br>
          mapper->SetInputData(polydata);<br>
      <br>
          vtkSmartPointer<vtkActor> actor =
      vtkSmartPointer<vtkActor>::New();<br>
          actor->SetMapper(mapper);<br>
          actor->GetProperty()->SetRepresentationToSurface();<br>
          actor->GetProperty()->SetFrontfaceCulling(0);<br>
          actor->GetProperty()->SetBackfaceCulling(0);<br>
      <br>
      <br>
          renderer->AddActor(actor);<br>
      <br>
          renderer->ResetCamera();</p>
  </body>
</html>