[vtk-developers] [VTK 0012660]: InsertNextCell does not work on various dataset types, if directly from reader

Mantis Bug Tracker mantis at public.kitware.com
Sat Oct 15 18:21:07 EDT 2011


The following issue has been SUBMITTED. 
====================================================================== 
http://vtk.org/Bug/view.php?id=12660 
====================================================================== 
Reported By:                Bryn Lloyd
Assigned To:                
====================================================================== 
Project:                    VTK
Issue ID:                   12660
Category:                   (No Category)
Reproducibility:            have not tried
Severity:                   minor
Priority:                   high
Status:                     backlog
Project:                    TBD 
Type:                       incorrect functionality 
Resolution:                 open
Fixed in Version:           
====================================================================== 
Date Submitted:             2011-10-15 18:21 EDT
Last Modified:              2011-10-15 18:21 EDT
====================================================================== 
Summary:                    InsertNextCell does not work on various dataset
types, if directly from reader
Description: 
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.


====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2011-10-15 18:21 Bryn Lloyd     New Issue                                    
======================================================================




More information about the vtk-developers mailing list