View Issue Details

IDProjectCategoryView StatusLast Update
0031701Open CASCADEOCCT:Visualizationpublic2020-12-02 17:13
Reporterkgv Assigned Tobugmaster  
PrioritynormalSeverityfeature 
Status closedResolutionfixed 
Target Version7.5.0Fixed in Version7.5.0 
Summary0031701: Visualization, SelectMgr_ViewerSelector - make depth tolerance configurable
DescriptionCurrently, SelectMgr_SortCriterion compare method takes Select3D_SensitiveEntity::SensitivityFactor() for considering two entities lying on the same depth. Entities on the same depth are sorted by priority and by distance to a geometry center.

Sensitivity defines the gap in screen pixels between mouse cursor and entity to make it pickable. Surface entities have small sensitivity (2 pixels by default), while vertex entities have larger (12 pixels) making vertex selection easier.

Applying the same sensitivity value as depth tolerance makes sense - it compensates geometry deflection and reduces depth fighting in selection when entities are very close. This works considerable well.

However, there are scenarios, when user wants extending sensitivity in screen space, while keeping depth as the main comparison factor. This is most noticeable for entities with a large sensitivity factor like points on a thin geometry - selection starts working as X-Rays for picking invisible points.
Steps To ReproduceN/A
TagsNo tags attached.
Test case numberNot required

Relationships

related to 0031793 closedbugmaster Draw Harness, vmanipulator - disable sorting picking result workaround 
related to 0031798 resolvedmzernova Visualization, SelectMgr_ViewerSelector - fix comparing depth of direct and indirect triangle hits 

Activities

git

2020-08-07 13:36

administrator   ~0093443

Branch CR31701_0 has been created by kgv.

SHA-1: 2a3993482bb0097e3eaf653faf9a9c366d1ff81b


Detailed log of new commits:

Author: kgv
Date: Fri Aug 7 13:38:28 2020 +0300

    0031701: Visualization, SelectMgr_ViewerSelector - make depth tolerance configurable
    
    SelectMgr_ViewerSelector::SetDepthTolerance() - added property defining depth tolerance type and value.
    Default value remains the same (SelectMgr_TypeOfDepthTolerance_SensitivityFactor),
    while new values (SelectMgr_TypeOfDepthTolerance_Uniform, SelectMgr_TypeOfDepthTolerance_UniformPixels) change behavior.
    
    AIS_Manipulator - removed obsolete suggestion to use AIS_InteractiveContext::SetPickClosest()
    for issue fixed long time ago by #0027797.
    
    vmanipulator command no more sets AIS_InteractiveContext::SetPickClosest(false)
    preserving default selection behavior.

git

2020-08-07 16:22

administrator   ~0093447

Branch CR31701_1 has been created by kgv.

SHA-1: c135a0c11231176bba29fd33bb7943d85fa28cb1


Detailed log of new commits:

Author: kgv
Date: Fri Aug 7 13:40:47 2020 +0300

    0031701: Visualization, SelectMgr_ViewerSelector - make depth tolerance configurable
    
    SelectMgr_ViewerSelector::SetDepthTolerance() - added property defining depth tolerance type and value.
    Default value remains the same (SelectMgr_TypeOfDepthTolerance_SensitivityFactor),
    while new values (SelectMgr_TypeOfDepthTolerance_Uniform, SelectMgr_TypeOfDepthTolerance_UniformPixels) change behavior.
    
    AIS_Manipulator - removed obsolete suggestion to use AIS_InteractiveContext::SetPickClosest()
    for issue fixed long time ago by #0027797.
    
    vmanipulator command no more sets AIS_InteractiveContext::SetPickClosest(false)
    preserving default selection behavior.

git

2020-08-10 09:49

administrator   ~0093458

Branch CR31701_1 has been updated by kgv.

SHA-1: 22c134e0eceeb5f764ebf857c1906ae9fce7ad74


Detailed log of new commits:

Author: kgv
Date: Mon Aug 10 09:51:31 2020 +0300

    SelectMgr_RectangularFrustum now stores also a distance from pcikgin Ray within SelectBasics_PickResult
    
    to better prioritize results and prefer entities closer to ray.

git

2020-08-21 10:21

administrator   ~0093573

Branch CR31701_1 has been updated forcibly by kgv.

SHA-1: b9a12f3c153ac2ebff5e8f03f0a7672a3cf0bd3e

kgv

2020-08-28 18:25

developer   ~0093714

To overcome scenarios, when direct picked result on a front face becomes farther by depth (distance from mouse cursor to 3D point on picked object) than indirect picking result on face behind:
- Compute depth of directly picked face not as distance to direct intersection but to the closest point within picking tolerance.
- Allow setting 0 pixel tolerance for faces.
  0 tolerance will mean picking volume of 1 pixel, while disallowing indirect picking of triangulation.

