From cece953cb4e17181f5c83eff083c879275ea4809 Mon Sep 17 00:00:00 2001 From: kgv Date: Tue, 27 Apr 2021 12:31:23 +0300 Subject: [PATCH] 0032334: Visualization - SelectMgr_RectangularFrustum::Overlaps() does not set triangle normal in some cases Added missing SelectBasics_PickResult::SetSurfaceNormal(). --- src/SelectMgr/SelectMgr_RectangularFrustum.cxx | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx index 547b204f21..61a0743b85 100644 --- a/src/SelectMgr/SelectMgr_RectangularFrustum.cxx +++ b/src/SelectMgr/SelectMgr_RectangularFrustum.cxx @@ -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());