<div dir="ltr">Hello everybody!<br><br>I need your help with a segmentation fault error.<br>Using gdb I understood where it is generated but I don't know how to modify the code to make it run.<br><br>Here's the portion of the code that I'm talking about:<br>
<br><br><i>vtkSmartPointer<vtkPolyData> polydata = reader->GetOutput();</i><br>(the reader is a vtkXMLPolyDataReader)<br><br><i>vtkFloatArray *PointNormalArray = vtkFloatArray::SafeDownCast( polydata->GetPointData()->GetNormals() ) ; <br>
<br>for(vtkIdType i = 0; i < PointNormalArray->GetNumberOfTuples(); i++) {....}</i><br> <br>everytime I call GetNumberOfTuples I have this error so I think the problem is on PointNormalArray.<br><br>Can somebody help me?<br>
<br>Thanks in advance<br><br>Elena<br></div>