<div dir="ltr">Hi all,<div><br></div><div>   I would like to set the state of vtkContourWidget to Manipulate at initialize and add the nodes programmably instead of interactively. Everything is fine but I have to check the there are at least 2 nodes in the following, otherwise AddNodeOnContour will crash</div><div><br></div><div>So I hope you can change the following function to</div><div><br></div><div>void vtkContourWidget::SelectAction( vtkAbstractWidget *w )<br></div><div>{</div><div><br></div><div>................</div><div>................</div><div><br></div><div><div>  switch ( self->WidgetState )</div><div>    {</div><div>    case vtkContourWidget::Start:</div><div>    case vtkContourWidget::Define:</div></div><div><div>................</div><div>................</div></div><div>    case vtkContourWidget::Manipulate:<br></div><div><div>      {</div><div>      if ( rep->ActivateNode( X, Y ) )</div></div><div>        {<br></div><div><div>................</div><div>................</div></div><div><div>        }</div><div>      else if ( rep->GetNumberOfNodes()>1 && rep->AddNodeOnContour( X, Y ) )   //Ensure the number of nodes is at least 2</div><div>        {</div></div><div><div><div>................</div><div>................</div></div><div>        }</div></div><div><div>................</div><div>................</div></div><div>}</div><div><br></div><div><br></div></div>