MantisBT
Mantis Bug Tracker Workflow

View Issue Details Jump to Notes ] Related Changesets ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0032366Open CASCADE[OCCT] OCCT:Visualizationpublic2021-05-13 12:022021-05-22 13:55
Reporterkgv 
Assigned Tobugmaster 
PrioritynormalSeverityfeature 
StatusverifiedResolutionfixed 
PlatformOSOS Version
Product Version 
Target Version[OCCT] 7.6.0*Fixed in Version 
Summary0032366: Visualization, SelectMgr_ViewerSelector3d::ToPixMap() - add option dumping surface normals
DescriptionIt is desired extending SelectMgr_ViewerSelector3d::ToPixMap() functionality to dump surface normals StdSelect_TypeOfSelectionImage_SurfaceNormal (SelectBasics_PickResult::SurfaceNormal()).

See also Draw Harness command "vseldump".
Steps To Reproduce
psphere s 1
vinit
vdisplay s -dispmode 1
vfit
vseldump ${imagedir}/${casename}_sphere.png  -type surfNormal
TagsNo tags attached.
Test case numbertests/vselect/sphere/generate_images,rectangle_selection,single_click_selection
Attached Files

- Relationships
child of 0031548closedbugmaster Visualization, SelectBasics_PickResult - include surface normal into picking details 

-  Notes
(0100954)
mkrylova (developer)
2021-05-13 20:03

Analysis, Solution elaboration
(0100989)
git (administrator)
2021-05-14 13:01

Branch CR32366 has been created by mkrylova.

SHA-1: 6f259de50eab293d2b92b0cd3d98b76c357666f0


Detailed log of new commits:

Author: mkrylova
Date: Fri May 14 12:58:43 2021 +0300

    0032366: Visualization, SelectMgr_ViewerSelector3d::ToPixMap() - add option dumping surface normals
    
    - extended functionality to dump surface normals
    - added new option to vseldump command
(0100991)
kgv (developer)
2021-05-14 13:50
edited on: 2021-05-14 13:50

+                   "\n\t\t:   normal      normal direction values",

"surfNormal" would look more self-describable.

+  StdSelect_TypeOfSelectionImage_ColoredSelectionMode,    //!< color of selection mode
+  StdSelect_TypeOfSelectionImage_SurfaceNormal

New enumeration value should be documented.

     {
       return new GeneratedSelModeColorFiller (thePixMap, theSelector);
     }
+    case StdSelect_TypeOfSelectionImage_SurfaceNormal:
+      return new SurfaceNormalFiller (thePixMap, theSelector);

Please do not omit braces.

