MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0021306Open CASCADE[OCCT] OCCT:Visualizationpublic2009-08-06 12:332016-12-09 16:38
Reportersan 
Assigned Tobugmaster 
PrioritynormalSeverityintegration request 
StatusclosedResolutionfixed 
PlatformOSAllOS Version
Product Version 
Target Version[OCCT] 7.1.0Fixed in Version[OCCT] 7.1.0 
Summary0021306: Visualization, AIS_InteractiveContext - revise DisplayedModes() semantics
DescriptionReported by R.Lygin on 05.08.2009.

AIS_GlobalStatus manages a list of display modes for each interactive object.
The modes in this list are considered as "displayed modes". However,
AIS_InteractiveContext::Display() removes all the modes except the current one
from AIS_GlobalStatus. This was done intentionally to avoid problems in LH3D-3H
application. Thus AIS_GlobalStatus::DisplayedModes() and
AIS_InteractiveContext::DisplayedModes() always return a list with a single
integer equal to the current display mode of the object.

Meanwhile, there is a reliable way to query all display modes, for which an
interactive object has presentations already computed (but some of them might
be erased, i.e. invisible): PrsMgr_PresentableObject::Presentations() method
returns all the object's presentations, each having a display mode. However,
this method is protected, and it is necessary to implement ComputedModes()
method in each application that needs such functionality.

It is proposed to remove DisplayedModes() from AIS_GlobalStatus and
AIS_InteractiveContext classes and keep one and only DisplayMode() per an
object. To obtain all display modes ever computed,
AIS_InteractiveObject::ComputedModes() method should be implemented:

void AIS_InteractiveObject::ComputedModes (TColStd_ListOfInteger& theList)
{
    theList.Clear();
    const PrsMgr_Presentations& aPrsSeq = Presentations();
    Standard_Integer aLen = aPrsSeq.Length();
    for (Standard_Integer i = 1; i <= aLen; i++) {
        theList.Append (aPrsSeq (i).Mode());
    }
}

Note that presentations for all display modes returned by this method except
the current one returned by AIS_InteractiveObject::DisplayMode() are erased
(invisible).
Steps To ReproduceNot required
TagsNo tags attached.
Test case numberNot needed
Attached Files

- Relationships
parent of 0027883closedkgv Open CASCADE Visualization - AIS_InteractiveContext::IsDisplayed() does not return displayed state for specified Display Mode 
related to 0027815closedbugmaster Open CASCADE Visualization, TKV3d - AIS_InteractiveContext has inconsistent display mode API 

-  Notes
(0056417)
git (administrator)
2016-08-03 11:19

Branch CR21306 has been created by isk.

SHA-1: 88bd6a7793e0d3bf2a83af026f07d886e4411f33


Detailed log of new commits:

Author: isk
Date: Tue Aug 2 14:46:13 2016 +0300

    0021306: Visualization, AIS_InteractiveContext - revise DisplayedModes() semantics
    Add a new method AIS_InteractiveObject::ComputedModes().
    Remove the AIS_InteractiveContext::DisplayedModes() method.
    Remove list of active display modes from AIS_GlobalStatus.
(0056450)
isk (developer)
2016-08-04 09:08

Dear Kirill,
please review the branch CR21306.
(0056453)
kgv (developer)
2016-08-04 10:05
edited on: 2016-08-04 10:06

The patch is expected to be based on #0027680.

-  TColStd_ListOfInteger myDispModes;
+  Standard_Integer myDispMode;

New field is left uninitialized in some constructors.
Please also check that logic works properly for objects that has been Loaded and then Displayed.

+  //! Returns the list of active display modes.
+  Standard_EXPORT void ComputedModes (TColStd_ListOfInteger& theModes) const;

Description does not looks correct.

+void AIS_InteractiveObject::ComputedModes (TColStd_ListOfInteger& theModes) const
+{
+  const PrsMgr_Presentations& aPrsList = Presentations();
+  for (PrsMgr_Presentations::Iterator anIt (aPrsList); anIt.More(); anIt.Next())
+  {
+    theModes.Append (anIt.Value().Mode());
+  }
+}

Implementation looks incorrect as well (possible duplication of the same display mode).
What is the purpose for this method - it is not used anywhere and application can do the same?

(0056468)
git (administrator)
2016-08-04 13:51

Branch CR21306 has been updated forcibly by isk.

SHA-1: 52fdef177263cbcf689a1c5ffeab4c36ff64eca1
(0056469)
isk (developer)
2016-08-04 13:52

Fix remarks by Kirill.
(0056470)
kgv (developer)
2016-08-04 15:22

Please test the patch (only last commit in branch should be rebased onto current IR).
(0056504)
git (administrator)
2016-08-05 15:27

Branch CR21306 has been updated forcibly by apv.

