Archived issue #0025467
Visualization - Possibility to remove AIS_LocalContext class
Description
AIS_LocalContext has the following roles:
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.
- 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.
- 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.
- 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.
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
[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
Branch [archived branch] has been updated forcibly by Commenter 1.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Commenter 1.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Commenter 1.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Commenter 1.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Commenter 1.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Commenter 1.
[revision removed]
[revision removed]
Patch is ready for review.
Branch [archived branch] has been updated forcibly by Commenter 1.
[revision removed]
[revision removed]
Branch [archived branch] has been updated forcibly by Commenter 1.
[revision removed]
[revision removed]
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.
[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.
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
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
Branch [archived branch] has been deleted by Commenter 1.
[revision removed]
[revision removed]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records
- #0027874 · parent of · closedVisualization - There are no way to add local selection in Global Context.
- #0028162 · parent of · closedDraw Harness - eliminate usage of deprecated Local Context
- #0030450 · parent of · closedVisualization - AIS_InteractiveContext::MoveTo() never uses V3d_View::ImmediateRedraw()
- #0032165 · parent of · closedVisualization - remove obsolete method AIS_InteractiveContext::PurgeViewer()
- #0032662 · parent of · closedCoding - Missing header file in AIS_DataMapOfSelStat.hxx
- #0029470 · related to · closedSamples - eliminate references to deprecated Local Context from MFC sample
- #0029425 · related to · closedVisualization - AIS_InteractiveContext::SetAutomaticHilight() has no affect