0023588: [CEA 2272] : GEOM test failed after transition to OCC 7.3

- Attempt 2, to fix regression caused be commit 81364d3f
This commit is contained in:
vsr 2018-09-12 15:39:42 +03:00
parent 5d340bb0d6
commit e5d35ef4b2
2 changed files with 3 additions and 3 deletions

View File

@ -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;
}
}

View File

@ -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;