[vtkusers] normals in a vtp file

Rusty Blue rusty.blue at kitware.com
Fri May 6 16:48:27 EDT 2005


Hey Enrico,

 

Your missing the "Name" attribute for your normals DataArray.  add 

 

     Name = "VertexNormals"

 

to the attribute list .

 

Rusty

 

  _____  

From: vtkusers-bounces+rusty.blue=kitware.com at vtk.org
[mailto:vtkusers-bounces+rusty.blue=kitware.com at vtk.org] On Behalf Of
Purisima, Enrico
Sent: Friday, May 06, 2005 4:36 PM
To: 'vtkusers at vtk.org'
Subject: [vtkusers] normals in a vtp file

 

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/5ddfaa8b/attachment.htm>


More information about the vtkusers mailing list