MantisBT - VTK
View Issue Details
0011104VTK(No Category)public2010-08-09 09:062016-08-12 09:55
BHopfer 
Berk Geveci 
normalmajoralways
closedmoved 
 
 
0011104: Most subclasses of vtkCell3D do not return terminated lists for vtkCell3D::GetFacePoints
On [1] it says about vtkCell3D::GetFacePoints:
"Get the list of vertices that define a face. The list is terminated with a negative number."

This is not true for most (all?) implementations of vtkCell3D (tetra, wedge, ...).

The behaviour should be changed to terminated lists, or GetFacePoints should also return the point count.

[1] http://davis.lbl.gov/Manuals/VTK-4.5/classvtkCell3D.html#a4 [^]
I am working with

The specific implementations usually return pointers that point directly into the static "faces" array. E.g.: vtkWedge:

Line 300:
static int faces[5][4] = { {0,1,2,-1}, {3,5,4,-1},
                           {0,3,4,1}, {1,4,5,2}, {2,5,3,0} };

Line 776:
void vtkWedge::GetFacePoints(int faceId, int* &pts)
{
  pts = this->GetFaceArray(faceId);
}

Line 477:
int *vtkWedge::GetFaceArray(int faceId)
{
  return faces[faceId];
}

For vtkWedge this means, calls to GetFacePoints(0) and GetFacePoints(1) will return correctly terminated lists, whereas all other calls won't return terminated lists.


I am trying to iterate over all faces of all cells of a vtkUnstructuredGrid (contains only 3D-Cells). Not changing the current vtk-behaviour needs switching on 3D-cell-types on my part, which would definitely be solved nicer using polymorphism (i.e. terminated lists). Looking at the documentation of GetFacePoints in vtkCell3D this was also the intented when designing vtkCell3D.

I use the vtk that comes with Paraview 3.8.0 (self compiled). I checked on the git webrepository and vtkWedge seems to be the same as my version.

Regards,
Ben

PS: This is my first bug report on this list. Suggestions for improving my bug reports is welcome, since I will be working with vtk for quite a time from now on.
No tags attached.
Issue History
2010-08-09 09:06BHopferNew Issue
2011-06-16 13:11Zack GalbreathCategory => (No Category)
2014-10-04 20:36Berk GeveciAssigned To => Berk Geveci
2014-10-04 20:36Berk GeveciStatusexpired => backlog
2014-10-04 20:36Berk GeveciResolutionopen => reopened
2016-07-06 12:16Berk GeveciNote Added: 0036195
2016-08-12 09:55Kitware RobotNote Added: 0037191
2016-08-12 09:55Kitware RobotStatusbacklog => closed
2016-08-12 09:55Kitware RobotResolutionreopened => moved

Notes
(0036195)
Berk Geveci   
2016-07-06 12:16   
Bumping
(0037191)
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.