Hi all,<br><br>I am new to Paraview and I could not find any clear information on how 2D glyphs are oriented. Is there a way to control their normals to the the 2D plane?<br><br>Here is the code I use to generate a cloud of points from a text file to which I would like to assign different filters (it can be 3D or 2D, but circles oriented by their normals would be perfect...)<br>
<br>/// here is the part to recover the data<br>std::ifstream file ("cracks.txt",std::ios::in);<br> if(file){<br> while ( !file.eof() ){ <br> std::string line;<br> Real p0,p1,p2,s,o0,o1,o2;<br>
while ( std::getline(file, line) ){<br> file >> p0 >> p1 >> p2 >> s >> o0 >> o1 >> o2;<br> vtkIdType pid[1];<br> pid[0] = crackPos->InsertNextPoint(p0, p1, p2);<br>
crackCells->InsertNextCell(1,pid);<br> crackSize->InsertNextValue(s);<br> float n[3] = { o0,o1,o2 };<br> crackOri->InsertNextTupleValue(n);<br>
}<br> }<br> file.close();<br>} <br> <br>/// here is the code to create the VTK file<br>vtkSmartPointer<vtkUnstructuredGrid> crackUg = vtkSmartPointer<vtkUnstructuredGrid>::New();<br>
crackUg->SetPoints(crackPos);<br>crackUg->SetCells(VTK_VERTEX, crackCells);<br>crackUg->GetPointData()->AddArray(crackSize);<br>crackUg->GetPointData()->AddArray(crackOri); <br> <br>vtkSmartPointer<vtkXMLUnstructuredGridWriter> writer = vtkSmartPointer<vtkXMLUnstructuredGridWriter>::New();<br>
string fn=fileName+"cracks."+lexical_cast<string>scene->currentIteration)+".vtu";<br>writer->SetFileName(fn.c_str());<br>writer->SetInput(crackUg);<br>writer->Write();<br><br>Do you have any advice?<br>
<br>Tahnks a lot in advance<br><br> Luc<br><br><br> <br>