View Issue Details

IDProjectCategoryView StatusLast Update
0023670Open CASCADEOCCT:DRAWpublic2014-03-05 10:35
ReportersanAssigned Toaba 
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
PlatformAOSL 
Product Version6.5.4 
Target Version6.7.0Fixed in Version6.7.0 
Summary0023670: Support for multiple 3D views
DescriptionThis issue has been inspired by 0023663, #23654 and #23655.

It is necessary to improve DRAW to support creation of several 3D views and removing a 3D view programmatically.

1. At C++ level (ViewerTest package):
- Convenient API to create and close a V3d_View instance should be provided. Some way to identify a view instance should be foreseen (probably, a view handle is enough).
- By default, new instances of V3d_Viewer and AIS_InteractiveContext should be also created. Optionally, it should be possible to create a new view for existing V3d_Viewer/AIS_InteractiveContext.
- There should be one active view at any moment. All ViewerTest commands and all interactive view operations should work with the active view. A 3D view can be activated manually, by activating corresponding window, or programmatically. Convenient API to activate another existing V3d_View instance should be provided.

2. At commands level:
- vinit command should create a new 3D view instance each time it is executed. It should accept an optional argument telling it if the existing V3d_Viewer/AIS_InteractiveContext should be reused for the new view (see p.1 above). This command should return the view identifier in some form.
- vclose command that closes a given 3D view instance or the active one should be provided.
- vactivate command that activates the given 3D view instance should be provided.
TagsNo tags attached.
Test case numberbugs vis(004) bug23670_1, bug23670_2

Relationships

related to 0023663 closedaba Open CASCADE Removing 2D viewer library 
related to 0023707 closedsan Open CASCADE New Draw command for testing of HLR algorithm 
related to 0023709 closedaba Open CASCADE Redesign of hlrtest command 
related to 0023605 closedbugmaster Open CASCADE DRAW crashes on closing the test 3D view under Linux 
related to 0024295 closedbugmaster Open CASCADE vclose behavior is inconsistent 
related to 0024430 closedapn Open CASCADE vviewlist draw command does not added name of viewer created by XShow draw command 
related to 0024688 closedbugmaster Open CASCADE Draw Harness - vdump command makes snapshot only for the first view 

Activities

aba

2013-03-26 16:47

developer   ~0023899

The Git branch CR23670 is ready to be reviewed.

Dear san, please review.

aba

2013-04-25 18:34

developer   ~0024283

Last edited: 2013-04-26 12:02

The Git branch CR32670 is ready to be reviewed.

vinit draw command was modified. Now DRAW supports creation of multiple views, and command vinit support syntax:
1) vinit
Name for view is created to be unique
2) vinit view_name
view_name - can be DriverName/ViewerName/ViewName, or ViewerName/ViewName to use current driver if it exists, or ViewName to use current viewer and current driver if they exist
3) vinit name=view_name l=leftPx t=topPx w=widthPx h=heightPx
to set name, position and sizes of window
If the position of window is not set by user, created views will be disposed on the display without overlapping
       
4) for Unix systems also it is possible to set display name in the form <HostName:DisplayNumber.ScreenNumber>:
      vinit name=view_name display=display_name l=leftPx t=topPx w=widthPx h=heightPx
Added commands:
1) All draw commands work with active view, so to work with definite view, it should be activated first. It can be done interactively by mouse click or with help of command:
         vactivate view_name
2) View closing can be done interactively by mouse click on close button or with help of draw command:
          vclose view_name
3) For getting information about all views draw command vviewlist can be called.


Dear san, please review.

kgv

2013-04-26 15:39

developer   ~0024292

Dear aba,

interactive selection is broken now if only 1 view is created (tested on Windows platform).

aba

2013-04-29 14:37

developer   ~0024297

Interactive selection for the one opened view was fixed.

Dear san, please review.

san

2013-04-30 13:54

developer   ~0024301

Last edited: 2013-04-30 13:58

Branch CR23670 reviewed with the following remarks:

