MantisBT - Open CASCADE
View Issue Details
0030695Open CASCADE[OCCT] OCCT:Visualizationpublic2019-05-06 16:272019-08-11 10:50
nds 
bugmaster 
normalfeature 
closedfixed 
 
[OCCT] 7.4.0[OCCT] 7.4.0 
bugs/vis/bug30695
0030695: Visualization - selection by box should use clipping planes set for viewer
In case when clipping planes are set on viewer, selection by rectangle returns hidden objects as selected.
pload ALL
vinit View1

box b 10 10 10
vdisplay b

box b1 -5 0 0 2 2 2
vdisplay b1

box b2 13 0 0 2 2 2
vdisplay b2

box b3 16 0 0 2 2 2
vdisplay b3

vsetdispmode 1

vtop
vfit
vzoom 0.5
vselect 40 100 370 300
vnbselected

vclipplane create pln
vclipplane set pln view Driver1/Viewer1/View1
vclipplane change pln equation -1 0 0 5

vselect 40 100 370 300
vnbselected

vselect 40 100 370 300 -allowoverlap 1
vnbselected
No tags attached.
Issue History
2019-05-06 16:27ndsNew Issue
2019-05-06 16:27ndsAssigned To => kgv
2019-05-06 16:28ndsAssigned Tokgv => nds
2019-06-13 14:12kgvRelationship addedrelated to 0030777
2019-08-02 15:39gitNote Added: 0085993
2019-08-06 06:54gitNote Added: 0086018
2019-08-06 07:07gitNote Added: 0086019
2019-08-06 11:12ndsNote Added: 0086025
2019-08-06 11:12ndsAssigned Tonds => kgv
2019-08-06 11:12ndsStatusnew => resolved
2019-08-06 11:21gitNote Added: 0086026
2019-08-06 13:32kgvNote Added: 0086030
2019-08-06 13:32kgvAssigned Tokgv => nds
2019-08-06 13:32kgvStatusresolved => assigned
2019-08-07 09:37gitNote Added: 0086044
2019-08-07 09:44gitNote Added: 0086045
2019-08-07 12:37ndsNote Added: 0086053
2019-08-07 12:37ndsAssigned Tonds => kgv
2019-08-07 12:37ndsStatusassigned => resolved
2019-08-07 12:45kgvAssigned Tokgv => bugmaster
2019-08-07 12:45kgvStatusresolved => reviewed
2019-08-07 19:50bugmasterTest case number => bugs/vis/bug30695
2019-08-07 19:55bugmasterNote Added: 0086077
2019-08-07 19:55bugmasterStatusreviewed => tested
2019-08-11 10:40bugmasterChangeset attached => occt master 8996b449
2019-08-11 10:40bugmasterStatustested => verified
2019-08-11 10:40bugmasterResolutionopen => fixed
2019-08-11 10:49gitNote Added: 0086139
2019-08-11 10:49gitNote Added: 0086140
2019-08-11 10:50gitNote Added: 0086144

Notes
(0085993)
git   
2019-08-02 15:39   
Branch CR30695 has been created by nds.

SHA-1: 1073be910f483c0ba73df6b25d3094287c1ee20b


Detailed log of new commits:

Author: nds
Date: Fri May 24 16:06:20 2019 +0300

    0030695: Visualization - selection by box should use clipping planes set for viewer - moving check on touching the clipping plane in selection only.
    
    (cherry picked from commit 2fb3ed87a516a4efb45ea8713e6df470d0342ac0)
    (cherry picked from commit 618238791bf6f511e36455e89a780c62c401da50)
    
    # Conflicts:
    # src/SelectMgr/SelectMgr_ViewerSelector.cxx
    (cherry picked from commit eb4bec05471fb5eab20d7244063514345c7da100)
    
    # Conflicts:
    # src/SelectMgr/SelectMgr_ViewerSelector.cxx
(0086018)
git   
2019-08-06 06:54   
Branch CR30695 has been updated by nds.

SHA-1: d80a882aa9f15eab2e2e53ce7533d7a7cefdc55a


Detailed log of new commits:

Author: nds
Date: Tue Aug 6 06:51:57 2019 +0300

    0030695: Visualization - selection by box should use clipping planes set for viewer - moving check on touching the clipping plane in selection only.
    
    # compilation correction, clear code for review

(0086019)
git   
2019-08-06 07:07   
Branch CR30695_1 has been created by nds.

SHA-1: 5a6ba7fe7e7d9971fad9f0fca16e91a530be97c4


Detailed log of new commits:

Author: nds
Date: Fri May 24 16:06:20 2019 +0300

    0030695: Visualization - selection by box should use clipping planes set for viewer - moving check on touching the clipping plane in selection only.