As alternative, it was tried to add to picking depth a distance from ray to indirect point, but observed results were not promising.

git

2020-09-24 11:16

administrator   ~0095260

Branch CR31701_2 has been created by kgv.

SHA-1: 12ae2d6f13197c36257d2e959c0394466b29638f


Detailed log of new commits:

Author: kgv
Date: Mon Aug 10 09:51:31 2020 +0300

    SelectMgr_RectangularFrustum now stores also a distance from pcikgin Ray within SelectBasics_PickResult
    
    to better prioritize results and prefer entities closer to ray.

Author: kgv
Date: Fri Aug 7 13:40:47 2020 +0300

    0031701: Visualization, SelectMgr_ViewerSelector - make depth tolerance configurable
    
    SelectMgr_ViewerSelector::SetDepthTolerance() - added property defining depth tolerance type and value.
    Default value remains the same (SelectMgr_TypeOfDepthTolerance_SensitivityFactor),
    while new values (SelectMgr_TypeOfDepthTolerance_Uniform, SelectMgr_TypeOfDepthTolerance_UniformPixels) change behavior.
    
    AIS_Manipulator - removed obsolete suggestion to use AIS_InteractiveContext::SetPickClosest()
    for issue fixed long time ago by #0027797.
    
    vmanipulator command no more sets AIS_InteractiveContext::SetPickClosest(false)
    preserving default selection behavior.

git

2020-09-24 11:26

administrator   ~0095261

Branch CR31701_3 has been created by kgv.

SHA-1: d88e46cb3fd70315b4b76b314e783003051f2e8b


No new revisions were added by this update.

git

2020-09-24 12:07

administrator   ~0095262

Branch CR31701_3 has been updated forcibly by kgv.

SHA-1: 5795ee713aff7dc9aae1ffece06ede95ba38ade9

git

2020-09-24 12:59

administrator   ~0095265

Branch CR31701_3 has been updated forcibly by kgv.

SHA-1: 050355786bf860dc5915e7b4ac974782043a42e9

git

2020-09-24 14:22

administrator   ~0095267

Branch CR31701_3 has been updated forcibly by kgv.

SHA-1: eb9f4fb01b816fb5c639e5e1e268dca209168b1c

kgv

2020-09-24 15:45

developer   ~0095270

Patch is ready for review
- OCCT branch: CR31701_3.

http://jenkins-test-12.nnov.opencascade.com:8080/view/CR31701_3-master-KGV/view/COMPARE/

The main purpose of current patch is refactoring sorting logic and exposing some hidden properties. The issues described in bug description will be registered as a separate bug.

osa

2020-09-25 11:15

developer   ~0095310

The patch was reviewed

bugmaster

2020-09-27 14:12

administrator   ~0095373

