MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030124Open CASCADE[OCCT] OCCT:Visualizationpublic2018-09-10 19:012018-10-26 17:13
Reporterkgv 
Assigned Tomnv 
PrioritynormalSeverityminor 
StatusassignedResolutionopen 
PlatformOSOS Version
Product Version[OCCT] 7.3.0 
Target Version[OCCT] 7.4.0*Fixed in Version 
Summary0030124: Visualization, AIS_InteractiveObject - clean up confusing Presentation invalidation logic
DescriptionAIS_InteractiveObject has several properties related to presentation invalidation:
- RecomputeEveryPrs()/ListOfRecomputeModes()/MustRecomputePrs()/SetRecomputeOk()
- ToBeUpdated()/SetToUpdate()

The usage of first set of methods looks like a nonsense - they are used as temporary flags within modified object while it is modified by methods like AIS_InteractiveContext::SetWidth() so that invalidated modes are recomputed by AIS_InteractiveContext::redisplayPrsRecModes(). At the same time, RecomputeEveryPrs() flag is messed up with the list of invalidated modes. The list of invalidated modes is stored as AIS_InteractiveObject class field regardless of existence of these modes.

The second set looks more clear, since they invalidate already computed presentations and handled by AIS_InteractiveContext::redisplayPrsModes() as well as by PrsMgr_PresentationManager.

It looks unreasonable having 2 duplicated mechanisms for invalidating presentations, so that one (first) should be removed and replaced by another.

Command vdisplay might require changes so that to rely on invalidation flag.
Steps To ReproduceNot required
TagsNo tags attached.
Test case number
Attached Files

- Relationships
related to 0029988verifiedbugmaster Community AIS_Shape - SetWidth() and SetColor() has no effect for FaceBoundary 

-  Notes
(0079449)
BenjaminBihler (updater)
2018-09-27 16:21

I have been struggling with presentation invalidation. Has it something to do with this issue?

https://www.opencascade.com/content/lazy-presentation-update [^]
(0079473)
kgv (developer)
2018-09-28 13:01
edited on: 2018-09-28 13:07

> I have been struggling with presentation invalidation.
> Has it something to do with this issue?
Sorry, but I have almost zero knowledge about TPrsStd to comment.
This bug is related to applications working directly with AIS objects
and having an issue how properly mark presentation invalidated to force Recompute later on, since there are several similar methods.

TPrsStd is part of Application Framework, not Visualization;
although it deals with AIS objects.

(0079474)
BenjaminBihler (updater)
2018-09-28 13:04

Okay, thank you.
(0079489)
git (administrator)
2018-09-28 16:36

Branch CR30124 has been created by mnv.

SHA-1: 515f6131d7cb0b822219900d55016207992b74e0


Detailed log of new commits:

Author: mnv
Date: Fri Sep 28 13:06:23 2018 +0300

    0030124: Visualization, AIS_InteractiveObject - clean up confusing Presentation invalidation logic
    
    Removed excess mechanism for invalidating presentations.
    Updated vdisplay command logic for redisplaying presentations.
(0079491)
kgv (developer)
2018-09-28 17:26
edited on: 2018-09-28 17:28

+  TColStd_ListOfInteger aModes;
+  theIObj->ToBeUpdated (aModes);
+  for (TColStd_ListIteratorOfListOfInteger aModeIter (aModes); aModeIter.More(); aModeIter.Next())

I think it would be better replacing this logic by direct iteration through Object presentations
(probably by improving / extending PrsMgr_PresentableObject::Update() methods).

(0079545)
git (administrator)
2018-10-01 10:39

Branch CR30124 has been updated forcibly by mnv.

SHA-1: 0f2aa6b01e14a9a3deed5cf2e69d9920ebc4c961
(0079595)
git (administrator)
2018-10-02 14:46

Branch CR30124 has been updated forcibly by mnv.

SHA-1: 5e745d7712ac508a9aa9c928a6e5677f742c26a6
(0079696)
mnv (developer)
2018-10-04 17:49

Patch is ready for review.
(0079708)
kgv (developer)
2018-10-04 18:55

   TColStd_ListOfInteger aPrsModes;
   theIObj->ToBeUpdated (aPrsModes);

Please update the code to avoid creation of temporary list of presentation modes to update.
(0079949)
git (administrator)
2018-10-15 11:45

Branch CR30124_1 has been created by mnv.

SHA-1: bd0a3f02ad4343186cb56ad93abf62bf8dc39c32


Detailed log of new commits:

Author: mnv
Date: Fri Sep 28 13:06:23 2018 +0300

    0030124: Visualization, AIS_InteractiveObject - clean up confusing Presentation invalidation logic
    
    Removed excess mechanism for invalidating presentations.
(0079958)
git (administrator)
2018-10-15 13:53

Branch CR30124_1 has been updated forcibly by mnv.

SHA-1: e973a76c166415e4e5f0ce2872e756e6d7771f08
(0079967)
git (administrator)
2018-10-15 15:59

Branch CR30124_1 has been updated forcibly by mnv.

SHA-1: f499ed5a016ea98b001048619f5f5f4723a142e4
(0080233)
git (administrator)
2018-10-23 15:10