- ViewerTest_ViewerCommands.cxx, line 1001: looks meaningless, probably a part of removed code so should be also removed.

- ViewerTest_ViewerCommands.cxx, VClose function: removing ALL views should be also implemented using RemoveView() function, instead of massive code duplication.

- ViewerTest_ViewerCommands.cxx, VViewList() function: it looks reasonable to output the list of views to Draw_Interpretor instance rather than to std::cout, like this it becomes possible to store the list of views in a variable and to compare it with another list e.g. after closing some views.

- tests/bugs/vis/bug23670_2: checkcolor is meaningless in this context. Instead, you can e.g. improve vviewlist command (see the previous remark) and compare the view lists before and after vclose command.


- tests/bugs/vis/bug23670_1: please, use checkcolor with care, and note that it is much more robust to check the color of a pixel somewhere in the middle of a shaded shape rather than the color of a pixel on a wireframe. Setting shading mode for displayed shapes is recommended.

aba

2013-05-13 13:15

developer   ~0024368

VClose, VViewList functions and test cases were corrected according to remarks.

Dear san, please review.

san

2013-05-13 15:58

developer   ~0024370

Branch CR23670 reviewed without remarks, ready for testing.

mkv

2013-05-14 12:25

tester   ~0024376

Dear BugMaster,

Branch CR23670 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 34a1ec9addf8fd7e8a4cf248ba9393596cfebbf4

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 11 (11 on master)

products component :
Linux: 0 (0 on master)
Windows: 64 (64 on master)

Regressions:
bugs vis(004) bug23670_1 - on Linux
http://occt-tests/CR23670-master-occt/Debian60-64/bugs/vis/bug23670_1.html

sat read_parallel(005) E4 - on Linux and on Windows (Products test case). May be it is non stable?

Improvements:
No improvements

Testing cases:
bugs vis(004) bug23670_1 - BAD
bugs vis(004) bug23670_2 - OK

Testing on Linux:
Total MEMORY difference: 366708032 / 365955156
Total CPU difference: 43899.300000001254 / 43866.130000001045

Testing on Windows:
Total MEMORY difference: 420565336 / 421157660
Total CPU difference: 40251.34375 / 32293.21875

There are following differences in images found by testdiff.
http://occt-tests/CR23670-master-occt/Debian60-64/diff-Debian60-64.html
http://occt-tests/CR23670-master-occt/Windows-32-VC9/diff-Windows-32-VC9.html
IMAGE bugs vis bug288_6: bug288_6.png differs
IMAGE bugs vis bug19_2: bug19_2.png differs
IMAGE bugs vis bug112_1: bug112_1.png differs
IMAGE bugs vis buc60661: buc60661.png differs
IMAGE bugs vis buc60701: buc60701.png differs
IMAGE bugs vis bug22835: bug22835.png differs
IMAGE bugs vis bug112: bug112_1.png differs
IMAGE bugs demo bug23409: bug23409.png differs
IMAGE bugs modalg_1 buc60905: buc60905.png differs
IMAGE bugs modalg_2 bug292: bug292.png differs
IMAGE bugs modalg_2 bug264_0: bug264_0.png differs
IMAGE bugs modalg_2 bug264_1: bug264_1.png differs
IMAGE bugs modalg_2 bug264_1: bug264_10.png differs
IMAGE bugs modalg_2 bug264_1: bug264_11.png differs
IMAGE bugs modalg_2 bug264_2: bug264_2.png differs
IMAGE bugs modalg_2 bug264_3: bug264_3.png differs
IMAGE bugs modalg_2 bug264_4: bug264_4.png differs
IMAGE bugs modalg_2 bug264_5: bug264_5.png differs
IMAGE bugs modalg_2 bug264_6: bug264_6.png differs
IMAGE bugs modalg_2 bug264_7: bug264_7.png differs
IMAGE bugs modalg_2 bug264_8: bug264_8.png differs
IMAGE bugs modalg_2 bug264_9: bug264_9.png differs
IMAGE bugs modalg_2 bug21909: bug21909.png differs
IMAGE bugs modalg_2 bug21: bug21909.png differs
IMAGE bugs modalg_2 bug264_10: bug264_10.png differs
IMAGE bugs modalg_2 bug264_11: bug264_11.png differs
IMAGE bugs modalg_4 bug62: bug625.png differs
IMAGE bugs modalg_4 bug625: bug625.png differs
IMAGE bugs moddata_2 bug6412: bug6412.png differs
IMAGE bugs moddata_2 bug6412: bug6412_1.png differs
IMAGE bugs moddata_2 bug256: bug2569_1.png differs
IMAGE bugs moddata_2 bug428: bug428.png differs
IMAGE bugs moddata_2 bug22746_1: bug22746_1.png differs
IMAGE bugs moddata_2 bug22746_2: bug22746_2.png differs
IMAGE bugs moddata_2 bug22746_3: bug22746_3.png differs
IMAGE bugs moddata_2 bug2569_1: bug2569_1.png differs
IMAGE bugs moddata_2 bug25: bug2569_1.png differs
IMAGE bugs moddata_2 bug42: bug428.png differs
IMAGE bugs moddata_2 bug4: bug428.png differs
IMAGE bugs moddata_2 bug6412_1: bug6412_1.png differs

