<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#003333">
<font size="-1"><font face="Tahoma">Hi all,<br>
<br>
I'm coding an application to select edges on a vtkPolyData.<br>
<br>
For my needs, I first have to build a wireframe vtkPolyData of
the input (vtkPolyline->GetPointIds(...);
vtkCellArray->InsertNextCell(vtkPolyLine); </font></font><font
size="-1"><font face="Tahoma">vtkPolyData->SetPoints(..); </font></font><font
size="-1"><font face="Tahoma">vtkPolyData->SetLines(vtkCellArray);</font></font><font
size="-1"><font face="Tahoma">...)<br>
<br>
This part is ok. Then I use vtkContourWidget with </font></font><font
size="-1"><font face="Tahoma">vtkPolygonalSurfacePointPlacer and </font></font><font
size="-1"><font face="Tahoma">vtkPolygonalSurfaceContourLineInterpolator
</font></font><font size="-1"><font face="Tahoma">:<br>
<br>
<br>
vtkSmartPointer<vtkContourWidget> contourWidget =
vtkSmartPointer<vtkContourWidget>::New();<br>
contourWidget->SetInteractor(interactor);<br>
<br>
vtkSmartPointer<vtkOrientedGlyphContourRepresentation>
rep = <br>
vtkOrientedGlyphContourRepresentation::SafeDownCast(contourWidget->GetRepresentation());<br>
rep->GetLinesProperty()->SetColor(1, 0.2, 0);<br>
rep->GetLinesProperty()->SetLineWidth(3.0);<br>
<br>
vtkSmartPointer<vtkPolygonalSurfacePointPlacer>
pointPlacer =<br>
vtkSmartPointer<vtkPolygonalSurfacePointPlacer>::New();<br>
pointPlacer->AddProp(actor);<br>
pointPlacer->GetPolys()->AddItem( my_polydata );<br>
<br>
vtkSmartPointer<vtkPolygonalSurfaceContourLineInterpolator>
interpolator =<br>
vtkSmartPointer<vtkPolygonalSurfaceContourLineInterpolator>::New();<br>
interpolator->GetPolys()->AddItem( </font></font><font
size="-1"><font face="Tahoma">my_</font></font><font size="-1"><font
face="Tahoma">polydata </font></font><font size="-1"><font
face="Tahoma">);<br>
<br>
</font></font><font size="-1"><font face="Tahoma">rep->SetPointPlacer(pointPlacer);</font></font><br>
<font size="-1"><font face="Tahoma">
rep->SetLineInterpolator(interpolator);<br>
<br>
contourWidget->EnabledOn();<br>
<br>
When I pick one point it's ok but after the second picking I get
an exception : "vector subscript out of range" thrown in the
function vtkDijkstraGraphGeodesicPath::TraceShortestPath().<br>
<br>
It appears only if I the LineInterPolator is </font></font><font
size="-1"><font face="Tahoma">vtkPolygonalSurfaceContourLineInterpolator.
It seems that Dijkstra can't find the path allong the lines.<br>
<br>
So I'm asking where does this comes from ?<br>
<br>
When I compute a vtkpolyDataConnectivityFilter, it says me I
have only one region, so my data is right connected (i means I
have no holes on my polylines).<br>
<br>
Is there a filter I can pass to my polydata to make it works ??<br>
<br>
Thanks by advance for helping me.<br>
<br>
Nicolas<br>
</font></font>
</body>
</html>