[vtkusers] How to add a new point to existing(!) vtkPolydata. Cannot find an answer!

Andy Bauer andy.bauer at kitware.com
Thu Dec 7 16:07:43 EST 2017


Hi AC,

>From a vtkPolyData (or any vtkPointSet) you'll want get the polydata's
vtkPoints object through GetPoints() and on that object you can call
InsertNextPoint(). To insert another cell into a polydata use the
InsertNextCell() method on vtkPolyData. Keep in mind that for the VTK
pipeline though that it's expected that filters do NOT modify their inputs.

On Thu, Dec 7, 2017 at 3:23 PM, alican <alican1812 at hotmail.com> wrote:

> I have looked into docs and examples, I have read a lot on this forum,
> there
> are options to delete points or cells, to replace a point or a cell, but no
> option to add. I know how to add point to a new polydata.
> I figured out that I can add a point to a new polydata and then use
> vtkAppendFilter.
> But it seems too complicate for so simple a task.
>
> So what should I do if I want to add a point or cell to existing polydata?
> Isn't there a simpler way?
>
> If it is a dumb question and I am missing something obvious, I am sorry.
> AC
>
>
>
> --
> Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at http://www.kitware.com/
> opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171207/a485f5f9/attachment.html>


More information about the vtkusers mailing list