<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=utf-8">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <br>
    <div class="moz-forward-container"><br>
      <meta http-equiv="content-type" content="text/html; charset=utf-8">
      Dear all, <br>
      <br>
      I am trying to transform polydata using double precision using
      python and vtk 5.<br>
      <br>
      I can set the datatype for the points via 
      <meta name="qrichtext" content="1">
      points.SetDataTypeToDouble()
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <style type="text/css">
p, li { white-space: pre-wrap; }</style>.<br>
      I create a surface using Delaunay. <br>
      Using delaunay.GetOutput().GetPoints().GetDataType() I can check
      that I still have double as datatype (11)<br>
      After the transformation, the datatype is float,
      pgt.GetOutput().GetPoints().GetDataType() gives float (10)<br>
      <br>
      How can I transform the polydata keeping double precision?<br>
      <br>
      Thanks in advance for your answer<br>
      <br>
      Code:<br>
          points = vtk.vtkPoints()<br>
          points.SetDataTypeToDouble()<br>
          vertices = vtk.vtkCellArray()<br>
          ------ # Fill points and vertices with data      <br>
          # Create a polydata object<br>
          point_pd = vtk.vtkPolyData()<br>
          # Set the points and vertices as the geometry and topology of
      the polydata<br>
          point_pd.SetPoints(points)<br>
          point_pd.SetVerts(vertices)<br>
          # make the delaunay mesh<br>
          boundary = vtk.vtkPolyData()<br>
          boundary.SetPoints(point_pd.GetPoints())<br>
          boundary.SetPolys(vertices)<br>
          delaunay = vtk.vtkDelaunay2D()<br>
          delaunay.SetInput(point_pd)<br>
          delaunay.SetSource(boundary)<br>
          delaunay.Update()<br>
      <meta name="qrichtext" content="1">
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"> # Rotate</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"> rotate = vtk.vtkTransform()</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"> rotate.RotateWXYZ(5.0, 0, 0, 1)</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"> pgt=vtk.vtkTransformPolyDataFilter()</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"> pgt.SetTransform(rotate)</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"> pgt.SetInput(delaunay.GetOutput())</p>
      <p style=" margin-top:0px; margin-bottom:0px; margin-left:0px;
        margin-right:0px; -qt-block-indent:0; text-indent:0px;
        -qt-user-state:0;"> pgt.Update()<!--EndFragment--></p>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
      <style type="text/css">
p, li { white-space: pre-wrap; }
</style><br>
      <br>
      <pre class="moz-signature" cols="72">-- 
---------------------------
Jaap Verheggen
</pre>
      <br>
    </div>
    <br>
  </body>
</html>