<div dir="ltr"><div><div><div>Dear all,<br><br></div>I am trying to implement a distance widget with a previously set representation (I want to give the points programatically and not by clicking on the screen). I tried the following code and the distance computed is correct, but the widget shows a line joining two points that are not the ones I typed in the code.<br>
<br></div><div>In the attached image, the blue lines joins the correct points, the green one corresponds to the widget.<br></div><div><br></div>Thanks, <br></div>Hector<br><div><div><br>    vtkSmartPointer<vtkDistanceWidget> distanceWidget =<br>
    vtkSmartPointer<vtkDistanceWidget>::New();<br>    distanceWidget->SetInteractor(renderWindowInteractor);<br>    distanceWidget->CreateDefaultRepresentation();<br>    vtkDistanceRepresentation * distRep = distanceWidget->GetDistanceRepresentation();<br>
    distRep->SetPoint1WorldPosition(PointInit);<br>    distRep->SetPoint2WorldPosition(PointEnd);<br>    distanceWidget->SetWidgetStateToManipulate();<br><br><br></div></div></div>