(0086025)
nds   
2019-08-06 11:12   
Dear Kirill,

please, review.
http://jenkins-test-12.nnov.opencascade.com/view/CR30695-master-NDS/ [^]

Best regards, Natalia
(0086026)
git   
2019-08-06 11:21   
Branch CR30695_1 has been updated by nds.

SHA-1: e3100ee6d7e5603b5a0deb7a269defdaafff68c8


Detailed log of new commits:

Author: nds
Date: Tue Aug 6 11:18:53 2019 +0300

    0030695: Visualization - selection by box should use clipping planes set for viewer - moving check on touching the clipping plane in selection only.
    
    #removes warnings

(0086030)
kgv   
2019-08-06 13:32   
+  // in case of Box/Polyline selection - keep only Owners having all Entities detected
+  if (!theMgr.ViewClipping().IsNull() &&
+      theMgr.GetActiveSelectionType() == SelectBasics_SelectingVolumeManager::Box)
+  {
+    Graphic3d_BndBox3d aBBox (aSensitivesTree->MinPoint (0), aSensitivesTree->MaxPoint (0));

+    // If box selection is active, and the whole sensitive tree is out of the clip planes
+    // selection is empty for this object
+    const Handle(Graphic3d_SequenceOfHClipPlane)& aViewPlanes = theMgr.ViewClipping();
...
+  }
+ 
   if (!theObject->ClipPlanes().IsNull()
     && theObject->ClipPlanes()->ToOverrideGlobal())

It doesn't make sense discarding object by View clipping planes BEFORE ToOverrideGlobal() flag is handled.
Please also remove the first comment - it is confusing there, because this block is intended for optimization to discard selection of entire object by clipping planes.
In addition, why only SelectBasics_SelectingVolumeManager::Box is handled, while comment considers also SelectBasics_SelectingVolumeManager::Polyline?


-          const Handle(Select3D_SensitiveEntity)& anEnt = aSensitive->BaseSensitive();
+            const Handle(SelectBasics_SensitiveEntity)& anEnt = aSensitive->BaseSensitive();


Unrelated.

+vselect 40 100 370 300
+vnbselected
+
+vselect 40 100 370 300 -allowoverlap 1
+vnbselected

Test case uses vnbselected without actually checking result.
(0086044)
git   
2019-08-07 09:37   
Branch CR30695_1 has been updated by nds.

SHA-1: 21d139c1d9476e21d18e9bb4079a1bb47b4a9195


Detailed log of new commits:

Author: nds
Date: Wed Aug 7 09:35:06 2019 +0300

    0030695: Visualization - selection by box should use clipping planes set for viewer - moving check on touching the clipping plane in selection only.
    
    #remarks correction

(0086045)
git   
2019-08-07 09:44   
Branch CR30695_2 has been created by nds.

SHA-1: d93771cc761e8e0f08aa7de4c2bd06a8f36db859


Detailed log of new commits:

Author: nds
Date: Wed Aug 7 09:42:33 2019 +0300

    0030695: Visualization - selection by box should use clipping planes set for viewer - moving check on touching the clipping plane in selection only.
(0086053)
nds   
2019-08-07 12:37   
Dear Kirill,

corrected, please review.
Job: http://jenkins-test-12.nnov.opencascade.com/view/CR30695-master-NDS/ [^]

Best regards, Natalia
(0086077)
bugmaster   
2019-08-07 19:55   
Combination -
OCCT branch : CR30695_2
master SHA - d93771cc761e8e0f08aa7de4c2bd06a8f36db859
5f5b1aed1c6e139bbd34314eca77ae7abcd8895c
Products branch : master SHA - 53815c0544dd1e39d32ee14979d7d88e78729edc
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: 16231.23000000001 / 16237.229999999976 [-0.04%]
Products
Total CPU difference: 10520.260000000031 / 10493.010000000033 [+0.26%]
Windows-64-VC14:
OCCT
Total CPU difference: 17662.71875 / 17592.765625 [+0.40%]
Products
Total CPU difference: 12076.0625 / 12065.453125 [+0.09%]


Image differences :
No differences that require special attention

Memory differences :
No differences that require special attention
(0086139)
git   
2019-08-11 10:49   
Branch CR30695_2 has been deleted by inv.

SHA-1: d93771cc761e8e0f08aa7de4c2bd06a8f36db859
(0086140)
git   
2019-08-11 10:49   
Branch CR30695_1 has been deleted by inv.

SHA-1: 21d139c1d9476e21d18e9bb4079a1bb47b4a9195
(0086144)
git   
2019-08-11 10:50   
Branch CR30695 has been deleted by inv.

SHA-1: d80a882aa9f15eab2e2e53ce7533d7a7cefdc55a