SHA-1: f55dbe388e55702f804b468d2275df4721fa37e8
(0056505)
apv (tester)
2016-08-05 15:28

Branch CR21306 has been rebased on the current master.
(0056537)
apv (tester)
2016-08-08 10:37

Dear BugMaster,

Branch CR21306 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: f55dbe388e55702f804b468d2275df4721fa37e8

Number of compiler warnings:
occt component:
   Linux: 0 (0 on master)
   Windows: 0 (0 on master)
   MasOS: 0 (0 on master)
products component:
   Linux: 64
   Windows: 0
   MacOS: 1119

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
Total MEMORY difference: 89247396 / 88460446 [+0.89%]
Total CPU difference: 19389.900000000027 / 19249.11000000006 [+0.73%]

Testing on Windows:
Total MEMORY difference: 57134779 / 57173794 [-0.07%]
Total CPU difference: 18361.302099898774 / 18044.994472298804 [+1.75%]
(0057163)
git (administrator)
2016-08-26 16:24

Branch CR21306 has been deleted by inv.

SHA-1: f55dbe388e55702f804b468d2275df4721fa37e8

- Related Changesets
occt: master 3db69e41
Timestamp: 2016-08-02 11:46:13
Author: isk
Committer: bugmaster
Details ] Diff ]
0021306: Visualization, AIS_InteractiveContext - revise DisplayedModes() semantics
Remove the AIS_InteractiveContext::DisplayedModes() method.
Remove list of active display modes from AIS_GlobalStatus.
mod - src/AIS/AIS_GlobalStatus.cxx Diff ] File ]
mod - src/AIS/AIS_GlobalStatus.hxx Diff ] File ]
mod - src/AIS/AIS_GlobalStatus.lxx Diff ] File ]
mod - src/AIS/AIS_InteractiveContext.cxx Diff ] File ]
mod - src/AIS/AIS_InteractiveContext.hxx Diff ] File ]
mod - src/AIS/AIS_InteractiveContext_2.cxx Diff ] File ]

- Issue History
Date Modified Username Field Change
2011-08-02 11:24 bugmaster Category OCCT:VIZ => OCCT:Visualization
2014-02-05 15:28 kgv Assigned To bugmaster => san
2014-02-05 15:28 kgv Fixed in Version EMPTY =>
2014-02-05 15:28 kgv Target Version => 7.0.0
2014-02-05 15:28 kgv Description Updated View Revisions
2014-09-29 22:57 kgv Target Version 7.0.0 => 7.1.0
2016-07-15 19:11 kgv Relationship added related to 0027680
2016-08-02 09:49 kgv Assigned To san => isk
2016-08-02 09:49 kgv Severity feature => integration request
2016-08-02 09:49 kgv Status new => assigned
2016-08-02 09:49 kgv Summary Revise DisplayedModes() semantics in AIS => Visualization, AIS_InteractiveContext - revise DisplayedModes() semantics
2016-08-03 11:19 git Note Added: 0056417
2016-08-04 09:08 isk Note Added: 0056450
2016-08-04 09:08 isk Assigned To isk => kgv
2016-08-04 09:08 isk Status assigned => resolved
2016-08-04 09:08 isk Steps to Reproduce Updated View Revisions
2016-08-04 10:05 kgv Note Added: 0056453
2016-08-04 10:05 kgv Assigned To kgv => isk
2016-08-04 10:05 kgv Status resolved => assigned
2016-08-04 10:06 kgv Note Edited: 0056453 View Revisions
2016-08-04 13:51 git Note Added: 0056468
2016-08-04 13:52 isk Note Added: 0056469
2016-08-04 14:17 isk Assigned To isk => kgv
2016-08-04 14:17 isk Status assigned => resolved
2016-08-04 15:22 kgv Note Added: 0056470
2016-08-04 15:22 kgv Assigned To kgv => bugmaster
2016-08-04 15:22 kgv Status resolved => reviewed
2016-08-05 15:27 git Note Added: 0056504
2016-08-05 15:28 apv Note Added: 0056505
2016-08-05 15:28 apv Assigned To bugmaster => apv
2016-08-05 15:28 apv Test case number => Not needed
2016-08-08 10:37 apv Note Added: 0056537
2016-08-08 10:37 apv Assigned To apv => bugmaster
2016-08-08 10:37 apv Status reviewed => tested
2016-08-12 10:48 bugmaster Changeset attached => occt master 3db69e41
2016-08-12 10:48 bugmaster Status tested => verified
2016-08-12 10:48 bugmaster Resolution open => fixed
2016-08-26 16:24 git Note Added: 0057163
2016-08-26 20:42 san Relationship added related to 0027815
2016-09-26 11:24 kgv Relationship added parent of 0027883
2016-12-09 16:30 user533 Status verified => closed
2016-12-09 16:38 user533 Fixed in Version => 7.1.0


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker