HasDetected never returning anything

Hi, I have OC 7.2 and a little app drawing the MakeBottle example and few extra primitive for testing. Now I'd like to detect a shape when the mouse moves around. Under my MouseMove function, I try this method but it's never true.

void wxViewOC::mouseMoved(wxMouseEvent& event)

{

if (mContext->HasDetected()){
     wxMessageBox("HasDetected");//the code never reach this part
 }

}

Am I missing a setting or something?

Robert W.'s picture

Do you call the MoveTo method on your context? You need it to sync the mouse position with the position in your 3d view.

https://www.opencascade.com/doc/occt-6.9.0/refman/html/class_a_i_s___int...

mfregeau's picture

Yes I discover I needed to do that. Thanks a lot!