<div dir="ltr">Ooops, I gave you a not-fully-Python snippet. Try<div><br></div><div><span style="font-size:12.8000001907349px">pgt.SetOutputPointsPrecision(vtk.</span><span style="font-size:12.8000001907349px">vtkAlgorithm.</span><span style="color:rgb(0,0,0);font-family:Roboto,sans-serif;font-size:14px;line-height:22px;white-space:nowrap">DOUBLE_PRECISION )</span><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">instead.</div><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Aug 18, 2015 at 1:17 PM, Cory Quammen <span dir="ltr"><<a href="mailto:cory.quammen@kitware.com" target="_blank">cory.quammen@kitware.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">pgt.SetOutputPointsPrecision(vtkAlgorithm::<span style="color:rgb(0,0,0);font-family:Roboto,sans-serif;font-size:14px;line-height:22px;white-space:nowrap">DOUBLE_PRECISION )</span><br><div><span style="color:rgb(0,0,0);font-family:Roboto,sans-serif;font-size:14px;line-height:22px;white-space:nowrap"><br></span></div><div><span style="color:rgb(0,0,0);font-family:Roboto,sans-serif;font-size:14px;line-height:22px;white-space:nowrap">should work. Let us know if it doesn't.</span></div></div><div class="gmail_extra"><br><div class="gmail_quote"><div><div class="h5">On Tue, Aug 18, 2015 at 11:07 AM, Jaap Verheggen <span dir="ltr"><<a href="mailto:jpmverheggen@gmail.com" target="_blank">jpmverheggen@gmail.com</a>></span> wrote:<br></div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5">
  

    
  
  <div bgcolor="#FFFFFF" text="#000000">
    <br>
    <div><br>
      
      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 
      
      points.SetDataTypeToDouble()
      
      .<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>
      
      <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> # Rotate</p>
      <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> rotate = vtk.vtkTransform()</p>
      <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> rotate.RotateWXYZ(5.0, 0, 0, 1)</p>
      <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> pgt=vtk.vtkTransformPolyDataFilter()</p>
      <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> pgt.SetTransform(rotate)</p>
      <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> pgt.SetInput(delaunay.GetOutput())</p>
      <p style="margin-top:0px;margin-bottom:0px;margin-left:0px;margin-right:0px;text-indent:0px"> pgt.Update()</p><span><font color="#888888">
      
      <br>
      <br>
      <pre cols="72">-- 
---------------------------
Jaap Verheggen
</pre>
      <br>
    </font></span></div>
    <br>
  </div>

<br></div></div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" rel="noreferrer" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" rel="noreferrer" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" rel="noreferrer" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" rel="noreferrer" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" rel="noreferrer" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><div><br></div>-- <br><div>Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</font></span></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature">Cory Quammen<br>R&D Engineer<br>Kitware, Inc.</div>
</div></div>