Hiding Context Without Erase

Hello I am Hiding my shapes with Erase() and unhide with Display() it works perfect but, if my file is too big ııt takes some time to Display,

I wonder ıf there is a way to hide Context without Erase(); Like setting it transparent and unselectable/touchable.

Kirill Gavrilov's picture

AIS_InteractiveContext::Erase() basically just marks presentation with a hidden flag, and AIS_InteractiveContext::Display() performs an opposite operation.
The first Display() may take a while for computing presentation (e.g. creation of triangulation from a B-Rep geometry), while further Erase()/Display()/Erase()/Display() sequence should take an instant, as long as presentation was not invalidated in between (via AIS_InteractiveObject::SetToUpdate() or AIS_InteractiveContext::Remove()).