Toron, <br><br>You are getting the error because you&#39;ve not included &lt;vtkPolyData.h&gt;<br>Adding this should help you compile the code. Also remove &#39;#include &quot;vtkIdType.h&quot;. Such a file doesn&#39;t exist. vtkIdType is defined in 
vtkPoints.h.<br><br>If you want to identify the vertex with the max X value and identify surfaces connected to this vertex, you can try the following:<br><span class="q">&nbsp; <br>double maxX = -9999;<br>vtkIdType maxXid = -1;
<br>for (vtkIdType i = 0; i &lt; points-&gt;GetNumberOfPoints(); i++)<br>{<br>&nbsp;&nbsp;&nbsp; double Pt[3];<br>&nbsp;&nbsp;&nbsp; points-&gt;GetPoint(i, Pt);<br>&nbsp;&nbsp;&nbsp; if (Pt[0] &gt; maxX)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; maxX = Pt[0];<br>&nbsp; &nbsp; &nbsp; &nbsp;&nbsp; maxXid = i;<br>
&nbsp; &nbsp; } <br>}<br>double Pt[3];<br>points-&gt;GetPoint(maxXid, Pt);<br></span>// you can move the vertex here by using points-&gt;SetPoint(maxXid, newPt);<br><br>// each surface on the cone is a cell<br>for (vtkIdType i = 0; i &lt; cone-&gt;GetOutput()-&gt;GetNumberOfCells(); i++)
<br>{<br>&nbsp;&nbsp;&nbsp; int numPts;<br>&nbsp;&nbsp;&nbsp; vtkIdType* pts;<br>&nbsp;&nbsp;&nbsp; cone-&gt;GetOutput()-&gt;GetCellPoints(i, numPts, pts)<br>&nbsp;&nbsp;&nbsp; for (vtkIdType j = 0; j &lt; numPts; j++)<br>&nbsp;&nbsp;&nbsp; {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if (*pts++ == maxXid)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; // cell i is a surface connected to vertex with max X
<br>&nbsp;&nbsp;&nbsp; }<br>}<br><br>HTH.<br>Shriram<br><br><br><div><span class="gmail_quote">On 10/22/07, <b class="gmail_sendername">Toron J.</b> &lt;<a href="mailto:ji_wi@yahoo.com">ji_wi@yahoo.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi Shriram,<br><br>Thanks for response!<br><br>I got the error message &quot;error: invalid use of incomplete type &#39;struct vtkPolyData&#39; &quot; related to the line &quot;points = cone-&gt;GetOutput()-&gt;GetPoints();&quot; when I compiled my program. I do not know how to correct it.
<br><br>Actually I want to move the vertex with the max X value of the cone and change the colors of the surfaces conjoint to this vertex. So i have to get all the vertices information including the each x-y-z and the points-index (rendering order) of each surface.
<br><br>Toron<br><br>my codes is here<br>--------------------------------------------------------------<br>#include &quot;vtkPolyDataMapper.h&quot;<br>#include &quot;vtkRenderWindow.h&quot;<br>#include &quot;vtkCamera.h&quot;
<br>#include &quot;vtkActor.h&quot;<br>#include &quot;vtkRenderer.h&quot;<br>#include &quot;vtkPoints.h&quot;<br>#include &quot;vtkCellArray.h&quot;<br>#include &quot;vtkIdType.h&quot;<br>#include &quot;vtkRenderWindowInteractor.h
&quot;<br>#include &quot;vtkInteractorStyleTrackballCamera.h&quot;<br><br>int main( int argc, char *argv[]
 )<br>{<span class="q"><br>&nbsp; vtkConeSource *cone = vtkConeSource::New();<br>&nbsp; cone-&gt;SetHeight( 3.0 );<br>&nbsp; cone-&gt;SetRadius( 1.0 );<br></span>&nbsp; cone-&gt;SetResolution( 10 );<span class="q"><br>&nbsp;<br>&nbsp; vtkPoints* points = vtkPoints::New();
<br>&nbsp; points = cone-&gt;GetOutput()-&gt;GetPoints();<br><br>&nbsp; for (vtkIdType i = 0; i &lt; points-&gt;GetNumberOfPoints(); i++)<br>&nbsp; {<br>&nbsp;&nbsp;&nbsp; double Pt[3];<br>&nbsp;&nbsp;&nbsp; points-&gt;GetPoint(i, Pt);<br>&nbsp;&nbsp;&nbsp; // ...<br>&nbsp;&nbsp;&nbsp; // Pt will now have the x, y, z coordinates of vertex i.
<br>&nbsp; }<br><br></span>&nbsp; //vtkCellArray *indexes = vtkCellArray::New();<br>&nbsp; //indexes = cone-&gt;GetOutput()-&gt;GetPoints(); <br><span class="q"><br>&nbsp; vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();<br>&nbsp; coneMapper-&gt;SetInput( cone-&gt;GetOutput() );
<br><br></span>&nbsp; vtkActor *coneActor = vtkActor::New();<br>&nbsp; coneActor-&gt;SetMapper( coneMapper );<br><br>&nbsp; vtkRenderer *ren1=
 vtkRenderer::New();<br>&nbsp; ren1-&gt;AddActor( coneActor );<br>&nbsp; ren1-&gt;SetBackground( 0.1, 0.2, 0.4 );<br><br>&nbsp; vtkRenderWindow *renWin = vtkRenderWindow::New();<br>&nbsp; renWin-&gt;AddRenderer( ren1 );<br>&nbsp; renWin-&gt;SetSize( 300, 300 );
<br><br>&nbsp; vtkRenderWindowInteractor *iren = vtkRenderWindowInteractor::New();<br>&nbsp; iren-&gt;SetRenderWindow(renWin);<br>&nbsp; iren-&gt;Initialize();<br>&nbsp; iren-&gt;Start();<br><br>&nbsp; cone-&gt;Delete();<br>&nbsp; coneMapper-&gt;Delete();
<br>&nbsp; coneActor-&gt;Delete();<br>&nbsp; ren1-&gt;Delete();<br>&nbsp; renWin-&gt;Delete();<br><br>&nbsp; return 0;<br>}<br>--------------------------------------------------------------<div><span class="e" id="q_115ca1567b0f453d_7"><br><br>
<br><br><br><b><i>Shriram Iyer &lt;<a href="mailto:shriram.uc@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">shriram.uc@gmail.com</a>&gt;</i></b> wrote:<blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">
 Toron,<br><br>I&#39;m not quite sure what you are trying to do here. If you just want to
 the location of <br>each vertex in the cone, you can use following code.<span><br><br>vtkPoints* points = vtkPoints::New(); <br>points = cone-&gt;GetOutput()-&gt;GetPoints(); <br><br></span>for (vtkIdType i = 0; i &lt; points-&gt;GetNumberOfPoints(); i++)
