<br><div class="gmail_quote">On Wed, Nov 25, 2009 at 1:29 AM, renlishen <span dir="ltr">&lt;<a href="mailto:renlishen@gmail.com">renlishen@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Hi everyone<br>
I have a question about vtkpolyDataNormals...<br>
My data is a point data set<br>
----------------------------------------------------------------------<br>
vtkPoints *trianglePoints = vtkPoints::New() ;<br>
trianglePoints-&gt;InsertPoint( 0, 0, 5, 0 ) ;<br>
trianglePoints-&gt;InsertPoint( 1, 5, 0, 0 ) ;<br>
trianglePoints-&gt;InsertPoint( 2, 0, -5, 0 ) ;<br>
trianglePoints-&gt;InsertPoint( 3, -5, 0, 0 ) ;<br>
trianglePoints-&gt;InsertPoint( 4, 0, 0, 5 ) ;<br>
<br>
static vtkIdType pts[6][3]={{0,1,3}, {1,2,3}, {0,4,1}, {1,4,2}, {2,4,3},<br>
{3,4,0}};<br>
<br>
vtkCellArray *polys = vtkCellArray::New();<br>
for (int i=0; i&lt;5; i++) polys-&gt;InsertNextCell(3,pts[i]);<br>
<br>
vtkPolyData *triangle = vtkPolyData::New();<br>
triangle-&gt;SetPoints( trianglePoints ) ;<br>
triangle-&gt;SetPolys( polys ) ;<br>
----------------------------------------------------------------------<br>
<br>
If I don&#39;t use vtkPolyDataNormals, I get correct number of points<br>
but when I use<br>
        vtkPolyDataNormals *triangleCellNormals = vtkPolyDataNormals::New() ;<br>
             triangleCellNormals-&gt;SetInput( triangle ) ;<br>
        triangleCellNormals-&gt;ComputeCellNormalsOff() ;<br>
        triangleCellNormals-&gt;ComputePointNormalsOn() ;<br>
        triangleCellNormals-&gt;ConsistencyOn() ;<br>
        triangleCellNormals-&gt;Update() ;<br>
I get the wrong number of points....<br>
does anyone tell me why is it?<br>
<br>
thanks for your help~<br>
<br></blockquote><div><br>Can you send a compilable example? Also, can you explain what goes wrong a bit more? What are the number of points in the correct and incorrect case? How are you getting the number of points. These are the things that should be included in the compilable example so we can take a look and make sure it works before sending it back to you.<br>
<br>Thanks,<br><br>David<br></div></div>