MantisBT - VTK |
View Issue Details |
|
ID | Project | Category | View Status | Date Submitted | Last Update |
0012687 | VTK | (No Category) | public | 2011-10-31 05:25 | 2015-09-29 14:56 |
|
Reporter | Andreas Buykx | |
Assigned To | Andy Bauer | |
Priority | high | Severity | minor | Reproducibility | have not tried |
Status | closed | Resolution | reopened | |
Platform | | OS | | OS Version | |
Product Version | 5.8.0 | |
Target Version | | Fixed in Version | 6.2.0 | |
Project | TBD |
Type | incorrect functionality |
|
Summary | 0012687: vtkGeometryFilter corrupts cell data when converting unstructured grid |
Description | During conversion of unstructured grid (UG) to polydata (PD) using vtkGeometryFilter cell data gets lost if the UG contains combinations of vertices/lines/polys.
The cell type switch in vtkGeometryFilter::UnstructuredGridExecute creates cells in vtkCellArrays for vertices, lines, and polys. Each of these generates its own ids, causing e.g. a subsequent UG vertex and UG line cell to map to the same PD id. Consequently, the cell data of the UG vertex is overwritten by that of the UG line.
In the attached archive is a small program that demonstrates the issue, and XML files of the input UG and the output PD, and the program output reporting the corrupted cell data array.
Note: SALOME GUI VTKViewer_GeometryFilter.cxx has probably addressed this issue by using vtkPolyData::InsertNextCell instead of building verts, lines etc. separately (http://docs.salome-platform.org/salome_6_3_1/gui/tui/GUI/index.html [^])
|
Steps To Reproduce | |
Additional Information | |
Tags | hackaton |
Relationships | |
Attached Files | vtkGeometryFilter_issue.tgz (2,893) 2011-10-31 05:25 https://www.vtk.org/Bug/file/9050/vtkGeometryFilter_issue.tgz
vtkGeometryFilter.cxx (40,022) 2015-02-07 02:03 https://www.vtk.org/Bug/file/9/vtkGeometryFilter.cxx
vtkGeometryFilter.cxx.patch (22,478) 2015-02-07 02:05 https://www.vtk.org/Bug/file/10/vtkGeometryFilter.cxx.patch
TestGeometryFilterCellData.cxx (9,196) 2015-02-19 07:28 https://www.vtk.org/Bug/file/14/TestGeometryFilterCellData.cxx |
|
Issue History |
Date Modified | Username | Field | Change |
2011-10-31 05:25 | Andreas Buykx | New Issue | |
2011-10-31 05:25 | Andreas Buykx | File Added: vtkGeometryFilter_issue.tgz | |
2011-10-31 05:43 | Andreas Buykx | Note Added: 0027625 | |
2012-01-23 10:02 | Utkarsh Ayachit | Assigned To | => Leo Liu |
2012-01-23 10:02 | Utkarsh Ayachit | Status | backlog => tabled |
2013-07-22 20:03 | Dave DeMarle | Status | tabled => backlog |
2013-07-22 20:03 | Dave DeMarle | Note Added: 0031258 | |
2013-07-22 20:37 | Dave DeMarle | Status | backlog => expired |
2013-07-22 20:37 | Dave DeMarle | Note Added: 0031307 | |
2014-01-27 06:53 | Andreas Buykx | Note Edited: 0027625 | bug_revision_view_page.php?bugnote_id=27625#r727 |
2014-01-27 06:56 | Andreas Buykx | Note Added: 0032219 | |
2014-01-27 06:57 | Andreas Buykx | Note Deleted: 0032219 | |
2014-01-27 07:03 | Andreas Buykx | Note Added: 0032221 | |
2014-01-27 07:03 | Andreas Buykx | Status | expired => backlog |
2014-01-27 07:03 | Andreas Buykx | Resolution | open => reopened |
2014-10-01 20:09 | Berk Geveci | Tag Attached: hackaton | |
2014-10-02 10:57 | Andy Bauer | Assigned To | Leo Liu => Andy Bauer |
2014-10-02 13:18 | Andy Bauer | Status | backlog => active development |
2014-10-02 13:37 | Andy Bauer | Status | active development => gerrit review |
2014-10-02 14:12 | Andy Bauer | Note Added: 0033506 | |
2014-10-02 14:12 | Andy Bauer | Status | gerrit review => closed |
2014-10-02 14:12 | Andy Bauer | Resolution | reopened => fixed |
2014-10-02 14:12 | Andy Bauer | Fixed in Version | => 6.2.0 |
2015-02-07 02:03 | Andreas Buykx | Note Added: 0034182 | |
2015-02-07 02:03 | Andreas Buykx | Status | closed => backlog |
2015-02-07 02:03 | Andreas Buykx | Resolution | fixed => reopened |
2015-02-07 02:03 | Andreas Buykx | File Added: vtkGeometryFilter.cxx | |
2015-02-07 02:05 | Andreas Buykx | File Added: vtkGeometryFilter.cxx.patch | |
2015-02-07 02:05 | Andreas Buykx | Note Edited: 0034182 | bug_revision_view_page.php?bugnote_id=34182#r1027 |
2015-02-09 09:41 | Andy Bauer | Note Added: 0034194 | |
2015-02-09 13:13 | Andreas Buykx | Note Added: 0034196 | |
2015-02-10 01:03 | Andreas Buykx | Note Edited: 0034196 | bug_revision_view_page.php?bugnote_id=34196#r1029 |
2015-02-16 13:37 | Andy Bauer | Note Added: 0034221 | |
2015-02-16 13:37 | Andy Bauer | Status | backlog => active development |
2015-02-18 11:50 | Andreas Buykx | Note Added: 0034226 | |
2015-02-18 11:54 | Andy Bauer | Note Added: 0034227 | |
2015-02-19 07:27 | Andreas Buykx | Note Added: 0034259 | |
2015-02-19 07:28 | Andreas Buykx | File Added: TestGeometryFilterCellData.cxx | |
2015-02-19 07:29 | Andreas Buykx | Note Edited: 0034259 | bug_revision_view_page.php?bugnote_id=34259#r1035 |
2015-09-29 14:48 | Andreas Buykx | Note Added: 0035247 | |
2015-09-29 14:56 | Andy Bauer | Status | active development => closed |
Notes |
|
(0027625)
|
Andreas Buykx
|
2011-10-31 05:43
(edited on: 2014-01-27 06:53) |
|
|
|
(0031258)
|
Dave DeMarle
|
2013-07-22 20:03
|
|
moving all "tabled" bugs into "backlog" category since "tabled" is no longer used. |
|
|
(0031307)
|
Dave DeMarle
|
2013-07-22 20:37
|
|
Leo no longer works on the project. If these issues still exist in 6.0, please reopen them and assign to Dave DeMarle. |
|
|
(0032221)
|
Andreas Buykx
|
2014-01-27 07:03
|
|
Code review of 6.1.0 version: the loop over cells starting at line 707 creates cells in one of several vtkCellArrays, each of which returns a cell id that is subsequently used to copy cell data. The issue therefor still is not dealt with. |
|
|
(0033506)
|
Andy Bauer
|
2014-10-02 14:12
|
|
Commit for the fix with a test is:
commit 1e441c10cf0cfa91c19300d7f4c2661100213ec7
Author: Andrew Bauer <andy.bauer@kitware.com>
Date: Thu Oct 2 12:22:27 2014 -0400
Fixed incorrect cell data output.
Cell data arrays were being output wrong from the vtkGeometryFilter
due to getting the wrong output cell id and using that with
CopyData().
Change-Id: I9269d94961dbadded1d1d9d46104eb06a9269e0e |
|
|
(0034182)
|
Andreas Buykx
|
2015-02-07 02:03
(edited on: 2015-02-07 02:05) |
|
Hi, I saw the fix that was applied, and indeed now the number of cell data records is correct, however it still mixes up the cell data of the original cells. polydata is traversed in order verts/lines/triangles/polys and so the cell numbering in the polydata is not the same as in the unstructured grid. Suppose the ug has alternating line (cell ids 0,2,4,...) and triangle cells (1,3,5,...) then traversing the cells of the poly will first see cell data of original cells 0,2,4,... and then 1,3,5,...
I have a fix that addresses this, which I uploaded as a diff and as complete file.
|
|
|
(0034194)
|
Andy Bauer
|
2015-02-09 09:41
|
|
Can you try out the following version of VTK:
commit 3cf2f8893474c9fa5b4a205d50c38000b8a933b8
Author: Paul Edwards <p.edwards@iconcfd.com>
Date: Wed Jan 28 16:26:46 2015 -0500
Fixing how polydata cells are deleted.
Change-Id: I153cd51c9948648338f5219288ed76acc2818572
If this doesn't fix your issue, please let me know. |
|
|
(0034196)
|
Andreas Buykx
|
2015-02-09 13:13
(edited on: 2015-02-10 01:03) |
|
Hi Andy,
Suppose my ug has four cells with a single cell-data array with an array that contains their cell id:
cell-id 0 : VTK_LINE cell-data 0
cell-id 1 : VTK_VERTEX cell-data 1
cell-id 2 : VTK_LINE cell-data 2
cell-id 3 : VTK_VERTEX cell-data 3
The current version will generate poly-data with (traversing first verts then lines):
0 : VTK_VERTEX 0
1 : VTK_VERTEX 1
2 : VTK_LINE 2
3 : VTK_LINE 3
instead of
0 : VTK_VERTEX 1
1 : VTK_VERTEX 3
2 : VTK_LINE 0
3 : VTK_LINE 2
I don't think that the commit you referred to addresses the issue, as vtkGeometryFilter is filling a vtkPolyData, not removing stuff from it.
|
|
|
(0034221)
|
Andy Bauer
|
2015-02-16 13:37
|
|
|
|
(0034226)
|
Andreas Buykx
|
2015-02-18 11:50
|
|
any chance this makes it into 6.2.0? |
|
|
(0034227)
|
Andy Bauer
|
2015-02-18 11:54
|
|
I'm pushing to get it into 6.2.0. Do you mind checking on the bug fix? You can just check out master as of today for it. |
|
|
(0034259)
|
Andreas Buykx
|
2015-02-19 07:27
(edited on: 2015-02-19 07:29) |
|
Hi Andy, I built the current master on our system, and adapted the TestGeometryFilterCellData to be able to test it (we don't usually build the python part). This all worked nicely.
I'll attach the source of TestGeometryFilterCellData, because I'm not sure how to do this in git (your branch was abandoned???).
I wouldn't mind doing it, for practice sake, by creating a new branch, committing it, and have you review it.
|
|
|
(0035247)
|
Andreas Buykx
|
2015-09-29 14:48
|
|
This issue can be closed, I think: code is in VTK6.2.0 |
|