Archived issue #0027477
Visualization - Select3D_SensitiveCircle always return infinite depth value in boundary mode
Description
Standard_Boolean Select3D_SensitiveCircle::Matches (SelectBasics_SelectingVolumeManager& theMgr,
SelectBasics_PickResult& thePickResult)
{
Standard_Real aDepth = RealLast();
Standard_Real aDistToCOG = RealLast();
if (mySensType == Select3D_TOS_BOUNDARY)
{
if (!Select3D_SensitivePoly::Matches (theMgr, thePickResult))
{
thePickResult = SelectBasics_PickResult (aDepth, aDistToCOG);
return Standard_False;
}
}
...
aDistToCOG = theMgr.DistToGeometryCenter (myCenter3D);
thePickResult = SelectBasics_PickResult (aDepth, aDistToCOG);
return Standard_True;
}
The above code will reveal the bug, aDepth value is not assigned if it hit the boundary.
SelectBasics_PickResult& thePickResult)
{
Standard_Real aDepth = RealLast();
Standard_Real aDistToCOG = RealLast();
if (mySensType == Select3D_TOS_BOUNDARY)
{
if (!Select3D_SensitivePoly::Matches (theMgr, thePickResult))
{
thePickResult = SelectBasics_PickResult (aDepth, aDistToCOG);
return Standard_False;
}
}
...
aDistToCOG = theMgr.DistToGeometryCenter (myCenter3D);
thePickResult = SelectBasics_PickResult (aDepth, aDistToCOG);
return Standard_True;
}
The above code will reveal the bug, aDepth value is not assigned if it hit the boundary.
Steps to reproduce
bugs vis bug27477
Public activity
5 archived notes
Participants are labeled by their role within this record.
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: vpa
Date: Mon May 23 19:08:24 2016 +0300
0027477: Visualization - Select3D_SensitiveCircle always return infinite depth value in boundary mode
- unnecessary re-initialization of pick result was removed from Select3D_SensitiveCircle;
- test case for issue #0027477
[revision removed]
Detailed log of new commits:
Author: vpa
Date: Mon May 23 19:08:24 2016 +0300
0027477: Visualization - Select3D_SensitiveCircle always return infinite depth value in boundary mode
- unnecessary re-initialization of pick result was removed from Select3D_SensitiveCircle;
- test case for issue #0027477
Dear Kirill,
the patch in branch CR27477 is ready to be reviewed.
the patch in branch CR27477 is ready to be reviewed.
Please test the patch.
Dear Commenter 1,
Branch CR27477 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS: 0 (0 on master)
products component:
Linux: 72
Windows: 4
MacOS: 1122
Regressions/Differences:
Not detected
Testing cases:
bugs vis bug27477 - OK
http://occt-tests/CR27477-master-OCCT/Debian70-64/bugs/vis/bug27477.html
http://occt-tests/CR27477-master-OCCT/Windows-64-VC10/bugs/vis/bug27477.html
Testing on Linux:
Total MEMORY difference: 89077345 / 89055164 [+0.02%]
Total CPU difference: 19344.310000000143 / 19272.24999999995 [+0.37%]
Testing on Windows:
Total MEMORY difference: 55773886 / 55813985 [-0.07%]
Total CPU difference: 18195.114234598797 / 18216.876374098912 [-0.12%]
Branch CR27477 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested.
[revision removed]
Number of compiler warnings:
occt component:
Linux: 0 (0 on master)
Windows: 0 (0 on master)
MacOS: 0 (0 on master)
products component:
Linux: 72
Windows: 4
MacOS: 1122
Regressions/Differences:
Not detected
Testing cases:
bugs vis bug27477 - OK
http://occt-tests/CR27477-master-OCCT/Debian70-64/bugs/vis/bug27477.html
http://occt-tests/CR27477-master-OCCT/Windows-64-VC10/bugs/vis/bug27477.html
Testing on Linux:
Total MEMORY difference: 89077345 / 89055164 [+0.02%]
Total CPU difference: 19344.310000000143 / 19272.24999999995 [+0.37%]
Testing on Windows:
Total MEMORY difference: 55773886 / 55813985 [-0.07%]
Total CPU difference: 18195.114234598797 / 18216.876374098912 [-0.12%]
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]