[vtkusers] normals in a vtp file

Purisima, Enrico Enrico.Purisima at cnrc-nrc.gc.ca
Fri May 6 16:36:05 EDT 2005


Hello,
 
Could someone guide me as to how to enter normal vector information into a vtp file? Below is an example of a vtp file for
a triangle defined by three points. I'd like to enter the normals at each point but get an error message if I uncomment the section below
containing the normals. Any help would be appreciated.
 
Thanks.
 
Enrico
 
<?xml version="1.0"?>
<VTKFile type="PolyData" version="0.1" >
<PolyData>
<Piece NumberOfPoints="3" NumberOfPolys="1">
 
<Points>
<DataArray type="Float32" NumberOfComponents="3" format="ascii">
-1.1128 -1.2333 -0.0112
-1.1778 -1.1778 -0.0778
-0.7997 -1.4227 -0.3227
</DataArray>
</Points>
 
<Polys>
<DataArray type="Int32" Name="connectivity" format="ascii">
0 1 2
</DataArray>
<DataArray type="Int32" Name="offsets" format="ascii">
3
</DataArray>
</Polys>
 
<!-- If I uncomment this section, I get errors reading the file into Paraview.
<PointData Normals="VertexNormals">
<DataArray type="Float32" NumberOfComponents="3" format="ascii">
-0.6699 -0.7424 -0.0068
-0.6196 -0.7840 0.0382
-0.5169 -0.8476 -0.1197
</DataArray>
</PointData>
-->
 
</Piece>
 
</PolyData>
</VTKFile>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20050506/4a338a69/attachment.htm>


More information about the vtkusers mailing list