[vtkusers] vtkpolydata
Gopalakrishnan, Gowri
Gowri.Gopalakrishnan at inteq.com
Tue Oct 16 08:30:42 EDT 2001
Hi
this question of mine is related to my question this morning.
I use vtkpoints to initialize points
vtkPoints *points = vtkPoints::New(VTK_DOUBLE);
my points are ex:386761.22 386761.23 etc
I then use vtkPolydata to set my points and lines
vtkPolyData *profile = vtkPolyData::New();
profile -> SetPoints(points);
profile -> SetLines(lines);
And then I use vtkpolydatawriter to write data in a file and then a
tubefilter etc to render.
If i use the following code
double xOut[3];
points->GetPoint(3, xOut);
to test the value of a point then it is the correct double precision value.
However the vtkfile I have using the
vtkdatawriter does not have the precise value. I has lost the decimal points
and the values are rounded off
ex 386761 or 6.43702e+006
Any of you have any idea why the vtkPolydata and the polydatawriter does not
hold the precision?.
Also I noticed that this happens if you change the data type to float from
double.
Is there anyway to force the vtkpolydata to have the double?.
Thanks
Gowri
More information about the vtkusers
mailing list