From fde952499df4bf4deb01c4da63f15e95dd04570c Mon Sep 17 00:00:00 2001 From: SaraP Date: Wed, 31 Jul 2024 14:22:22 +0200 Subject: [PATCH] EgtGeomKernel : - correzione in AssociatePolyLinesMinDistPoints. --- PolyLine.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/PolyLine.cpp b/PolyLine.cpp index 4678ce9..9557017 100644 --- a/PolyLine.cpp +++ b/PolyLine.cpp @@ -1608,7 +1608,7 @@ AssociatePolyLinesMinDistPoints( const PolyLine& PL1, const PolyLine& PL2, PNTIV // distanza del punto dal segmento della polilinea DistPointLine PointLineDistCalc( vPnt1[i].first, vPnt2[j-1].first, vPnt2[j].first) ; double dPlDist ; - if ( PointLineDistCalc.GetDist( dPlDist) && dPlDist < dDist) { + if ( PointLineDistCalc.GetDist( dPlDist) && dPlDist < dDist - EPS_SMALL) { dDist = dPlDist ; PointLineDistCalc.GetParamAtMinDistPoint( dMinDistPar) ; dMinDistPar += j - 1 ; @@ -1639,8 +1639,7 @@ AssociatePolyLinesMinDistPoints( const PolyLine& PL1, const PolyLine& PL2, PNTIV // distanza del punto dal segmento della polilinea DistPointLine PointLineDistCalc( vPnt2[j].first, vPnt1[i-1].first, vPnt1[i].first) ; double dPlDist ; - PointLineDistCalc.GetDist( dPlDist) ; - if ( dPlDist < dDist) { + if ( PointLineDistCalc.GetDist( dPlDist) && dPlDist < dDist - EPS_SMALL) { dDist = dPlDist ; PointLineDistCalc.GetParamAtMinDistPoint( dMinDistPar) ; dMinDistPar += i - 1 ;