<br>{<br>&nbsp; double Pt[3];<br>&nbsp; points-&gt;GetPoint(i, Pt);<br>&nbsp; // Pt will now have the x, y, z coordinates of vertex i.<br>&nbsp;...<br>}<br><br> HTH.<br>Shriram<br><br><div><span class="gmail_quote">On 10/22/07, <b class="gmail_sendername">
Toron J.</b> &lt;<a href="mailto:ji_wi@yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ji_wi@yahoo.com</a>&gt; wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
 Thanks, Shriram.<br><br>I do know how to read &#39;cone-&gt;GetOutput()-&gt;GetPoints()&#39; you suggested. So I tired to add the below codes. <br>-------------------------------------------------------------------------
<br> &nbsp; vtkPoints *points =
 vtkPoints::New();<br>&nbsp;&nbsp;&nbsp; points = cone-&gt;GetOutput()-&gt;GetPoints(); <br><br>&nbsp; vtkCellArray *indexes = vtkCellArray::New();<br>&nbsp;&nbsp;&nbsp; indexes = cone-&gt;GetOutput()-&gt;GetPoints(); <br>------------------------------------------------------------------------ 
<br>They did work. Could you correct them or let me know any example like this?<br><span><br>Toron</span><div><span><br><br><br><br><br><br><b><i>Shriram Iyer &lt;<a href="mailto:shriram.uc@gmail.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
 shriram.uc@gmail.com</a>&gt;</i></b> wrote:<blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"> Use cone-&gt;GetOutput()-&gt;GetPoints() to get the vertices.<br><br>Shriram<br>
 <br><div><span class="gmail_quote">On 10/22/07, <b class="gmail_sendername">Toron J.</b> &lt;<a href="mailto:ji_wi@yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">ji_wi@yahoo.com</a> &gt; wrote: 
</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi All,<br><br>I used the following codes to build a simple cone.<br>---------------------------------------------------------------------------------------  
<br>&nbsp; vtkConeSource *cone = vtkConeSource::New();<br>&nbsp; &nbsp;&nbsp;&nbsp; cone-&gt;SetHeight( 3.0 );<br>&nbsp; &nbsp;&nbsp;&nbsp; cone-&gt;SetRadius( 1.0 );<br>&nbsp; &nbsp;&nbsp;&nbsp; cone-&gt;SetResolution( 6 );<br>&nbsp; <br>&nbsp; vtkPolyDataMapper *coneMapper = vtkPolyDataMapper::New();  
<br>&nbsp;&nbsp;&nbsp; &nbsp; coneMapper-&gt;SetInput( cone-&gt;GetOutput()  );<br>--------------------------------------------------------------------------------------<br>Does any one can help me to know how to get the position (x,y,z) of each vertex and the rendering index? &nbsp; &nbsp;&nbsp;
 Thanks in advance!  <br><span><br>Toron<br></span><span><div> __________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br><a href="http://mail.yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
  http://mail.yahoo.com</a> </div></span><br>_______________________________________________<br>This is the private VTK discussion list.<br>Please keep messages on-topic. Check the FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
  http://www.vtk.org/Wiki/VTK_FAQ</a><br>Follow this link to subscribe/unsubscribe:<br><a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">http://www.vtk.org/mailman/listinfo/vtkusers  
</a><br><br></blockquote></div><br> </blockquote><br><div> __________________________________________________<br>Do You
 Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br><a href="http://mail.yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)"> http://mail.yahoo.com</a> </div></span>
</div></blockquote></div><br> </blockquote><br><p> __________________________________________________<br>Do You Yahoo!?<br>Tired of spam?  Yahoo! Mail has the best spam protection around <br><a href="http://mail.yahoo.com" target="_blank" onclick="return top.js.OpenExtLink(window,event,this)">
http://mail.yahoo.com</a> </p></span></div></blockquote></div><br>