View Issue Details

IDProjectCategoryView StatusLast Update
0028088Open CASCADEOCCT:Visualizationpublic2018-03-16 00:03
Reporterkgv Assigned Tokgv  
PrioritynormalSeverityintegration request 
Status closedResolutionfixed 
Target Version7.2.0Fixed in Version7.2.0 
Summary0028088: Visualization, AIS_InteractiveContext - drop default value for Update Viewer parameter
DescriptionAIS_InteractiveContext defines many methods taking parameter to update viewer or not. The problem is that this parameter has default value which is TRUE.

Existing syntax simplifies first usage of OCCT - e.g. application developer sees all changes immediately in 3D Viewer exactly at the line where AIS_InteractiveContext method is called.

However, this approach is inefficient and error-prone, because real application usually performs several changes in AIS_InteractiveContext at once, and performing additional Viewer updates in between significantly impacts overall performance.

The usual approach is to set the UpdateViewer parameter to FALSE for every called method AIS_InteractiveContext, and calling Viewer update explicitly once after all modifications have been done. This approach works well, however the problem is that default value in all methods is TRUE and it is easy to miss argument at application code leading to implicit redundant Viewer updates which are not well-seen to developer, but still impact performance.

It is proposed to alter existing API and remove default value to UpdateViewer flag from all AIS_InteractiveContext methods, so that user should always specify desired effect.
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot needed

Relationships

related to 0024609 closedbugmaster Open CASCADE Revise consistency of immediate update mode in V3d_View 
parent of 0028305 closedbugmaster Open CASCADE Visualization, AIS_Manipulator - Attach method should receive an "update viewer" flag 
parent of 0028820 closedbugmaster Open CASCADE Samples - fix compilation of JAVA sample for Android 
parent of 0028895 closedbugmaster Open CASCADE Visualization, V3d_View::SetComputedMode() - HLR calculation is performed multiple times when 'hlr on' has been called 
parent of 0029214 closedbugmaster Open CASCADE Application Framework - TPrsStd_AISPresentation::AISUpdate() should not implicitly redraw 3D Viewer 
parent of 0029285 closedbugmaster Open CASCADE Visualization, V3d_View::UpdateLights() - eliminate implicit redraw 
parent of 0029140 closedbugmaster Open CASCADE Samples - Viewer is not updated in MFC Modeling and Viewer3D samples 
related to 0028405 closedbugmaster Community Visualization, V3d_Viewer - changes to Grid immediately updates view 
related to 0028407 closedapn Open CASCADE Visualization - remove ::UpdateMode() from Graphic3d_StructureManager 

Activities

git

2016-12-23 13:54

administrator   ~0062059

Branch CR28088 has been created by isk.

SHA-1: 038fc9ed682ec3682843803b4691400e80e746bd


Detailed log of new commits:

Author: isk
Date: Fri Dec 23 11:20:29 2016 +0300

    0028088: Visualization, AIS_InteractiveContext - drop default value for Update Viewer parameter

isk

2016-12-26 11:32

developer   ~0062111

Some methods of AIS_InteractiveContext have several default parameters:

void ClearPrs (const Handle(AIS_InteractiveObject)& aniobj, const Standard_Integer theMode = 0, const Standard_Boolean theToUpdateViewer = Standard_True);

void Redisplay (const AIS_KindOfInteractive theTypeOfObject, const Standard_Integer theSignature = -1, const Standard_Boolean theToUpdateViewer = Standard_True);

void SetTransparency (const Handle(AIS_InteractiveObject)& theIObj, const Standard_Real theValue = 0.6, const Standard_Boolean theToUpdateViewer = Standard_True);

void SetPolygonOffsets (const Handle(AIS_InteractiveObject)& theIObj, const Standard_Integer theMode, const Standard_ShortReal theFactor = 1.0, const Standard_ShortReal theUnits = 0.0, const Standard_Boolean theToUpdateViewer = Standard_True);

void SetSelectedAspect (const Handle(Prs3d_BasicAspect)& theAspect, const Standard_Boolean theGlobalChange = Standard_True, const Standard_Boolean theToUpdateViewer = Standard_True);

void CloseLocalContext (const Standard_Integer theIndex = -1, const Standard_Boolean theToUpdateViewer = Standard_True);

void FitSelected (const Handle(V3d_View)& theView, const Standard_Real theMargin = 0.01, const Standard_Boolean theToUpdate = Standard_True);

It is not clear what with them to do.

kgv

2016-12-26 11:46

developer   ~0062112

Last edited: 2016-12-26 12:13

