I think it should be GetTuple3 instead of GetTuple<br><br><div><span class="gmail_quote">On 11/21/05, <b class="gmail_sendername">Helena Kaldeira</b> <<a href="mailto:h_kaldeira@hotmail.co.uk">h_kaldeira@hotmail.co.uk</a>
> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">hello everybody,<br>I am trying to load a 3D model and calculate its normal so that I may print
<br>the values of its normals .I h ave got the following code which is derived<br>from another thread of VTK partly found at<br><a href="http://public.kitware.com/pipermail/vtkusers/2004-September/076497.html">http://public.kitware.com/pipermail/vtkusers/2004-September/076497.html
</a><br><br>*****************************************************************************<br>#include "vtkPolyDataMapper.h"<br>#include "vtkRenderWindow.h"<br>#include "vtkCamera.h"<br>#include "
vtkActor.h"<br>#include "vtkRenderer.h"<br>#include "vtkXMLPolyDataReader.h"<br>#include "vtkPolyDataNormals.h"<br>#include "vtkPolyData.h"<br>#include "vtkPointData.h"
<br><br><br>int main( int argc, char *argv[] )<br>{<br>vtkXMLPolyDataReader *reader1 = vtkXMLPolyDataReader::New();<br> reader1->SetFileName("C:\\VtkProjects\\normal\\bunny_vtp_zipper.vtp");<br><br> vtkPolyDataNormals *dataset = vtkPolyDataNormals::New();
<br> dataset->SetInput(reader1->GetOutput());<br> dataset->SetFeatureAngle(60.0);<br> dataset->FlipNormalsOff();<br> dataset->Update();<br><br> for (int pointID=0; pointID < dataset->GetOutput()->GetNumberOfPoints();
<br>pointID++)<br> {<br> float *point =<br>(float*)(reader1->GetOutput()->GetPointData()->GetNormals()->GetTuple(pointID));<br><br> printf("x
-> %f",(float)point[0]);<br> printf("y
-> %f",(float)point[1]);<br> printf("z
-> %f",(float)point[2]);<br><br><br>}<br>}<br>*********************************************************************<br>I am new to mailing list,forwarding my mail to the ppl who contributed in<br>the above mentioned discussion,please let me know if it is not allowed :)
<br>I m really desperate to get any hint whts wrong on with my code<br><br>Thanks and Regards,<br>Helena<br><br>_________________________________________________________________<br>MSN Messenger 7.5 is now out. Download it for FREE here.
<br><a href="http://messenger.msn.co.uk">http://messenger.msn.co.uk</a><br><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at:
<a href="http://www.vtk.org/Wiki/VTK_FAQ">http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers">http://www.vtk.org/mailman/listinfo/vtkusers
</a><br></blockquote></div><br>