1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-14 13:30:48 +03:00

0027618: Visualization - selection returns entity overlapped by another entity on border cases

SelectMgr_ViewerSelector::updatePoint3d() - scale tolerance according to Camera defintion.
SelectMgr_RectangularFrustum::segmentSegmentDistance() now uses gp::Resolution() instead of Precision::Confusion().
This commit is contained in:
kgv
2018-03-25 20:41:41 +03:00
committed by bugmaster
parent 0e443e130c
commit fe76088cc7
6 changed files with 107 additions and 35 deletions

View File

@@ -39,7 +39,7 @@ void SelectMgr_RectangularFrustum::segmentSegmentDistance (const gp_Pnt& theSegP
Standard_Real aSn = aCoef;
Standard_Real aTc, aTn, aTd = aCoef;
if (aCoef < Precision::Confusion())
if (aCoef < gp::Resolution())
{
aTn = anE;
aTd = aC;
@@ -68,7 +68,7 @@ void SelectMgr_RectangularFrustum::segmentSegmentDistance (const gp_Pnt& theSegP
{
aTn = aTd;
}
aTc = (Abs (aTn) < Precision::Confusion() ? 0.0 : aTn / aTd);
aTc = (Abs (aTd) < gp::Resolution() ? 0.0 : aTn / aTd);
gp_Pnt aClosestPnt = myNearPickedPnt.XYZ() + myViewRayDir.XYZ() * aTc;
theDepth = myNearPickedPnt.Distance (aClosestPnt) * myScale;