<div dir="ltr">Gerrick is correct. Polyhedron require a different call. But,<span name="shinpei" class=""> shinpe's call should report an error I think.<br><br> // Description:<br>  // Insert/create cell in object by type and list of point ids defining<br>
  // cell topology. Most cells require just a type which implicitly defines<br>  // a set of points and their ordering. For non-polyhedron cell type, npts<br>  // is the number of unique points in the cell. pts are the list of global<br>
  // point Ids. For ****** polyhedron cell ************<br>  // a special input format is required.<br>  // npts is the number of faces in the cell. ptIds is the list of face stream:<br>  // (numFace0Pts, id1, id2, id3, numFace1Pts,id1, id2, id3, ...)<br>
  vtkIdType InsertNextCell(int type, vtkIdType npts, vtkIdType *ptIds);<br><br>// Desciption:<br>  // Insert/create a ******* polyhedron cell ********. npts is the number of unique points in<br>  // the cell. pts is the list of the unique cell point Ids. nfaces is the<br>
  // number of faces in the cell. faces is the face-stream<br>  // [numFace0Pts, id1, id2, id3, numFace1Pts,id1, id2, id3, ...].<br>  // All point Ids are global.<br>  vtkIdType InsertNextCell(int type, vtkIdType npts, vtkIdType *ptIds,<br>
                           vtkIdType nfaces, vtkIdType *faces);<br><br><br></span><span name="shinpei" class=""></span><span class=""></span><span class=""></span></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, May 28, 2013 at 12:38 PM, Gerrick Bivins <span dir="ltr"><<a href="mailto:Gerrick.Bivins@halliburton.com" target="_blank">Gerrick.Bivins@halliburton.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
That method doesn't work (at least for me and one other) for polyhedron. You have to use the "face stream" method described here:<br>
<a href="http://www.vtk.org/Wiki/VTK/Polyhedron_Support" target="_blank">http://www.vtk.org/Wiki/VTK/Polyhedron_Support</a><br>
<br>
Not sure if it's a bug or "works as designed".<br>
See wiki entry for example of how to make it work:<br>
<a href="http://www.vtk.org/Wiki/VTK/Examples/Broken/Cxx/GeometricObjects/Cell3DDemo" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Broken/Cxx/GeometricObjects/Cell3DDemo</a><br>
<br>
Gerrick<br>
<div><div class="h5"><br>
-----Original Message-----<br>
From: <a href="mailto:vtk-developers-bounces@vtk.org">vtk-developers-bounces@vtk.org</a> [mailto:<a href="mailto:vtk-developers-bounces@vtk.org">vtk-developers-bounces@vtk.org</a>] On Behalf Of David Doria<br>
Sent: Tuesday, May 28, 2013 6:51 AM<br>
To: shinpei<br>
Cc: VTK Developers<br>
Subject: Re: [vtk-developers] vtkUGrid InsertNextCell throws error<br>
<br>
On Sat, May 25, 2013 at 7:48 PM, shinpei <<a href="mailto:noro_shinpei@web.de">noro_shinpei@web.de</a>> wrote:<br>
> Hi,<br>
><br>
> I try to insert a new Cell into a vtkUGrid with the Function<br>
> "InsertNextCell"<br>
><br>
> vtkIdType pts[5];<br>
> pts[0] = e13;<br>
> pts[1] = e23;<br>
> pts[2] = e24;<br>
> pts[3] = e14;<br>
> pts[4] = e12;<br>
> UGrid->InsertNextCell(VTK_POLYHEDRON, 5, pts);<br>
><br>
> e** are vertex ids. These ids were generated by a vtkPointLocator.<br>
><br>
> But I get an error at runtime. Where is my mistake?<br>
<br>
<br>
This question is more appropriate for the vtk-users mailing list.<br>
<br>
David<br>
_______________________________________________<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>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div>----------------------------------------------------------------------<br>
This e-mail, including any attached files, may contain confidential and privileged information for the sole use of the intended recipient.  Any review, use, distribution, or disclosure by others is strictly prohibited.  If you are not the intended recipient (or authorized to receive information for the intended recipient), please contact the sender by reply e-mail and delete all copies of this message.<br>

<div class="HOEnZb"><div class="h5">_______________________________________________<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>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br>Unpaid intern in BillsBasement at noware dot com<br>
</div>