mirror of
https://git.salome-platform.org/gitpub/modules/geom.git
synced 2024-12-26 09:20:35 +05:00
0023588: [CEA 2272] : GEOM test failed after transition to OCC 7.3
This commit is contained in:
parent
151029c42d
commit
81364d3f21
@ -2126,21 +2126,9 @@ Standard_Integer GEOMImpl_IMeasureOperations::ClosestPoints (Handle(GEOM_Object)
|
|||||||
|
|
||||||
// skl 30.06.2008
|
// skl 30.06.2008
|
||||||
// additional workaround for bugs 19899, 19908 and 19910 from Mantis
|
// additional workaround for bugs 19899, 19908 and 19910 from Mantis
|
||||||
gp_Pnt P1, P2;
|
gp_Pnt P1s, P2s;
|
||||||
double dist = GEOMUtils::GetMinDistanceSingular(aShape1, aShape2, P1, P2);
|
double dist = GEOMUtils::GetMinDistanceSingular(aShape1, aShape2, P1s, P2s);
|
||||||
if (dist > -1.0) {
|
bool singularBetter = dist > -1.0;
|
||||||
nbSolutions = 1;
|
|
||||||
|
|
||||||
theDoubles->Append(P1.X());
|
|
||||||
theDoubles->Append(P1.Y());
|
|
||||||
theDoubles->Append(P1.Z());
|
|
||||||
theDoubles->Append(P2.X());
|
|
||||||
theDoubles->Append(P2.Y());
|
|
||||||
theDoubles->Append(P2.Z());
|
|
||||||
|
|
||||||
SetErrorCode(OK);
|
|
||||||
return nbSolutions;
|
|
||||||
}
|
|
||||||
|
|
||||||
BRepExtrema_DistShapeShape dst (aShape1, aShape2);
|
BRepExtrema_DistShapeShape dst (aShape1, aShape2);
|
||||||
if (dst.IsDone()) {
|
if (dst.IsDone()) {
|
||||||
@ -2158,8 +2146,25 @@ Standard_Integer GEOMImpl_IMeasureOperations::ClosestPoints (Handle(GEOM_Object)
|
|||||||
theDoubles->Append(P2.X());
|
theDoubles->Append(P2.X());
|
||||||
theDoubles->Append(P2.Y());
|
theDoubles->Append(P2.Y());
|
||||||
theDoubles->Append(P2.Z());
|
theDoubles->Append(P2.Z());
|
||||||
|
|
||||||
|
Standard_Real Dist = P1.Distance(P2);
|
||||||
|
singularBetter = dist < Dist;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (singularBetter) {
|
||||||
|
if (theDoubles.IsNull()) theDoubles = new TColStd_HSequenceOfReal;
|
||||||
|
else theDoubles->Clear();
|
||||||
|
|
||||||
|
nbSolutions = 1;
|
||||||
|
|
||||||
|
theDoubles->Append(P1s.X());
|
||||||
|
theDoubles->Append(P1s.Y());
|
||||||
|
theDoubles->Append(P1s.Z());
|
||||||
|
theDoubles->Append(P2s.X());
|
||||||
|
theDoubles->Append(P2s.Y());
|
||||||
|
theDoubles->Append(P2s.Z());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
catch (Standard_Failure& aFail) {
|
catch (Standard_Failure& aFail) {
|
||||||
SetErrorCode(aFail.GetMessageString());
|
SetErrorCode(aFail.GetMessageString());
|
||||||
|
@ -994,12 +994,13 @@ Standard_Real GEOMUtils::GetMinDistance
|
|||||||
|
|
||||||
// skl 30.06.2008
|
// skl 30.06.2008
|
||||||
// additional workaround for bugs 19899, 19908 and 19910 from Mantis
|
// additional workaround for bugs 19899, 19908 and 19910 from Mantis
|
||||||
double dist = GEOMUtils::GetMinDistanceSingular
|
aResult = GEOMUtils::GetMinDistanceSingular(theShape1, theShape2, thePnt1, thePnt2);
|
||||||
(theShape1, theShape2, thePnt1, thePnt2);
|
|
||||||
|
|
||||||
|
/*
|
||||||
if (dist > -1.0) {
|
if (dist > -1.0) {
|
||||||
return dist;
|
return dist;
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
BRepExtrema_DistShapeShape dst (theShape1, theShape2);
|
BRepExtrema_DistShapeShape dst (theShape1, theShape2);
|
||||||
if (dst.IsDone()) {
|
if (dst.IsDone()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user