How to hide entities in a object of Graphic3d_Group?

I create a new class, which derived from AIS_InteractiveObject. Then put entities into serveral groups(Graphic3d_Group) in the class. How to hide entites in one of groups?

gkv311 n's picture

You may say interior style Graphic3d_Aspects::SetInteriorStyle() to Aspect_IS_EMPTY to hide triangles in the group and similar properties to hide lines / markers.

David Gao's picture

Thank you, gkv311.
It's work to hide entities in a group by your suggestion. But the hidden entities still can be selected. Is there a way to exclude the hidden group when selecting?

gkv311 n's picture

Selection mechanism is completely independent from presentation groups in OCCT. So, you have to adjust your ::ComputeSelection() to filter out elements, or subclass sensitive entities classes, or define selection filters for AIS_InteractiveContext::Filters().

David Gao's picture

Thank you, gkv311.
I'll have a try.