MantisBT - VTK
View Issue Details
0012660VTK(No Category)public2011-10-15 18:212016-08-12 09:55
Bryn Lloyd 
Dave DeMarle 
highminorhave not tried
closedmoved 
5.8.0 
 
TBD
incorrect functionality
0012660: InsertNextCell does not work on various dataset types, if directly from reader
If a dataset is directly from a reader (e.g. vtkPolyDataReader or vtkXMLPolyDataReader) then the InsertionLocation is not correctly set (it is set to zero, even if the data contains N>0 cells).

If a user tries to insert a cell in this dataset, the result will be wrong, because the point ids of the cell will be set at the wrong location.

Simply copying does not work, because the DeepCopy operation does not use the InsertNextCell to copy cells. Instead it copies also the InsertionLocation variable.

The only way to fix such a dataset, is to create a new cell array, and insert the cells into this array. I am sure the bug is in the readers. I don't know if it happens in all readers, but have observed it for XML and legacy readers for polydata and unstructured grids.

I will post a test, which illustrates the problem, and which can be added to verify that a fix actually resolved the issue.

No tags attached.
cxx test-InsertNextCellBug.cxx (4,045) 2011-10-15 18:22
https://www.vtk.org/Bug/file/9047/test-InsertNextCellBug.cxx
Issue History
2011-10-15 18:21Bryn LloydNew Issue
2011-10-15 18:22Bryn LloydFile Added: test-InsertNextCellBug.cxx
2013-07-22 17:21Dave DeMarleNote Added: 0031182
2013-07-22 17:21Dave DeMarleStatusbacklog => expired
2013-07-22 17:21Dave DeMarleResolutionopen => fixed
2013-07-22 17:21Dave DeMarleAssigned To => Dave DeMarle
2014-10-04 20:29Berk GeveciStatusexpired => backlog
2014-10-04 20:29Berk GeveciResolutionfixed => reopened
2016-07-06 16:48Berk GeveciStatusbacklog => expired
2016-07-06 16:48Berk GeveciNote Added: 0036252
2016-08-12 09:55Kitware RobotNote Added: 0037251
2016-08-12 09:55Kitware RobotStatusexpired => closed
2016-08-12 09:55Kitware RobotResolutionreopened => moved

Notes
(0031182)
Dave DeMarle   
2013-07-22 17:21   
If this bug is still present in 6.0.0, please reopen the bug report.
(0036252)
Berk Geveci   
2016-07-06 16:48   
Setting to status of bugs that have not been updated in the last year to expired. Please re-open if still important.
(0037251)
Kitware Robot   
2016-08-12 09:55   
Resolving issue as `moved`.

This issue tracker is no longer used. Further discussion of this issue may take place in the current VTK Issues page linked in the banner at the top of this page.