View Issue Details

IDProjectCategoryView StatusLast Update
0025723Open CASCADEOCCT:Visualizationpublic2016-02-05 16:00
ReporteribsAssigned Tobugmaster  
PrioritynormalSeverityminor 
Status closedResolutionfixed 
Product Version6.8.0 
Target Version6.9.0Fixed in Version6.9.0 
Summary0025723: Visualization, TKV3d - the center of rotation should be calculated taking into account structure visibility and selection flags
DescriptionThe center of rotation is calculated with using all displayed structures. No matter if they are visible or not.

The center should be calculated taking into account just visible elements. If there are selectable elements - they only should used.
Steps To Reproducepload ALL

box b1 0 0 0 10 10 10
box b2 0 0 20 10 10 10
box b3 0 0 -20 10 10 10
box b4 0 0 40 10 10 10

vinit

# set shaded mode
vsetdispmode 1

# turn on solid selection
vselmode 6 1

vdisplay b1 b2 b3 b4

vfit
Additional information
and documentation updates
attached snapshot:

* source shape "1. origin.png"
* source shape has one selected solid "1. selected_origin.png"
* source shape has just one visible solid "1. visible_origin.png"

* rotation source shape (there is no one selected solid and all solids are visible) "1. origin_rotated.png"

* rotation source shape with selected solid (current behavior)"2. selected_rotated_KO.png"
* rotation source shape with just one visible solid (current behavior) "2. visible_rotated_KO.png"

* rotation source shape with selected solid (with fixes) "3. selected_rotated_OK.png"
* rotation source shape with just one visible solid (with fixes) "3. visible_rotated_OK.png"
TagsNo tags attached.
Test case numberbugs vis(004) bug25723, bug25723_1

Attached Files

  • 1. origin.png (2,597 bytes)
  • 1. selected_origin.png (2,884 bytes)
  • 1. visible_origin.png (1,125 bytes)
  • 2. selected_rotated_KO.png (2,441 bytes)
  • 2. visible_rotated_KO.png (1,342 bytes)
  • 3. selected_rotated_OK.png (2,316 bytes)
  • 3. visible_rotated_OK.png (1,315 bytes)
  • 1. origin_rotated.png (2,185 bytes)

Relationships

related to 0002618 closedbugmaster Community Visualization - choose better center of gravity for camera rotation operations 
related to 0027137 closedabv Open CASCADE Visualization - handle shadow structures within V3d_View::Gravity() 

Activities

git

2015-01-20 11:05

administrator   ~0036239

Branch CR25723 has been created by ibs.

SHA-1: 008f4fbd59feb2d2408d95d01605c415ce93ad3d


Detailed log of new commits:

Author: ibs
Date: Mon Jan 19 15:44:48 2015 +0300

    0025723: The center of rotation is calculated without considering hidden and selected v3d structures
    
    Gravity method uses just visible v3d structures.
    If there are selected structures - the method uses only they

ibs

2015-01-20 12:55

developer   ~0036249

Dear kgv,
please review CR25723 branch in occt git

kgv

2015-01-20 14:09

developer   ~0036256

-  Graphic3d_MapOfStructure MySetOfStructures;
+  Graphic3d_MapOfStructure aSetOfStructures, aSetOfVisibleStructures;

it would be better to eliminate structure maps copies.

