vtkPolyData::ReplaceLinkedCell does not seem to work

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

vtkPolyData::ReplaceLinkedCell does not seem to work

Mengda Wu-3
Hi All,

  I  am trying to delete one point on one end from a cell (VTK_POLY_LINE) from vtkPolyData.

 I tried to use ReplaceLinkedCell but it does not actually change the vtkPolyData. Why is that?

  What I did  was
  (1) BuildLinks()
  (2) RemoveCellReference(cellId)
  (3) ReplaceLinkedCell (cellId, npts, pts)    npts and pts are reconstructed from the old cell list minus the one point I was deleting.
  (4) Then I push the vtkPolyData to vtkCleanPolyData and deep copy the output

  Am I missing anything?

Thanks,
Mengda

_______________________________________________
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
Reply | Threaded
Open this post in threaded view
|

Re: vtkPolyData::ReplaceLinkedCell does not seem to work

Mengda Wu-3
Tried to debug a little bit. It seems that ReplaceLinkedCell or ReplaceCell can only replace with the same number points.
It does not or cannot change the size of one cell in the vtkCellArray due to the definition of vtkCellArray.



On Tue, Jan 26, 2016 at 5:53 PM, Mengda Wu <[hidden email]> wrote:
Hi All,

  I  am trying to delete one point on one end from a cell (VTK_POLY_LINE) from vtkPolyData.

 I tried to use ReplaceLinkedCell but it does not actually change the vtkPolyData. Why is that?

  What I did  was
  (1) BuildLinks()
  (2) RemoveCellReference(cellId)
  (3) ReplaceLinkedCell (cellId, npts, pts)    npts and pts are reconstructed from the old cell list minus the one point I was deleting.
  (4) Then I push the vtkPolyData to vtkCleanPolyData and deep copy the output

  Am I missing anything?

Thanks,
Mengda


_______________________________________________
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