1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-09-03 14:10:33 +03:00

0027434: Wrong result of classification of the point in "infinity"

In the case of infinite point due to not enough machine precision the distance from the point to each edge of the face is computed the same, and the algorithm cannot correctly select the nearest edge. To solve this problem checking of point was added, if the point is located too far from the bounding box of the face, then it will be replaced with another point located on the line between the point and the center of the bounding box.
    The new point has the same state as initial one but its state can be resolved without ambiguity.

Corrections in CheckPoint method
Small correction of test case for issue CR27434
This commit is contained in:
aka
2016-12-08 16:33:47 +03:00
committed by apn
parent 8013367c92
commit a148c938b0
6 changed files with 103 additions and 6 deletions

View File

@@ -73,6 +73,16 @@ Geom2dHatch_Element& Geom2dHatch_Elements::ChangeFind(const Standard_Integer K)
return(myMap.ChangeFind(K));
}
//=======================================================================
//function : CheckPoint
//purpose :
//=======================================================================
Standard_Boolean Geom2dHatch_Elements::CheckPoint(gp_Pnt2d&)
{
return Standard_True;
}
//=======================================================================
//function : Reject
//purpose :

View File

@@ -70,7 +70,8 @@ Geom2dHatch_Element& operator() (const Standard_Integer K)
{
return ChangeFind(K);
}
Standard_EXPORT Standard_Boolean CheckPoint (gp_Pnt2d& P);
Standard_EXPORT Standard_Boolean Reject (const gp_Pnt2d& P) const;
Standard_EXPORT Standard_Boolean Segment (const gp_Pnt2d& P, gp_Lin2d& L, Standard_Real& Par);