Hi I'm trying to edit the points that defines a line that is already rendered.<div><br></div><div>So I know how to draw it: </div><div><br></div><div> controlPoints.InsertNextPoint(0, 0, 0);</div><div> controlPoints.InsertNextPoint(1, 1, 1);</div>
<div> </div><div> polyLine = new vtkPolyLine();</div><div> cellArray = new vtkCellArray();</div><div> </div><div> polyLine.GetPointIds().SetNumberOfIds( controlPoints.GetNumberOfPoints() );</div>
<div> for ( int i = 0; i < controlPoints.GetNumberOfPoints(); i++ )</div><div> {</div><div> polyLine.GetPointIds().SetId(i, i);</div><div> }</div><div> </div><div> cellArray.InsertNextCell(polyLine);</div>
<div> </div><div> polyData.SetPoints(controlPoints);</div><div> polyData.SetLines(cellArray);</div><div> polyData.Update();</div><div> </div><div> length = polyData.GetLength(); </div>
<div> </div><div> polyDataMapper.SetInput(polyData); </div><div> </div><div> actor.SetMapper(polyDataMapper); </div><div> ....</div><div><br></div><div>But I don't know how to get it back from the scene to be able to modify points coordinates, so far I think that I can get the actor using vtkPicker and use vtkActor.GetInputDataObject(0,0) do a type casting (vtkPolyData) to get the points , but not sure, somebody did it before, or got any advise ?</div>
<div><br></div><div>Thanks</div>