From: nbv Date: Thu, 15 Feb 2018 11:38:59 +0000 (+0300) Subject: 0029510: IntWalk_PWalking:: PutToBoundary(...) method results in appearing several... X-Git-Tag: V7_3_0_beta~80 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=5c655dd5667d1ad19666d0d9567cacbfcf80ce5f;p=occt-copy.git 0029510: IntWalk_PWalking:: PutToBoundary(...) method results in appearing several coincident points in Walking-line Places have been detected where coincident points are created. The problem has been fixed. --- diff --git a/src/IntWalk/IntWalk_PWalking.cxx b/src/IntWalk/IntWalk_PWalking.cxx index 987bf634a5..e5b36a4bd9 100644 --- a/src/IntWalk/IntWalk_PWalking.cxx +++ b/src/IntWalk/IntWalk_PWalking.cxx @@ -2427,7 +2427,16 @@ Standard_Boolean IntWalk_PWalking:: { aP1.SetXYZ(line->Value(aPInd).Value().XYZ()); if (aP1.SquareDistance(aPInt) > Precision::SquareConfusion()) + { break; + } + else if (aPInd == 1) + { + // After insertion, we will obtain + // two coincident points in the line. + // Therefore, insertion is forbidden. + return isOK; + } } for (++aPInd; aPInd <= aNbPnts; aPInd++) @@ -2468,7 +2477,16 @@ Standard_Boolean IntWalk_PWalking:: { aPCurr.SetXYZ(line->Value(aPInd).Value().XYZ()); if (aPCurr.SquareDistance(aPInt) > Precision::SquareConfusion()) + { break; + } + else if (aPInd == aNbPnts) + { + // After insertion, we will obtain + // two coincident points in the line. + // Therefore, insertion is forbidden. + return isOK; + } } for (--aPInd; aPInd > 0; aPInd--)