<div dir="ltr">I was able to do it..<div><br></div><div><div>  polys= skinnormals.GetOutput();</div><div>              polys.Update();</div><div>              polys.BuildCells();</div><div>              </div><div>              for (int i = 0; i < polys.GetNumberOfPoints(); i++)</div>
<div>              {</div><div>                  double[] p = new double[3];</div><div>                  p=polys.GetPoint(i);</div><div>              }</div><div>              vtkCellArray Cellarray = new vtkCellArray();</div>
<div>              Cellarray = polys.GetPolys();</div><div>              </div><div>              int numcells = Cellarray.GetNumberOfCells();</div><div>              </div><div>              vtkIdList idlist = new vtkIdList();</div>
<div>              Cellarray.InitTraversal();</div><div>              </div><div>              for (int j = 0; j < polys.GetNumberOfPolys(); j++)</div><div>              {</div><div>                  Cellarray.GetNextCell(idlist);</div>
<div>                  int a = idlist.GetId(0);</div><div>                  int b = idlist.GetId(1);</div><div>                  int c = idlist.GetId(2);</div><div>                  double[] pa = new double[3];</div><div>
                  pa = polys.GetPoint(a);</div><div>                  double[] pb = new double[3];</div><div>                  pb = polys.GetPoint(b);</div><div>                  double[] pc = new double[3];</div><div>                  pc = polys.GetPoint(c);</div>
<div>              }</div></div><div><br></div><div>I'm assuming pa, pb and pc conform a triangle..</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Jan 15, 2014 at 3:37 PM, Matias Montroull <span dir="ltr"><<a href="mailto:matimontg@gmail.com" target="_blank">matimontg@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Ok, no success so far. So, following my code below:<div><br><div><div class="im"><div><font face="arial, sans-serif">  vtkPolyDataNormals skinnormals = vtkPolyDataNormals.New();</font></div>
<div><font face="arial, sans-serif">              skinnormals.SetInputConnection(skinextractor.GetOutputPort());</font></div>
</div><div class="im"><div><font face="arial, sans-serif">              skinnormals.SetFeatureAngle(90.0);</font></div><div><font face="arial, sans-serif">              skinnormals.ComputePointNormalsOn();</font></div><div>
<font face="arial, sans-serif">              </font></div>
<div><font face="arial, sans-serif">              vtkPolyData polys = new vtkPolyData();</font></div><div><font face="arial, sans-serif">              </font></div><div><font face="arial, sans-serif"><br></font></div><div>

<font face="arial, sans-serif">              polys= skinnormals.GetOutput();</font></div><div><font face="arial, sans-serif">              polys.Update();</font></div></div><div><font face="arial, sans-serif">              polys.BuildCells();</font></div>
<div class="im">
<div><font face="arial, sans-serif">              </font></div><div><font face="arial, sans-serif">              for (int i = 0; i < polys.GetNumberOfPoints(); i++)</font></div><div><font face="arial, sans-serif">              {</font></div>

<div><font face="arial, sans-serif">                  double[] p = new double[3];</font></div><div><font face="arial, sans-serif">                  p=polys.GetPoint(i);</font></div><div><font face="arial, sans-serif">              }</font></div>

</div><div><font face="arial, sans-serif">              vtkCellArray Cellarray = new vtkCellArray();</font></div><div><font face="arial, sans-serif">              Cellarray = polys.GetPolys();</font></div><div><font face="arial, sans-serif">              </font></div>

<div><font face="arial, sans-serif">              int numcells = Cellarray.GetNumberOfCells();</font></div></div></div><div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">I see the number of cells but I'm not sure how to iterate through each Cell and get the triangles points..}</font></div>

<div><font face="arial, sans-serif"><br></font></div><div><font face="arial, sans-serif">Is there a C# example on how to use GetCellPoints??</font></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jan 15, 2014 at 2:48 PM, Matias Montroull <span dir="ltr"><<a href="mailto:matimontg@gmail.com" target="_blank">matimontg@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Yes, Cells.. I will take a look at those, thanks!</div><div><div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Wed, Jan 15, 2014 at 2:37 PM, lgriffiths <span dir="ltr"><<a href="mailto:lgriffiths.aero@gmail.com" target="_blank">lgriffiths.aero@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">By triangles I assume you mean the cells? You can use GetCell<br>
<br>
Take a look at GetPointCells and GetCellPoints, these will return The cells<br>
conntect to a point, or Points connected to a cell<br>
<br>
Remember to use polydata.BuildCells() or polydata.BuildLinks()<br>
<br>
Take a look here also if you want to loop over the connectivity:<br>
<a href="http://vtk.1045678.n5.nabble.com/Neighbours-of-a-point-in-a-mesh-td1236245.html#a1236246" target="_blank">http://vtk.1045678.n5.nabble.com/Neighbours-of-a-point-in-a-mesh-td1236245.html#a1236246</a><br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://vtk.1045678.n5.nabble.com/Obtain-Points-from-Polydata-tp5725372p5725414.html" target="_blank">http://vtk.1045678.n5.nabble.com/Obtain-Points-from-Polydata-tp5725372p5725414.html</a><br>



<div>Sent from the VTK - Users mailing list archive at Nabble.com.<br>
</div><div><div>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>