<P class=MsoNormal>Hi vtk Users,</P>
<P class=MsoNormal>I have some 3D points in vtkPolyData; I want to compute normal for them. I tried the following way, the code is working till triangulation but vtkPolyDataNormals is not working. I have two questions on this problem:</P>
<P class=MsoNormal>1. Why vtkPolyDataNormals is not working?</P>
<P class=MsoNormal>2. What is the probable reason for getting the following error?<SPAN style="mso-spacerun: yes"> </SPAN>if I try to execute vtkDataArray *p = Snormals->GetOutput()->GetPointData()->GetNormals(); </P>
<P class=MsoNormal>I'll get the error as <B>error C2039: 'GetNormal' : is not a member of 'vtkDataArray'</B></P>
<P class=MsoNormal>Can someone throw light on this </P>
<P class=MsoNormal>Here is the code I am working on:</P>
<P class=MsoNormal>vtkGeometryFilter *geoms = vtkGeometryFilter::New();</P>
<P class=MsoNormal>geoms->SetInput(Polydata output);</P>
<P class=MsoNormal>geoms->Update();</P>
<P class=MsoNormal>vtkDelaunay2D *Ttriangulate =vtkDelaunay2D::New();</P>
<P class=MsoNormal>Ttriangulate->BoundingTriangulationOff();</P>
<P class=MsoNormal>Ttriangulate->SetTolerance(stltolerance);</P>
<P class=MsoNormal>Ttriangulate->SetAlpha(0.01);</P>
<P class=MsoNormal>Ttriangulate->ReleaseDataFlagOn();</P>
<P class=MsoNormal>Ttriangulate->SetInput(geoms->GetOutput());</P>
<P class=MsoNormal>Ttriangulate->Update();</P>
<P class=MsoNormal>vtkPolyDataNormals *Snormals=vtkPolyDataNormals::New();</P>
<P class=MsoNormal>Snormals->SetInput(Ttriangulate->GetOutput());</P>
<P class=MsoNormal>Snormals-> SetFeatureAngle(30.0);</P>
<P class=MsoNormal>Snormals->SetComputePointNormals(1);</P>
<P class=MsoNormal>Snormals->SplittingOff();</P>
<P class=MsoNormal>Snormals->ConsistencyOn();</P>
<P class=MsoNormal>Snormals->Update();</P>
<P class=MsoNormal>float *n = Snormals->GetOutput()->GetPointData()->GetNormals()->GetNormal(ptId);</P>
<P class=MsoNormal>Thanks in advance<SPAN style="mso-spacerun: yes"> </SPAN></P>
<P class=MsoNormal>Siddu</P>
<P class=MsoNormal> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></P><p><img src="http://us.i1.yimg.com/us.yimg.com/i/icon/auto.gif" height=17 width=28>
Post your ad on Yahoo! India Autos.
Check out the used <a href="http://in.classifieds.yahoo.com/display/autos?ct_hft=ct_hft=search/list&leve
l=0:Car&mtype=86308693:Maruti" target="_blank">Maruti</a>, <a href="http://in.classifieds.yahoo.com/display/autos?ct_hft=ct_hft=search/list&lev
el=0:Car&mtype=86308611:Fiat" target="_blank">Fiat</a> and <a href="http://in.classifieds.yahoo.com/display/autos?ct_hft=ct_hft=search/list&leve
l=0:Car&mtype=86308612:Ford" target="_blank">Ford</a> models on sale now.