[vtk-developers] vtkUGrid InsertNextCell throws error

Bill Lorensen bill.lorensen at gmail.com
Tue May 28 14:06:08 EDT 2013


Gerrick is correct. Polyhedron require a different call. But, shinpe's call
should report an error I think.

 // Description:
  // Insert/create cell in object by type and list of point ids defining
  // cell topology. Most cells require just a type which implicitly defines
  // a set of points and their ordering. For non-polyhedron cell type, npts
  // is the number of unique points in the cell. pts are the list of global
  // point Ids. For ****** polyhedron cell ************
  // a special input format is required.
  // npts is the number of faces in the cell. ptIds is the list of face
stream:
  // (numFace0Pts, id1, id2, id3, numFace1Pts,id1, id2, id3, ...)
  vtkIdType InsertNextCell(int type, vtkIdType npts, vtkIdType *ptIds);

// Desciption:
  // Insert/create a ******* polyhedron cell ********. npts is the number
of unique points in
  // the cell. pts is the list of the unique cell point Ids. nfaces is the
  // number of faces in the cell. faces is the face-stream
  // [numFace0Pts, id1, id2, id3, numFace1Pts,id1, id2, id3, ...].
  // All point Ids are global.
  vtkIdType InsertNextCell(int type, vtkIdType npts, vtkIdType *ptIds,
                           vtkIdType nfaces, vtkIdType *faces);




On Tue, May 28, 2013 at 12:38 PM, Gerrick Bivins <
Gerrick.Bivins at halliburton.com> wrote:

> That method doesn't work (at least for me and one other) for polyhedron.
> You have to use the "face stream" method described here:
> http://www.vtk.org/Wiki/VTK/Polyhedron_Support
>
> Not sure if it's a bug or "works as designed".
> See wiki entry for example of how to make it work:
> http://www.vtk.org/Wiki/VTK/Examples/Broken/Cxx/GeometricObjects/Cell3DDemo
>
> Gerrick
>
> -----Original Message-----
> From: vtk-developers-bounces at vtk.org [mailto:
> vtk-developers-bounces at vtk.org] On Behalf Of David Doria
> Sent: Tuesday, May 28, 2013 6:51 AM
> To: shinpei
> Cc: VTK Developers
> Subject: Re: [vtk-developers] vtkUGrid InsertNextCell throws error
>
> On Sat, May 25, 2013 at 7:48 PM, shinpei <noro_shinpei at web.de> wrote:
> > Hi,
> >
> > I try to insert a new Cell into a vtkUGrid with the Function
> > "InsertNextCell"
> >
> > vtkIdType pts[5];
> > pts[0] = e13;
> > pts[1] = e23;
> > pts[2] = e24;
> > pts[3] = e14;
> > pts[4] = e12;
> > UGrid->InsertNextCell(VTK_POLYHEDRON, 5, pts);
> >
> > e** are vertex ids. These ids were generated by a vtkPointLocator.
> >
> > But I get an error at runtime. Where is my mistake?
>
>
> This question is more appropriate for the vtk-users mailing list.
>
> David
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
> ----------------------------------------------------------------------
> 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.
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtk-developers
>
>


-- 
Unpaid intern in BillsBasement at noware dot com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtk-developers/attachments/20130528/3efb5a6c/attachment.html>


More information about the vtk-developers mailing list