+
+  class SurfaceNormalFiller : public SelectMgr_SelectionImageFiller
+  {

Class description is missing.

+        Graphic3d_Vec3 aNormal = aPickResult.SurfaceNormal();
+        gp_Dir aColor (aNormal.x(), aNormal.y(), aNormal.z());

gp_Dir would throw an exception if surface normal is unavailable.
It should be reproducible by enabling Vertex / Edge selection modes.

+        myImage->SetPixelColor (theCol, theRow, Quantity_ColorRGBA (Abs (aColor.X()), Abs (aColor.Y()), 
Abs (aColor.Z()), 1.0f));

This mapping would not allow distinguishing normals having an opposite direction (negative values).
It might be better shifting range (as an option), so that ZERO values will be mapped to GRAY and not BLACK:
> aNormalColor = theNormal * 0.5f + 0.5f;

Please also add a test case covering new functionality.
Consider moving the new test case from sphere sensitivity patch (making sure that test doesn't fail).

(0101083)
git (administrator)
2021-05-17 12:43

Branch CR32366 has been updated forcibly by mkrylova.

SHA-1: 38a81f70056305bf9be4e746f6c35775e9c36acb
(0101084)
git (administrator)
2021-05-17 12:49

Branch CR32366_1 has been created by mkrylova.

SHA-1: 4842b191bfbfde14d954311acf66f185d52505c3


Detailed log of new commits:

Author: mkrylova
Date: Fri May 14 12:58:43 2021 +0300

    0032366: Visualization, SelectMgr_ViewerSelector3d::ToPixMap() - add option dumping surface normals
    
    - extended functionality to dump surface normals
    - added new option to vseldump command
    - added new test

Author: mkrylova
Date: Wed Mar 17 17:38:00 2021 +0300

    0032182: Visualization - add Select3D_SensitiveSphere
    
    - created Select3D_SensitiveSphere class
    - implemented interfaces for intersection methods
    - added tests
(0101086)
git (administrator)
2021-05-17 14:30

Branch CR32366_1 has been updated forcibly by mkrylova.

SHA-1: 141d864794dbda21a0b8901dd4bb9b24e358aa7f
(0101089)
kgv (developer)
2021-05-17 14:49

+tests/vselect/sphere/generate_images

New test grid is not added to the list.
Please also move other tests from 0032182 which pass testing on current master.
(0101091)
git (administrator)
2021-05-17 16:03

Branch CR32366_1 has been updated by mkrylova.

SHA-1: 1c72b2441b9f8a3c9b1b6e8e4d3dbeb48dd98d17


Detailed log of new commits:

Author: mkrylova
Date: Mon May 17 16:03:56 2021 +0300

    kgv remarks:
    - moved tests
    - added tests to grids.list

(0101092)
git (administrator)
2021-05-17 16:05

Branch CR32366_2 has been created by mkrylova.

SHA-1: 442c5351f062b7a30113b5ae3ed0646514ec17ea


Detailed log of new commits:

Author: mkrylova
Date: Fri May 14 12:58:43 2021 +0300

    0032366: Visualization, SelectMgr_ViewerSelector3d::ToPixMap() - add option dumping surface normals
    
    - extended functionality to dump surface normals
    - added new option to vseldump command
    - added tests
(0101101)
kgv (developer)
2021-05-17 16:42

Please fix compiler warnings:
/dn63/builds/CR32366_2-master-KGV/OCCT_SRC/src/SelectMgr/SelectMgr_SelectionImageFiller.cxx:344:32: warning: 
unused variable 'isMatched' [-Wunused-variable]
(0101107)
git (administrator)
2021-05-17 17:39

Branch CR32366_2 has been updated by mkrylova.

SHA-1: bc2d04fe97f16738c7652925e4494b999b106cef


Detailed log of new commits:

Author: mkrylova
Date: Mon May 17 17:39:47 2021 +0300

    #kgv remarks
    - fixed compiler warnings

(0101108)
git (administrator)
2021-05-17 17:40

Branch CR32366_3 has been created by mkrylova.

SHA-1: 101c47c59e138573c5d8909294e2216fa62f6051


Detailed log of new commits:

Author: mkrylova
Date: Fri May 14 12:58:43 2021 +0300

    0032366: Visualization, SelectMgr_ViewerSelector3d::ToPixMap() - add option dumping surface normals
    
    - extended functionality to dump surface normals
    - added new option to vseldump command
    - added tests
(0101112)
kgv (developer)
2021-05-17 19:54

Please raise the patch
- OCCT: branch CR32366_3.
(0101249)
bugmaster (administrator)
2021-05-22 12:23

Combination -
OCCT branch : IR-2021-05-21
master SHA - 2aa0a6991da6f767c2a6a4c1d6d720fee35867ce
a87b7ddc8cb44606b91e3f37113847c3f5f50fdc
Products branch : IR-2021-05-21 SHA - e89cefb48fe77db69215a5124b453f69d9db404b
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:
Debian80-64:
OCCT
Total CPU difference: 17862.650000000373 / 17879.470000000332 [-0.09%]
Products
Total CPU difference: 11535.410000000107 / 11557.880000000083 [-0.19%]
Windows-64-VC14:
OCCT
Total CPU difference: 19361.25 / 19400.171875 [-0.20%]
Products
Total CPU difference: 12920.28125 / 12880.234375 [+0.31%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0101280)
git (administrator)
2021-05-22 13:55

Branch CR32366 has been deleted by mnt.

SHA-1: 38a81f70056305bf9be4e746f6c35775e9c36acb
(0101281)
git (administrator)
2021-05-22 13:55

Branch CR32366_1 has been deleted by mnt.

SHA-1: 1c72b2441b9f8a3c9b1b6e8e4d3dbeb48dd98d17
(0101282)
git (administrator)
2021-05-22 13:55

Branch CR32366_2 has been deleted by mnt.

SHA-1: bc2d04fe97f16738c7652925e4494b999b106cef
(0101283)
git (administrator)
2021-05-22 13:55

Branch CR32366_3 has been deleted by mnt.

SHA-1: 101c47c59e138573c5d8909294e2216fa62f6051

- Related Changesets
occt: master 114e7a90
Timestamp: 2021-05-14 09:58:43
Author: mkrylova
Committer: bugmaster
Details ] Diff ]
0032366: Visualization, SelectMgr_ViewerSelector3d::ToPixMap() - add option dumping surface normals

