]> OCCT Git - occt.git/commitdiff
0031887: IntTools_Context::IsPointInFace always return TRUE IR-2020-10-30
authorXu Zhongxing <xuzhongxing@iscas.ac.cn>
Thu, 29 Oct 2020 11:33:27 +0000 (19:33 +0800)
committerbugmaster <bugmaster@opencascade.com>
Fri, 30 Oct 2020 15:25:19 +0000 (18:25 +0300)
If aDist >= aTol, bIn is never updated to false, and the function
always returns TRUE.

src/IntTools/IntTools_Context.cxx

index 08e33044f1c58f64f7884ed3d7b6137e2668a6b8..b6c45959b31a2a3abe6fe5834ab69a7a635bf029 100644 (file)
@@ -723,14 +723,14 @@ Standard_Boolean IntTools_Context::IsPointInFace
    const TopoDS_Face& aF,
    const Standard_Real aTol) 
 {
-  Standard_Boolean bIn;
+  Standard_Boolean bIn = Standard_False;
   Standard_Real aDist;
   //
   GeomAPI_ProjectPointOnSurf& aProjector=ProjPS(aF);
   aProjector.Perform(aP);
   //
-  bIn = aProjector.IsDone();
-  if (bIn) {
+  Standard_Boolean bDone = aProjector.IsDone();
+  if (bDone) {
     aDist = aProjector.LowerDistance();
     if (aDist < aTol) {
       Standard_Real U, V;