+    if (aStructure->IsHighlighted())
+    {
+      if (!anIsHightlightedStructureUsed)

this change about highlighted structures is not documented in but tracker and commit description.
"anIsHightlightedStructureUsed" should be written as "isHightlightedStructureUsed"; the name is too long and should be re-considered.

+  Graphic3d_MapIteratorOfMapOfStructure aStructIter (aSetOfStructures);
+  for (; aStructIter.More(); aStructIter.Next())
...
+  Graphic3d_MapIteratorOfMapOfStructure aVisibleStructIter(aSetOfVisibleStructures);
+  for (; aVisibleStructIter.More(); aVisibleStructIter.Next())

Please move iterator declaration into for(;;) header.

git

2015-01-20 17:43

administrator   ~0036277

Branch CR25723 has been updated forcibly by ibs.

SHA-1: c678fb57c8a7a4b1f599fa9940501b4c37246586

ibs

2015-01-20 17:49

developer   ~0036279

CR25723 branch has been updated in occt git

kgv

2015-01-21 14:22

developer   ~0036321

Dear Ivan,

please create complete test cases for regression tests (command vrotate can be used).
It would be better to create scene by the script.

git

2015-01-22 11:35

administrator   ~0036366

Branch CR25723 has been updated by ibs.

SHA-1: 52d8c254748b980d47ed5c6154d3d484655729ec


Detailed log of new commits:

Author: ibs
Date: Thu Jan 22 11:33:41 2015 +0300

    clean up code

git

2015-01-23 15:17

administrator   ~0036444

Branch CR25723 has been updated forcibly by ibs.

SHA-1: f2e90aacaa7c3eb778c5955847d4f99339c71608

git

2015-01-29 15:02

administrator   ~0036827

Branch CR25723 has been updated by ibs.

SHA-1: fb4ec0326a0deecdc263321e0460db2fbc854fbc


Detailed log of new commits:

Author: ibs
Date: Thu Jan 29 12:17:59 2015 +0300

    vrotate DRAW command expanded; test cases added
    
    vrotate:
    vrotate -startmouse X Y - start rotation according to the mouse position
    vrotate -movemouse X Y - continue rotation with angle computed from last and new mouse position
    vrotate AX AY AZ [X Y Z] - rotation eye about coordinate system

git

2015-01-29 15:30

administrator   ~0036832

Branch CR25723 has been updated forcibly by ibs.

SHA-1: 98ee23035b96b749be666f70cbad00a9aedc3b3c

git

2015-01-29 17:00

administrator   ~0036847

Branch CR25723 has been updated forcibly by ibs.

SHA-1: 5c118d7e8840f229b48bd7a37cf2fe8e7c33fba4

git

2015-01-29 17:29

administrator   ~0036848

Branch CR25723 has been updated forcibly by ibs.

SHA-1: e7d984dfe35d6142e731893655085870c897b487

ibs

2015-01-29 18:33

developer   ~0036856

Last edited: 2015-01-29 18:34

dear kgv,
test cases added; please review

kgv

2015-01-30 10:05

developer   ~0036869

   Handle(V3d_View) V3dView = ViewerTest::CurrentView();
-  if ( V3dView.IsNull() ) {
+  
+  if (V3dView.IsNull())
+  {
     return 1;
   }

please add error message before "return 1" and apply name conventions to the command - since it is already rewritten.

+    "vrotate [-startmouse|-movemouse] AX AY [AZ [X Y Z]]"
+    "\n                : Option -startmouse starts rotation according to the mouse pos, e.g.:"
+    "\n                : vrotate -startmouse X Y"
+    "\n                : Option -movemouse continues rotation with angle computed"
+    "\n                : from last and new mouse pos, e.g.:"
+    "\n                : vrotate -movemouse X Y"

-mousestart and -mousemove would be better from might point of view.

+    if (aFlag.Search("-") != 1)
+    {
+      anArgList.Append(aFlag);
+      continue;
+    }
+    else if (aFlag == "-startmouse")
+    {
+      aRotType = RotationType_START_MOUSE;
+    }
+    else if (aFlag == "-movemouse")
+    {
+      aRotType = RotationType_MOVE_MOUSE;
+    }

mouse coordinates are naturally mandatory options for -startmouse and -movemouse arguments, and should follow them.
Please re-organize the command to parse arguments right here.

+puts "============"
+puts "OCC25723"
+puts "============"
+puts ""
+
+# ######################################################################
+# Visualization - the center of rotation should be calculated taking into 

the test description should be print, not just buried (commented) in tcl-script.
Please attach test cases snapshots before and after (_KO, _OK) to this Mantis issue.

+set check_red_color 0.78039216995239258
+set check_green_color 0.55294120311737061
+set check_blue_color 0.094117648899555206

color precision specified in the test exceeds sane limits.
Please consider testing color name instead of floating point value.

+if { ${stat} != 1 } {
+   puts "Error : Rotation is not correct"
+}

indentation is broken.

+vinit

please prefer "vinit View1", and add vclear, vaxo to reset viewer into initial state.

ibs

2015-01-30 11:26

developer  

1. origin.png (2,597 bytes)

ibs

2015-01-30 11:26

developer  

1. selected_origin.png (2,884 bytes)

ibs

2015-01-30 11:26

developer  

1. visible_origin.png (1,125 bytes)

ibs

2015-01-30 11:27

developer  

2. selected_rotated_KO.png (2,441 bytes)

ibs

2015-01-30 11:27

developer  

2. visible_rotated_KO.png (1,342 bytes)

ibs

2015-01-30 11:27

developer  

3. selected_rotated_OK.png (2,316 bytes)

ibs

2015-01-30 11:27

developer  

3. visible_rotated_OK.png (1,315 bytes)

ibs

2015-01-30 11:34

developer   ~0036880

attached snapshot:

* source shape "1. origin.png"
* source shape has one selected solid "1. selected_origin.png"
* source shape has just one visible solid "1. visible_origin.png"

* rotation source shape (there is no one selected solid and all solids are visible) "1. origin_rotated.png"

* rotation source shape with selected solid (current behavior)"2. selected_rotated_KO.png"
* rotation source shape with just one visible solid (current behavior) "2. visible_rotated_KO.png"

* rotation source shape with selected solid (with fixes) "3. selected_rotated_OK.png"
* rotation source shape with just one visible solid (with fixes) "3. visible_rotated_OK.png"

ibs

2015-01-30 11:34

developer  

1. origin_rotated.png (2,185 bytes)

git

2015-01-30 14:51

administrator   ~0036897

Branch CR25723 has been updated by ibs.

SHA-1: be358054c74a677833589da6641322d652591adf


Detailed log of new commits:

Author: ibs
Date: Fri Jan 30 12:04:54 2015 +0300

    vrotate DRAW command has new syntax: -startmouse and -movemouse options can be used simultaneously
    
    test cases corrected in connection with the new syntax

git

2015-01-30 14:58

administrator   ~0036898

Branch CR25723 has been updated by ibs.

SHA-1: 91a7658060e63e4c6f5c6352d08016556a49a8f9


Detailed log of new commits:

Author: ibs
Date: Fri Jan 30 14:58:06 2015 +0300

    the description of vrotate updated

git

2015-01-30 15:01

administrator   ~0036899

Branch CR25723 has been updated forcibly by ibs.

SHA-1: d3d50b53227d6a6117fa9aca77b16bd4e9e17bca

git

2015-01-30 15:24

administrator   ~0036901

Branch CR25723 has been updated by ibs.

SHA-1: 8fb04e2ca2d08459bb255fdec8ad68829a8728f6


Detailed log of new commits:

Author: ibs
Date: Fri Jan 30 15:21:22 2015 +0300

    vrotate ignores invalid option due to "-" can be used in negative number

ibs

2015-01-30 15:38

developer   ~0036903

dear kgv, please review

git

2015-01-30 17:16

administrator   ~0036923

Branch CR25723 has been updated by ibs.

SHA-1: de4deac26be3725f92dfd482143b412a1361edda


Detailed log of new commits:

Author: ibs
Date: Fri Jan 30 17:16:06 2015 +0300

    v3d_view::Gravity method returns void

git

2015-02-02 10:11

administrator   ~0036940

Branch CR25723 has been updated by kgv.

SHA-1: 9c13f497655d4dab087562fc7d73205e1c98b1bd


Detailed log of new commits:

Author: kgv
Date: Mon Feb 2 10:11:50 2015 +0300

    cosmetics

git

2015-02-02 10:26

administrator   ~0036941

Branch CR25723_1 has been created by kgv.

SHA-1: 5da3382328f6680863811766d6750c313d8dca42


Detailed log of new commits:

Author: ibs
Date: Mon Feb 2 10:25:25 2015 +0300

    0025723: Visualization, TKV3d - the center of rotation should be calculated taking into account structure visibility and selection flags
    
    V3d_View::Gravity() - compute scene bounding box only including highlighted objects, if there are any, to provide context-oriented center of gravity.
    Skip hidden objects, if there are any visible.
    Do not return any value from this method.
    
    Extend command vrotate with new flags -mouseStart and -mouseMove, to emulate rotation by mouse.

kgv

2015-02-02 10:27

developer   ~0036942

Please test the branch CR25723_1.

git

2015-02-06 15:32

administrator   ~0037186

Branch CR25723_1 has been updated forcibly by mkv.

SHA-1: bcf9edf3700eaa90dd39338805bc1de481499fad

mkv

2015-02-10 16:15

tester   ~0037295

Dear BugMaster,
Branch CR25723_1 was rebased on current master of occt git-repository.

mkv

2015-02-10 16:16

tester   ~0037296

Dear BugMaster,
Branch CR25723_1 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
SHA-1: bcf9edf3700eaa90dd39338805bc1de481499fad

Number of compiler warnings:

occt component :
Linux: 18 (18 on master)
Windows: 1 (0 on master)

There is new additional compilation warning on Linux platform:
http://jenkins-test-03.nnov.opencascade.com:8080/user/mnt/my-views/view/A_mnt_warnings/portlet/dashboard_portlet_17008/job/mnt-CR25723_1-master_build_occt_windows/2/warnings34Result/
ViewerTest_ViewerCommands.cxx:2953, MSBuild, Priority: Normal
'theDi' : unreferenced formal parameter

products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)

Regressions/Differences:
No regressions/differences

Testing cases:
http://occt-tests/CR25723-1-master-occt/Debian60-64/bugs/vis/bug25723.html
http://occt-tests/CR25723-1-master-occt/Windows-32-VC10/bugs/vis/bug25723.html
bugs vis(004) bug25723: OK

http://occt-tests/CR25723-1-master-occt/Debian60-64/bugs/vis/bug25723_1.html
http://occt-tests/CR25723-1-master-occt/Windows-32-VC10/bugs/vis/bug25723_1.html
bugs vis(004) bug25723_1: OK

Testing on Linux:
occt component :
Total MEMORY difference: 84698987 / 86196724
Total CPU difference: 51240.84000000004 / 47876.709999999846
products component :
Total MEMORY difference: 23172624 / 23184238
Total CPU difference: 15497.70999999996 / 14616.609999999962

Testing on Windows:
occt component :
Total MEMORY difference: 40650550 / 40658496
Total CPU difference: 35011.4375 / 32754.0
products component :
Total MEMORY difference: 11036556 / 11081969
Total CPU difference: 10223.03125 / 10978.125

There are no differences in images found by testdiff.

git

2015-02-10 19:40

administrator   ~0037326

Branch CR25723_1 has been updated by ibs.

SHA-1: 28780e5cdceef6882b6dda83093025d699595def


Detailed log of new commits:

Author: unknown
Date: Tue Feb 10 19:35:35 2015 +0300

    unused argument theDi of VRotate disabled

ibs

2015-02-10 19:42

developer   ~0037327

dear bugmaster,
the warning removed, please integrate

abv

2015-02-10 19:49

manager   ~0037329

Note that no testing is needed, maximum recompile!

mkv

2015-02-11 17:06

tester   ~0037368

Branch CR25723_1 is TESTED.

git

2015-03-18 13:36

administrator   ~0038565

Branch CR25723 has been deleted by inv.

SHA-1: 9c13f497655d4dab087562fc7d73205e1c98b1bd

git

2015-03-18 13:36

administrator   ~0038566

Branch CR25723_1 has been deleted by inv.

SHA-1: 28780e5cdceef6882b6dda83093025d699595def

Related Changesets

occt: master 4af098ba

2015-02-12 08:59:56

ibs


Committer: bugmaster Details Diff
0025723: Visualization, TKV3d - the center of rotation should be calculated taking into account structure visibility and selection flags

V3d_View::Gravity() - compute scene bounding box only including highlighted objects, if there are any, to provide context-oriented center of gravity.
Skip hidden objects, if there are any visible.
Do not return any value from this method.

Extend command vrotate with new flags -mouseStart and -mouseMove, to emulate rotation by mouse.

Unused argument theDi of VRotate disabled
Affected Issues
0025723
mod - src/V3d/V3d_View.cdl Diff File
mod - src/V3d/V3d_View.cxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File
add - tests/bugs/vis/bug25723 Diff File
add - tests/bugs/vis/bug25723_1 Diff File

Issue History

Date Modified Username Field Change
2015-01-20 11:03 ibs New Issue
2015-01-20 11:03 ibs Assigned To => ibs
2015-01-20 11:05 git Note Added: 0036239
2015-01-20 11:09 ibs File Added: Penrose.stp
2015-01-20 12:54 ibs Steps to Reproduce Updated
2015-01-20 12:55 ibs Note Added: 0036249
2015-01-20 12:55 ibs Assigned To ibs => kgv
2015-01-20 12:55 ibs Status new => resolved
2015-01-20 14:09 kgv Note Added: 0036256
2015-01-20 14:09 kgv Assigned To kgv => ibs
2015-01-20 14:09 kgv Status resolved => assigned
2015-01-20 15:33 ibs Steps to Reproduce Updated
2015-01-20 17:43 git Note Added: 0036277
2015-01-20 17:49 ibs Note Added: 0036279
2015-01-20 17:49 ibs Assigned To ibs => kgv
2015-01-20 17:49 ibs Status assigned => resolved
2015-01-21 14:18 kgv Summary The center of rotation is calculated without considering hidden and selected v3d structures => Visualization, TKV3d - the center of rotation should be calculated taking into account visibility and selection flags
2015-01-21 14:18 kgv Summary Visualization, TKV3d - the center of rotation should be calculated taking into account visibility and selection flags => Visualization, TKV3d - the center of rotation should be calculated taking into account structure visibility and selection flags
2015-01-21 14:22 kgv Note Added: 0036321
2015-01-21 14:22 kgv Assigned To kgv => ibs
2015-01-21 14:22 kgv Status resolved => assigned
2015-01-22 11:35 git Note Added: 0036366
2015-01-23 15:17 git Note Added: 0036444
2015-01-26 14:46 kgv Relationship added related to 0002618
2015-01-29 15:02 git Note Added: 0036827
2015-01-29 15:30 git Note Added: 0036832
2015-01-29 17:00 git Note Added: 0036847
2015-01-29 17:29 git Note Added: 0036848
2015-01-29 18:33 ibs Note Added: 0036856
2015-01-29 18:33 ibs Assigned To ibs => kgv
2015-01-29 18:33 ibs Status assigned => resolved
2015-01-29 18:33 ibs Steps to Reproduce Updated
2015-01-29 18:33 ibs File Deleted: Penrose.stp
2015-01-29 18:34 ibs Note Edited: 0036856
2015-01-30 10:05 kgv Note Added: 0036869
2015-01-30 10:05 kgv Assigned To kgv => ibs
2015-01-30 10:05 kgv Status resolved => assigned
2015-01-30 11:26 ibs File Added: 1. origin.png
2015-01-30 11:26 ibs File Added: 1. selected_origin.png
2015-01-30 11:26 ibs File Added: 1. visible_origin.png
2015-01-30 11:27 ibs File Added: 2. selected_rotated_KO.png
2015-01-30 11:27 ibs File Added: 2. visible_rotated_KO.png
2015-01-30 11:27 ibs File Added: 3. selected_rotated_OK.png
2015-01-30 11:27 ibs File Added: 3. visible_rotated_OK.png
2015-01-30 11:34 ibs Note Added: 0036880
2015-01-30 11:34 ibs File Added: 1. origin_rotated.png
2015-01-30 11:36 ibs Additional Information Updated
2015-01-30 14:51 git Note Added: 0036897
2015-01-30 14:58 git Note Added: 0036898
2015-01-30 15:01 git Note Added: 0036899
2015-01-30 15:24 git Note Added: 0036901
2015-01-30 15:38 ibs Note Added: 0036903
2015-01-30 15:38 ibs Assigned To ibs => kgv
2015-01-30 15:38 ibs Status assigned => resolved
2015-01-30 17:16 git Note Added: 0036923
2015-02-02 10:11 git Note Added: 0036940
2015-02-02 10:26 git Note Added: 0036941
2015-02-02 10:27 kgv Note Added: 0036942
2015-02-02 10:27 kgv Assigned To kgv => bugmaster
2015-02-02 10:27 kgv Status resolved => reviewed
2015-02-06 14:39 mkv Assigned To bugmaster => mkv
2015-02-06 15:32 git Note Added: 0037186
2015-02-10 16:15 mkv Note Added: 0037295
2015-02-10 16:16 mkv Note Added: 0037296
2015-02-10 16:17 mkv Test case number => bugs vis(004) bug25723, bug25723_1
2015-02-10 16:17 mkv Assigned To mkv => ibs
2015-02-10 16:17 mkv Status reviewed => assigned
2015-02-10 19:40 git Note Added: 0037326
2015-02-10 19:41 ibs Status assigned => resolved
2015-02-10 19:42 ibs Note Added: 0037327
2015-02-10 19:42 ibs Assigned To ibs => bugmaster
2015-02-10 19:42 ibs Status resolved => reviewed
2015-02-10 19:45 mkv Assigned To bugmaster => mkv
2015-02-10 19:49 abv Note Added: 0037329
2015-02-11 17:06 mkv Note Added: 0037368
2015-02-11 17:06 mkv Assigned To mkv => bugmaster
2015-02-11 17:06 mkv Status reviewed => tested
2015-02-13 17:55 bugmaster Changeset attached => occt master 4af098ba
2015-02-13 17:55 bugmaster Status tested => verified
2015-02-13 17:55 bugmaster Resolution open => fixed
2015-03-18 13:36 git Note Added: 0038565
2015-03-18 13:36 git Note Added: 0038566
2015-05-14 15:29 aiv Status verified => closed
2015-05-14 15:32 aiv Fixed in Version => 6.9.0
2016-02-05 16:00 kgv Relationship added related to 0027137