A quick google finds this:

At 09:59 AM 12/30/2006, tony hakki wrote:

hello;
Can I use the following code for obtain STL file's all (x,y,z) surface coordinates?Thanks in advance
tony


double X[3], Y[3], Z[3];

vtkSTLReader *read = vtkSTLReader::New();

Tony,

Yes, if you first do a:

read>Update();
It seems to me this piece of software may be able extract Z data from an stl file given X & Y



http://www.vtk.org/