MantisBT - Open CASCADE
View Issue Details
0030153Open CASCADE[OCCT] OCCT:Visualizationpublic2018-09-21 12:432018-09-30 18:47
mnv 
bugmaster 
normalminor 
verifiedfixed 
[OCCT] 7.1.0 
[OCCT] 7.4.0* 
Not needed
0030153: Visualization, TKOpenGl - AIS_ColoredShape::SynchronizeAspects() doesn't update all aspects
OpenGl_Group::SetGroupPrimitivesAspect method not work properly in some cases, because part of aspect fields is cached and updated only for the whole group. But in some cases is needed to update aspect fields for every group members.
Not required
No tags attached.
Issue History
2018-09-21 12:43mnvNew Issue
2018-09-21 12:43mnvAssigned To => kgv
2018-09-21 12:44mnvAssigned Tokgv => mnv
2018-09-21 12:44mnvStatusnew => assigned
2018-09-24 12:40gitNote Added: 0079355
2018-09-24 12:44kgvSummaryVisualization - In some cases Graphic3d_Aspect not applied for models which contain many groups => Visualization, TKOpenGl - AIS_ColoredShape::SynchronizeAspects() doesn't update all aspects
2018-09-24 12:53kgvNote Added: 0079358
2018-09-24 17:18gitNote Added: 0079369
2018-09-25 14:07gitNote Added: 0079390
2018-09-25 15:10gitNote Added: 0079393
2018-09-25 17:09mnvNote Added: 0079400
2018-09-25 17:09mnvAssigned Tomnv => kgv
2018-09-25 17:09mnvStatusassigned => resolved
2018-09-25 17:09mnvSteps to Reproduce Updatedbug_revision_view_page.php?rev_id=19969#r19969
2018-09-25 18:32gitNote Added: 0079401
2018-09-25 19:50kgvNote Added: 0079404
2018-09-25 19:50kgvAssigned Tokgv => bugmaster
2018-09-25 19:50kgvStatusresolved => reviewed
2018-09-25 19:52kgvRelationship addedchild of 0027682
2018-09-25 19:52kgvProduct Version => 7.1.0
2018-09-26 12:11bugmasterTest case number => Not needed
2018-09-26 12:14bugmasterNote Added: 0079408
2018-09-26 12:14bugmasterStatusreviewed => tested
2018-09-30 18:26bugmasterChangeset attached => occt master eaac0866
2018-09-30 18:26bugmasterStatustested => verified
2018-09-30 18:26bugmasterResolutionopen => fixed
2018-09-30 18:47gitNote Added: 0079507
2018-09-30 18:47gitNote Added: 0079508
2018-09-30 18:47gitNote Added: 0079509

Notes
(0079355)
git   
2018-09-24 12:40   
Branch CR30153 has been created by mnv.

SHA-1: e86d161db03d23240b8225cf21beaaca243e4b78


Detailed log of new commits:

Author: mnv
Date: Mon Sep 24 11:53:12 2018 +0300

    0030153: Visualization - In some cases Graphic3d_Aspect not applied for models which contain many groups
    
    Added new virtual method OpenGl_Element::UpdateParameters().
    This method is needed for updating aspects for all OpenGl group members.
    Added new virtual method Graphic3d_Group::UpdateAspects().
    This method is overriden in OpenGl_Group and implement logic for updating presentation aspects after their modification.
(0079358)
kgv   
2018-09-24 12:53   
+  //! Update presentation aspects after their modification.
+  Standard_EXPORT virtual void UpdateAspects() Standard_OVERRIDE;

It would be better calling method in the same way as where it is actually used - e.g. AIS_InteractiveObject::SynchronizeAspects().

+  //! Update parameters of the drawable elements.
+  virtual void UpdateParameters() = 0;

It doesn't look reasonable forcing every OpenGl_Element implementation defining this method.

+  OpenGl_ElementNode* aNode = myFirst;
+  while (aNode != NULL)
+  {

for(;;) loop syntax is preferable.

@@ -101,6 +116,7 @@ void OpenGl_Group::SetGroupPrimitivesAspect (const Handle(Graphic3d_AspectLine3d
   
{
     myAspectLine->SetAspect (theAspect);
   }
+  updateGroupElementNodes();

These updateGroupElementNodes() in Set**Aspect() look unrelated and redundant.
(0079369)
git   
2018-09-24 17:18   
Branch CR30153_1 has been created by mnv.

SHA-1: fc117be7e5065b14f4580e431f75260c39f15e82


Detailed log of new commits:

Author: mnv
Date: Mon Sep 24 11:53:12 2018 +0300

    0030153: Visualization, TKOpenGl - AIS_ColoredShape::SynchronizeAspects() doesn't update all aspects
    
    Added new virtual method OpenGl_Element::UpdateParameters().
    This method is needed for updating aspects for all OpenGl group members.
    Added new virtual method Graphic3d_Group::SynchronizeAspects().
    This method is overriden in OpenGl_Group and implement logic for updating presentation aspects after their modification.
(0079390)
git   
2018-09-25 14:07   
Branch CR30153_1 has been updated forcibly by mnv.

SHA-1: 0b9ed5ad78af0447c0b277c855f947fdcd52ca0f
(0079393)
git   
2018-09-25 15:10   
Branch CR30153_1 has been updated forcibly by mnv.

SHA-1: b379bb28bc9f930b0ff813393c11ee579e5f3818
(0079400)
mnv   
2018-09-25 17:09   
Patch is ready for review.
http://vm-jenkins-test-12.nnov.opencascade.com:8080/view/CR30153-master-MNV/view/ALL/ [^]
(0079401)
git   
2018-09-25 18:32   
Branch CR30153_2 has been created by kgv.

SHA-1: 7b840121f09213133cf7b5863bf0338960bf2d8d


Detailed log of new commits:

Author: mnv
Date: Mon Sep 24 11:53:12 2018 +0300

    0030153: Visualization, TKOpenGl - AIS_ColoredShape::SynchronizeAspects() doesn't update all aspects
    
    AIS_InteractiveObject::SynchronizeAspects() now propagates event
    to OpenGl_Group::SynchronizeAspects() which properly handles
    all aspects defined within the group.
(0079404)
kgv   
2018-09-25 19:50   
Please take the patch.
(0079408)
bugmaster   
2018-09-26 12:14   
Combination -
OCCT branch : CR30153_1 SHA - b379bb28bc9f930b0ff813393c11ee579e5f3818
Products branch : master SHA - f9065a267b8d853b9b62de5a81af9e9e51bc8d26
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: 17202.059999999743 / 17379.439999999933 [-1.02%]
Products
Total CPU difference: 7450.570000000066 / 7467.690000000077 [-0.23%]
Windows-64-VC14:
OCCT
Total CPU difference: 17412.784819698452 / 17536.33761169853 [-0.70%]
Products
Total CPU difference: 8346.287501499997 / 8382.276932199968 [-0.43%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0079507)
git   
2018-09-30 18:47   
Branch CR30153_2 has been deleted by inv.

SHA-1: 7b840121f09213133cf7b5863bf0338960bf2d8d
(0079508)
git   
2018-09-30 18:47   
Branch CR30153_1 has been deleted by inv.

SHA-1: b379bb28bc9f930b0ff813393c11ee579e5f3818
(0079509)
git   
2018-09-30 18:47   
Branch CR30153 has been deleted by inv.

SHA-1: e86d161db03d23240b8225cf21beaaca243e4b78