0032334: Visualization - SelectMgr_RectangularFrustum::Overlaps() does not set triang...
authorkgv <kgv@opencascade.com>
Tue, 27 Apr 2021 09:31:23 +0000 (12:31 +0300)
committerbugmaster <bugmaster@opencascade.com>
Wed, 28 Apr 2021 15:27:56 +0000 (18:27 +0300)
Added missing SelectBasics_PickResult::SetSurfaceNormal().

src/SelectMgr/SelectMgr_RectangularFrustum.cxx

index 547b204..61a0743 100644 (file)
@@ -678,6 +678,7 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1,
         segmentSegmentDistance (aStartPnt, anEndPnt, aPickResult);
         thePickResult = SelectBasics_PickResult::Min (thePickResult, aPickResult);
       }
+      thePickResult.SetSurfaceNormal (aTriangleNormal);
       return !theClipRange.IsClipped (thePickResult.Depth());
     }
 
@@ -720,6 +721,7 @@ Standard_Boolean SelectMgr_RectangularFrustum::Overlaps (const gp_Pnt& thePnt1,
       aNearestEdgeIdx2 = aNearestEdgeIdx1 == 0 ? 2 : aNearestEdgeIdx1 - 1;
     }
     segmentSegmentDistance (aPnts[aNearestEdgeIdx1], aPnts[aNearestEdgeIdx2], thePickResult);
+    thePickResult.SetSurfaceNormal (aTriangleNormal);
   }
 
   return !theClipRange.IsClipped (thePickResult.Depth());