DiscussionsIssue archiveOCCT:Visualization

Archived issue #0025467

Visualization - Possibility to remove AIS_LocalContext class

Open CASCADEOCCT:Visualizationclosed15 public notes

Search issues

Description

AIS_LocalContext has the following roles:

  1. Local selection currently works in a local context only. This looks rather an artificial limitation, because the selection mode management and the selection algorithm itself do not care about local/global contexts.

  2. Temporary selection environment. A convenient aspect is that all local selection modes are deactivated automatically when a local context is closed, and previously active global selection is restored. Using local contexts, a stack of selection states is organized, but it is not clear if more than one local context has ever been used in practice or not.

  3. Temporary visualization environment. Interactive objects displayed in a local context are marked as temporary and they are removed by default when a local context is closed. This is at least a disputable advantage, because normally an application developer wants to fully control the lifecycle of an interactive object.


Meanwhile, the fee is that a lot of code is duplicated among AIS_InteractiveContext and AIS_LocalContext. In general, forcing developers to open a local context in order to use local selection results in numerous issues related to display/erase, display mode management, update of presentations, etc.

The idea is to consider the possibility to get rid of local context and thus simplify local/global selection management. At the same time, it is necessary to keep the features of AIS_LocalContext, which are considered as useful.

Public activity

15 archived notes

Participants are labeled by their role within this record.

01Commenter 4
Branch [archived branch] has been created by Commenter 1.

[revision removed]


Detailed log of new commits:

Author: Commenter 1
Date: Wed Feb 21 21:42:37 2018 +0300

    0025467: Visualization - Possibility to remove AIS_LocalContext class
02Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
03Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
04Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
05Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
06Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
07Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
08Commenter 1
Patch is ready for review.
09Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
10Commenter 4
Branch [archived branch] has been updated forcibly by Commenter 1.

[revision removed]
11Commenter 4
Branch [archived branch] has been created by Commenter 1.

[revision removed]


Detailed log of new commits:

Author: Commenter 1
Date: Wed Jun 20 08:48:40 2018 +0300

    0025467: Visualization - Possibility to remove AIS_LocalContext class
    
    Deprecated class AIS_LocalContext has been removed,
    as well as related classes AIS_DataMapOfILC, AIS_LocalStatus,
    SelectMgr_SequenceOfSelector, SelectMgr_DataMapOfObjectSelectors.
    Removed enumeration value AIS_DS_Temporary.
    
    AIS_InteractiveContext - removed methods related to Local Context:
    ::HasOpenedContext(), ::HighestIndex(), ::LocalContext(),
    ::LocalSelector(), ::OpenLocalContext(), ::CloseLocalContext(),
    ::IndexOfCurrentLocal(), ::CloseAllContexts(), ::ResetOriginalState(),
    ::ClearLocalContext(), ::UseDisplayedObjects(), ::NotUseDisplayedObjects(),
    ::SetShapeDecomposition(), ::SetTemporaryAttributes(),
    ::ActivateStandardMode(), ::DeactivateStandardMode(), ::KeepTemporary(),
    ::SubIntensityOn(), ::SubIntensityOff(),
    ::ActivatedStandardModes(), ::IsInLocal()
    ::AddOrRemoveSelected() taking TopoDS_Shape.
    
    SelectMgr_SelectionManager has been simplified so that now it
    support only single Viewer Selector; eliminated code duplication.
    
    Draw Harness - removed unused commands vsetam, vunsetam.
    Removed argument -local from commands vselmode, vremove, vdisplay, vdisplayall, verase.
    Removed unused methods ViewerTest::StandardModeActivation(), ::PickObject(), PickObjects().
    Removed test cases related to testing Local Context issues.
    
    The methods AIS_InteractiveContext::Display() and ::Load()
    taking argument theToAllowDecomposition have been marked as deprecated;
    the new methods without this unused argument should be used instead.
    AIS_InteractiveContext::DisplayedObjects() - removed argument theOnlyFromNeutral.
12Commenter 1
13Commenter 2
Combination -
OCCT branch : [archived branch] SHA - [revision removed]
Products branch : [archived branch] SHA - [revision removed]
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

Regressions/Differences/Improvements:
No regressions/differences

CPU differences:
Debian70-64:
OCCT
Total CPU difference: 17038.739999999845 / 17005.210000000097 [+0.20%]
Products
Total CPU difference: 7518.600000000038 / 7460.130000000034 [+0.78%]
Windows-64-VC10:
OCCT
Total CPU difference: 16907.684781898606 / 16831.54069379858 [+0.45%]
Products
Total CPU difference: 8223.031111399883 / 8259.114142699882 [-0.44%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
14Commenter 4
Branch [archived branch] has been deleted by Commenter 1.

[revision removed]
15Commenter 4
Branch [archived branch] has been deleted by Participant.

[revision removed]

Related records