1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-04 18:06:22 +03:00

0023051: Bug in BRepExtrema_DistShapeShape (through BRepExtrema_DistanceSS)

Fixed problem of returning swapped solution points for extrema between face and vertex.
This commit is contained in:
abv 2012-04-02 12:55:25 +04:00
parent ed60a55e7f
commit 46def2b567

View File

@ -842,7 +842,7 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Face& S1, const TopoDS_Vertex&
if ((Dstmin < myDstRef - myEps) || (fabs(Dstmin-myDstRef) < myEps))
{
Standard_Real U,V;
gp_Pnt Pt,P1=BRep_Tool::Pnt(S2);
gp_Pnt Pt,P2=BRep_Tool::Pnt(S2);
BRepClass_FaceClassifier classifier;
const Standard_Real tol = BRep_Tool::Tolerance(S1);
@ -862,8 +862,8 @@ void BRepExtrema_DistanceSS::Perform(const TopoDS_Face& S1, const TopoDS_Vertex&
if (myDstRef > Dstmin)
myDstRef=Dstmin;
myModif=Standard_True;
const BRepExtrema_SolutionElem Sol1(Dstmin,P1,BRepExtrema_IsInFace,S1,U,V);
const BRepExtrema_SolutionElem Sol2(Dstmin,Pt,BRepExtrema_IsVertex,S2);
const BRepExtrema_SolutionElem Sol1(Dstmin,Pt,BRepExtrema_IsInFace,S1,U,V);
const BRepExtrema_SolutionElem Sol2(Dstmin,P2,BRepExtrema_IsVertex,S2);
SeqSolShape1.Append(Sol1);
SeqSolShape2.Append(Sol2);
}