Combination -
OCCT branch : IR-2020-09-25
master SHA - d7bc5c833ec064bd103ebbff2882146ad5a7e7de
a206de37fbfa0bf71bd534ae47192bbec23b8522
Products branch : IR-2020-09-25 SHA - a8c0c30ba368a2503bbdf9800228ace93993dfff
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: 18039.260000000093 / 17637.5100000001 [+2.28%]
Products
Total CPU difference: 12124.200000000114 / 12092.06000000011 [+0.27%]
Windows-64-VC14:
OCCT
Total CPU difference: 19753.9375 / 18982.296875 [+4.07%]
Products
Total CPU difference: 13527.921875 / 13315.40625 [+1.60%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention

git

2020-09-27 14:29

administrator   ~0095382

Branch CR31701_3 has been deleted by inv.

SHA-1: eb9f4fb01b816fb5c639e5e1e268dca209168b1c

git

2020-09-27 14:29

administrator   ~0095383

Branch CR31701_2 has been deleted by inv.

SHA-1: 12ae2d6f13197c36257d2e959c0394466b29638f

git

2020-09-27 14:30

administrator   ~0095408

Branch CR31701_1 has been deleted by inv.

SHA-1: b9a12f3c153ac2ebff5e8f03f0a7672a3cf0bd3e

git

2020-09-27 14:30

administrator   ~0095409

Branch CR31701_0 has been deleted by inv.

SHA-1: 2a3993482bb0097e3eaf653faf9a9c366d1ff81b

Related Changesets

occt: master b7eab711

2020-08-07 10:40:47

kgv


Committer: bugmaster Details Diff
0031701: Visualization, SelectMgr_ViewerSelector - make depth tolerance configurable

SelectMgr_ViewerSelector::SetDepthTolerance() - added property defining depth tolerance type and value.
Default value remains the same (SelectMgr_TypeOfDepthTolerance_SensitivityFactor),
while new values (SelectMgr_TypeOfDepthTolerance_Uniform, SelectMgr_TypeOfDepthTolerance_UniformPixels) change behavior.

AIS_Manipulator - removed obsolete suggestion to use AIS_InteractiveContext::SetPickClosest()
for issue fixed long time ago by #0027797.
Affected Issues
0031701
mod - src/AIS/AIS_Manipulator.hxx Diff File
mod - src/SelectMgr/FILES Diff File
mod - src/SelectMgr/SelectMgr_SortCriterion.hxx Diff File
add - src/SelectMgr/SelectMgr_TypeOfDepthTolerance.hxx Diff File
mod - src/SelectMgr/SelectMgr_ViewerSelector.cxx Diff File
mod - src/SelectMgr/SelectMgr_ViewerSelector.hxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File

occt: master 8c36926a

2020-08-07 10:40:47

kgv


Committer: bugmaster Details Diff
0031701: Visualization, SelectMgr_ViewerSelector - make depth tolerance configurable

SelectMgr_ViewerSelector::SetDepthTolerance() - added property defining depth tolerance type and value.
Default value remains the same (SelectMgr_TypeOfDepthTolerance_SensitivityFactor),
while new values (SelectMgr_TypeOfDepthTolerance_Uniform, SelectMgr_TypeOfDepthTolerance_UniformPixels) change behavior.

AIS_Manipulator - removed obsolete suggestion to use AIS_InteractiveContext::SetPickClosest()
for issue fixed long time ago by #0027797.
Affected Issues
0031701
mod - src/AIS/AIS_Manipulator.hxx Diff File
mod - src/SelectMgr/FILES Diff File
mod - src/SelectMgr/SelectMgr_SortCriterion.hxx Diff File
add - src/SelectMgr/SelectMgr_TypeOfDepthTolerance.hxx Diff File
mod - src/SelectMgr/SelectMgr_ViewerSelector.cxx Diff File
mod - src/SelectMgr/SelectMgr_ViewerSelector.hxx Diff File
mod - src/ViewerTest/ViewerTest_ViewerCommands.cxx Diff File

Issue History

Date Modified Username Field Change
2020-08-07 13:31 kgv New Issue
2020-08-07 13:31 kgv Assigned To => kgv
2020-08-07 13:36 git Note Added: 0093443
2020-08-07 16:22 git Note Added: 0093447
2020-08-10 09:49 git Note Added: 0093458
2020-08-10 12:20 kgv File Added: occt_pick_surf_behind.png
2020-08-10 12:21 kgv File Added: occt_pick_vert_behind.png
2020-08-10 12:21 kgv Steps to Reproduce Updated
2020-08-21 10:21 git Note Added: 0093573
2020-08-28 18:25 kgv Note Added: 0093714
2020-09-21 17:46 kgv Target Version 7.5.0 => 7.6.0
2020-09-24 11:16 git Note Added: 0095260
2020-09-24 11:26 git Note Added: 0095261
2020-09-24 12:07 git Note Added: 0095262
2020-09-24 12:59 git Note Added: 0095265
2020-09-24 14:10 kgv Relationship added related to 0031793
2020-09-24 14:22 git Note Added: 0095267
2020-09-24 15:45 kgv Note Added: 0095270
2020-09-24 15:45 kgv Assigned To kgv => osa
2020-09-24 15:45 kgv Status new => resolved
2020-09-24 15:45 kgv Target Version 7.6.0 => 7.5.0
2020-09-25 11:15 osa Note Added: 0095310
2020-09-25 11:15 osa Assigned To osa => bugmaster
2020-09-25 11:15 osa Status resolved => reviewed
2020-09-27 12:16 bugmaster Test case number => Not required
2020-09-27 12:31 kgv Relationship added related to 0031798
2020-09-27 12:32 kgv File Deleted: occt_pick_surf_behind.png
2020-09-27 12:32 kgv File Deleted: occt_pick_vert_behind.png
2020-09-27 12:32 kgv Steps to Reproduce Updated
2020-09-27 14:12 bugmaster Note Added: 0095373
2020-09-27 14:12 bugmaster Status reviewed => tested
2020-09-27 14:13 bugmaster Changeset attached => occt master b7eab711
2020-09-27 14:13 bugmaster Status tested => verified
2020-09-27 14:13 bugmaster Resolution open => fixed
2020-09-27 14:29 git Note Added: 0095382
2020-09-27 14:29 git Note Added: 0095383
2020-09-27 14:30 git Note Added: 0095408
2020-09-27 14:30 git Note Added: 0095409
2020-10-03 14:05 bugmaster Changeset attached => occt master 8c36926a
2020-12-02 16:43 emo Fixed in Version => 7.5.0
2020-12-02 17:13 emo Status verified => closed