[vtk-developers] Fwd: bug in vtkContourRepresentation ?
nspx.roronoa at gmail.com
Wed Mar 21 03:42:24 EDT 2012
Dear vtk developpers,
I think I felt on a bug concerning vtkContourRepresentation but i'm not
sure so i'm exposing the situation. Then you'll confirm me or not.
(vtk 5.8, windows XP 32bits, visual studio 2008)
I use vtkOrientedGlyphContourRepresentation (with
vtkPolygonalSurfaceContourLineInterpolator) via vtkContourWidget to draw
a contour on a mesh interactively.
However when I want to close the contour, the penultimate line is reset
to be a simple segment.
I found the problem comes from the function : void
vtkContourRepresentation::UpdateLines( int index ) in this portion of code :
vtkIntArray *arr = vtkIntArray::New();
this->LineInterpolator->GetSpan( index, arr, this );
int nNodes = arr->GetNumberOfTuples();
for (int i = 0; i < nNodes; i++)
arr->GetTupleValue( i, indices );
this->UpdateLine( indices, indices );
if I understand well, this function clear the path between node
indices and indices and build it again.But when
indices=nNodes-1 and indices=nNodes-2 (or vice-versa) this line is
Please someone confirm the problem.
This test can be reproduce using the example on the wiki and closing a
contour on the sphere :
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the vtk-developers