<div>Dear all,</div>
<div> </div>
<div>i have some problem in procedure below</div>
<div>first i want to pick 3 points on an isosurface and then i want to measure the angle formed by these 3 points.</div>
<div>but it does not seem to work when i want to pass the location generated by cellpicker to the points of angle widget.</div>
<div>below are some fragments of my tcl code. can someone advice me how to archieve this ?</div>
<div> </div>
<div> </div>
<div>vtkAngleRepresentation3D rep</div>
<p>vtkAngleWidget widget<br>    widget SetInteractor rwi</p>
<p><br>vtkCellPicker picker</p>
<p>set AnglePointCounter 1</p>
<p>proc OnLeftButtonDown { } { </p>
<p># if angle measurement is enabled</p>
<p>if {$:: angle == 1} {<br> if { $::AnglePointCounter &gt;= 4 } { set $::AnglePointCounter 1 }<br> if { $::AnglePointCounter == 1 } { </p>
<p>  set apt1 [picker GetPickPosition] <br>  set apt1x [lindex $apt1 0]<br>  set apt1y [lindex $apt1 1]<br>  set apt1z [lindex $apt1 2]</p>
<p>  rep SetPoint1DisplayPosition $apt1x $apt1y $apt1z <br> }</p>
<div> if { $::AnglePointCounter == 2 } { <br>     set apt2 [picker GetPickPosition]<br>     set apt2x [lindex $apt2 0]<br>     set apt2y [lindex $apt2 1]<br>     set apt2z [lindex $apt2 2] </div>
<div><br>  rep SetCenterDisplayPosition $apt2x $apt2y $apt2z<br> }<br> if { $::AnglePointCounter == 3 } {<br>         set apt3 [picker GetPickPosition] <br>         set apt3x [lindex $apt3 0]<br>         set apt3y [lindex $apt3 1]<br>
         set apt3z [lindex $apt3 2] </div>
<div><br>  rep SetPoint2DisplayPosition  $apt3x $apt3y $apt3z<br> }<br>       <br> widget SetRepresentation rep<br> widget On</div>
<p>incr ::AnglePointCounter<br>}</p>
<div>}; # end function<br clear="all"><br>thank you</div>
<div> </div>
<div>regards</div>
<div> </div>
<div>O.S</div>
<div><br> </div>