Also, the clarity of the images is bad.

aba

2013-05-20 12:48

developer   ~0024436

ViewerTest::ViewerInit() method was corrected.
Dear san, please review.

aba

2013-05-20 19:31

developer   ~0024440

CR23670 was updated.
1) vviewlist command was modificated. Now it allows to get output as tree like:
   Driver1:
     Viewer1:
       View1
or like list of full view names like:
  Driver1/Viewer1/View Dwr/Vwr/myView
2) bugs/end script was edited to dump results from all opened views.

san

2013-05-23 14:48

developer   ~0024493

Branch CR23670 reviewed without remarks, ready for testing.

mkv

2013-05-29 17:01

tester   ~0024546

Dear BugMaster,

Branch CR23670 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 0dad840c8fc11065c99cd1cd37cf495fbb624edc

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 11 (11 on master)

products component :
Linux: 0 (0 on master)
Windows: 64 (64 on master)

Regressions:
http://occt-tests/CR23670-master-occt/Debian60-64/summary.html
http://occt-tests/CR23670-master-occt/Windows-32-VC9/summary.html
bugs vis(004) bug280_2, bug280_3, bug349, bug349_1, bug6652

Improvements:
No improvements

Testing cases:
bugs vis(004) bug23670_1 - OK
bugs vis(004) bug23670_2 - OK

Testing on Linux:
Total MEMORY difference: 363924308 / 365459412
Total CPU difference: 44687.42000000066 / 45778.66000000136

Testing on Windows:
Total MEMORY difference: 417040112 / 419307964
Total CPU difference: 36616.0625 / 29779.953125

There are following differences in images found by testdiff.
http://occt-tests/CR23670-master-occt/Windows-32-VC9/diff-Windows-32-VC9.html
IMAGE bugs vis bug288_6: bug288_6.png differs
IMAGE bugs vis bug19_2: bug19_2.png differs

kgv

2013-05-30 14:29

developer   ~0024568

> 2) bugs/end script was edited to dump results from all opened views.
bugs/end is not the only place where vinit is called second time to take snapshots.

aba

2013-06-05 12:04

developer   ~0024630

The git branch CR23670 was updated:
1) bugs/end script was edited to dump results from all opened views
2) duplicated vinit was deleted from bug625
3) QABugs::OCC280() was edited to work with multiviews.
As workaround methods ViewerInit::InitViewName(), ViewerTest::RemoveViewName,ViewerTest::GetCurrentViewName were added to create non-orthographic views in QABugs functions.

Dear san, please review.

san

2013-06-05 12:46

developer   ~0024633

Branch CR23670 reviewed without remarks, ready for testing.

mkv

2013-06-05 14:36

