MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0030124Open CASCADE[OCCT] OCCT:Visualizationpublic2018-09-10 19:012019-03-19 10:35
Reporterkgv 
Assigned Toapn 
PrioritynormalSeverityminor 
StatusverifiedResolutionfixed 
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 numberNot needed
Attached Files

- Relationships
related to 0029988verifiedbugmaster Community AIS_Shape - SetWidth() and SetColor() has no effect for FaceBoundary 
related to 0029570verifiedapn Open CASCADE Visualization, Graphic3d_Aspect - merge Graphic3d_Group aspects 

-  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
(0081510)
git (administrator)
2018-12-13 13:08

Branch CR30124_3 has been created by mnv.

SHA-1: c208b15fbde99bf3e78e05c93560e30288d722bc


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.
(0081517)
git (administrator)
2018-12-13 16:46

Branch CR30124_3 has been updated forcibly by mnv.

SHA-1: a0a4bbe376d69ab0beacc364e3348f6acad0c950
(0081520)
git (administrator)
2018-12-13 18:32

Branch CR30124_3 has been updated forcibly by mnv.

SHA-1: ee0f88e078b889da426991565e1682d55899002a
(0082785)
git (administrator)
2019-03-08 15:02

Branch CR30124_4 has been created by kgv.

SHA-1: 1efa1a3de332da7664c89ba958fabca3ecbb00bc


Detailed log of new commits:

Author: mnv
Date: Thu Mar 7 20:45:58 2019 +0300

    0030124: Visualization, AIS_InteractiveObject - clean up confusing Presentation invalidation logic
    
    Removed excess mechanism for invalidating presentations AIS_InteractiveObject::myRecomputeEveryPrs.
    PrsMgr_PresentableObject::Update() has been deprecated and replaced by PrsMgr_PresentableObject::UpdatePresentations()
    recomputing only explicitly invalidated presentations.
(0082787)
git (administrator)
2019-03-08 15:22

Branch CR30124_4 has been updated forcibly by kgv.

SHA-1: 4ee3f541a5c9927df2b6d5dd2b50600ab860e729
(0082790)
kgv (developer)
2019-03-08 16:36

Please raise the patch.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR30124_4-CR30124_4-KGV/ [^]
(0082843)
apn (administrator)
2019-03-11 16:02

Combination -
OCCT branch : CR30124_4
master SHA - 1efa1a3de332da7664c89ba958fabca3ecbb00bc
d67d4b811012eef8913d3c535c29654d0acf3c4c
Products branch : CR30124_4 SHA - 4bbb463f2856388eef288d87691ef384b2847755
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:
Debian80-64:
OCCT
Total CPU difference: 16568.019999999964 / 16562.049999999996 [+0.04%]
Products
Total CPU difference: 9114.850000000039 / 9082.700000000026 [+0.35%]
Windows-64-VC14:
OCCT
Total CPU difference: 17967.078125 / 17955.015625 [+0.07%]
Products
Total CPU difference: 10455.78125 / 10469.015625 [-0.13%]

Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0082888)
git (administrator)
2019-03-13 08:03

Branch CR30124_4 has been updated by kgv.

SHA-1: 20fbf5286b66f38c292e22469f8d5e092274c509


Detailed log of new commits:

Author: kgv
Date: Wed Mar 13 07:58:18 2019 +0300

    # gcc compiler fix

(0082889)
git (administrator)
2019-03-13 08:24

Branch CR30124_4 has been updated forcibly by kgv.

SHA-1: ef72a8f7f456844ab7f009ce05903ec80f962d69
(0083083)
git (administrator)
2019-03-19 10:33

Branch CR30124_4 has been deleted by inv.

SHA-1: ef72a8f7f456844ab7f009ce05903ec80f962d69
(0083090)
git (administrator)
2019-03-19 10:33

Branch CR30124_3 has been deleted by inv.

SHA-1: ee0f88e078b889da426991565e1682d55899002a
(0083091)
git (administrator)
2019-03-19 10:33

Branch CR30124_2 has been deleted by inv.

SHA-1: 6939fc1d462fe654c9760abca6936118cd1d62e3
(0083092)
git (administrator)
2019-03-19 10:33

Branch CR30124_1 has been deleted by inv.

SHA-1: 011f1c1b4d525049dd4ffc5d7fa07581848aaa1e
(0083093)
git (administrator)
2019-03-19 10:33

