Archived issue #0022844
Bug in Select2d_SensitiveSegment
Description
Post from the Forum (Massimo Del Fedele) - http://www.opencascade.org/org/forum/thread_22337/.
"Here :
Standard_Boolean Select2D_SensitiveSegment::
Matches (const Standard_Real XMin,
const Standard_Real YMin,
const Standard_Real XMax,
const Standard_Real YMax,
const Standard_Real aTol)
{
Standard_Real TheTol = HasOwnTolerance()? myOwnTolerance : aTol;
Bnd_Box2d BoundBox;
BoundBox.Update(XMin-TheTol,YMin-TheTol,XMax+TheTol,YMax+TheTol);
if (BoundBox.IsOut(mystart)&&BoundBox.IsOut(myend)) return Standard_False;
return Standard_True;
}
the function returns true if ONE of both segment ends is inside given rectangle; it should return true
if BOTH ends are inside box, so the && should be replaced with ||.
Max"
================
It is confirmed by SAN that it is a bug.
This is clearly a typo so test case is not needed.
"Here :
Standard_Boolean Select2D_SensitiveSegment::
Matches (const Standard_Real XMin,
const Standard_Real YMin,
const Standard_Real XMax,
const Standard_Real YMax,
const Standard_Real aTol)
{
Standard_Real TheTol = HasOwnTolerance()? myOwnTolerance : aTol;
Bnd_Box2d BoundBox;
BoundBox.Update(XMin-TheTol,YMin-TheTol,XMax+TheTol,YMax+TheTol);
if (BoundBox.IsOut(mystart)&&BoundBox.IsOut(myend)) return Standard_False;
return Standard_True;
}
the function returns true if ONE of both segment ends is inside given rectangle; it should return true
if BOTH ends are inside box, so the && should be replaced with ||.
Max"
================
It is confirmed by SAN that it is a bug.
This is clearly a typo so test case is not needed.
Additional information
Mistyping in Standard_Boolean Select2D_SensitiveSegment::Matches(xmin, ymin, xmax, ymax) corrected, now this method returns Standard_True only when both ends are inside the selection rectangle.
Public activity
3 archived notes
Participants are labeled by their role within this record.
SVN branch OCC22844 is ready for testing.
Dear Commenter 1,
Workbench KAS:dev:mkv-22844-occt was created from SVN branch http://svn/svn/occt/branches/OCC22844
(and mkv-22844-products from trunk) and compiled on Linux platform.
There are not regressions in mkv-22844-products regarding to KAS:dev:products-20120217-opt
See results in /QADisk/occttests/results/KAS/dev/mkv-22844-products_21022012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120217-opt_17022012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification
Workbench KAS:dev:mkv-22844-occt was created from SVN branch http://svn/svn/occt/branches/OCC22844
(and mkv-22844-products from trunk) and compiled on Linux platform.
There are not regressions in mkv-22844-products regarding to KAS:dev:products-20120217-opt
See results in /QADisk/occttests/results/KAS/dev/mkv-22844-products_21022012/lin
See reference results in /QADisk/occttests/results/KAS/dev/products-20120217-opt_17022012/lin
See test cases in /QADisk/occttests/tests/ED
N.B. In order to launch testing case you can make use the following instructions
http://doc/doku.php?id=occt:certification
Integrated into trunk of occt repository
Date: 2012-02-22 16:49:54 +0400 (Wed, 22 Feb 2012)
New Revision: 10600
Modified:
trunk/src/Select2D/Select2D_SensitiveSegment.cxx
Date: 2012-02-22 16:49:54 +0400 (Wed, 22 Feb 2012)
New Revision: 10600
Modified:
trunk/src/Select2D/Select2D_SensitiveSegment.cxx