ClearPrs(), Redisplay(), SetTransparency(), SetPolygonOffsets() - all default values can be removed.

SetSelectedAspect() - remove unused second argument and default value for theToUpdateViewer.

CloseLocalContext() - deprecated method, can be left as is.

FitSelected() - define one more method without theMargin argument. In the current definition - remove default values from both arguments.

git

2016-12-27 13:24

administrator   ~0062175

Branch CR28088_1 has been created by isk.

SHA-1: 7d63c99d66b14439c9d91bc11dab895baa18b3f4


Detailed log of new commits:

Author: isk
Date: Tue Dec 27 13:24:08 2016 +0300

    0028088: Visualization, AIS_InteractiveContext - drop default value for Update Viewer parameter

kgv

2016-12-27 16:31

developer   ~0062197

Please add notes to upgrade guide and update sample for C# wrapper.

kgv

2016-12-28 10:58

developer   ~0062218

Please remove also the following line within AIS_Manipulator::Attach():
    aContext->CurrentViewer()->RedrawImmediate();

git

2016-12-28 14:25

administrator   ~0062247

Branch CR28088_1 has been updated by isk.

SHA-1: f74ef432768af85240a1aac63eba5fa1017ec3eb


Detailed log of new commits:

Author: isk
Date: Wed Dec 28 14:25:38 2016 +0300

    Add notes to upgrade guide and update AIS_Manipulator::Attach().

git

2016-12-29 13:24

administrator   ~0062307

Branch CR28088_2 has been created by isk.

SHA-1: eb10834395cb1ec829fa6d22740e31fb4db7ea8b


Detailed log of new commits:

Author: isk
Date: Tue Dec 27 13:24:08 2016 +0300

    0028088: Visualization, AIS_InteractiveContext - drop default value for Update Viewer parameter

kgv

2016-12-29 13:31

developer   ~0062310

Please test the patch.

git

2016-12-29 13:59

administrator   ~0062316

Branch CR28088_2 has been updated forcibly by isk.

SHA-1: f432482d8921b5fc839b5f76db1bc03a28013303

apv

2017-01-09 15:06

tester   ~0062423

Dear Ilya,

Please, rebase CR28088_2 (from occt git-repositories) and CR28088_1 (from products git-repositories) on the current masters. Thank you in advance.

git

2017-01-09 15:25

administrator   ~0062425

Branch CR28088_2 has been updated forcibly by kgv.

SHA-1: 0c9c9112030e01bf82525fe93d43ea7f68ab3a07

kgv

2017-01-09 15:29

developer   ~0062427

Rebased.

apv

2017-01-10 11:42

tester   ~0062436

Dear BugMaster,

During building of branches CR28088_2 (SHA-1: 0c9c9112030e01bf82525fe93d43ea7f68ab3a07) from occt git-repository and CR28088_1 (SHA-1: 0de6f609d0d67a1d230dd423dd92799e34aa3066) from products git-repository compilation errors have been detected.
On Linux:
http://jenkins-test-05.nnov.opencascade.com/view/CR28088_2-CR28088_1/job/CR28088_2-CR28088_1-OCCT-Debian70-64-opt-compile/1/parsed_console/
On MacOS:
http://jenkins-test-05.nnov.opencascade.com/view/CR28088_2-CR28088_1/job/CR28088_2-CR28088_1-OCCT-MacOS-opt-compile/1/parsed_console/

Moreover, compilation errors have been detected during building
Products MFC-samples on Windows:
http://jenkins-test-05.nnov.opencascade.com/view/CR28088_2-CR28088_1/job/CR28088_2-CR28088_1-Products-Windows-64-VC10-mfc-samples/1/parsed_console/
Products Qt-samples on Windows:
http://jenkins-test-05.nnov.opencascade.com/view/CR28088_2-CR28088_1/job/CR28088_2-CR28088_1-Products-Windows-64-VC10-qt-samples-windows/1/parsed_console/

apv

2017-01-10 11:43

tester   ~0062437

Dear Kirill,

Branches CR28088_2 (from occt git-repositoriy) and CR28088_1 (from products git-repository) have been rejected due to:
- compilation errors

git

2017-01-10 13:45

administrator   ~0062443

Branch CR28088_2 has been updated by kgv.

SHA-1: 852b3ffc3d3bc674331153d28d220ca09f18d267


Detailed log of new commits:

Author: kgv
Date: Tue Jan 10 13:45:17 2017 +0300

    fix compilation errors

git

2017-01-10 14:53

administrator   ~0062448

Branch CR28088_3 has been created by kgv.

SHA-1: 0577ae8ca4a5e9360deab8eba9f58d8347b3da29


