NsPx:<div><br></div><div>Excellent insight. <div><br></div><div>I had fixed in VTK a few months ago (post the VTK58 release). Please switch to the development version<div><br></div><div>--</div><div>karthik<br><br><div class="gmail_quote">
On Wed, Mar 21, 2012 at 1:12 PM, NsPx <span dir="ltr"><<a href="mailto:nspx.roronoa@gmail.com">nspx.roronoa@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div bgcolor="#FFFFFF" text="#003333">
<font size="-1"><font face="Tahoma">Dear vtk developpers,<br>
<br>
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.<br>
(vtk 5.8, windows XP 32bits, visual studio 2008)<br>
<br>
I use vtkOrientedGlyphContourRepresentation (with
vtkPolygonalSurfacePointPlacer and
vtkPolygonalSurfaceContourLineInterpolator) via vtkContourWidget
to draw a contour on a mesh interactively.<br>
<br>
However when I want to close the contour, the penultimate line
is reset to be a simple segment.<br>
<br>
I found the problem comes from the function : void
vtkContourRepresentation::UpdateLines( int index ) in this
portion of code :<br>
<br>
if (this->LineInterpolator)<br>
{<br>
vtkIntArray *arr = vtkIntArray::New();<br>
this->LineInterpolator->GetSpan( index, arr, this );<br>
<br>
int nNodes = arr->GetNumberOfTuples();<br>
for (int i = 0; i < nNodes; i++)<br>
{<br>
arr->GetTupleValue( i, indices );<br>
this->UpdateLine( indices[0], indices[1] );<br>
}<br>
arr->Delete();<br>
}<br>
<br>
<br>
if I understand well, this function clear the path between </font></font><font size="-1"><font face="Tahoma">no</font></font><font size="-1"><font face="Tahoma">d</font></font><font size="-1"><font face="Tahoma">e
indices[0] and indices[1] and build it again.</font></font><font size="-1"><font face="Tahoma"> But w</font></font><font size="-1"><font face="Tahoma">hen indices[0]=</font></font><font size="-1"><font face="Tahoma">nNodes-1 </font></font><font size="-1"><font face="Tahoma"> and indices[1]=</font></font><font size="-1"><font face="Tahoma">nNodes-2 (or vice-versa) this line is only
cleared.<br>
<br>
</font></font><font size="-1"><font face="Tahoma">Please someone
confirm the problem.<br>
<br>
This test can be reproduce using the example on the wiki and
closing a contour on the sphere :
<a href="http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/vtkPolygonalSurfacePointPlacer" target="_blank">http://www.vtk.org/Wiki/VTK/Examples/Cxx/PolyData/vtkPolygonalSurfacePointPlacer</a><br>
<br>
Regards.<br>
</font></font><font size="-1"><font face="Tahoma"><br>
<br>
</font></font>
</div>
<br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://www.vtk.org/mailman/listinfo/vtk-developers" target="_blank">http://www.vtk.org/mailman/listinfo/vtk-developers</a><br>
<br>
<br></blockquote></div><br><br><br>
</div></div></div>