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 Wed, 02/22/2023 - 07:47
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.
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?
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().
Wed, 02/22/2023 - 07:47
You may say interior style
Graphic3d_Aspects::SetInteriorStyle()
toAspect_IS_EMPTY
to hide triangles in the group and similar properties to hide lines / markers.Wed, 02/22/2023 - 10:58
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?
Wed, 02/22/2023 - 18:37
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 forAIS_InteractiveContext::Filters()
.Thu, 02/23/2023 - 05:01
Thank you, gkv311.
I'll have a try.