- Attempt 2, to fix regression caused be commit
81364d3f
// additional workaround for bugs 19899, 19908 and 19910 from Mantis
gp_Pnt P1s, P2s;
double dist = GEOMUtils::GetMinDistanceSingular(aShape1, aShape2, P1s, P2s);
// 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()) {
BRepExtrema_DistShapeShape dst (aShape1, aShape2);
if (dst.IsDone()) {
theDoubles->Append(P2.Z());
Standard_Real Dist = P1.Distance(P2);
theDoubles->Append(P2.Z());
Standard_Real Dist = P1.Distance(P2);
- singularBetter = dist < Dist;
+ singularBetter = singularBetter && dist < Dist;
P2 = dst.PointOnShape2(i);
Standard_Real Dist = P1.Distance(P2);
P2 = dst.PointOnShape2(i);
Standard_Real Dist = P1.Distance(P2);
+ if (aResult < 0 || aResult > Dist) {
aResult = Dist;
thePnt1 = P1;
thePnt2 = P2;
aResult = Dist;
thePnt1 = P1;
thePnt2 = P2;