tester   ~0024636

Dear BugMaster,

Branch CR23670 was compiled on Linux platform.
There are following compilation error:

http://jenkins-test-02.nnov.opencascade.com:8080/user/mnt/my-views/view/CR23670/job/mnt-CR23670-master_build_occt_linux/1/parsed_console/?
../../../../src/ViewerTest/ViewerTest_ViewerCommands.cxx: In function ‘int ViewerMainLoop(Standard_Integer, const char**)’:
../../../../src/ViewerTest/ViewerTest_ViewerCommands.cxx:2073: error: ‘RemoveView’ was not declared in this scope
make[2]: *** [ViewerTest_ViewerCommands.lo] Error 1

aba

2013-06-06 11:18

developer   ~0024649

Compile error in the Linux part was corrected.
Dear san, please review.

san

2013-06-06 18:17

developer   ~0024677

Branch CR23670 reviewed without remarks, ready for testing.

mkv

2013-06-10 14:54

tester   ~0024710

Dear BugMaster,

Branch CR23670 (and products from GIT master) was compiled on Linux and Windows platforms and tested.
SHA-1: 1b81c4c849c1c3f38d7335d7c6e011bb94106a89

Number of compiler warnings:

occt component :
Linux: 2 (2 on master)
Windows: 7 (7 on master)

products component :
Linux: 0 (0 on master)
Windows: 63 (63 on master)

Regressions:
No regressions

Improvements:
No improvements

Testing cases:
bugs vis(004) bug23670_1, bug23670_2 - OK.

Testing on Linux:
Total MEMORY difference: 364684480 / 366092124
Total CPU difference: 52483.16999999947 / 43685.680000001455

Testing on Windows:
Total MEMORY difference: 419478552 / 422984572
Total CPU difference: 40942.828125 / 31251.296875

There are not differences in images found by testdiff.

Related Changesets

occt: master 18d715bd

2013-06-13 10:57:07

aba

Details Diff
0023670: Support for multiple 3D views: edited commands: vinit; added commands: vclose, vactivate, vviewlist
bugs/end script was edited to dump results from all opened views; duplicated vinit was deleted from bug625. QABugs::OCC280()
was edited to work with multiviews;ViewerInit() method was corrected. vviewlist command was modificated to output string.
Small corrections
Compile errors were corrected
Affected Issues
0023670
mod - src/Aspect/Aspect.cdl Diff File
mod - src/Aspect/Aspect_DisplayConnection.cxx Diff File
mod - src/Aspect/Aspect_DisplayConnection.hxx Diff File
mod - src/Cocoa/Cocoa_Window.mm Diff File
mod - src/QABugs/QABugs_17.cxx Diff File
mod - src/ViewerTest/ViewerTest.cdl Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands_1.mm Diff File
mod - src/Xw/Xw_Window.cxx Diff File
mod - tests/bugs/end Diff File
mod - tests/bugs/modalg_4/bug625 Diff File
add - tests/bugs/vis/bug23670_1 Diff File
add - tests/bugs/vis/bug23670_2 Diff File

Issue History