- extended functionality to dump surface normals
- added new option to vseldump command
- added tests
mod - src/SelectMgr/SelectMgr_SelectionImageFiller.cxx Diff ] File ]
mod - src/StdSelect/StdSelect_TypeOfSelectionImage.hxx Diff ] File ]
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff ] File ]
mod - tests/vselect/grids.list Diff ] File ]
add - tests/vselect/sphere/begin Diff ] File ]
add - tests/vselect/sphere/generate_images Diff ] File ]
add - tests/vselect/sphere/rectangle_selection Diff ] File ]
add - tests/vselect/sphere/single_click_selection Diff ] File ]

- Issue History
Date Modified Username Field Change
2021-05-13 12:02 kgv New Issue
2021-05-13 12:02 kgv Assigned To => mkrylova
2021-05-13 12:03 kgv Relationship added child of 0031548
2021-05-13 12:03 kgv Status new => assigned
2021-05-13 14:49 kgv Description Updated View Revisions
2021-05-13 20:03 mkrylova Note Added: 0100954
2021-05-14 13:01 git Note Added: 0100989
2021-05-14 13:02 mkrylova Assigned To mkrylova => kgv
2021-05-14 13:02 mkrylova Status assigned => resolved
2021-05-14 13:02 mkrylova Steps to Reproduce Updated View Revisions
2021-05-14 13:50 kgv Note Added: 0100991
2021-05-14 13:50 kgv Assigned To kgv => mkrylova
2021-05-14 13:50 kgv Status resolved => assigned
2021-05-14 13:50 kgv Note Edited: 0100991 View Revisions
2021-05-14 14:08 kgv Note Added: 0100992
2021-05-14 14:09 kgv Note Deleted: 0100992
2021-05-17 12:43 git Note Added: 0101083
2021-05-17 12:49 git Note Added: 0101084
2021-05-17 12:51 mkrylova Assigned To mkrylova => kgv
2021-05-17 12:51 mkrylova Status assigned => resolved
2021-05-17 12:51 mkrylova Steps to Reproduce Updated View Revisions
2021-05-17 13:43 kgv Assigned To kgv => mkrylova
2021-05-17 13:43 kgv Status resolved => assigned
2021-05-17 14:30 git Note Added: 0101086
2021-05-17 14:42 mkrylova Assigned To mkrylova => kgv
2021-05-17 14:42 mkrylova Status assigned => resolved
2021-05-17 14:49 kgv Note Added: 0101089
2021-05-17 14:49 kgv Assigned To kgv => mkrylova
2021-05-17 14:49 kgv Status resolved => assigned
2021-05-17 16:03 git Note Added: 0101091
2021-05-17 16:05 git Note Added: 0101092
2021-05-17 16:06 mkrylova Assigned To mkrylova => kgv
2021-05-17 16:06 mkrylova Status assigned => resolved
2021-05-17 16:42 kgv Note Added: 0101101
2021-05-17 16:42 kgv Assigned To kgv => mkrylova
2021-05-17 16:42 kgv Status resolved => assigned
2021-05-17 17:39 git Note Added: 0101107
2021-05-17 17:40 git Note Added: 0101108
2021-05-17 17:40 mkrylova Assigned To mkrylova => kgv
2021-05-17 17:40 mkrylova Status assigned => resolved
2021-05-17 19:54 kgv Note Added: 0101112
2021-05-17 19:54 kgv Assigned To kgv => bugmaster
2021-05-17 19:54 kgv Status resolved => reviewed
2021-05-17 19:54 kgv Steps to Reproduce Updated View Revisions
2021-05-22 12:23 bugmaster Note Added: 0101249
2021-05-22 12:23 bugmaster Status reviewed => tested
2021-05-22 12:28 bugmaster Test case number => tests/vselect/sphere/generate_images,rectangle_selection,single_click_selection
2021-05-22 12:38 bugmaster Changeset attached => occt master 114e7a90
2021-05-22 12:38 bugmaster Status tested => verified
2021-05-22 12:38 bugmaster Resolution open => fixed
2021-05-22 13:55 git Note Added: 0101280
2021-05-22 13:55 git Note Added: 0101281
2021-05-22 13:55 git Note Added: 0101282
2021-05-22 13:55 git Note Added: 0101283


Copyright © 2000 - 2021 MantisBT Team
Powered by Mantis Bugtracker