From: vsr Date: Wed, 12 Sep 2018 12:39:42 +0000 (+0300) Subject: 0023588: [CEA 2272] : GEOM test failed after transition to OCC 7.3 X-Git-Tag: V9_1_0^0 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=e5d35ef4b2616bfd846c320f801fe06c620000b7;p=modules%2Fgeom.git 0023588: [CEA 2272] : GEOM test failed after transition to OCC 7.3 - Attempt 2, to fix regression caused be commit 81364d3f --- diff --git a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx index 809975e3b..a06332644 100644 --- a/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx +++ b/src/GEOMImpl/GEOMImpl_IMeasureOperations.cxx @@ -2128,7 +2128,7 @@ Standard_Integer GEOMImpl_IMeasureOperations::ClosestPoints (Handle(GEOM_Object) // additional workaround for bugs 19899, 19908 and 19910 from Mantis gp_Pnt P1s, P2s; double dist = GEOMUtils::GetMinDistanceSingular(aShape1, aShape2, P1s, P2s); - bool singularBetter = dist > -1.0; + bool singularBetter = dist >= 0; BRepExtrema_DistShapeShape dst (aShape1, aShape2); if (dst.IsDone()) { @@ -2148,7 +2148,7 @@ Standard_Integer GEOMImpl_IMeasureOperations::ClosestPoints (Handle(GEOM_Object) theDoubles->Append(P2.Z()); Standard_Real Dist = P1.Distance(P2); - singularBetter = dist < Dist; + singularBetter = singularBetter && dist < Dist; } } diff --git a/src/GEOMUtils/GEOMUtils.cxx b/src/GEOMUtils/GEOMUtils.cxx index 32e6214ee..a8dd75b7f 100644 --- a/src/GEOMUtils/GEOMUtils.cxx +++ b/src/GEOMUtils/GEOMUtils.cxx @@ -1011,7 +1011,7 @@ Standard_Real GEOMUtils::GetMinDistance P2 = dst.PointOnShape2(i); Standard_Real Dist = P1.Distance(P2); - if (aResult > Dist) { + if (aResult < 0 || aResult > Dist) { aResult = Dist; thePnt1 = P1; thePnt2 = P2;