Forum archiveIssue archiveVisualization and 3D Viewer

Archived discussion

Hiding Context Without Erase

Visualization and 3D ViewerMon, 02/08/2021 - 15:461 reply

Browse this forum
QuestionAuthor

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.

Discussion

1 archived reply

Posts are displayed in their archived order.

01Commenter-1

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()).