Branch CR30124_1 has been updated forcibly by mnv.

SHA-1: 011f1c1b4d525049dd4ffc5d7fa07581848aaa1e
(0080253)
mnv (developer)
2018-10-24 10:54

Patch is ready for review.
http://jenkins-test-12.nnov.opencascade.com/view/CR30124-master-MNV/view/ALL/ [^]
(0080255)
kgv (developer)
2018-10-24 11:13

@@ -1006,12 +1006,7 @@ void AIS_InteractiveContext::Update (const Handle(AIS_InteractiveObject)& 
theIOb
     return;
   }
 
-  TColStd_ListOfInteger aPrsModes;
-  theIObj->ToBeUpdated (aPrsModes);
-  for (TColStd_ListIteratorOfListOfInteger aPrsModesIt (aPrsModes); aPrsModesIt.More(); aPrsModesIt.Next())

-  {
-    theIObj->Update (aPrsModesIt.Value(), Standard_False);
-  }
+  theIObj->Update();
...
+void PrsMgr_PresentableObject::Update (const Standard_Boolean theAllModes,
+                                       const Standard_Boolean theClearOther)
...
+    if (theAllModes)
+    {
+      aPrsMgr->Update (this, aModedPrs.Mode());
+    }
+    else
+    {
+      if (aPrsMgr->IsDisplayed (this, aModedPrs.Mode())
+       || aPrsMgr->IsHighlighted (this, aModedPrs.Mode()))
+      {
+        aPrsMgr->Update (this, aModedPrs.Mode());
+      }
+      else
+      {
+        SetToUpdate (aModedPrs.Mode());
+      }

It doesn't look intended to work at all - with ClearOther set to FALSE,
MustBeUpdated is ignored at all, and all active presentations
are re-computed unconditionally while inactive presentations
are invalidated unconditionally.
(0080271)
git (administrator)
2018-10-24 15:43

Branch CR30124_2 has been created by mnv.

SHA-1: 30cccf5972908453151f9f1f970819c8b8fffc39


Detailed log of new commits:

Author: mnv
Date: Fri Sep 28 13:06:23 2018 +0300

    0030124: Visualization, AIS_InteractiveObject - clean up confusing Presentation invalidation logic
    
    Removed excess mechanism for invalidating presentations.
(0080380)
git (administrator)
2018-10-26 14:59

Branch CR30124_2 has been updated forcibly by mnv.

SHA-1: 873899429d3623935bea41939d320f1ba10c8d3e
(0080395)
git (administrator)
2018-10-26 17:13

Branch CR30124_2 has been updated forcibly by mnv.

SHA-1: 6939fc1d462fe654c9760abca6936118cd1d62e3

- Issue History
Date Modified Username Field Change
2018-09-10 19:01 kgv New Issue
2018-09-10 19:01 kgv Assigned To => kgv
2018-09-10 19:02 kgv Relationship added related to 0029988
2018-09-10 19:08 kgv Assigned To kgv => mnv
2018-09-10 19:08 kgv Status new => assigned
2018-09-27 16:21 BenjaminBihler Note Added: 0079449
2018-09-28 12:58 kgv Description Updated View Revisions
2018-09-28 13:01 kgv Note Added: 0079473
2018-09-28 13:02 kgv Note Edited: 0079473 View Revisions
2018-09-28 13:04 BenjaminBihler Note Added: 0079474
2018-09-28 13:07 kgv Note Edited: 0079473 View Revisions
2018-09-28 16:36 git Note Added: 0079489
2018-09-28 17:26 kgv Note Added: 0079491
2018-09-28 17:28 kgv Note Edited: 0079491 View Revisions
2018-10-01 10:39 git Note Added: 0079545
2018-10-02 14:46 git Note Added: 0079595
2018-10-04 17:49 mnv Note Added: 0079696
2018-10-04 17:49 mnv Assigned To mnv => kgv
2018-10-04 17:49 mnv Status assigned => resolved
2018-10-04 17:49 mnv Steps to Reproduce Updated View Revisions
2018-10-04 18:27 kgv Assigned To kgv => mnv
2018-10-04 18:27 kgv Status resolved => assigned
2018-10-04 18:55 kgv Note Added: 0079708
2018-10-15 11:45 git Note Added: 0079949
2018-10-15 13:53 git Note Added: 0079958
2018-10-15 15:59 git Note Added: 0079967
2018-10-23 15:10 git Note Added: 0080233
2018-10-24 10:54 mnv Note Added: 0080253
2018-10-24 10:54 mnv Assigned To mnv => kgv
2018-10-24 10:54 mnv Status assigned => resolved
2018-10-24 11:13 kgv Note Added: 0080255
2018-10-24 11:13 kgv Assigned To kgv => mnv
2018-10-24 11:13 kgv Status resolved => assigned
2018-10-24 15:43 git Note Added: 0080271
2018-10-26 14:59 git Note Added: 0080380
2018-10-26 17:13 git Note Added: 0080395


Copyright © 2000 - 2018 MantisBT Team
Powered by Mantis Bugtracker