MantisBT
Mantis Bug Tracker Workflow

View Revisions: Issue #22844 All Revisions ] Back to Issue ]
Summary 0022844: Bug in Select2d_SensitiveSegment
Revision 2012-02-21 18:00 by san
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.
Revision 2012-02-21 17:54 by san
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.


Copyright © 2000 - 2019 MantisBT Team
Powered by Mantis Bugtracker