Branch CR30124 has been deleted by inv.

SHA-1: 5e745d7712ac508a9aa9c928a6e5677f742c26a6

- Related Changesets
occt: master 226fce20
Timestamp: 2019-03-07 17:45:58
Author: mnv
Committer: apn
Details ] Diff ]
0030124: Visualization, AIS_InteractiveObject - clean up confusing Presentation invalidation logic

Removed excess mechanism for invalidating presentations AIS_InteractiveObject::myRecomputeEveryPrs.
PrsMgr_PresentableObject::Update() has been deprecated and replaced by PrsMgr_PresentableObject::UpdatePresentations()
recomputing only explicitly invalidated presentations.
mod - dox/dev_guides/upgrade/upgrade.md Diff ] File ]
mod - samples/mfc/standard/Common/ISession2D/ISession2D_Shape.cpp Diff ] File ]
mod - src/AIS/AIS_Axis.cxx Diff ] File ]
mod - src/AIS/AIS_CameraFrustum.cxx Diff ] File ]
mod - src/AIS/AIS_Circle.cxx Diff ] File ]
mod - src/AIS/AIS_Circle.hxx Diff ] File ]
mod - src/AIS/AIS_ColoredShape.cxx Diff ] File ]
mod - src/AIS/AIS_InteractiveContext.cxx Diff ] File ]
mod - src/AIS/AIS_InteractiveContext.hxx Diff ] File ]
mod - src/AIS/AIS_InteractiveObject.cxx Diff ] File ]
mod - src/AIS/AIS_InteractiveObject.hxx Diff ] File ]
mod - src/AIS/AIS_Line.cxx Diff ] File ]
mod - src/AIS/AIS_Line.hxx Diff ] File ]
mod - src/AIS/AIS_Plane.cxx Diff ] File ]
mod - src/AIS/AIS_PlaneTrihedron.cxx Diff ] File ]
mod - src/AIS/AIS_PlaneTrihedron.hxx Diff ] File ]
mod - src/AIS/AIS_Point.cxx Diff ] File ]
mod - src/AIS/AIS_Point.hxx Diff ] File ]
mod - src/AIS/AIS_Shape.cxx Diff ] File ]
mod - src/AIS/AIS_Shape.hxx Diff ] File ]
mod - src/AIS/AIS_TextLabel.cxx Diff ] File ]
mod - src/AIS/AIS_Triangulation.cxx Diff ] File ]
mod - src/AIS/AIS_Trihedron.cxx Diff ] File ]
mod - src/AIS/AIS_Trihedron.hxx Diff ] File ]
mod - src/PrsMgr/PrsMgr_PresentableObject.cxx Diff ] File ]
mod - src/PrsMgr/PrsMgr_PresentableObject.hxx Diff ] File ]
mod - src/StdSelect/StdSelect_BRepOwner.cxx Diff ] File ]
mod - src/XCAFPrs/XCAFPrs_AISObject.cxx Diff ] File ]

- 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
2018-12-13 13:08 git Note Added: 0081510
2018-12-13 16:46 git Note Added: 0081517
2018-12-13 18:32 git Note Added: 0081520
2019-03-08 13:39 kgv Relationship added related to 0029570
2019-03-08 15:02 git Note Added: 0082785
2019-03-08 15:22 git Note Added: 0082787
2019-03-08 16:36 kgv Note Added: 0082790
2019-03-08 16:36 kgv Assigned To mnv => bugmaster
2019-03-08 16:36 kgv Status assigned => resolved
2019-03-08 16:37 kgv Status resolved => reviewed
2019-03-11 16:02 apn Test case number => Not needed
2019-03-11 16:02 apn Note Added: 0082843
2019-03-11 16:02 apn Status reviewed => tested
2019-03-13 08:03 git Note Added: 0082888
2019-03-13 08:24 git Note Added: 0082889
2019-03-17 15:40 apn Changeset attached => occt master 226fce20
2019-03-17 15:40 apn Assigned To bugmaster => apn
2019-03-17 15:40 apn Status tested => verified
2019-03-17 15:40 apn Resolution open => fixed
2019-03-19 10:33 git Note Added: 0083083
2019-03-19 10:33 git Note Added: 0083090
2019-03-19 10:33 git Note Added: 0083091
2019-03-19 10:33 git Note Added: 0083092
2019-03-19 10:33 git Note Added: 0083093


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker