View Issue Details

IDProjectCategoryView StatusLast Update
0026127CommunityOCCT:Visualizationpublic2018-06-29 21:21
ReporterMarkus Assigned Tobugmaster  
PrioritylowSeverityminor 
Status closedResolutionfixed 
Product Version6.8.0 
Target Version7.3.0Fixed in Version7.3.0 
Summary0026127: Visualization - Default camera is not copied in copy constructor of V3d_View
DescriptionI'm referring to the copy constructor of V3d_View:

V3d_View (const Handle< V3d_Viewer > &theVM, const Handle< V3d_View >
&theView)

When a V3d_View is copied using the copy constructor, the default camera is not copied but the current camera is used as default camera in the new view.
This is done by the following lines in the end of the constructor:

  SetViewMappingDefault();
  SetViewOrientationDefault();

In order to copy the default camera, I have to do it explicitly after the
construction:
[C#-code]
view.View().DefaultCamera().Copy(oldView.View().DefaultCamera());

It is in my case necessary in order to avoid not sensible scaling because scaling is dependent on the default camera.
I have to create a new view, e.g. when undocking the window, because then a new window handle is created.

Wouldn't it be sensible to copy also the default camera in the copy constructor of V3d_View? Or is the current behaviour needed / preferred because of certain use cases?

I mentioned this problem a longer time ago on the forum but there was no feedback at that time:
http://www.opencascade.org/org/forum/thread_23334/?forum=3
TagsNo tags attached.
Test case numberNot needed

Activities

Timo

2016-05-26 13:40

developer   ~0054446

In OCC 7.0 the DefaultCamera is not accessible from outside. Therefore I had to change the above mentioned C# code in the following way:

   Graphic3d_Camera oldCamera = new Graphic3d_Camera(oldView.Camera());
   oldView.Reset();

   view = new V3d_View(viewer, oldView);
                     
   view.SetCamera(oldCamera);

git

2018-03-08 13:55

administrator   ~0074367

Branch CR26127 has been created by kgv.

SHA-1: ae8b96d7f1b29bcbdf85445a2ae5e5cb18669496


Detailed log of new commits:

Author: kgv
Date: Thu Mar 8 13:52:01 2018 +0300

    0026127: Visualization - Default camera is not copied in copy constructor of V3d_View
    
    V3d_View copy constructor now copies DefaultCamera() from specified View.
    Draw Harness command vinit - added new argument -cloneActive.

kgv

2018-03-08 13:57

developer   ~0074368

Patch is ready for review.

http://jenkins-test-10.nnov.opencascade.com/view/CR26127-master-KGV/

san

2018-03-12 22:07

developer   ~0074406

Branch CR26127 reviewed without remarks, ready for testing.

bugmaster

2018-03-13 16:04

administrator   ~0074440

Combination -
OCCT branch : CR26127 SHA - ae8b96d7f1b29bcbdf85445a2ae5e5cb18669496
Products branch : master SHA - 4fd289ec73d35d02f23f3990c73b3acac9a60574
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:
Debian70-64:
OCCT
Total CPU difference: 18340.619999999668 / 18338.37999999957 [+0.01%]
Products
Total CPU difference: 7497.829999999986 / 7461.340000000009 [+0.49%]
Windows-64-VC10:
OCCT
Total CPU difference: 17691.49620629858 / 17653.338361698563 [+0.22%]
Products
Total CPU difference: 8014.17697259998 / 7990.761222500007 [+0.29%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2018-03-19 10:05

administrator   ~0074590

Branch CR26127 has been deleted by kgv.

SHA-1: ae8b96d7f1b29bcbdf85445a2ae5e5cb18669496

Related Changesets

occt: master 9e04ccdc

2018-03-08 10:52:01

kgv


Committer: bugmaster Details Diff
0026127: Visualization - Default camera is not copied in copy constructor of V3d_View

V3d_View copy constructor now copies DefaultCamera() from specified View.
Draw Harness command vinit - added new argument -cloneActive.
Affected Issues
0026127
mod - src/V3d/V3d_View.cxx Diff File
mod - src/V3d/V3d_Viewer.hxx Diff File
mod - src/ViewerTest/ViewerTest.hxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File

Issue History

Date Modified Username Field Change
2015-04-23 10:26 Timo New Issue
2015-04-23 10:26 Timo Assigned To => kgv
2015-04-23 10:34 Timo Description Updated
2015-04-23 20:00 kgv Priority normal => low
2015-04-23 20:00 kgv Target Version 6.9.0 => 7.1.0
2016-05-26 13:40 Timo Note Added: 0054446
2016-10-25 09:38 kgv Target Version 7.1.0 => 7.2.0
2017-05-31 15:41 Timo Reporter Timo => Markus
2017-07-20 11:32 kgv Target Version 7.2.0 => 7.4.0
2018-03-08 13:37 kgv Summary Default camera is not copied in copy constructor of V3d_View => Visualization - Default camera is not copied in copy constructor of V3d_View
2018-03-08 13:55 git Note Added: 0074367
2018-03-08 13:57 kgv Note Added: 0074368
2018-03-08 13:57 kgv Assigned To kgv => san
2018-03-08 13:57 kgv Status new => resolved
2018-03-08 13:57 kgv Target Version 7.4.0 => 7.3.0
2018-03-12 22:07 san Note Added: 0074406
2018-03-12 22:07 san Assigned To san => bugmaster
2018-03-12 22:07 san Status resolved => reviewed
2018-03-13 16:01 bugmaster Test case number => Not needed
2018-03-13 16:04 bugmaster Note Added: 0074440
2018-03-13 16:04 bugmaster Status reviewed => tested
2018-03-18 13:21 bugmaster Changeset attached => occt master 9e04ccdc
2018-03-18 13:21 bugmaster Status tested => verified
2018-03-18 13:21 bugmaster Resolution open => fixed
2018-03-19 10:05 git Note Added: 0074590
2018-06-29 21:16 aiv Fixed in Version => 7.3.0
2018-06-29 21:21 aiv Status verified => closed
The file specified in $g_log_destination "/var/log/mantis/bugs/LDAP.log" is not writable.