MantisBT - Open CASCADE
View Issue Details
0025467Open CASCADE[OCCT] OCCT:Visualizationpublic2014-11-12 13:272021-02-25 12:51
normalintegration request 
[OCCT] 6.8.0 
[OCCT] 7.4.0[OCCT] 7.4.0 
Not needed
0025467: Visualization - Possibility to remove AIS_LocalContext class
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.
No tags attached.
parent of 0027874closed bugmaster Community Visualization - There are no way to add local selection in Global Context. 
parent of 0028162closed apn Open CASCADE Draw Harness - eliminate usage of deprecated Local Context 
parent of 0030450closed bugmaster Open CASCADE Visualization - AIS_InteractiveContext::MoveTo() never uses V3d_View::ImmediateRedraw() 
parent of 0032165verified bugmaster Open CASCADE Visualization - remove obsolete method AIS_InteractiveContext::PurgeViewer() 
related to 0029470closed bugmaster Open CASCADE Samples - eliminate references to deprecated Local Context from MFC sample 
related to 0029425closed bugmaster Community Visualization - AIS_InteractiveContext::SetAutomaticHilight() has no affect 
Issue History
2014-11-12 13:27sanNew Issue
2014-11-12 13:27sanAssigned To => kgv
2014-11-12 13:27sanDescription Updatedbug_revision_view_page.php?rev_id=8585#r8585
2014-11-12 13:28sanRelationship addedrelated to 0025466
2014-11-12 13:30sanRelationship addedrelated to 0024965
2014-11-12 13:31sanRelationship addedrelated to 0024966
2014-11-12 15:05sanSummaryVisualization - Possibility to remove AIS_LocalContext => Visualization - Possibility to remove AIS_LocalContext class
2015-05-26 15:07vpaRelationship addedrelated to 0026272
2016-10-25 09:45kgvTarget Version7.1.0 => 7.2.0
2016-11-11 11:09kgvRelationship addedparent of 0027874
2017-07-10 10:56kgvRelationship addedrelated to 0028162
2017-07-10 10:56kgvRelationship replacedparent of 0028162
2017-07-10 10:58kgvRelationship addedparent of 0028906
2017-07-20 11:33kgvTarget Version7.2.0 => 7.4.0
2018-02-21 21:42gitNote Added: 0074097
2018-02-21 22:54gitNote Added: 0074098
2018-02-21 22:56gitNote Added: 0074099
2018-02-21 23:47gitNote Added: 0074102
2018-02-22 08:24gitNote Added: 0074106
2018-02-22 12:00gitNote Added: 0074110
2018-02-22 12:20gitNote Added: 0074111
2018-02-22 12:21kgvNote Added: 0074112
2018-02-22 12:21kgvAssigned Tokgv => san
2018-02-22 12:21kgvSeverityfeature => integration request
2018-02-22 12:21kgvStatusnew => resolved
2018-02-22 12:21kgvTarget Version7.4.0 => 7.3.0
2018-02-22 12:50gitNote Added: 0074113
2018-02-22 15:00gitNote Added: 0074118
2018-02-27 11:25abvTarget Version7.3.0 => 7.4.0
2018-02-27 11:30abvRelationship addedrelated to 0029470
2018-03-13 14:38kgvRelationship addedrelated to 0029425
2018-06-20 09:43gitNote Added: 0076839
2018-06-20 11:34kgvNote Added: 0076844
2018-06-20 11:34kgvAssigned Tosan => bugmaster
2018-06-20 11:34kgvStatusresolved => reviewed
2018-06-20 19:34bugmasterTest case number => Not needed
2018-06-20 19:34bugmasterNote Added: 0076858
2018-06-20 19:34bugmasterStatusreviewed => tested
2018-06-23 19:05bugmasterChangeset attached => occt master 665fcc31
2018-06-23 19:05bugmasterStatustested => verified
2018-06-23 19:05bugmasterResolutionopen => fixed
2018-06-25 13:58gitNote Added: 0077025
2018-06-30 12:48kgvChangeset attached => occt master 68dcee02
2018-06-30 12:48kgvAssigned Tobugmaster => kgv
2018-06-30 13:34gitNote Added: 0077141
2019-01-21 13:06kgvRelationship addedparent of 0030450
2021-02-25 12:51kgvRelationship addedparent of 0032165

2018-02-21 21:42   
Branch CR25467 has been created by kgv.

SHA-1: 16953063a9c0772f00f5fb221a2038fbb2e27410

Detailed log of new commits:

Author: kgv
Date: Wed Feb 21 21:42:37 2018 +0300

    0025467: Visualization - Possibility to remove AIS_LocalContext class
2018-02-21 22:54   
Branch CR25467 has been updated forcibly by kgv.

SHA-1: 945d6cd6fc42da77639592ed4826450a76d8942c
2018-02-21 22:56   
Branch CR25467 has been updated forcibly by kgv.

SHA-1: f30dbcc2d601e66d6c168a019575077301c8a019
2018-02-21 23:47   
Branch CR25467 has been updated forcibly by kgv.

SHA-1: ebc03142697c96b4c2a02841382a0cc75db0966b
2018-02-22 08:24   
Branch CR25467 has been updated forcibly by kgv.

SHA-1: daa2250ea14a89bc68100b3d312bef4ab8740661
2018-02-22 12:00   
Branch CR25467 has been updated forcibly by kgv.

SHA-1: 4493b045043f13f69e72be23025aecc9d7c8c53d
2018-02-22 12:20   
Branch CR25467 has been updated forcibly by kgv.

SHA-1: f15ef4360f572f20071c27b5925e383e0c37f080
2018-02-22 12:21   
Patch is ready for review.
2018-02-22 12:50   
Branch CR25467 has been updated forcibly by kgv.

SHA-1: ba762a1f6d492f132fc6ca0fb2d0be7dc584cb16
2018-02-22 15:00   
Branch CR25467 has been updated forcibly by kgv.

SHA-1: 44894eaf0718953c33e8f567cd3c54ce78b61a34
2018-06-20 09:43   
Branch CR25467_1 has been created by kgv.

SHA-1: 5a68d0004ab9bacc9aea0746b770fbfc4e236490

Detailed log of new commits:

Author: kgv
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.
2018-06-20 11:34   
Please take the patch. [^]
2018-06-20 19:34   
Combination -
OCCT branch : CR25467_1 SHA - 5a68d0004ab9bacc9aea0746b770fbfc4e236490
Products branch : CR25467_1 SHA - 5035873b798d17e807fa12c4734f83c999caf0bf
was compiled on Linux, MacOS and Windows platforms and tested in optimize mode.

Number of compiler warnings:
No new/fixed warnings

No regressions/differences

CPU differences:
Total CPU difference: 17038.739999999845 / 17005.210000000097 [+0.20%]
Total CPU difference: 7518.600000000038 / 7460.130000000034 [+0.78%]
Total CPU difference: 16907.684781898606 / 16831.54069379858 [+0.45%]
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
2018-06-25 13:58   
Branch CR25467_1 has been deleted by kgv.

SHA-1: 5a68d0004ab9bacc9aea0746b770fbfc4e236490
2018-06-30 13:34   
Branch CR25467 has been deleted by inv.

SHA-1: 44894eaf0718953c33e8f567cd3c54ce78b61a34