Thu, 02/06/2025 - 13:27
Forums: 
hi,
I have this problem programming a MFC c++ application to select a Face inside another model that is transparent, there is a wireframe,
it does not selecting correctly, and I have already used all possible methods.
The frame outline is superior and catches attempts at internal selection. I show it on the video.
https://drive.google.com/file/d/1VodicCHhaVWlwi0obBbFCnZH-ccmY6lK/view?u...
Watch my Video
Please give me a good idea...
I try with code - do Deactive

Thank you
PetrusPolonusPrimusMaximus
Attachments: 
        
Fri, 02/07/2025 - 08:27
Indeed
AIS_WireFramedisplay mode doesn't affect howAIS_Shapeis going to be selected - the solid remains selectable as a solid. And this behavior is by design.I can propose the following approaches:
AIS_InteractiveContext::MoveTo()highlights the topmost object, but it detects all objects below mouse cursor and puts them into sorted list. The highlighting could be switched to the next/previous item viaAIS_InteractiveContext::HilightNextDetected()/::HilightPreviousDetected()methods. In Draw Harness this functionality is mapped to hot-keys '<' and '>', and to commandsvselnext/vselprev.AIS_Shape::ComputeSelection()with desired selection behavior - e.g. by putting onlyTopoDS_EdgefromTopoDS_Faceto selection toolStdSelect_BRepSelectionTool, and notTopoDS_Faceitself. Or by puttingtheInteriorFlag=falsetoStdSelect_BRepSelectionTool::GetSensitiveForFace(). Note that it will be also needed to recompute selection on switching betweenAIS_ShadedandAIS_WireFramedisplay modes if you want them behave differently, as selection and display modes live separately withinAIS.Mon, 02/10/2025 - 11:03
Thank you for your help.
I override this method :