<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi!</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I&nbsp;used vtkpolydatanormals to calculate 
normals.&nbsp; I uses a cone to visualize if the calculation is correct. i tried 
severel input dataset, only vtkplanesource works well. if i use vtksperesource, 
the normal"cone" shows in the wrong direction. My code looks like 
this:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkSphereSource *cylinder = 
vtkSphereSource::New();<BR>&nbsp; cylinder-&gt;SetRadius( 1 );<BR>&nbsp; 
cylinder-&gt;SetThetaResolution(50); <BR>&nbsp; 
cylinder-&gt;SetPhiResolution(50);</FONT></DIV>
<DIV><FONT face=Arial size=2>vtkTriangleFilter *Triangles = 
vtkTriangleFilter::New();<BR>&nbsp; 
Triangles-&gt;SetInput(cylinder-&gt;GetOutput());</FONT></DIV>
<DIV><FONT face=Arial size=2>vtkDecimatePro *deci = 
vtkDecimatePro::New();<BR>&nbsp;deci-&gt;SetInput(Triangles-&gt;GetOutput());<BR>&nbsp;deci-&gt;SetTargetReduction(0.0);<BR>&nbsp;deci-&gt;PreserveTopologyOn();</FONT></DIV>
<DIV><FONT face=Arial size=2>vtkPolyDataNormals *ViewNormals = 
vtkPolyDataNormals::New&nbsp; 
();<BR>&nbsp;ViewNormals-&gt;SetInput(deci-&gt;GetOutput());<BR>&nbsp;ViewNormals-&gt;SetFeatureAngle(60.0);<BR>&nbsp;ViewNormals-&gt;FlipNormalsOff();</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;ViewNormals-&gt;Update();</FONT></DIV>
<DIV><FONT face=Arial size=2>......</FONT></DIV>
<DIV><FONT face=Arial size=2>&nbsp;vtkPoints 
*datapoints=vtkPoints::New();<BR>&nbsp;datapoints=ViewNormals-&gt;GetOutput()-&gt;GetPoints();<BR>&nbsp;float 
points[3];<BR>&nbsp;float *normalen;<BR>&nbsp;vtkPolyData 
*profile=vtkPolyData::New();<BR>&nbsp;profile=(ViewNormals-&gt;GetOutput());</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;for(ID=0;ID&lt;nPoints;ID++)<BR>&nbsp;{</FONT></DIV>
<DIV><FONT face=Arial 
size=2>&nbsp;&nbsp;datapoints-&gt;GetPoint(ID,points);<BR></FONT><FONT 
face=Arial 
size=2>&nbsp;&nbsp;normalen=profile-&gt;GetPointData()-&gt;GetNormals()-&gt;GetTuple(ID);<BR>&nbsp;}</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>vtkConeSource *cone = 
vtkConeSource::New();<BR>&nbsp; cone-&gt;SetHeight( 0.5 );<BR>&nbsp; 
cone-&gt;SetRadius( 0.05 );<BR>&nbsp; cone-&gt;SetResolution( 20 );<BR>&nbsp; 
cone-&gt;SetCenter(points[0],points[1],points[2]);<BR>&nbsp; 
cone-&gt;SetDirection(normalen[0],normalen[1],normalen[2]);<BR></FONT></DIV>
<DIV><FONT face=Arial size=2>I expect that the cone shows in the direction of 
the normal (SetDirection), but it doesnīt. I tried a lot, but i canīt find the 
mistake. Maybe you have some ideas.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Thanks a lot</FONT></DIV>
<DIV><FONT face=Arial size=2>Bernhard</DIV></FONT>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV></BODY></HTML>