<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=us-ascii">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR></HEAD>
<BODY>
<DIV><FONT face=Arial size=2><SPAN class=578354923-22062004>Hi,
</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN
class=578354923-22062004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=2><SPAN class=578354923-22062004>The pick function in
VTK is some unstable. I tried to do some programming to pick a
vtkProp in a vtkAssembly.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=578354923-22062004>it turned out to
crash after i picked several times. I tried to track the code in VTK, and
found vtkPicker has some suspicious codes.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=578354923-22062004>in version(4.2.1)
line 300 of vtkPicker.cxx:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=578354923-22062004> <FONT
size=3> this->Prop3Ds->AddItem((vtkProp3D
*)prop);</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=578354923-22062004><FONT size=3>I guess
something is wrong there. it will collect the assembly many times. now I found
it was updated with </FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=2><SPAN class=578354923-22062004><FONT size=3>the
codes in CVS </FONT></SPAN></FONT><FONT face=Arial size=2><SPAN
class=578354923-22062004><FONT size=3>:</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=3><SPAN
class=578354923-22062004> <FONT size=2> <FONT
size=3>
if ( ! this->Prop3Ds->IsItemPresent(prop) )<BR></FONT><A name=368><FONT
size=3>368</FONT></A><FONT
size=3>
{<BR></FONT><A name=369><FONT size=3>369</FONT></A><FONT
size=3>
this->Prop3Ds->AddItem((vtkProp3D *)prop);<BR></FONT><A name=370><FONT
size=3>370</FONT></A></FONT>
}</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=3><SPAN
class=578354923-22062004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=3><SPAN class=578354923-22062004>I think it is better
to change as:</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=3><SPAN
class=578354923-22062004>
if ( ! this->Prop3Ds->IsItemPresent(propCandidate) )<BR><A name=368><FONT
size=3>368</FONT></A><FONT
size=3>
{<BR></FONT><A name=369><FONT size=3>369</FONT></A><FONT
size=3>
this->Prop3Ds->AddItem((vtkProp3D *)propCandidate);<BR></FONT><A
name=370><FONT
size=3>370</FONT></A>
}</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=3><SPAN
class=578354923-22062004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=3><SPAN class=578354923-22062004>As i read the code,
I think prop is a vtkAssembly and propCandidate is a
vtkProp composited in the assembly.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=3><SPAN class=578354923-22062004>before we add
this item to Props3Ds, propCandidate's bounding box is
checked for the intersection test. So i think it </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=3><SPAN class=578354923-22062004>is rational to add
propCandidate to Props3Ds.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=3><SPAN
class=578354923-22062004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=3><SPAN class=578354923-22062004>Do we have some
serious picking test with vtkAssembly involved?</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=3><SPAN
class=578354923-22062004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=3><SPAN class=578354923-22062004>I'm not sure my
opinion is correct or wrong. anyway, i hope vtk has a robust
picking function.</SPAN></FONT></DIV>
<DIV><FONT face=Arial size=3><SPAN class=578354923-22062004><FONT size=2>any
hints will be helpful.</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=3><SPAN
class=578354923-22062004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=3><SPAN class=578354923-22062004><FONT
size=2>Thanks</FONT></SPAN></FONT></DIV>
<DIV><FONT face=Arial size=3><SPAN
class=578354923-22062004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=3><SPAN class=578354923-22062004><FONT
size=2>Dennis</FONT> </SPAN></FONT></DIV>
<DIV><FONT face=Arial size=3><SPAN
class=578354923-22062004>
</SPAN></FONT></DIV>
<DIV><FONT face=Arial><SPAN class=578354923-22062004></SPAN></FONT> </DIV>
<DIV><FONT face=Arial size=3><SPAN class=578354923-22062004><FONT size=3><FONT
size=2></FONT> </DIV>
<DIV><BR></DIV></FONT></SPAN></FONT>
<DIV><FONT face=Arial size=2><SPAN class=578354923-22062004><FONT
size=3><BR></FONT> </SPAN></FONT></DIV></BODY></HTML>