Archived issue #0025627
SelectedShape() and HasSelectedShape() of AIS_InteractiveContext class do not work as expected.
Description
for (aContext->InitSelected(); aContext->MoreSelected(); aContext->NextSelected())
{
Handle_AIS_InteractiveObject& aAISObject = aContext->SelectedInteractive();
const TopoDS_Shape& aSelectedShape = aContext->SelectedShape();
Standard_Boolean aHasSelection = aContext->HasSelectedShape();
Standard_Boolean anIsSame = aSelectedShape.IsSame(Handle_AIS_Shape::DownCast(aAISObject)->Shape());
// The interactiveObject is a box shape,
// In Neutral Point mode:
// 1. anIsSame is Standard_False. Expected result is Standard_True.
// 2. aHasSelection is Standard_True.
// In local context mode:
// The sub-shape selection mode is solid:
// 1. anIsSame is Standard_True.
// 2. aHasSelection is Standard_False. Expected result is Standard_True.
}
{
Handle_AIS_InteractiveObject& aAISObject = aContext->SelectedInteractive();
const TopoDS_Shape& aSelectedShape = aContext->SelectedShape();
Standard_Boolean aHasSelection = aContext->HasSelectedShape();
Standard_Boolean anIsSame = aSelectedShape.IsSame(Handle_AIS_Shape::DownCast(aAISObject)->Shape());
// The interactiveObject is a box shape,
// In Neutral Point mode:
// 1. anIsSame is Standard_False. Expected result is Standard_True.
// 2. aHasSelection is Standard_True.
// In local context mode:
// The sub-shape selection mode is solid:
// 1. anIsSame is Standard_True.
// 2. aHasSelection is Standard_False. Expected result is Standard_True.
}
Steps to reproduce
bugs/vis/bug25627
Public activity
6 archived notes
Participants are labeled by their role within this record.
Dear kgv,
This issue is similar to 0025492, it has relation with the location of shape. It blocks the user normal workflow of OCCT interactive action. It works in OCCT6.7.1.
[signature removed]
Vico
This issue is similar to 0025492, it has relation with the location of shape. It blocks the user normal workflow of OCCT interactive action. It works in OCCT6.7.1.
[signature removed]
Vico
Branch [archived branch] has been created by Participant.
[revision removed]
Detailed log of new commits:
Author: vpa
Date: Fri Dec 19 15:24:09 2014 +0300
0025627: SelectedShape() and HasSelectedShape() of AIS_InteractiveContext class do not work as expected.
Location calculation in SelectedShape() was corrected;
Method HasSelectedShape() that does not take into account shape decomposition was added.
Test case for issue 25627
[revision removed]
Detailed log of new commits:
Author: vpa
Date: Fri Dec 19 15:24:09 2014 +0300
0025627: SelectedShape() and HasSelectedShape() of AIS_InteractiveContext class do not work as expected.
Location calculation in SelectedShape() was corrected;
Method HasSelectedShape() that does not take into account shape decomposition was added.
Test case for issue 25627
Dear Kirill,
corresponding changes are pushed into branch CR25627 and are ready to be reviewed.
corresponding changes are pushed into branch CR25627 and are ready to be reviewed.
Please test the patch.
Dear Commenter 1,
Branch CR25627 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)
products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
http://occt-tests.nnov.opencascade.com/CR25627-master-occt/Debian60-64/bugs/vis/bug25627.html
http://occt-tests.nnov.opencascade.com/CR25627-master-occt/Windows-32-VC10/bugs/vis/bug25627.html
bugs vis(004) bug25627: OK
Testing on Linux:
occt component :
Total MEMORY difference: 367170780 / 367924740
Total CPU difference: 49173.68999999988 / 51486.81000000016
products component :
Total MEMORY difference: 112069484 / 112532308
Total CPU difference: 15703.469999999998 / 16881.949999999983
Testing on Windows:
occt component :
Total MEMORY difference: 277570552 / 277277864
Total CPU difference: 37618.140625 / 37472.0935757
products component :
Total MEMORY difference: 72358644 / 71352468
Total CPU difference: 10925.8125 / 10337.547159399997
There are no differences in images found by testdiff.
Branch CR25627 from occt git-repository (and master from products git-repository) was compiled on Linux, MacOS and Windows platforms and tested on Release mode.
[revision removed]
Number of compiler warnings:
occt component :
Linux: 18 (18 on master)
Windows: 0 (0 on master)
products component :
Linux: 11 (11 on master)
Windows: 1 (1 on master)
Regressions/Differences:
No regressions/differences
Testing cases:
http://occt-tests.nnov.opencascade.com/CR25627-master-occt/Debian60-64/bugs/vis/bug25627.html
http://occt-tests.nnov.opencascade.com/CR25627-master-occt/Windows-32-VC10/bugs/vis/bug25627.html
bugs vis(004) bug25627: OK
Testing on Linux:
occt component :
Total MEMORY difference: 367170780 / 367924740
Total CPU difference: 49173.68999999988 / 51486.81000000016
products component :
Total MEMORY difference: 112069484 / 112532308
Total CPU difference: 15703.469999999998 / 16881.949999999983
Testing on Windows:
occt component :
Total MEMORY difference: 277570552 / 277277864
Total CPU difference: 37618.140625 / 37472.0935757
products component :
Total MEMORY difference: 72358644 / 71352468
Total CPU difference: 10925.8125 / 10337.547159399997
There are no differences in images found by testdiff.
Branch [archived branch] has been deleted by Participant.
[revision removed]
[revision removed]
Related records