MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0025723Open CASCADE[OCCT] OCCT:Visualizationpublic2015-01-20 11:032016-02-05 16:00
Reporteribs 
Assigned Tobugmaster 
PrioritynormalSeverityminor 
StatusclosedResolutionfixed 
PlatformOSOS Version
Product Version[OCCT] 6.8.0 
Target Version[OCCT] 6.9.0Fixed in Version[OCCT] 6.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 Filespng file icon 1. origin.png (2,597 bytes) 2015-01-30 11:26
png file icon 1. selected_origin.png (2,884 bytes) 2015-01-30 11:26
png file icon 1. visible_origin.png (1,125 bytes) 2015-01-30 11:26
png file icon 2. selected_rotated_KO.png (2,441 bytes) 2015-01-30 11:27
png file icon 2. visible_rotated_KO.png (1,342 bytes) 2015-01-30 11:27
png file icon 3. selected_rotated_OK.png (2,316 bytes) 2015-01-30 11:27
png file icon 3. visible_rotated_OK.png (1,315 bytes) 2015-01-30 11:27
png file icon 1. origin_rotated.png (2,185 bytes) 2015-01-30 11:34

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

-  Notes
(0036239)
git (administrator)
2015-01-20 11:05

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
(0036249)
ibs (developer)
2015-01-20 12:55

Dear kgv,
please review CR25723 branch in occt git
(0036256)
kgv (developer)
2015-01-20 14:09

-  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.
(0036277)
git (administrator)
2015-01-20 17:43

Branch CR25723 has been updated forcibly by ibs.

SHA-1: c678fb57c8a7a4b1f599fa9940501b4c37246586
(0036279)
ibs (developer)
2015-01-20 17:49

CR25723 branch has been updated in occt git
(0036321)
kgv (developer)
2015-01-21 14:22

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.
(0036366)
git (administrator)
2015-01-22 11:35

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

(0036444)
git (administrator)
2015-01-23 15:17

Branch CR25723 has been updated forcibly by ibs.

SHA-1: f2e90aacaa7c3eb778c5955847d4f99339c71608
(0036827)
git (administrator)
2015-01-29 15:02

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

(0036832)
git (administrator)
2015-01-29 15:30

Branch CR25723 has been updated forcibly by ibs.

SHA-1: 98ee23035b96b749be666f70cbad00a9aedc3b3c
(0036847)
git (administrator)
2015-01-29 17:00

Branch CR25723 has been updated forcibly by ibs.

SHA-1: 5c118d7e8840f229b48bd7a37cf2fe8e7c33fba4
(0036848)
git (administrator)
2015-01-29 17:29

Branch CR25723 has been updated forcibly by ibs.

SHA-1: e7d984dfe35d6142e731893655085870c897b487
(0036856)
ibs (developer)
2015-01-29 18:33
edited on: 2015-01-29 18:34

dear kgv,
test cases added; please review

(0036869)
kgv (developer)
2015-01-30 10:05

   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.
(0036880)
ibs (developer)
2015-01-30 11:34

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"
(0036897)
git (administrator)
2015-01-30 14:51

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

(0036898)
git (administrator)
2015-01-30 14:58

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

(0036899)
git (administrator)
2015-01-30 15:01

Branch CR25723 has been updated forcibly by ibs.

SHA-1: d3d50b53227d6a6117fa9aca77b16bd4e9e17bca
(0036901)
git (administrator)
2015-01-30 15:24

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

(0036903)
ibs (developer)
2015-01-30 15:38

dear kgv, please review
(0036923)
git (administrator)
2015-01-30 17:16

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

(0036940)
git (administrator)
2015-02-02 10:11

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

(0036941)
git (administrator)
2015-02-02 10:26

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.
(0036942)
kgv (developer)
2015-02-02 10:27

Please test the branch CR25723_1.
(0037186)
git (administrator)
2015-02-06 15:32

Branch CR25723_1 has been updated forcibly by mkv.

SHA-1: bcf9edf3700eaa90dd39338805bc1de481499fad
(0037295)
mkv (tester)
2015-02-10 16:15

Dear BugMaster,
Branch CR25723_1 was rebased on current master of occt git-repository.
(0037296)
mkv (tester)
2015-02-10 16:16

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.
(0037326)
git (administrator)
2015-02-10 19:40

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

(0037327)
ibs (developer)
2015-02-10 19:42

dear bugmaster,
the warning removed, please integrate
(0037329)
abv (manager)
2015-02-10 19:49

Note that no testing is needed, maximum recompile!
(0037368)
mkv (tester)
2015-02-11 17:06

Branch CR25723_1 is TESTED.
(0038565)
git (administrator)
2015-03-18 13:36

Branch CR25723 has been deleted by inv.

SHA-1: 9c13f497655d4dab087562fc7d73205e1c98b1bd
(0038566)
git (administrator)
2015-03-18 13:36

Branch CR25723_1 has been deleted by inv.

SHA-1: 28780e5cdceef6882b6dda83093025d699595def

- Related Changesets
occt: master 4af098ba
Timestamp: 2015-02-12 08:59:56
Author: 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
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:07 ibs Relationship added has duplicate 0025642
2015-01-20 11:09 ibs File Added: Penrose.stp
2015-01-20 12:54 ibs Steps to Reproduce Updated View Revisions
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 13:05 ibs Relationship added child of 0025295
2015-01-20 13:06 ibs Relationship deleted child of 0025295
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 View Revisions
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 View Revisions
2015-01-29 18:33 ibs File Deleted: Penrose.stp
2015-01-29 18:34 ibs Note Edited: 0036856 View Revisions
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 View Revisions
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-12 16:51 abv Relationship added related to 0025824
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


Copyright © 2000 - 2020 MantisBT Team
Powered by Mantis Bugtracker