Date Modified Username Field Change
2012-12-25 15:35 san New Issue
2012-12-25 15:35 san Assigned To => mkv
2012-12-25 15:35 san Relationship added related to 0023663
2012-12-26 14:11 san Assigned To mkv => san
2013-01-17 14:56 san Relationship added related to 0023707
2013-01-17 15:15 aba Relationship added related to 0023709
2013-03-12 16:03 san Assigned To san => aba
2013-03-12 16:03 san Status new => assigned
2013-03-12 16:05 san Target Version => 6.7.0
2013-03-15 12:22 san Relationship added related to 0023605
2013-03-26 16:47 aba Note Added: 0023899
2013-03-26 16:47 aba Assigned To aba => san
2013-03-26 16:47 aba Status assigned => resolved
2013-03-27 15:17 kgv Assigned To san => aba
2013-03-27 15:17 kgv Status resolved => assigned
2013-04-25 18:34 aba Note Added: 0024283
2013-04-25 18:34 aba Assigned To aba => san
2013-04-25 18:34 aba Status assigned => resolved
2013-04-26 12:02 aba Note Edited: 0024283
2013-04-26 15:39 kgv Note Added: 0024292
2013-04-26 15:39 kgv Assigned To san => aba
2013-04-26 15:39 kgv Status resolved => assigned
2013-04-29 14:37 aba Note Added: 0024297
2013-04-29 14:37 aba Assigned To aba => san
2013-04-29 14:37 aba Status assigned => resolved
2013-04-30 13:54 san Note Added: 0024301
2013-04-30 13:54 san Assigned To san => aba
2013-04-30 13:54 san Status resolved => assigned
2013-04-30 13:58 san Note Edited: 0024301
2013-05-13 13:15 aba Note Added: 0024368
2013-05-13 13:15 aba Assigned To aba => san
2013-05-13 13:15 aba Status assigned => resolved
2013-05-13 15:58 san Note Added: 0024370
2013-05-13 15:58 san Assigned To san => bugmaster
2013-05-13 15:58 san Status resolved => reviewed
2013-05-14 12:25 mkv Note Added: 0024376
2013-05-14 12:25 mkv Test case number => bugs vis(004) bug23670_1, bug23670_2
2013-05-14 12:25 mkv Assigned To bugmaster => aba
2013-05-14 12:25 mkv Status reviewed => assigned
2013-05-20 12:48 aba Note Added: 0024436
2013-05-20 12:48 aba Assigned To aba => san
2013-05-20 12:48 aba Status assigned => resolved
2013-05-20 19:31 aba Note Added: 0024440
2013-05-23 14:48 san Note Added: 0024493
2013-05-23 14:48 san Assigned To san => bugmaster
2013-05-23 14:48 san Status resolved => reviewed
2013-05-23 15:44 mkv Assigned To bugmaster => mkv
2013-05-29 17:01 mkv Note Added: 0024546
2013-05-29 17:02 mkv Assigned To mkv => aba
2013-05-29 17:02 mkv Status reviewed => assigned
2013-05-30 14:29 kgv Note Added: 0024568
2013-06-05 12:04 aba Note Added: 0024630
2013-06-05 12:04 aba Assigned To aba => san
2013-06-05 12:04 aba Status assigned => resolved
2013-06-05 12:46 san Note Added: 0024633
2013-06-05 12:46 san Assigned To san => bugmaster
2013-06-05 12:46 san Status resolved => reviewed
2013-06-05 13:01 mkv Assigned To bugmaster => mkv
2013-06-05 14:36 mkv Note Added: 0024636
2013-06-05 14:37 mkv Assigned To mkv => aba
2013-06-05 14:37 mkv Status reviewed => assigned
2013-06-06 11:18 aba Note Added: 0024649
2013-06-06 11:18 aba Assigned To aba => san
2013-06-06 11:18 aba Status assigned => resolved
2013-06-06 18:17 san Note Added: 0024677
2013-06-06 18:17 san Assigned To san => bugmaster
2013-06-06 18:17 san Status resolved => reviewed
2013-06-07 13:08 mkv Assigned To bugmaster => mkv
2013-06-10 14:54 mkv Note Added: 0024710
2013-06-10 14:55 mkv Assigned To mkv => bugmaster
2013-06-10 14:55 mkv Status reviewed => tested
2013-06-14 12:18 aba Changeset attached => occt master 18d715bd
2013-06-14 12:18 aba Assigned To bugmaster => aba
2013-06-14 12:18 aba Status tested => verified
2013-06-14 12:18 aba Resolution open => fixed
2013-10-29 06:57 kgv Relationship added related to 0024295
2013-12-03 12:20 san Relationship added related to 0024430
2013-12-19 13:50 bugmaster Status verified => closed
2013-12-19 14:00 bugmaster Fixed in Version => 6.7.0
2014-03-05 10:35 kgv Relationship added related to 0024688