Detailed log of new commits:

Author: isk
Date: Tue Dec 27 13:24:08 2016 +0300

    0028088: Visualization, AIS_InteractiveContext - drop default value for Update Viewer parameter

kgv

2017-01-10 14:54

developer   ~0062449

Please check updated patch in branch CR28088_3.

apv

2017-01-11 12:15

tester   ~0062483

Dear BugMaster,

Branch CR28088_3 from occt git-repository (and CR28088_3 from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
SHA-1: 0577ae8ca4a5e9360deab8eba9f58d8347b3da29
SHA-1: ade81d1eb66f1a43fcaa91e974cb5d14ba2c11c4

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

Compilation errors have been detected during building of Products MFC-samples on Windows:
http://jenkins-test-05.nnov.opencascade.com/view/CR28088_3-CR28088_3/job/CR28088_3-CR28088_3-Products-Windows-64-VC10-mfc-samples/1/parsed_console/

Regressions/Differences:
Not detected

Testing cases:
Not needed

Testing on Linux:
occt component:
Total MEMORY difference: 93319680 / 92886504 [+0.47%]
Total CPU difference: 21383.38000000012 / 21505.9100000003 [-0.57%]
products component:
Total MEMORY difference: 30362708 / 30395462 [-0.11%]
Total CPU difference: 5347.099999999976 / 5312.789999999971 [+0.65%]

Testing on Windows:
occt component:
Total MEMORY difference: 58639028 / 58649007 [-0.02%]
Total CPU difference: 19320.879850998477 / 19749.742200098677 [-2.17%]
products component:
Total MEMORY difference: 21150835 / 21118126 [+0.15%]
Total CPU difference: 5170.419143499968 / 5256.094892699988 [-1.63%]

apv

2017-01-11 12:16

tester   ~0062484

Dear Kirill,

Branches CR28088_3 (from occt and products git-repositories) have been rejected due to:
- compilation errors

kgv

2017-01-11 16:02

developer   ~0062499

Please check building Product samples within updated patch.
Regression testing is not needed.

apv

2017-01-12 13:06

tester   ~0062526

Last edited: 2017-01-12 13:06

Dear BugMaster,

Branch CR28088_3 from occt git-repository (and CR28088_3 from products git-repository) was compiled on Linux, MacOS and Windows platforms.
SHA-1: 0577ae8ca4a5e9360deab8eba9f58d8347b3da29
SHA-1: ed231a2e496ee6526377df026db8ccba0f3d80b7

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

git

2017-02-08 11:31

administrator   ~0063536

Branch CR28088 has been deleted by kgv.

SHA-1: 038fc9ed682ec3682843803b4691400e80e746bd

git

2017-02-08 11:31

administrator   ~0063537

Branch CR28088_1 has been deleted by kgv.

SHA-1: f74ef432768af85240a1aac63eba5fa1017ec3eb

git

2017-02-08 11:31

administrator   ~0063538

Branch CR28088_2 has been deleted by kgv.

SHA-1: 852b3ffc3d3bc674331153d28d220ca09f18d267

git

2017-02-08 11:31

administrator   ~0063539

Branch CR28088_3 has been deleted by kgv.

SHA-1: 0577ae8ca4a5e9360deab8eba9f58d8347b3da29

Related Changesets

occt: master 0577ae8c

2016-12-27 10:24:08

isk


Committer: kgv Details Diff
0028088: Visualization, AIS_InteractiveContext - drop default value for Update Viewer parameter Affected Issues
0028088
mod - dox/dev_guides/upgrade/upgrade.md Diff File
mod - samples/CSharp/OCCTProxy/OCCTProxy.cpp Diff File
mod - samples/CSharp/OCCTProxy_D3D/OCCTProxyD3D.cpp Diff File
mod - samples/mfc/standard/01_Geometry/src/GeometryDoc.cpp Diff File
mod - samples/mfc/standard/01_Geometry/src/GeomSources.cpp Diff File
mod - samples/mfc/standard/02_Modeling/src/ModelingDoc.cpp Diff File
mod - samples/mfc/standard/03_Viewer2d/src/Viewer2dDoc.cpp Diff File
mod - samples/mfc/standard/04_Viewer3d/src/ModelClippingDlg.cpp Diff File
mod - samples/mfc/standard/04_Viewer3d/src/OCCDemo_Presentation.cpp Diff File
mod - samples/mfc/standard/04_Viewer3d/src/TexturesExt_Presentation.cpp Diff File
mod - samples/mfc/standard/04_Viewer3d/src/Viewer3dDoc.cpp Diff File
mod - samples/mfc/standard/04_Viewer3d/src/Viewer3dView.cpp Diff File
mod - samples/mfc/standard/05_ImportExport/src/ColoredShapes.cpp Diff File
mod - samples/mfc/standard/05_ImportExport/src/ImportExportDoc.cpp Diff File
mod - samples/mfc/standard/06_Ocaf/src/OcafDoc.cpp Diff File
mod - samples/mfc/standard/07_Triangulation/src/OCCDemo_Presentation.cpp Diff File
mod - samples/mfc/standard/07_Triangulation/src/Tesselate_Presentation.cpp Diff File
mod - samples/mfc/standard/07_Triangulation/src/TriangulationDoc.cpp Diff File
mod - samples/mfc/standard/08_HLR/src/HLRDoc.cpp Diff File
mod - samples/mfc/standard/08_HLR/src/SelectionDialog.cpp Diff File
mod - samples/mfc/standard/09_Animation/src/AnimationDoc.cpp Diff File
mod - samples/mfc/standard/10_Convert/src/Convert_Presentation.cpp Diff File
mod - samples/mfc/standard/10_Convert/src/OCCDemo_Presentation.cpp Diff File
mod - samples/mfc/standard/10_Convert/src/WNT/OCCDemoDoc.cpp Diff File
mod - samples/mfc/standard/10_Convert/src/WNT/OCCDemoView.cpp Diff File
mod - samples/mfc/standard/Common/AISDialogs.cpp Diff File
mod - samples/mfc/standard/Common/AngleParamsVerticesPage.cpp Diff File
mod - samples/mfc/standard/Common/ImportExport/ImportExport.cpp Diff File
mod - samples/mfc/standard/Common/LengthParamsEdgePage.cpp Diff File
mod - samples/mfc/standard/Common/LengthParamsEdgesPage.cpp Diff File
mod - samples/mfc/standard/Common/LengthParamsVerticesPage.cpp Diff File
mod - samples/mfc/standard/Common/OCC_2dDoc.cpp Diff File
mod - samples/mfc/standard/Common/OCC_2dView.cpp Diff File
mod - samples/mfc/standard/Common/OCC_3dBaseDoc.cpp Diff File
mod - samples/mfc/standard/Common/ParamsFacesPage.cpp Diff File
mod - samples/mfc/standard/Common/RadiusParamsPage.cpp Diff File
mod - samples/qt/Common/src/DocumentCommon.cxx Diff File
mod - samples/qt/Common/src/View.cxx Diff File
mod - samples/qt/Tutorial/src/DocumentTut.cxx Diff File
mod - src/AIS/AIS_InteractiveContext.cxx Diff File
mod - src/AIS/AIS_InteractiveContext.hxx Diff File
mod - src/AIS/AIS_InteractiveContext_1.cxx Diff File
mod - src/AIS/AIS_LocalContext.cxx Diff File
mod - src/AIS/AIS_Manipulator.cxx Diff File
mod - src/AIS/AIS_Trihedron.cxx Diff File
mod - src/QABugs/QABugs_1.cxx Diff File
mod - src/QABugs/QABugs_11.cxx Diff File
mod - src/QABugs/QABugs_14.cxx Diff File
mod - src/QABugs/QABugs_15.cxx Diff File
mod - src/QABugs/QABugs_16.cxx Diff File
mod - src/QABugs/QABugs_17.cxx Diff File
mod - src/QABugs/QABugs_19.cxx Diff File
mod - src/QABugs/QABugs_3.cxx Diff File
mod - src/QABugs/QABugs_4.cxx Diff File
mod - src/QABugs/QABugs_8.cxx Diff File
mod - src/QABugs/QABugs_9.cxx Diff File
mod - src/QADraw/QADraw.cxx Diff File
mod - src/TPrsStd/TPrsStd_AISPresentation.cxx Diff File
mod - src/ViewerTest/ViewerTest.cxx Diff File
mod - src/ViewerTest/ViewerTest_FilletCommands.cxx Diff File
mod - src/ViewerTest/ViewerTest_ObjectCommands.cxx Diff File
mod - src/ViewerTest/ViewerTest_RelationCommands.cxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File
mod - src/XDEDRAW/XDEDRAW.cxx Diff File
mod - src/XSDRAWSTLVRML/XSDRAWSTLVRML.cxx Diff File

Issue History

Date Modified Username Field Change
2016-11-11 10:20 kgv New Issue
2016-11-11 10:20 kgv Assigned To => kgv
2016-11-11 10:21 kgv Relationship added related to 0024609
2016-12-22 10:14 kgv Assigned To kgv => isk
2016-12-22 10:14 kgv Status new => assigned
2016-12-23 13:54 git Note Added: 0062059
2016-12-26 11:32 isk Note Added: 0062111
2016-12-26 11:46 kgv Note Added: 0062112
2016-12-26 12:13 kgv Note Edited: 0062112
2016-12-27 13:24 git Note Added: 0062175
2016-12-27 13:31 isk Assigned To isk => kgv
2016-12-27 13:31 isk Status assigned => feedback
2016-12-27 16:31 kgv Note Added: 0062197
2016-12-27 16:31 kgv Assigned To kgv => isk
2016-12-27 16:31 kgv Status feedback => assigned
2016-12-28 10:58 kgv Note Added: 0062218
2016-12-28 13:40 kgv Relationship added parent of 0028305
2016-12-28 14:25 git Note Added: 0062247
2016-12-29 13:24 git Note Added: 0062307
2016-12-29 13:27 isk Assigned To isk => kgv
2016-12-29 13:27 isk Status assigned => resolved
2016-12-29 13:31 kgv Note Added: 0062310
2016-12-29 13:31 kgv Assigned To kgv => bugmaster
2016-12-29 13:31 kgv Status resolved => reviewed
2016-12-29 13:59 git Note Added: 0062316
2017-01-09 14:38 apv Assigned To bugmaster => apv
2017-01-09 15:06 apv Note Added: 0062423
2017-01-09 15:06 apv Assigned To apv => isk
2017-01-09 15:06 apv Status reviewed => feedback
2017-01-09 15:25 git Note Added: 0062425
2017-01-09 15:29 kgv Note Added: 0062427
2017-01-09 15:29 kgv Assigned To isk => bugmaster
2017-01-09 15:29 kgv Status feedback => reviewed
2017-01-09 15:56 apv Assigned To bugmaster => apv
2017-01-10 11:42 apv Note Added: 0062436
2017-01-10 11:42 apv Assigned To apv => kgv
2017-01-10 11:42 apv Status reviewed => assigned
2017-01-10 11:43 apv Note Added: 0062437
2017-01-10 13:45 git Note Added: 0062443
2017-01-10 14:53 git Note Added: 0062448
2017-01-10 14:54 kgv Note Added: 0062449
2017-01-10 14:54 kgv Assigned To kgv => bugmaster
2017-01-10 14:54 kgv Status assigned => resolved
2017-01-10 14:54 kgv Status resolved => reviewed
2017-01-10 15:31 apv Assigned To bugmaster => apv
2017-01-11 12:06 apv Test case number => Not needed
2017-01-11 12:15 apv Note Added: 0062483
2017-01-11 12:15 apv Assigned To apv => kgv
2017-01-11 12:15 apv Status reviewed => assigned
2017-01-11 12:16 apv Note Added: 0062484
2017-01-11 16:02 kgv Note Added: 0062499
2017-01-11 16:02 kgv Assigned To kgv => bugmaster
2017-01-11 16:02 kgv Status assigned => resolved
2017-01-11 16:02 kgv Status resolved => reviewed
2017-01-11 16:45 apv Assigned To bugmaster => apv
2017-01-12 13:06 apv Note Added: 0062526
2017-01-12 13:06 apv Assigned To apv => bugmaster
2017-01-12 13:06 apv Status reviewed => tested
2017-01-12 13:06 apv Note Edited: 0062526
2017-01-20 16:12 kgv Changeset attached => occt master 0577ae8c
2017-01-20 16:12 kgv Assigned To bugmaster => kgv
2017-01-20 16:12 kgv Status tested => verified
2017-01-20 16:12 kgv Resolution open => fixed
2017-01-30 11:21 kgv Relationship added related to 0028405
2017-01-30 11:29 kgv Relationship added related to 0028407
2017-01-30 11:29 kgv Description Updated
2017-02-08 11:31 git Note Added: 0063536
2017-02-08 11:31 git Note Added: 0063537
2017-02-08 11:31 git Note Added: 0063538
2017-02-08 11:31 git Note Added: 0063539
2017-06-06 18:01 kgv Relationship added parent of 0028820
2017-07-10 14:12 kgv Relationship added parent of 0028895
2017-09-29 16:18 aiv Fixed in Version => 7.2.0
2017-09-29 16:28 aiv Status verified => closed
2017-11-02 09:56 kgv Relationship added parent of 0029214
2017-11-02 10:06 kgv Relationship added parent of 0029285
2018-03-16 00:03 kgv Relationship added parent of 0029140