
Wed, 09/23/2020 - 02:52
I have an application where I'm keeping some references to the topological data in the form of TopoDS_Shape
objects and using AIS to display this data in the form of AIS_InteractiveObject
s. However, I'm having a difficult time trying to figure out how to programmatically select an entity owner that represents the visualization of a TopoDS_Shape
.
For example, if the current selection mode is set for face selection, I want to select the face by calling entityOwner->SetSelected(Standard_True)
(i.e. SelectMgr_EntityOwner::SetSelected
). However, this doesn't cause the face to be highlighted in the viewer. How can I select a SelectMgr_EntityOwner
from code? Do I need to use something like StdSelect_BRepSelectionTool
?
Thanks!
Thu, 09/24/2020 - 01:53
I believe I have figured out the issue. I have to use
AIS_InteractiveContext::SetSelected
to select the owners instead of callingSelectMgr_EntityOwner::SetSelected
. CallingSetSelected
on the entity owner simply sets theIsSelected
flag for the owner, but the actual selection and presentation logic is part of the context.