Wed, 01/06/2010 - 14:22
Hello,
I would like to use the mouse-detection capabilities of an AIS_InteractiveContext without active Highlighting.
My goal is to group individual objects (lines, points, planes and shapes) to 'Assemblies' of which all contained objects should be highlighted once a member-object has been detected under at the current mouseposition (set with moveTo).
My problem is that I need to disable auto-highlighting to prevent it form interfereing with my own highligting, but I don't seem to be able to switch of the Auto-Highlighting without disabling detection as well.
(And for AIS_Lines, even disabling does not work.)
I tried to switch of auto-hilighting - which didn't work. Then i researched the forum only to find that others had the same problems. Someone suggested the solution to set an undefined hilightmode. This _did_ deactivate automatic highlightimg (except for AIS_Line), but it also deactivated Detection.
So, I am pretty much stuck.
Has anyone of You experienced similar probelms, or has a hint for me?
Best regards
Tilman
Thu, 01/07/2010 - 14:28
Hello,
myAISContext->SetAutomaticHilight(Standard_False)
and
myAISContext->Hilight(myAISContext->DetectedInteractive(), true).
Thu, 01/07/2010 - 17:58
Thank you,
That's the way I already tried.
This way it is supposed to work, but it doesn't:
Hilighting my objects manually does work, but setAutomaticHighlight does not show any effect.
Objects are still Highlighted if they are touched by the mouse pointer.
Thu, 01/07/2010 - 18:14
If you only need detection of AIS object, you might want to use the Pick method from the selector (this is what is done by the MoveTo method from AIS_InteractiveContext) and handle everything yourself (look at the source code in AIS_InteractiveContext_1.cxx / MoveTo method). It's pretty straightforward, you use the selector from AIS_InteractiveContext::MainSelector() like it's done in the MoveTo method (selector->Pick(XPix, YPix, aView)) and you iterate over detected objects and do what you want with them.
Good Luck,
Francois.
Mon, 01/11/2010 - 10:59
Thanks a lot, that approach works like a charm!
Sat, 04/09/2011 - 06:22
Many thanks for your help. It's working cool !